- ACRFJS ;IHS/OIRM/DSD/THL,AEF - PRINT JUSTIFICATION AND SPECIAL REMARKS; [ 11/01/2001 9:44 AM ]
- ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
- ;;ROUTINE TO PRINT JUSTIFICATION AND SPECIAL REMARKS
- DISPLAY ;EP;TO DISPLAY NARRATIVE AND JUSTIFICATION
- Q:$D(ACROUT)
- I $D(^ACROBL(ACRDOCDA,"NOTES")) S ACRX=^("NOTES") D:ACRX]""
- .N ACRI
- .W !,"BRIEF NARRATIVE:--------------------------------------------------------------"
- .D W
- I $D(^ACROBL(ACRDOCDA,"NOTES2")) S ACRX=^("NOTES2") D W:ACRX]""
- I $D(^ACROBL(ACRDOCDA,"JST")) S ACRX=^("JST") D
- .W !,"JUSTIFICATION:------------------------------------------------------------------"
- .D W
- .I $D(^ACROBL(ACRDOCDA,"JST2")) S ACRX=^("JST2") D W:ACRX]""
- D VEND
- EXIT D PAUSE^ACRFWARN
- K ACRX
- Q
- W F ACRI=1:1:5 W:$P(ACRX,U,ACRI)]"" !?4,$P(ACRX,U,ACRI)
- Q
- VENDOR ;EP;TO DISPLAY REQUESTED VENDOR DATA
- Q:$D(ACROUT)
- N ACRFVNDA
- S ACRFVNDA=$P(ACRDOCPO,U,5)
- I ACRFVNDA,$D(^AUTTVNDR(ACRFVNDA,0)) D
- .S ACRVN0=^AUTTVNDR(ACRFVNDA,0)
- .S ACRVN11=$G(^AUTTVNDR(ACRFVNDA,11))
- .S ACRVN13=$G(^AUTTVNDR(ACRFVNDA,13))
- .W !!,"Requested Vendor: ",$P(ACRVN0,U)
- .W !?18,$P(ACRVN13,U)
- .W !?18,$P(ACRVN13,U,2),", ",$P(^DIC(5,$P(ACRVN13,U,3),0),U,2)," ",$P(ACRVN13,U,4)
- .W !,"Attention.......: ",$P(ACRVN13,U,5)
- .W !,"Phone...........: ",$P(ACRVN11,U,9)
- .W !
- .K ACRVN0,ACRVN11,ACRVN13
- Q
- NSVEND ;EP;TO PRINT NON-STANDARD VENDOR DATA
- Q:$D(ACROUT)
- S ACRVND1=$S($D(^ACRDOC(ACRDOCDA,3)):$P(^(3),U,1,8),1:"NO VENDOR SPECIFIED")
- W !?10,"(THIS VENDOR DATA NOT FROM STANDARD VENDOR FILE)"
- F ACRK=1:1:4 W:$P(ACRVND1,U,ACRK)]"" !?10,$P(ACRVND1,U,ACRK)
- W:$P(ACRVND1,U,5)]"" ", ",$P(^DIC(5,$P(ACRVND1,U,5),0),U,2)," ",$P(ACRVND1,U,6)
- W !?10,"EIN.:",$P($G(^ACRDOC(ACRDOCDA,14)),U,10)
- W:$P(ACRVND1,U,7)]"" !?10,"ATTN: ",$P(ACRVND1,U,7)
- W:$P(ACRVND1,U,8)]"" !?10,"PHONE: ",$P(ACRVND1,U,8)
- W !
- D:ACRVND1]"" PAUSE^ACRFWARN
- Q
- VEND ;EP
- W !,"REQUESTED VENDOR:---------------------------------------------------------------"
- I $D(ACRDOCVN),ACRDOCVN D I 1
- .N D0,DXS,DIP,DC,DN
- .S D0=ACRDOCVN
- .D ^ACRPRVN
- E I $P(ACRDOCPO,U,5)="",$D(^ACRDOC(ACRDOCDA,3)),$P(^(3),U)]"" D NSVEND I 1
- E W !!,"NO VENDOR HAS BEEN SPECIFIED FOR THIS REQUEST."
- Q
- ACRFJS ;IHS/OIRM/DSD/THL,AEF - PRINT JUSTIFICATION AND SPECIAL REMARKS; [ 11/01/2001 9:44 AM ]
- +1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
- +2 ;;ROUTINE TO PRINT JUSTIFICATION AND SPECIAL REMARKS
- DISPLAY ;EP;TO DISPLAY NARRATIVE AND JUSTIFICATION
- +1 IF $DATA(ACROUT)
- QUIT
- +2 IF $DATA(^ACROBL(ACRDOCDA,"NOTES"))
- SET ACRX=^("NOTES")
- IF ACRX]""
- Begin DoDot:1
- +3 NEW ACRI
- +4 WRITE !,"BRIEF NARRATIVE:--------------------------------------------------------------"
- +5 DO W
- End DoDot:1
- +6 IF $DATA(^ACROBL(ACRDOCDA,"NOTES2"))
- SET ACRX=^("NOTES2")
- IF ACRX]""
- DO W
- +7 IF $DATA(^ACROBL(ACRDOCDA,"JST"))
- SET ACRX=^("JST")
- Begin DoDot:1
- +8 WRITE !,"JUSTIFICATION:------------------------------------------------------------------"
- +9 DO W
- +10 IF $DATA(^ACROBL(ACRDOCDA,"JST2"))
- SET ACRX=^("JST2")
- IF ACRX]""
- DO W
- End DoDot:1
- +11 DO VEND
- EXIT DO PAUSE^ACRFWARN
- +1 KILL ACRX
- +2 QUIT
- W FOR ACRI=1:1:5
- IF $PIECE(ACRX,U,ACRI)]""
- WRITE !?4,$PIECE(ACRX,U,ACRI)
- +1 QUIT
- VENDOR ;EP;TO DISPLAY REQUESTED VENDOR DATA
- +1 IF $DATA(ACROUT)
- QUIT
- +2 NEW ACRFVNDA
- +3 SET ACRFVNDA=$PIECE(ACRDOCPO,U,5)
- +4 IF ACRFVNDA
- IF $DATA(^AUTTVNDR(ACRFVNDA,0))
- Begin DoDot:1
- +5 SET ACRVN0=^AUTTVNDR(ACRFVNDA,0)
- +6 SET ACRVN11=$GET(^AUTTVNDR(ACRFVNDA,11))
- +7 SET ACRVN13=$GET(^AUTTVNDR(ACRFVNDA,13))
- +8 WRITE !!,"Requested Vendor: ",$PIECE(ACRVN0,U)
- +9 WRITE !?18,$PIECE(ACRVN13,U)
- +10 WRITE !?18,$PIECE(ACRVN13,U,2),", ",$PIECE(^DIC(5,$PIECE(ACRVN13,U,3),0),U,2)," ",$PIECE(ACRVN13,U,4)
- +11 WRITE !,"Attention.......: ",$PIECE(ACRVN13,U,5)
- +12 WRITE !,"Phone...........: ",$PIECE(ACRVN11,U,9)
- +13 WRITE !
- +14 KILL ACRVN0,ACRVN11,ACRVN13
- End DoDot:1
- +15 QUIT
- NSVEND ;EP;TO PRINT NON-STANDARD VENDOR DATA
- +1 IF $DATA(ACROUT)
- QUIT
- +2 SET ACRVND1=$SELECT($DATA(^ACRDOC(ACRDOCDA,3)):$PIECE(^(3),U,1,8),1:"NO VENDOR SPECIFIED")
- +3 WRITE !?10,"(THIS VENDOR DATA NOT FROM STANDARD VENDOR FILE)"
- +4 FOR ACRK=1:1:4
- IF $PIECE(ACRVND1,U,ACRK)]""
- WRITE !?10,$PIECE(ACRVND1,U,ACRK)
- +5 IF $PIECE(ACRVND1,U,5)]""
- WRITE ", ",$PIECE(^DIC(5,$PIECE(ACRVND1,U,5),0),U,2)," ",$PIECE(ACRVND1,U,6)
- +6 WRITE !?10,"EIN.:",$PIECE($GET(^ACRDOC(ACRDOCDA,14)),U,10)
- +7 IF $PIECE(ACRVND1,U,7)]""
- WRITE !?10,"ATTN: ",$PIECE(ACRVND1,U,7)
- +8 IF $PIECE(ACRVND1,U,8)]""
- WRITE !?10,"PHONE: ",$PIECE(ACRVND1,U,8)
- +9 WRITE !
- +10 IF ACRVND1]""
- DO PAUSE^ACRFWARN
- +11 QUIT
- VEND ;EP
- +1 WRITE !,"REQUESTED VENDOR:---------------------------------------------------------------"
- +2 IF $DATA(ACRDOCVN)
- IF ACRDOCVN
- Begin DoDot:1
- +3 NEW D0,DXS,DIP,DC,DN
- +4 SET D0=ACRDOCVN
- +5 DO ^ACRPRVN
- End DoDot:1
- IF 1
- +6 IF '$TEST
- IF $PIECE(ACRDOCPO,U,5)=""
- IF $DATA(^ACRDOC(ACRDOCDA,3))
- IF $PIECE(^(3),U)]""
- DO NSVEND
- IF 1
- +7 IF '$TEST
- WRITE !!,"NO VENDOR HAS BEEN SPECIFIED FOR THIS REQUEST."
- +8 QUIT