source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURSEPC1.m@ 1203

Last change on this file since 1203 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1NURSEPC1 ;HIRMFO/MD,FT-AA/FUNDING REQUEST,PRINT (132 COLUMN REPORT) CON'T ;8/9/96 12:06
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3EN1 ; Called by NURSEPCA
4 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
5NPRINT 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
6 Q
7NO 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
8 Q
9NR 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
10 Q
11NS 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
12 Q
13NPPRINT I 'NURSW1!($Y>(IOSL-5)) D NHDR Q:NUROUT
14 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
15 S:$D(NS1) ID=$P(^PRSE(452,NS1,0),"^")
16 D EN2^NURSUT0 S NLO=$S($D(NOD1):+$G(^NURSF(211.8,+NOD1,0)),1:"")
17 S NPWARD=NLO D EN7^NURSAUTL S NL1=NPWARD I HOLD(1) W ?25,$E(NL1,1,8) S:'NSP HOLD(1)=0
18 W:NDP'[" BLANK" ?35,$E(NDP,4,5),"/",$E(NDP,6,7),"/",$E(NDP,2,3)
19 I $D(^PRSE(452,NS1,0)),$P(^(0),U,2)'="" W ?45,$E($P(^(0),U,2),1,31)
20 I $P(^PRSE(452,NS1,0),U,15)'="" W ?78,$E($P(^(0),U,15),1,10)
21 I $P(^PRSE(452,NS1,0),"^",17)'="" W ?90,$P(^(0),"^",17)
22 I $P(^PRSE(452,NS1,0),"^",18)'="" W ?95,$P(^(0),"^",18)
23 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
24 . I $P($G(^PRSE(452,NS1,3,NS2,0)),U)'="" S X=$P(^(0),U),NFUND(X)=""
25 . S:$D(^PRSE(452,NS1,3,NS2,0)) NF3(X)=$P(^(0),"^",2),NF3("TOTAL")=NF3("TOTAL")+NF3(X)
26 . Q
27 I $D(^PRSE(452,NS1,4,0)) F NS2=0:0 S NS2=$O(^PRSE(452,NS1,4,NS2)) Q:NS2'>0 D
28 . I $D(^PRSE(452,NS1,4,NS2,0)),$P(^(0),"^",1)'="" S X=$P(^(0),"^",1),NFUND(X)=""
29 . S:$D(^PRSE(452,NS1,4,NS2,0)) NF4(X)=$P(^(0),"^",2),NF4("TOTAL")=NF4("TOTAL")+NF4(X)
30 . Q
31 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
32 . 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:"")
33 . 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)
34 . S N(1)=1 D:$Y>(IOSL-5) NHDR
35 . Q
36 I $D(^PRSE(452,NS1,5,0)) D
37 . I $Y>(IOSL-5) D NHDR Q:NUROUT
38 . W !,?37,"Comment: " S N(1)=0
39 . 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
40 . Q
41 S:$D(NF3("TOTAL")) NTOTAL3=NTOTAL3+NF3("TOTAL") S:$D(NF4("TOTAL")) NTOTAL4=NTOTAL4+NF4("TOTAL")
42 Q
43NHDR ; HEADINGS ;Called by NURSEPCA
44 I NURSW1'="" I 'NURQUEUE,NURSW1 D ENDPG^NURSUT1 Q:$G(NUROUT)
45 S NURPAGE=NURPAGE+1 W:'($E(IOST)="P"&(NURPAGE=1)) @IOF
46 I NURMDSW,$G(NURFAC)'="" W !,?$$CNTR^NURSUT2(NURFAC(2)),$$FACL^NURSUT2(NURFAC(2))
47 W !,"AUTHORIZED ABSENCE AND FUNDING REQUESTS REPORT" S X="T" D ^%DT D:+Y D^DIQ W ?109,Y,?122,"PAGE: ",NURPAGE
48 W !!,"EMPLOYEE",?35,"CLASS",?78,"CLASS",?90,"AA",?95,"AA",?100,"FUNDS",?115,"FUNDS"
49 W !,"NAME",?25,"UNIT",?35,"DATE",?45,"CLASS",?78,"LOCATION",?90,"REQ",?95,"AUT",?100,"REQ",?107,"AMT",?115,"AUTH",?123,"AMT"
50 W !,$$REPEAT^XLFSTR("-",132)
51 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)
52 W ! S (HOLD,HOLD(1),NURSW1)=1
53 Q
Note: See TracBrowser for help on using the repository browser.