ACRFSSRC ;IHS/OIRM/DSD/THL,AEF - PRINT RENTAL CAR JUSTIFICATION; [ 11/01/2001 9:44 AM ]
;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
;;ROUTINE TO PRINT RENTAL CAR JUSTIFICATION
EN I '$D(ACROUT),$D(^ACRDOC(D0,"TOSA")),$P(^("TOSA"),U,3)="Y",$D(^ACRTV("D",D0)) D EN1
EXIT K ACR
Q
EN1 N I,J,ACRY,ACRX
W !,"|------------------------- RENTAL CAR JUSTIFICATION -------------------------|"
S ACR=0
F S ACR=$O(^ACRTV("D",D0,ACR)) Q:'ACR D
.S ACRY=$G(^ACRTV(ACR,"RCJ"))
.Q:ACRY=""
.S ACRX=$P($G(^ACRPD(+$P(^ACRTV(ACR,"DT"),U,4),0)),U)
.S:ACRX="" ACRX="(CITY NOT LISTED)"
.S ACRX=ACRX_": "
.F I=1:1:5 S:$P(ACRY,U,I)]"" ACRX=ACRX_$P(ACRY,U,I)_" "
.Q:ACRX=""
.W !,"|"
.W ?5
.F J=1:1:$L(ACRX," ") D
..S X=$P(ACRX," ",J)
..Q:X=""
..I $X+$L(X)+1>75 D
...W ?79,"|"
...W !,"|"
...W ?5
..W X
..W ?$X+1
.W ?79,"|"
Q
POT ;EP;TO PRINT PURPOSE OF TRAVEL
N I,J,X,Y
W !,"----------------------------- PURPOSE OF TRAVEL ------------------------------"
S X=""
S Y=$G(^ACROBL(D0,"JST"))
I Y]"" F I=1:1:5 S:$P(Y,U,I)]"" X=X_$P(Y,U,I)_" "
S Y=$G(^ACROBL(D0,"JST2"))
I Y]"" F I=1:1:5 S:$P(Y,U,I)]"" X=X_$P(Y,U,I)_" "
Q:X=""
W !?5
F J=1:1:$L(X," ") S X=$P(X," ",J) D:X]""
.W:$X+$L(X)+1>75 !?5
.W X
.W ?$X+1
Q
NEED ;EP;TO PRINT TRAINING NEED
N ACRX,X,J
S ACRX=$G(^ACRDOC(ACRDOCDA,"TRNGND1"))_" "_$G(^ACRDOC(ACRDOCDA,"TRNGND2"))_" "_$G(^ACRDOC(ACRDOCDA,"TRNGND3"))_" "_$G(^ACRDOC(ACRDOCDA,"TRNGND4"))
Q:ACRX=""
W !?5
F J=1:1:$L(ACRX," ") S X=$P(ACRX," ",J) D:X]""
.W:$X+$L(X)+1>75 !?5
.W X
.W ?$X+1
Q
RELATE ;EP;TO PRINT HOW TRAINING NEED RELATES TO WORK
N ACRX,X,J
S ACRX=$G(^ACRDOC(ACRDOCDA,"TRNGRL1"))_" "_$G(^ACRDOC(ACRDOCDA,"TRNGRL2"))_" "_$G(^ACRDOC(ACRDOCDA,"TRNGRL3"))_" "_$G(^ACRDOC(ACRDOCDA,"TRNGRL4"))
Q:ACRX=""
W !?5
F J=1:1:$L(ACRX," ") S X=$P(ACRX," ",J) D:X]""
.W:$X+$L(X)+1>75 !?5
.W X
.W ?$X+1
Q
ACRFSSRC ;IHS/OIRM/DSD/THL,AEF - PRINT RENTAL CAR JUSTIFICATION; [ 11/01/2001 9:44 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
+2 ;;ROUTINE TO PRINT RENTAL CAR JUSTIFICATION
EN IF '$DATA(ACROUT)
IF $DATA(^ACRDOC(D0,"TOSA"))
IF $PIECE(^("TOSA"),U,3)="Y"
IF $DATA(^ACRTV("D",D0))
DO EN1
EXIT KILL ACR
+1 QUIT
EN1 NEW I,J,ACRY,ACRX
+1 WRITE !,"|------------------------- RENTAL CAR JUSTIFICATION -------------------------|"
+2 SET ACR=0
+3 FOR
SET ACR=$ORDER(^ACRTV("D",D0,ACR))
IF 'ACR
QUIT
Begin DoDot:1
+4 SET ACRY=$GET(^ACRTV(ACR,"RCJ"))
+5 IF ACRY=""
QUIT
+6 SET ACRX=$PIECE($GET(^ACRPD(+$PIECE(^ACRTV(ACR,"DT"),U,4),0)),U)
+7 IF ACRX=""
SET ACRX="(CITY NOT LISTED)"
+8 SET ACRX=ACRX_": "
+9 FOR I=1:1:5
IF $PIECE(ACRY,U,I)]""
SET ACRX=ACRX_$PIECE(ACRY,U,I)_" "
+10 IF ACRX=""
QUIT
+11 WRITE !,"|"
+12 WRITE ?5
+13 FOR J=1:1:$LENGTH(ACRX," ")
Begin DoDot:2
+14 SET X=$PIECE(ACRX," ",J)
+15 IF X=""
QUIT
+16 IF $X+$LENGTH(X)+1>75
Begin DoDot:3
+17 WRITE ?79,"|"
+18 WRITE !,"|"
+19 WRITE ?5
End DoDot:3
+20 WRITE X
+21 WRITE ?$X+1
End DoDot:2
+22 WRITE ?79,"|"
End DoDot:1
+23 QUIT
POT ;EP;TO PRINT PURPOSE OF TRAVEL
+1 NEW I,J,X,Y
+2 WRITE !,"----------------------------- PURPOSE OF TRAVEL ------------------------------"
+3 SET X=""
+4 SET Y=$GET(^ACROBL(D0,"JST"))
+5 IF Y]""
FOR I=1:1:5
IF $PIECE(Y,U,I)]""
SET X=X_$PIECE(Y,U,I)_" "
+6 SET Y=$GET(^ACROBL(D0,"JST2"))
+7 IF Y]""
FOR I=1:1:5
IF $PIECE(Y,U,I)]""
SET X=X_$PIECE(Y,U,I)_" "
+8 IF X=""
QUIT
+9 WRITE !?5
+10 FOR J=1:1:$LENGTH(X," ")
SET X=$PIECE(X," ",J)
IF X]""
Begin DoDot:1
+11 IF $X+$LENGTH(X)+1>75
WRITE !?5
+12 WRITE X
+13 WRITE ?$X+1
End DoDot:1
+14 QUIT
NEED ;EP;TO PRINT TRAINING NEED
+1 NEW ACRX,X,J
+2 SET ACRX=$GET(^ACRDOC(ACRDOCDA,"TRNGND1"))_" "_$GET(^ACRDOC(ACRDOCDA,"TRNGND2"))_" "_$GET(^ACRDOC(ACRDOCDA,"TRNGND3"))_" "_$GET(^ACRDOC(ACRDOCDA,"TRNGND4"))
+3 IF ACRX=""
QUIT
+4 WRITE !?5
+5 FOR J=1:1:$LENGTH(ACRX," ")
SET X=$PIECE(ACRX," ",J)
IF X]""
Begin DoDot:1
+6 IF $X+$LENGTH(X)+1>75
WRITE !?5
+7 WRITE X
+8 WRITE ?$X+1
End DoDot:1
+9 QUIT
RELATE ;EP;TO PRINT HOW TRAINING NEED RELATES TO WORK
+1 NEW ACRX,X,J
+2 SET ACRX=$GET(^ACRDOC(ACRDOCDA,"TRNGRL1"))_" "_$GET(^ACRDOC(ACRDOCDA,"TRNGRL2"))_" "_$GET(^ACRDOC(ACRDOCDA,"TRNGRL3"))_" "_$GET(^ACRDOC(ACRDOCDA,"TRNGRL4"))
+3 IF ACRX=""
QUIT
+4 WRITE !?5
+5 FOR J=1:1:$LENGTH(ACRX," ")
SET X=$PIECE(ACRX," ",J)
IF X]""
Begin DoDot:1
+6 IF $X+$LENGTH(X)+1>75
WRITE !?5
+7 WRITE X
+8 WRITE ?$X+1
End DoDot:1
+9 QUIT