ACRPTV ; GENERATED FROM 'ACR TRAVEL VOUCHER' PRINT TEMPLATE (#3865) ; 09/30/09 ; (FILE 9002196, MARGIN=80)
G BEGIN
N W !
T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
Q
DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
W Y Q
M D @DIXX
Q
BEGIN ;
S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
I $D(DXS)<9 M DXS=^DIPT(3865,"DXS")
S I(0)="^ACRDOC(",J(0)=9002196
I $E($G(IOST),1,2)="C-" W "ARMS REF: ",$P(^ACRDOC(D0,0),U,6),"/",D0 K DIP K:DN Y
S ACRDOCDA=D0 K DIP K:DN Y
D N:$X>9 Q:'DN W ?9 W "DHHS/INDIAN HEALTH SERVICE - TRAVEL VOUCHER"
D N:$X>9 Q:'DN W ?9 W "TRAVEL ORDER #: "
S X=$G(^ACRDOC(D0,0)) W ?27,$E($P(X,U,1),1,17)
D N:$X>44 Q:'DN W ?44 W "VOUCHER NO.:"
W ?58,$E($P(X,U,2),1,15)
D N:$X>9 Q:'DN W ?9 W "DHHS #: "
W $$EXPDN^ACRFUTL(D0) K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
D N:$X>0 Q:'DN W ?0 W "TRAVELER........:"
S X=$G(^ACRDOC(D0,"TO")) D N:$X>19 Q:'DN W ?19 S Y=$P(X,U,9) S Y(0)=Y S Y=$$NAME2^ACRFUTL1(Y) W $E(Y,1,30)
D N:$X>51 Q:'DN W ?51 W "DEPART:"
S X=$G(^ACRDOC(D0,"TO")) W ?60 S Y=$P(X,U,14) D DT
D N:$X>0 Q:'DN W ?0 W "SOC SECURITY NO.: "
W $$PSSN^ACRFUTL($P($G(^ACRDOC(D0,"TO")),U,9),$G(DUZ),$G(IOST),$G(ACRSSNOK)) K DIP K:DN Y
D N:$X>51 Q:'DN W ?51 W "RETURN:"
S X=$G(^ACRDOC(D0,"TO")) W ?60 S Y=$P(X,U,15) D DT
D N:$X>0 Q:'DN W ?0 W "MAILING ADDRESS.:"
D N:$X>19 Q:'DN W ?19 X DXS(1,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>51 Q:'DN W ?51 W "PHONE.:"
W:$E(IOST,1,2)="C-" " ***-***-****" K DIP K:DN Y
X DXS(2,9) K DIP K:DN Y
D N:$X>19 Q:'DN W ?19 X DXS(3,9.2) S X=$P(DIP(101),U,2) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>19 Q:'DN W ?19 X DXS(4,9.2) S X=$P(DIP(101),U,4) S D0=I(0,0) K DIP K:DN Y W X
W ", "
X DXS(5,9.2) S X=$P($G(^DIC(5,+$P(DIP(101),U,5),0)),U) S D0=I(0,0) K DIP K:DN Y W X
W " "
X DXS(6,9.2) S X=$P(DIP(101),U,6) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>0 Q:'DN W ?0 W "PRESENT STATION.:"
S X=$G(^ACRDOC(D0,"TO")) D N:$X>19 Q:'DN W ?19 S Y=$P(X,U,13) S Y=$S(Y="":Y,$D(^AUTTLOC(Y,0))#2:$P(^(0),U),1:Y) S Y=$S(Y="":Y,$D(^DIC(4,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>0 Q:'DN W ?0 W "---------- TRAVEL ADVANCE -----------"
D N:$X>39 Q:'DN W ?39 W "--------- CASH PAYMENT RECEIPT --------"
D N:$X>0 Q:'DN W ?0 W "OUTSTANDING..........:"
W ?24 S Y=$P(X,U,25) W:Y]"" $J(Y,8,2)
D N:$X>39 Q:'DN W ?39 W "| DATE RECEIVED:"
D N:$X>59 Q:'DN W ?59 W "| AMOUNT RECEIVED:"
D N:$X>0 Q:'DN W ?0 W "AMOUNT TO BE APPLIED.:"
W ?24 S Y=$P(X,U,25) W:Y]"" $J(Y,8,2)
D N:$X>39 Q:'DN W ?39 W "|___________________|___________________"
D N:$X>0 Q:'DN W ?0 W "AMOUNT DUE GOVERNMENT:"
D EN11^ACRFCLM K DIP K:DN Y
I $G(ACRADV)>$G(ACRX) W $J($FN(ACRADV-ACRX,"P",2),11) K DIP K:DN Y
D N:$X>39 Q:'DN W ?39 W "| PAYEE'S SIGNATURE:"
D PAUSE^ACRFWARN K DIP K:DN Y
S ACRY="PURPOSE OF TRAVEL" D JUST^ACRFSSD1 K DIP K:DN Y
K DXS S D0=ACRDOCDA D ^ACRPTVI K DIP K:DN Y
D ^ACRFCLM K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "NOTE: Falsification of an item in an expense account works a forfeiture of claim"
D N:$X>0 Q:'DN W ?0 W "(28 U.S.C. 2514 and may result in a fine of not more than $10,000 or imprison-"
D N:$X>0 Q:'DN W ?0 W "ment for not more than five (5) years or both (18 U.S.C. 287 i.d. 1001)."
D ^ACRFPAPV K DIP K:DN Y
D ^ACRFPSS K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "|------------------------------------------------------------------------------|"
D N:$X>3 Q:'DN W ?3 W "IHS 531 (6/94) Computerized Modification of Standard Form 1012 (Rev.10/77)"
S ACRPRT="" K DIP K:DN Y
D ^ACRFSS4 K DIP K:DN Y
D EXIT^ACRFCLM K DIP K:DN Y
D T Q:'DN W ?2 D PTR^ACRFTO K DIP K:DN Y
K Y
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
ACRPTV ; GENERATED FROM 'ACR TRAVEL VOUCHER' PRINT TEMPLATE (#3865) ; 09/30/09 ; (FILE 9002196, MARGIN=80)
+1 GOTO BEGIN
N WRITE !
T IF $X
WRITE !
IF '$DATA(DIOT(2))
IF DN
IF $DATA(IOSL)
IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
IF $DATA(^UTILITY($JOB,1))#2
IF ^(1)?1U1P1E.E
XECUTE ^(1)
+1 SET DISTP=DISTP+1
SET DILCT=DILCT+1
IF '(DISTP#100)
DO CSTP^DIO2
+2 QUIT
DT IF $GET(DUZ("LANG"))>1
IF Y
WRITE $$OUT^DIALOGU(Y,"DD")
QUIT
+1 IF Y
WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
IF Y#100
WRITE $JUSTIFY(Y#100\1,2)_","
WRITE Y\10000+1700
IF Y#1
WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
QUIT
+2 WRITE Y
QUIT
M DO @DIXX
+1 QUIT
BEGIN ;
+1 IF '$DATA(DN)
SET DN=1
SET DISTP=$GET(DISTP)
SET DILCT=$GET(DILCT)
+2 IF $DATA(DXS)<9
MERGE DXS=^DIPT(3865,"DXS")
+3 SET I(0)="^ACRDOC("
SET J(0)=9002196
+4 IF $EXTRACT($GET(IOST),1,2)="C-"
WRITE "ARMS REF: ",$PIECE(^ACRDOC(D0,0),U,6),"/",D0
KILL DIP
IF DN
KILL Y
+5 SET ACRDOCDA=D0
KILL DIP
IF DN
KILL Y
+6 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
WRITE "DHHS/INDIAN HEALTH SERVICE - TRAVEL VOUCHER"
+7 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
WRITE "TRAVEL ORDER #: "
+8 SET X=$GET(^ACRDOC(D0,0))
WRITE ?27,$EXTRACT($PIECE(X,U,1),1,17)
+9 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "VOUCHER NO.:"
+10 WRITE ?58,$EXTRACT($PIECE(X,U,2),1,15)
+11 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
WRITE "DHHS #: "
+12 WRITE $$EXPDN^ACRFUTL(D0)
KILL DIP
IF DN
KILL Y
+13 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+14 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "TRAVELER........:"
+15 SET X=$GET(^ACRDOC(D0,"TO"))
IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
SET Y=$PIECE(X,U,9)
SET Y(0)=Y
SET Y=$$NAME2^ACRFUTL1(Y)
WRITE $EXTRACT(Y,1,30)
+16 IF $X>51
DO N
IF 'DN
QUIT
WRITE ?51
WRITE "DEPART:"
+17 SET X=$GET(^ACRDOC(D0,"TO"))
WRITE ?60
SET Y=$PIECE(X,U,14)
DO DT
+18 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "SOC SECURITY NO.: "
+19 WRITE $$PSSN^ACRFUTL($PIECE($GET(^ACRDOC(D0,"TO")),U,9),$GET(DUZ),$GET(IOST),$GET(ACRSSNOK))
KILL DIP
IF DN
KILL Y
+20 IF $X>51
DO N
IF 'DN
QUIT
WRITE ?51
WRITE "RETURN:"
+21 SET X=$GET(^ACRDOC(D0,"TO"))
WRITE ?60
SET Y=$PIECE(X,U,15)
DO DT
+22 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "MAILING ADDRESS.:"
+23 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
XECUTE DXS(1,9.2)
SET X=$PIECE(DIP(101),U,1)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+24 IF $X>51
DO N
IF 'DN
QUIT
WRITE ?51
WRITE "PHONE.:"
+25 IF $EXTRACT(IOST,1,2)="C-"
WRITE " ***-***-****"
KILL DIP
IF DN
KILL Y
+26 XECUTE DXS(2,9)
KILL DIP
IF DN
KILL Y
+27 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
XECUTE DXS(3,9.2)
SET X=$PIECE(DIP(101),U,2)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+28 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
XECUTE DXS(4,9.2)
SET X=$PIECE(DIP(101),U,4)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+29 WRITE ", "
+30 XECUTE DXS(5,9.2)
SET X=$PIECE($GET(^DIC(5,+$PIECE(DIP(101),U,5),0)),U)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+31 WRITE " "
+32 XECUTE DXS(6,9.2)
SET X=$PIECE(DIP(101),U,6)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+33 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "PRESENT STATION.:"
+34 SET X=$GET(^ACRDOC(D0,"TO"))
IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
SET Y=$PIECE(X,U,13)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTLOC(Y,0))#2:$PIECE(^(0),U),1:Y)
SET Y=$SELECT(Y="":Y,$DATA(^DIC(4,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+35 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "---------- TRAVEL ADVANCE -----------"
+36 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "--------- CASH PAYMENT RECEIPT --------"
+37 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "OUTSTANDING..........:"
+38 WRITE ?24
SET Y=$PIECE(X,U,25)
IF Y]""
WRITE $JUSTIFY(Y,8,2)
+39 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "| DATE RECEIVED:"
+40 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "| AMOUNT RECEIVED:"
+41 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "AMOUNT TO BE APPLIED.:"
+42 WRITE ?24
SET Y=$PIECE(X,U,25)
IF Y]""
WRITE $JUSTIFY(Y,8,2)
+43 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|___________________|___________________"
+44 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "AMOUNT DUE GOVERNMENT:"
+45 DO EN11^ACRFCLM
KILL DIP
IF DN
KILL Y
+46 IF $GET(ACRADV)>$GET(ACRX)
WRITE $JUSTIFY($FNUMBER(ACRADV-ACRX,"P",2),11)
KILL DIP
IF DN
KILL Y
+47 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "| PAYEE'S SIGNATURE:"
+48 DO PAUSE^ACRFWARN
KILL DIP
IF DN
KILL Y
+49 SET ACRY="PURPOSE OF TRAVEL"
DO JUST^ACRFSSD1
KILL DIP
IF DN
KILL Y
+50 KILL DXS
SET D0=ACRDOCDA
DO ^ACRPTVI
KILL DIP
IF DN
KILL Y
+51 DO ^ACRFCLM
KILL DIP
IF DN
KILL Y
+52 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "NOTE: Falsification of an item in an expense account works a forfeiture of claim"
+53 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "(28 U.S.C. 2514 and may result in a fine of not more than $10,000 or imprison-"
+54 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "ment for not more than five (5) years or both (18 U.S.C. 287 i.d. 1001)."
+55 DO ^ACRFPAPV
KILL DIP
IF DN
KILL Y
+56 DO ^ACRFPSS
KILL DIP
IF DN
KILL Y
+57 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "|------------------------------------------------------------------------------|"
+58 IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
WRITE "IHS 531 (6/94) Computerized Modification of Standard Form 1012 (Rev.10/77)"
+59 SET ACRPRT=""
KILL DIP
IF DN
KILL Y
+60 DO ^ACRFSS4
KILL DIP
IF DN
KILL Y
+61 DO EXIT^ACRFCLM
KILL DIP
IF DN
KILL Y
+62 DO T
IF 'DN
QUIT
WRITE ?2
DO PTR^ACRFTO
KILL DIP
IF DN
KILL Y
+63 KILL Y
+64 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!