ACRFTR ;IHS/OIRM/DSD/THL,AEF - TRAINING REPORTS; [ 11/01/2001 9:44 AM ]
;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
;;UTILITY TO SELECT AND PRINT VARIOUS TRAINING SUMMARY REPORTS
EN ;EP;
F D EN1 Q:$D(ACRQUIT)!$D(ACROUT)
EXIT ;EP
K ACR,ACRFOR,ACRDFN,ACRXREF,ACRBEGIN,AC,TREND,ACRTYPE,ACRDC,ACRTOTD,ACRTRNG,ACRY,ACRRTN,ACRNVAL,ACRLOC,ACRPOZ,ACRFOR,ACRLOC,ACRTRNEE,ACRGRD,ACRTITLE,ACRTUIT,ACRBOOKS,ACR1,ACR2,ACR3,ACRDUTHR,ACRNDHR,ACRTOTD,ACRTOTND,ACRTTUIT,ACRTBOOK,ACRT1
K ACRT2,ACRT3,ACRT4,ACRT5,ACRT6,ACRDOC0,ACRTRNG,ACRTRNG3,ACRTRNG4,ACRCME,ACRDUZ,ACRFROM,ACRTO,ACRDATES,ACRNVAL,ACR4,ACR5,ACR6,ACRTGNO,ACROUT,ACRTYPE,ACRTYPET,ACRXT,ACRAREA,ACRCAN,ACRSG,ACRTT
Q
EN1 W @IOF
D EXIT
W !?10,"TRAINING SUMMARY REPORTS"
S DIR(0)="SO^1:Individual Employee;2:Department;3:Location Code;4:Purchasing Office;5:Area Office;6:CAN No.;7:Series/Grade;8:Training Type"
S DIR("A")="Which one"
D DIR^ACRFDIC
Q:+Y<1
S ACRTYPE=Y
S ACRXREF=$S(Y=1:"F",Y=2:"M",1:"REF")
I ACRTYPE=1 D IND
I ACRTYPE=2 D DEPT
I ACRTYPE=3 D LOCATION
I ACRTYPE=4 D PO
I ACRTYPE=5 D AREA
I $D(ACRQUIT) K ACRQUIT Q
I ACRTYPE=6 D CAN(.ACRDFN,.ACRFOR,.ACRCAN,.ACRQUIT)
I $D(ACRQUIT) K ACRQUIT Q
I ACRTYPE=7 D SG(.ACRDFN,.ACRFOR,.ACRSG,.ACRQUIT)
I $D(ACRQUIT) K ACRQUIT Q
I ACRTYPE=8 D TT(.ACRDFN,.ACRFOR,.ACRTT,.ACRQUIT)
I $D(ACRQUIT) K ACRQUIT Q
K ACRTYPE
D DATES
I $D(ACRQUIT) K ACRQUIT Q
D TE
I $D(ACRQUIT) K ACRQUIT Q
D TYPE
I $D(ACRQUIT) K ACRQUIT Q
I ACRTYPE=8 S ACRSMRY=""
E D SUMMARY
I $D(ACRQUIT) K ACRQUIT Q
D ZIS,EXIT
Q
ZIS S ACRRTN="START^ACRFTR1"
S ZTDESC=$S(ACRTYPE=1:"INDIVIDUAL",ACRTYPE=2:"DEPARTMENT",ACRTYPE=3:"LOCATION CODE",1:"PURCHASING OFFICE")_" TRAINING REPORT"
D ^ACRFZIS
Q
IND S DIR(0)="PO^200:AEMNQZ"
S DIR("A")="Employee Name."
S DIR("?",1)="Enter the name of the employee for whom you want to print a training summary"
S DIR("?")="in the format 'LAST,FIRST MI'"
W !
D DIR^ACRFDIC
Q:+Y<1
S ACRDFN=+Y
S ACRFOR=Y(0,0)
Q
DEPT ;
W !!?21,"Department Training summary"
S DIR(0)="PO^AUTTPRG(:AEMNQZ"
S DIR("A")="Department...."
S DIR("?",1)="Enter the name of the DEPARTMENT for which you want to print a training summary"
S DIR("?")="in the format 'LAST,FIRST MI'"
W !
D DIR^ACRFDIC
Q:+Y<1
S ACRDFN=+Y
S ACRFOR=$P(Y(0),U)
Q
LOCATION ;
W !!?21,"Location Code Training summary"
S DIR(0)="PO^AUTTLCOD(:AEMNQZ"
S DIR("A")="Location Code."
S DIR("?")="Enter the name of the LOCATION CODE for which to print a training summary"
W !
D DIR^ACRFDIC
Q:+Y<1
S ACRLOC=+Y
S ACRDFN=53
S ACRFOR=$P(Y(0),U)
Q
DATES ;
S DIR(0)="DO^::E"
S DIR("A")="Beginning Date"
S DIR("?",1)="Enter the earliest date for which you want to include training for the employee."
S DIR("?")="Do not enter any date if you want to list all the employee's training."
W !
D DIR^ACRFDIC
Q:$D(ACROUT)
I +Y<1 D G DATES
.W !!,"You must enter a Beginning Date. Enter '^^' to exit."
K ACRQUIT
S ACRBEGIN=+Y
S ACREND=""
I ACRBEGIN D Q:$D(ACRQUIT)
. S DIR(0)="DO^::E"
.S DIR("A")="Ending Date..."
.S DIR("?",1)="Enter the latest date for which you want to include training for the employee."
.S DIR("?")="Do not enter any date if you want to list all the employee's training."
.D DIR^ACRFDIC
.I $E(X)[U S ACRQUIT="" Q
.K ACRQUIT
.S ACREND=$S(Y="":DT,1:Y)
Q
PO ;SELECT PURCHASING OFFICE
D PO^ACRFPSR
Q:$D(ACRQUIT)
S ACRDFN=53
S ACRFOR=+^ACRPO(ACRPOZ,0)
S ACRFOR=$P($G(^DIC(4,+ACRFOR,0)),U)
Q
AREA ;SELECT AREA OFFICE
I '$O(^ACRSYS(1)) S Y=1
E D
.S DIC="^ACRSYS("
.S DIC(0)="AEMQZ"
.S DIC("A")="Training Report for which Area: "
.S DIC("B")=$P($G(^AUTTAREA(+$G(^ACRSYS(1,0)),0)),U)
.W !
.D DIC^ACRFDIC
I +Y<1 S ACRQUIT="" Q
S ACRAREA=+Y
S ACRDFN=53
S ACRFOR=+^ACRSYS(ACRAREA,0)
S ACRFOR=$P($G(^AUTTAREA(+ACRFOR,0)),U)
Q
CAN(ACRDFN,ACRFOR,ACRCAN,ACRQUIT) ;
;----- SELECT CAN NUMBER
;
N DIC,DTOUT,DUOUT,X,Y
S DIC="^ACRCAN("
S DIC(0)="AEMQ"
S DIC("A")="Training Report for which CAN No.: "
D ^DIC
I +Y'>0!($D(DTOUT))!($D(DUOUT)) S ACRQUIT="" Q
S ACRCAN=+Y
S ACRFOR=$P(^AUTTCAN(+Y,0),U)
S ACRDFN=53
Q
SG(ACRDFN,ACRFOR,ACRSG,ACRQUIT) ;
;----- SELECT SERIES/GRADE
;
N DIR,DIRUT,DTOUT,DUOUT,X,Y
S DIR(0)="F^1:4"
S DIR("A")="Select PERSONNEL SERIES"
D ^DIR
I Y']""!($D(DIRUT))!($D(DTOUT))!($D(DUOUT)) S ACRQUIT="" Q
S ACRSG=Y
;
S DIR(0)="N^1:18"
S DIR("A")="Select PAY GRADE"
D ^DIR
I Y'>0!($D(DIRUT))!($D(DTOUT))!($D(DUOUT)) K ACRSG S ACRQUIT="" Q
S ACRSG=ACRSG_U_Y
S ACRFOR="SERIES-GRADE "_$P(ACRSG,U)_"-"_$P(ACRSG,U,2)
S ACRDFN=53
Q
TT(ACRDFN,ACRFOR,ACRTT,ACRQUIT) ;
;
N DIC,DTOUT,DUOUT,X,Y
S DIC="^ACRTT("
S DIC(0)="AEMQ"
S DIC("A")="Training Report for which Training Type: "
D ^DIC
I +Y'>0!($D(DTOUT))!($D(DUOUT)) S ACRQUIT="" Q
S ACRTT=+Y
S ACRFOR="TRAINING TYPE "_$P(^ACRTT(+Y,0),U)_" ("_$P(^ACRTT(+Y,0),U,2)_")"
S ACRDFN=53
Q
TE ;
S DIR(0)="YO"
S DIR("A")="Include ONLY 350's WITHOUT completed TRAINING EVALUATION"
S DIR("B")="NO"
W !
D DIR^ACRFDIC
Q:$D(ACRQUIT)
S:$G(Y)=1 ACRNVAL=""
Q
CME ;
S DIR(0)="SO^1:Continuing MEDICAL Education;2:Continuing NURSING Education;3:All Training"
S DIR("A")="Which report"
S DIR("B")="All Training"
W !
D DIR^ACRFDIC
K ACRQUIT
I $D(ACROUT) S ACRQUIT="" Q
S ACRCME=+Y
Q
TYPE ;
S DIR(0)="SO^1:Purpose of Training;2:Type of Training;3:Source of Training;4:Special Interest Code;5:Skill Code;6:Professional Category;7:All Training;8:All of the Above"
S DIR("A")="Report for Which of the Above"
S DIR("B")="All Training"
W !
D DIR^ACRFDIC
K ACRQUIT
I $D(ACROUT) S ACRQUIT="" Q
S ACRTYPE=+Y
S ACRTYPE("G")=$$TTYPE(ACRTYPE)
Q
SUMMARY ;
S DIR(0)="SO^1:Summary Only;2:Detailed Report Only;3:Both"
S DIR("A")="Which report"
S DIR("B")="Both"
W !
D DIR^ACRFDIC
K ACRQUIT
I $D(ACROUT) S ACRQUIT="" Q
I Y=1 S ACRSMRY="" K ACRDTAIL
I Y=2 S ACRDTAIL="" K ACRSMRY
I Y=3 S (ACRSMRY,ACRDTAIL)=""
Q
TTYPE(X) ;EP;FIND GLOBAL REFERENCE FOR REPORT TYPE
I X=1 S X="^ACRTP(" Q X
I X=2 S X="^ACRTT(" Q X
I X=3 S X="^ACRTS(" Q X
I X=4 S X="^ACRTSI(" Q X
I X=5 S X="^ACRTSC(" Q X
I X=6 S X="^ACRCME(" Q X
Q ""
ACRFTR ;IHS/OIRM/DSD/THL,AEF - TRAINING REPORTS; [ 11/01/2001 9:44 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
+2 ;;UTILITY TO SELECT AND PRINT VARIOUS TRAINING SUMMARY REPORTS
EN ;EP;
+1 FOR
DO EN1
IF $DATA(ACRQUIT)!$DATA(ACROUT)
QUIT
EXIT ;EP
+1 KILL ACR,ACRFOR,ACRDFN,ACRXREF,ACRBEGIN,AC,TREND,ACRTYPE,ACRDC,ACRTOTD,ACRTRNG,ACRY,ACRRTN,ACRNVAL,ACRLOC,ACRPOZ,ACRFOR,ACRLOC,ACRTRNEE,ACRGRD,ACRTITLE,ACRTUIT,ACRBOOKS,ACR1,ACR2,ACR3,ACRDUTHR,ACRNDHR,ACRTOTD,ACRTOTND,ACRTTUIT,ACRTBOOK,ACRT1
+2 KILL ACRT2,ACRT3,ACRT4,ACRT5,ACRT6,ACRDOC0,ACRTRNG,ACRTRNG3,ACRTRNG4,ACRCME,ACRDUZ,ACRFROM,ACRTO,ACRDATES,ACRNVAL,ACR4,ACR5,ACR6,ACRTGNO,ACROUT,ACRTYPE,ACRTYPET,ACRXT,ACRAREA,ACRCAN,ACRSG,ACRTT
+3 QUIT
EN1 WRITE @IOF
+1 DO EXIT
+2 WRITE !?10,"TRAINING SUMMARY REPORTS"
+3 SET DIR(0)="SO^1:Individual Employee;2:Department;3:Location Code;4:Purchasing Office;5:Area Office;6:CAN No.;7:Series/Grade;8:Training Type"
+4 SET DIR("A")="Which one"
+5 DO DIR^ACRFDIC
+6 IF +Y<1
QUIT
+7 SET ACRTYPE=Y
+8 SET ACRXREF=$SELECT(Y=1:"F",Y=2:"M",1:"REF")
+9 IF ACRTYPE=1
DO IND
+10 IF ACRTYPE=2
DO DEPT
+11 IF ACRTYPE=3
DO LOCATION
+12 IF ACRTYPE=4
DO PO
+13 IF ACRTYPE=5
DO AREA
+14 IF $DATA(ACRQUIT)
KILL ACRQUIT
QUIT
+15 IF ACRTYPE=6
DO CAN(.ACRDFN,.ACRFOR,.ACRCAN,.ACRQUIT)
+16 IF $DATA(ACRQUIT)
KILL ACRQUIT
QUIT
+17 IF ACRTYPE=7
DO SG(.ACRDFN,.ACRFOR,.ACRSG,.ACRQUIT)
+18 IF $DATA(ACRQUIT)
KILL ACRQUIT
QUIT
+19 IF ACRTYPE=8
DO TT(.ACRDFN,.ACRFOR,.ACRTT,.ACRQUIT)
+20 IF $DATA(ACRQUIT)
KILL ACRQUIT
QUIT
+21 KILL ACRTYPE
+22 DO DATES
+23 IF $DATA(ACRQUIT)
KILL ACRQUIT
QUIT
+24 DO TE
+25 IF $DATA(ACRQUIT)
KILL ACRQUIT
QUIT
+26 DO TYPE
+27 IF $DATA(ACRQUIT)
KILL ACRQUIT
QUIT
+28 IF ACRTYPE=8
SET ACRSMRY=""
+29 IF '$TEST
DO SUMMARY
+30 IF $DATA(ACRQUIT)
KILL ACRQUIT
QUIT
+31 DO ZIS
DO EXIT
+32 QUIT
ZIS SET ACRRTN="START^ACRFTR1"
+1 SET ZTDESC=$SELECT(ACRTYPE=1:"INDIVIDUAL",ACRTYPE=2:"DEPARTMENT",ACRTYPE=3:"LOCATION CODE",1:"PURCHASING OFFICE")_" TRAINING REPORT"
+2 DO ^ACRFZIS
+3 QUIT
IND SET DIR(0)="PO^200:AEMNQZ"
+1 SET DIR("A")="Employee Name."
+2 SET DIR("?",1)="Enter the name of the employee for whom you want to print a training summary"
+3 SET DIR("?")="in the format 'LAST,FIRST MI'"
+4 WRITE !
+5 DO DIR^ACRFDIC
+6 IF +Y<1
QUIT
+7 SET ACRDFN=+Y
+8 SET ACRFOR=Y(0,0)
+9 QUIT
DEPT ;
+1 WRITE !!?21,"Department Training summary"
+2 SET DIR(0)="PO^AUTTPRG(:AEMNQZ"
+3 SET DIR("A")="Department...."
+4 SET DIR("?",1)="Enter the name of the DEPARTMENT for which you want to print a training summary"
+5 SET DIR("?")="in the format 'LAST,FIRST MI'"
+6 WRITE !
+7 DO DIR^ACRFDIC
+8 IF +Y<1
QUIT
+9 SET ACRDFN=+Y
+10 SET ACRFOR=$PIECE(Y(0),U)
+11 QUIT
LOCATION ;
+1 WRITE !!?21,"Location Code Training summary"
+2 SET DIR(0)="PO^AUTTLCOD(:AEMNQZ"
+3 SET DIR("A")="Location Code."
+4 SET DIR("?")="Enter the name of the LOCATION CODE for which to print a training summary"
+5 WRITE !
+6 DO DIR^ACRFDIC
+7 IF +Y<1
QUIT
+8 SET ACRLOC=+Y
+9 SET ACRDFN=53
+10 SET ACRFOR=$PIECE(Y(0),U)
+11 QUIT
DATES ;
+1 SET DIR(0)="DO^::E"
+2 SET DIR("A")="Beginning Date"
+3 SET DIR("?",1)="Enter the earliest date for which you want to include training for the employee."
+4 SET DIR("?")="Do not enter any date if you want to list all the employee's training."
+5 WRITE !
+6 DO DIR^ACRFDIC
+7 IF $DATA(ACROUT)
QUIT
+8 IF +Y<1
Begin DoDot:1
+9 WRITE !!,"You must enter a Beginning Date. Enter '^^' to exit."
End DoDot:1
GOTO DATES
+10 KILL ACRQUIT
+11 SET ACRBEGIN=+Y
+12 SET ACREND=""
+13 IF ACRBEGIN
Begin DoDot:1
+14 SET DIR(0)="DO^::E"
+15 SET DIR("A")="Ending Date..."
+16 SET DIR("?",1)="Enter the latest date for which you want to include training for the employee."
+17 SET DIR("?")="Do not enter any date if you want to list all the employee's training."
+18 DO DIR^ACRFDIC
+19 IF $EXTRACT(X)[U
SET ACRQUIT=""
QUIT
+20 KILL ACRQUIT
+21 SET ACREND=$SELECT(Y="":DT,1:Y)
End DoDot:1
IF $DATA(ACRQUIT)
QUIT
+22 QUIT
PO ;SELECT PURCHASING OFFICE
+1 DO PO^ACRFPSR
+2 IF $DATA(ACRQUIT)
QUIT
+3 SET ACRDFN=53
+4 SET ACRFOR=+^ACRPO(ACRPOZ,0)
+5 SET ACRFOR=$PIECE($GET(^DIC(4,+ACRFOR,0)),U)
+6 QUIT
AREA ;SELECT AREA OFFICE
+1 IF '$ORDER(^ACRSYS(1))
SET Y=1
+2 IF '$TEST
Begin DoDot:1
+3 SET DIC="^ACRSYS("
+4 SET DIC(0)="AEMQZ"
+5 SET DIC("A")="Training Report for which Area: "
+6 SET DIC("B")=$PIECE($GET(^AUTTAREA(+$GET(^ACRSYS(1,0)),0)),U)
+7 WRITE !
+8 DO DIC^ACRFDIC
End DoDot:1
+9 IF +Y<1
SET ACRQUIT=""
QUIT
+10 SET ACRAREA=+Y
+11 SET ACRDFN=53
+12 SET ACRFOR=+^ACRSYS(ACRAREA,0)
+13 SET ACRFOR=$PIECE($GET(^AUTTAREA(+ACRFOR,0)),U)
+14 QUIT
CAN(ACRDFN,ACRFOR,ACRCAN,ACRQUIT) ;
+1 ;----- SELECT CAN NUMBER
+2 ;
+3 NEW DIC,DTOUT,DUOUT,X,Y
+4 SET DIC="^ACRCAN("
+5 SET DIC(0)="AEMQ"
+6 SET DIC("A")="Training Report for which CAN No.: "
+7 DO ^DIC
+8 IF +Y'>0!($DATA(DTOUT))!($DATA(DUOUT))
SET ACRQUIT=""
QUIT
+9 SET ACRCAN=+Y
+10 SET ACRFOR=$PIECE(^AUTTCAN(+Y,0),U)
+11 SET ACRDFN=53
+12 QUIT
SG(ACRDFN,ACRFOR,ACRSG,ACRQUIT) ;
+1 ;----- SELECT SERIES/GRADE
+2 ;
+3 NEW DIR,DIRUT,DTOUT,DUOUT,X,Y
+4 SET DIR(0)="F^1:4"
+5 SET DIR("A")="Select PERSONNEL SERIES"
+6 DO ^DIR
+7 IF Y']""!($DATA(DIRUT))!($DATA(DTOUT))!($DATA(DUOUT))
SET ACRQUIT=""
QUIT
+8 SET ACRSG=Y
+9 ;
+10 SET DIR(0)="N^1:18"
+11 SET DIR("A")="Select PAY GRADE"
+12 DO ^DIR
+13 IF Y'>0!($DATA(DIRUT))!($DATA(DTOUT))!($DATA(DUOUT))
KILL ACRSG
SET ACRQUIT=""
QUIT
+14 SET ACRSG=ACRSG_U_Y
+15 SET ACRFOR="SERIES-GRADE "_$PIECE(ACRSG,U)_"-"_$PIECE(ACRSG,U,2)
+16 SET ACRDFN=53
+17 QUIT
TT(ACRDFN,ACRFOR,ACRTT,ACRQUIT) ;
+1 ;
+2 NEW DIC,DTOUT,DUOUT,X,Y
+3 SET DIC="^ACRTT("
+4 SET DIC(0)="AEMQ"
+5 SET DIC("A")="Training Report for which Training Type: "
+6 DO ^DIC
+7 IF +Y'>0!($DATA(DTOUT))!($DATA(DUOUT))
SET ACRQUIT=""
QUIT
+8 SET ACRTT=+Y
+9 SET ACRFOR="TRAINING TYPE "_$PIECE(^ACRTT(+Y,0),U)_" ("_$PIECE(^ACRTT(+Y,0),U,2)_")"
+10 SET ACRDFN=53
+11 QUIT
TE ;
+1 SET DIR(0)="YO"
+2 SET DIR("A")="Include ONLY 350's WITHOUT completed TRAINING EVALUATION"
+3 SET DIR("B")="NO"
+4 WRITE !
+5 DO DIR^ACRFDIC
+6 IF $DATA(ACRQUIT)
QUIT
+7 IF $GET(Y)=1
SET ACRNVAL=""
+8 QUIT
CME ;
+1 SET DIR(0)="SO^1:Continuing MEDICAL Education;2:Continuing NURSING Education;3:All Training"
+2 SET DIR("A")="Which report"
+3 SET DIR("B")="All Training"
+4 WRITE !
+5 DO DIR^ACRFDIC
+6 KILL ACRQUIT
+7 IF $DATA(ACROUT)
SET ACRQUIT=""
QUIT
+8 SET ACRCME=+Y
+9 QUIT
TYPE ;
+1 SET DIR(0)="SO^1:Purpose of Training;2:Type of Training;3:Source of Training;4:Special Interest Code;5:Skill Code;6:Professional Category;7:All Training;8:All of the Above"
+2 SET DIR("A")="Report for Which of the Above"
+3 SET DIR("B")="All Training"
+4 WRITE !
+5 DO DIR^ACRFDIC
+6 KILL ACRQUIT
+7 IF $DATA(ACROUT)
SET ACRQUIT=""
QUIT
+8 SET ACRTYPE=+Y
+9 SET ACRTYPE("G")=$$TTYPE(ACRTYPE)
+10 QUIT
SUMMARY ;
+1 SET DIR(0)="SO^1:Summary Only;2:Detailed Report Only;3:Both"
+2 SET DIR("A")="Which report"
+3 SET DIR("B")="Both"
+4 WRITE !
+5 DO DIR^ACRFDIC
+6 KILL ACRQUIT
+7 IF $DATA(ACROUT)
SET ACRQUIT=""
QUIT
+8 IF Y=1
SET ACRSMRY=""
KILL ACRDTAIL
+9 IF Y=2
SET ACRDTAIL=""
KILL ACRSMRY
+10 IF Y=3
SET (ACRSMRY,ACRDTAIL)=""
+11 QUIT
TTYPE(X) ;EP;FIND GLOBAL REFERENCE FOR REPORT TYPE
+1 IF X=1
SET X="^ACRTP("
QUIT X
+2 IF X=2
SET X="^ACRTT("
QUIT X
+3 IF X=3
SET X="^ACRTS("
QUIT X
+4 IF X=4
SET X="^ACRTSI("
QUIT X
+5 IF X=5
SET X="^ACRTSC("
QUIT X
+6 IF X=6
SET X="^ACRCME("
QUIT X
+7 QUIT ""