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

NURSEPC1.m

Go to the documentation of this file.
NURSEPC1 ;HIRMFO/MD,FT-AA/FUNDING REQUEST,PRINT (132 COLUMN REPORT) CON'T ;8/9/96  12:06
 ;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ; Called by NURSEPCA
 I $O(^TMP("NURE",$J,""))="" S NURFAC(2)=$S($G(NURFAC)=0:$G(NURFAC(1)),1:""),NURPROG(2)=$S($G(NURPROG)=0:$G(NURPROG(1)),1:"") D NHDR W !!,"THERE IS NO DATA FOR THIS REPORT" G QUIT^NURSEPCA
NPRINT S NURFAC(2)="" F  S NURFAC(2)=$O(^TMP("NURE",$J,NURFAC(2))) Q:NURFAC(2)=""!(NUROUT)  D NHDR Q:NUROUT  D NO Q:NUROUT
 Q
NO S NURPROG(2)="" F  S NURPROG(2)=$O(^TMP("NURE",$J,NURFAC(2),NURPROG(2))) Q:NURPROG(2)=""  S NDP="" F  S NDP=$O(^TMP("NURE",$J,NURFAC(2),NURPROG(2),NDP)) Q:NDP=""!NUROUT  D NR Q:NUROUT
 Q
NR S N1="" F  S N1=$O(^TMP("NURE",$J,NURFAC(2),NURPROG(2),NDP,N1)) Q:N1=""!NUROUT  S NLDTPR=$E(NDP,1,7) D NS Q:NUROUT
 Q
NS F NS1=0:0 S NS1=$O(^TMP("NURE",$J,NURFAC(2),NURPROG(2),NDP,N1,NS1)) Q:NS1'>0!NUROUT  F DA=0:0 S DA=$O(^TMP("NURE",$J,NURFAC(2),NURPROG(2),NDP,N1,NS1,DA)) Q:DA'>0!NUROUT  D NPPRINT W ! Q:NUROUT
 Q
NPPRINT I 'NURSW1!($Y>(IOSL-5)) D NHDR Q:NUROUT
 Q:'$D(^PRSE(452,NS1,0))  I HOLD W $E(N1,1,20)_"  "_^TMP("NURE",$J,NURFAC(2),NURPROG(2),NDP,N1,NS1,DA) I 'NSP S HOLD=0
 S:$D(NS1) ID=$P(^PRSE(452,NS1,0),"^")
 D EN2^NURSUT0 S NLO=$S($D(NOD1):+$G(^NURSF(211.8,+NOD1,0)),1:"")
 S NPWARD=NLO D EN7^NURSAUTL S NL1=NPWARD I HOLD(1) W ?25,$E(NL1,1,8) S:'NSP HOLD(1)=0
 W:NDP'["  BLANK" ?35,$E(NDP,4,5),"/",$E(NDP,6,7),"/",$E(NDP,2,3)
 I $D(^PRSE(452,NS1,0)),$P(^(0),U,2)'="" W ?45,$E($P(^(0),U,2),1,31)
 I $P(^PRSE(452,NS1,0),U,15)'="" W ?78,$E($P(^(0),U,15),1,10)
 I $P(^PRSE(452,NS1,0),"^",17)'="" W ?90,$P(^(0),"^",17)
 I $P(^PRSE(452,NS1,0),"^",18)'="" W ?95,$P(^(0),"^",18)
 K NFUND,NF3,NF4 S (NF3("TOTAL"),NF4("TOTAL"))=0 I $D(^PRSE(452,NS1,3,0)) F NS2=0:0 S NS2=$O(^PRSE(452,NS1,3,NS2)) Q:NS2'>0  D
 .  I $P($G(^PRSE(452,NS1,3,NS2,0)),U)'="" S X=$P(^(0),U),NFUND(X)=""
 .  S:$D(^PRSE(452,NS1,3,NS2,0)) NF3(X)=$P(^(0),"^",2),NF3("TOTAL")=NF3("TOTAL")+NF3(X)
 .  Q
 I $D(^PRSE(452,NS1,4,0)) F NS2=0:0 S NS2=$O(^PRSE(452,NS1,4,NS2)) Q:NS2'>0  D
 .  I $D(^PRSE(452,NS1,4,NS2,0)),$P(^(0),"^",1)'="" S X=$P(^(0),"^",1),NFUND(X)=""
 .  S:$D(^PRSE(452,NS1,4,NS2,0)) NF4(X)=$P(^(0),"^",2),NF4("TOTAL")=NF4("TOTAL")+NF4(X)
 .  Q
 I $D(NFUND) S N(1)=0 F N="A","P","R","H","T","N","U","B","D","I" Q:NUROUT  I $D(NFUND(N)) D
 .  S X=$S(N="A":"AIRFA",N="P":"PER D",N="R":"REGIS",N="H":"HOTEL",N="T":"TRAVE",N="N":"NONE",N="U":"TUITI",N="B":"BOOKS",N="D":"DIREC",N="I":"INDIR",1:"")
 .  W:N(1)'=0 ! W:$D(NF3(N)) ?100,X,?107,$J(NF3(N),0,2) W:$D(NF4(N)) ?115,X,?123,$J(NF4(N),0,2)
 .  S N(1)=1 D:$Y>(IOSL-5) NHDR
 .  Q
 I $D(^PRSE(452,NS1,5,0)) D
 .  I $Y>(IOSL-5) D NHDR Q:NUROUT
 .  W !,?37,"Comment: " S N(1)=0
 .  F NS2=0:0 S NS2=$O(^PRSE(452,NS1,5,NS2)) Q:NS2'>0!NUROUT  I $L(^PRSE(452,NS1,5,NS2,0))>0 W:N(1)'=0 ! W ?47,^(0) S N(1)=1
 .  Q
 S:$D(NF3("TOTAL")) NTOTAL3=NTOTAL3+NF3("TOTAL") S:$D(NF4("TOTAL")) NTOTAL4=NTOTAL4+NF4("TOTAL")
 Q
NHDR ; HEADINGS ;Called by NURSEPCA
 I NURSW1'="" I 'NURQUEUE,NURSW1 D ENDPG^NURSUT1 Q:$G(NUROUT)
 S NURPAGE=NURPAGE+1 W:'($E(IOST)="P"&(NURPAGE=1)) @IOF
 I NURMDSW,$G(NURFAC)'="" W !,?$$CNTR^NURSUT2(NURFAC(2)),$$FACL^NURSUT2(NURFAC(2))
 W !,"AUTHORIZED ABSENCE AND FUNDING REQUESTS REPORT" S X="T" D ^%DT D:+Y D^DIQ W ?109,Y,?122,"PAGE: ",NURPAGE
 W !!,"EMPLOYEE",?35,"CLASS",?78,"CLASS",?90,"AA",?95,"AA",?100,"FUNDS",?115,"FUNDS"
 W !,"NAME",?25,"UNIT",?35,"DATE",?45,"CLASS",?78,"LOCATION",?90,"REQ",?95,"AUT",?100,"REQ",?107,"AMT",?115,"AUTH",?123,"AMT"
 W !,$$REPEAT^XLFSTR("-",132)
 I $G(NURPLSW),$G(NURPROG(2))'="" N Z S Z=$$PROD^NURSUT2(NURPROG(2)) W !,?$$CNTR^NURSUT2(NURPROG(2)),$G(Z),!,?$$CNTR^NURSUT2(NURPROG(2)),$$REPEAT^XLFSTR("-",$L(Z)+1)
 W ! S (HOLD,HOLD(1),NURSW1)=1
 Q