NURSEPL1 ;HIRMFO/MD,FT-TRAINING REPORT BY LOCATION/SVC POSITION ;8/19/97
;;4.0;NURSING SERVICE;**3,10,13**;Apr 25, 1997
NPRINT ;
S NURFAC="" F S NURFAC=$O(^TMP("NURE",$J,"L",NURFAC)) Q:NURFAC="" D NM Q:$G(NUROUT)
Q
NM S NURPROG="" F S NURPROG=$O(^TMP("NURE",$J,"L",NURFAC,NURPROG)) Q:NURPROG=""!$G(NUROUT) D NN
Q
NN S NURSPEC="" F S NURSPEC=$O(^TMP("NURE",$J,"L",NURFAC,NURPROG,NURSPEC)) Q:NURSPEC=""!$G(NUROUT) D NHDR D NO
Q
NO S NIC="" F S NIC=$O(^TMP("NURE",$J,"L",NURFAC,NURPROG,NURSPEC,NIC)) Q:NIC=""!$G(NUROUT) S NURSORT=$G(^(NIC)) D:NURSORT NP Q:$G(NUROUT) D BRK1
Q
NP D:$Y>(IOSL-6) NHDR Q:$G(NUROUT) W " "_NIC,!! S (NMHOLD,N1)="",NATTEND=0 F S N1=$O(^TMP("NURE",$J,"L1",NURSORT,N1)) Q:N1=""!$G(NUROUT) D NQ
Q
NQ I $Y>(IOSL-6) D NHDR Q:$G(NUROUT) W " "_NIC_" (continued)",!!
W " "_$E(N1,1,30) S NATTEND=NATTEND+1,NURSEPC(1)="" F S NURSEPC(1)=$O(^TMP("NURE",$J,"L1",NURSORT,N1,NURSEPC(1))) Q:NURSEPC(1)=""!$G(NUROUT) D NR
Q
NR W:$G(NURSEL(1))'=2 " "_$$CAT^NURSUT2(NURSEPC(1)) I $G(NURSEL(1))=2 W " "_NURSEPC(1)
S NCD="",NCD(1)=0 F S NCD=$O(^TMP("NURE",$J,"L1",NURSORT,N1,NURSEPC(1),NCD)) Q:NCD=""!$G(NUROUT) S NLDTPR=$E(NCD,1,7) D NS
Q
NS S NDA=0 F S NDA=$O(^TMP("NURE",$J,"L1",NURSORT,N1,NURSEPC(1),NCD,NDA)) Q:NDA=""!$G(NUROUT) S DATA=^(NDA) D NPPRINT
Q
NPPRINT ;
D:NCD(1)&($Y>(IOSL-6)) NHDR W:NLDTPR'=" BLANK" ?35,$E(NLDTPR,4,5)_"/"_$E(NLDTPR,6,7)_"/"_$E(NLDTPR,2,3),?45,$J(+DATA,2,2),?52,$E($P($G(DATA),U,2),1,28),!
S NCD(1)=1
Q
BRK1 ;
D:$Y>(IOSL-6) NHDR W !,?4,"Total Attendees: ",NATTEND,!!
Q
BRK ;
I NURSEL="C"!(NURSEL="A") D
.Q:+SHRS("CEU")'>0&(+SHRS("CON")'>0) W ?5,"Location CEUs: ",$J(SHRS("CEU"),4,2)
.W ?$S(NURS132:93,1:38),"Location Contact Hours: ",$J(SHRS("CON"),4,2) S RHRS("CEU")=(RHRS("CEU")+SHRS("CEU")),RHRS("CON")=(RHRS("CON")+SHRS("CON")),(SHRS("CEU"),SHRS("CON"))=0
.Q
Q
NHDR I '$G(NUROUT),'NURQUEUE,NURSW1,$E(IOST)="C" D ENDPG^NURSUT1 Q:$G(NUROUT)
S NURPAGE=NURPAGE+1,NURSW1=1
W:$E(IOST)="C"!(NURPAGE>1) @IOF
I NURMDSW,$L(NURFAC)>1 W !,?$$CNTR^NURSUT2(NURFAC),$$FACL^NURSUT2(NURFAC)
I TYP="S" S X="T" D ^%DT D:+Y D^DIQ W ?$X+2,Y
I $G(NURSEL(1))=2 D
.W !,$S(NURSEL="M":"MANDATORY ",NURSEL="O":"OTHER ",NURSEL="W":"WARD ",NURSEL="C":"C.E. ",1:"")_"TRAINING REPORT BY SVC. CATEGORY/CLASS FOR "_$S(TYP="C":"CY ",TYP="F":"FY ",1:"")_$S(TYP="C"!(TYP="F"):$G(NYR),1:$G(YRST(1))_"-"_$G(YREND(1)))
E W !,$S(NURSEL="M":"MANDATORY ",NURSEL="O":"OTHER ",NURSEL="W":"WARD ",NURSEL="C":"C.E. ",1:"")_"TRAINING REPORT BY UNIT/CLASS FOR "_$S(TYP="C":"CY ",TYP="F":"FY ",1:"")_$S(TYP="C"!(TYP="F"):$G(NYR),1:$G(YRST(1))_"-"_$G(YREND(1)))
I TYP'="S" S X="T" D ^%DT D:+Y D^DIQ W ?55,Y
W " Page: ",NURPAGE
W !,?35,"Date",?45,"Class",!,"Class/Employee",?35,"Attended",?45,"Hours",?52,"Presenter"
W !,$$REPEAT^XLFSTR("-",$S(NURS132:132,1:80)),!
I $G(NURPLSW),$L(NURPROG)>1 N Z S Z=$$PROD^NURSUT2(NURPROG) W !?$$CNTR^NURSUT2(NURPROG),$G(Z),!,?$$CNTR^NURSUT2(NURPROG),$$REPEAT^XLFSTR("-",$L(Z)+1)
Q:$G(NUROUT)
W !
I NURSPEC'="" W $S($G(NURSEL(1))'=2:"Unit: ",1:"Service Category: ")_NURSPEC,!!
Q
NURSEPL1 ;HIRMFO/MD,FT-TRAINING REPORT BY LOCATION/SVC POSITION ;8/19/97
+1 ;;4.0;NURSING SERVICE;**3,10,13**;Apr 25, 1997
NPRINT ;
+1 SET NURFAC=""
FOR
SET NURFAC=$ORDER(^TMP("NURE",$JOB,"L",NURFAC))
IF NURFAC=""
QUIT
DO NM
IF $GET(NUROUT)
QUIT
+2 QUIT
NM SET NURPROG=""
FOR
SET NURPROG=$ORDER(^TMP("NURE",$JOB,"L",NURFAC,NURPROG))
IF NURPROG=""!$GET(NUROUT)
QUIT
DO NN
+1 QUIT
NN SET NURSPEC=""
FOR
SET NURSPEC=$ORDER(^TMP("NURE",$JOB,"L",NURFAC,NURPROG,NURSPEC))
IF NURSPEC=""!$GET(NUROUT)
QUIT
DO NHDR
DO NO
+1 QUIT
NO SET NIC=""
FOR
SET NIC=$ORDER(^TMP("NURE",$JOB,"L",NURFAC,NURPROG,NURSPEC,NIC))
IF NIC=""!$GET(NUROUT)
QUIT
SET NURSORT=$GET(^(NIC))
IF NURSORT
DO NP
IF $GET(NUROUT)
QUIT
DO BRK1
+1 QUIT
NP IF $Y>(IOSL-6)
DO NHDR
IF $GET(NUROUT)
QUIT
WRITE " "_NIC,!!
SET (NMHOLD,N1)=""
SET NATTEND=0
FOR
SET N1=$ORDER(^TMP("NURE",$JOB,"L1",NURSORT,N1))
IF N1=""!$GET(NUROUT)
QUIT
DO NQ
+1 QUIT
NQ IF $Y>(IOSL-6)
DO NHDR
IF $GET(NUROUT)
QUIT
WRITE " "_NIC_" (continued)",!!
+1 WRITE " "_$EXTRACT(N1,1,30)
SET NATTEND=NATTEND+1
SET NURSEPC(1)=""
FOR
SET NURSEPC(1)=$ORDER(^TMP("NURE",$JOB,"L1",NURSORT,N1,NURSEPC(1)))
IF NURSEPC(1)=""!$GET(NUROUT)
QUIT
DO NR
+2 QUIT
NR IF $GET(NURSEL(1))'=2
WRITE " "_$$CAT^NURSUT2(NURSEPC(1))
IF $GET(NURSEL(1))=2
WRITE " "_NURSEPC(1)
+1 SET NCD=""
SET NCD(1)=0
FOR
SET NCD=$ORDER(^TMP("NURE",$JOB,"L1",NURSORT,N1,NURSEPC(1),NCD))
IF NCD=""!$GET(NUROUT)
QUIT
SET NLDTPR=$EXTRACT(NCD,1,7)
DO NS
+2 QUIT
NS SET NDA=0
FOR
SET NDA=$ORDER(^TMP("NURE",$JOB,"L1",NURSORT,N1,NURSEPC(1),NCD,NDA))
IF NDA=""!$GET(NUROUT)
QUIT
SET DATA=^(NDA)
DO NPPRINT
+1 QUIT
NPPRINT ;
+1 IF NCD(1)&($Y>(IOSL-6))
DO NHDR
IF NLDTPR'=" BLANK"
WRITE ?35,$EXTRACT(NLDTPR,4,5)_"/"_$EXTRACT(NLDTPR,6,7)_"/"_$EXTRACT(NLDTPR,2,3),?45,$JUSTIFY(+DATA,2,2),?52,$EXTRACT($PIECE($GET(DATA),U,2),1,28),!
+2 SET NCD(1)=1
+3 QUIT
BRK1 ;
+1 IF $Y>(IOSL-6)
DO NHDR
WRITE !,?4,"Total Attendees: ",NATTEND,!!
+2 QUIT
BRK ;
+1 IF NURSEL="C"!(NURSEL="A")
Begin DoDot:1
+2 IF +SHRS("CEU")'>0&(+SHRS("CON")'>0)
QUIT
WRITE ?5,"Location CEUs: ",$JUSTIFY(SHRS("CEU"),4,2)
+3 WRITE ?$SELECT(NURS132:93,1:38),"Location Contact Hours: ",$JUSTIFY(SHRS("CON"),4,2)
SET RHRS("CEU")=(RHRS("CEU")+SHRS("CEU"))
SET RHRS("CON")=(RHRS("CON")+SHRS("CON"))
SET (SHRS("CEU"),SHRS("CON"))=0
+4 QUIT
End DoDot:1
+5 QUIT
NHDR IF '$GET(NUROUT)
IF 'NURQUEUE
IF NURSW1
IF $EXTRACT(IOST)="C"
DO ENDPG^NURSUT1
IF $GET(NUROUT)
QUIT
+1 SET NURPAGE=NURPAGE+1
SET NURSW1=1
+2 IF $EXTRACT(IOST)="C"!(NURPAGE>1)
WRITE @IOF
+3 IF NURMDSW
IF $LENGTH(NURFAC)>1
WRITE !,?$$CNTR^NURSUT2(NURFAC),$$FACL^NURSUT2(NURFAC)
+4 IF TYP="S"
SET X="T"
DO ^%DT
IF +Y
DO D^DIQ
WRITE ?$X+2,Y
+5 IF $GET(NURSEL(1))=2
Begin DoDot:1
+6 WRITE !,$SELECT(NURSEL="M":"MANDATORY ",NURSEL="O":"OTHER ",NURSEL="W":"WARD ",NURSEL="C":"C.E. ",1:"")_"TRAINING REPORT BY SVC. CATEGORY/CLASS FOR "_$SELECT(TYP="C":"CY ",TYP="F":"FY ",1:"")_...
... $SELECT(TYP="C"!(TYP="F"):$GET(NYR),1:$GET(YRST(1))_"-"_$GET(YREND(1)))
End DoDot:1
+7 IF '$TEST
WRITE !,$SELECT(NURSEL="M":"MANDATORY ",NURSEL="O":"OTHER ",NURSEL="W":"WARD ",NURSEL="C":"C.E. ",1:"")_"TRAINING REPORT BY UNIT/CLASS FOR "_$SELECT(TYP="C":"CY ",TYP="F":"FY ",1:"")_$SELECT(TYP="C"!(TYP="F"):$GET(NYR),1:$GET(YRST(1))_"-"_..
.
... $GET(YREND(1)))
+8 IF TYP'="S"
SET X="T"
DO ^%DT
IF +Y
DO D^DIQ
WRITE ?55,Y
+9 WRITE " Page: ",NURPAGE
+10 WRITE !,?35,"Date",?45,"Class",!,"Class/Employee",?35,"Attended",?45,"Hours",?52,"Presenter"
+11 WRITE !,$$REPEAT^XLFSTR("-",$SELECT(NURS132:132,1:80)),!
+12 IF $GET(NURPLSW)
IF $LENGTH(NURPROG)>1
NEW Z
SET Z=$$PROD^NURSUT2(NURPROG)
WRITE !?$$CNTR^NURSUT2(NURPROG),$GET(Z),!,?$$CNTR^NURSUT2(NURPROG),$$REPEAT^XLFSTR("-",$LENGTH(Z)+1)
+13 IF $GET(NUROUT)
QUIT
+14 WRITE !
+15 IF NURSPEC'=""
WRITE $SELECT($GET(NURSEL(1))'=2:"Unit: ",1:"Service Category: ")_NURSPEC,!!
+16 QUIT