Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: NURSEPL1

NURSEPL1.m

Go to the documentation of this file.
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