source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURARWL3.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 5.1 KB
Line 
1NURARWL3 ;HIRMFO/MD,FT-CONTINUATION OF THE (CURRENT) WORKLOAD STATISTICS ;12/11/96 10:45
2 ;;4.0;NURSING SERVICE;**20**;Apr 25, 1997
3DETAIL ;PRINT DATA LINES
4 S NPWARD=NURSWARD D EN6^NURSAUTL I $P(NURS213,U)="DOM"!($P(NURS213,U)="REC")!($P(NURS213,U)="HEM") S COUNTSW=1
5 I ($Y>(IOSL-6)!'NSW1) D HEADER Q:NURQUIT
6 S SECT=$P(NURS213,U) G:$G(NURSUMSW) A W !,$S(NBR:$E(NPWARD,1,10),1:""),?17,SECT S:NBR NBR=0
7 I '$G(COUNTSW) W ?23,$S(SECT="ATC":" N/A",1:$J($P(NREQ,U),3,1))
8 W ?29,$J($P(NDFTEE,U),3,1)
9 I '$G(COUNTSW) W ?35,$J($P(NVAR,U),4,1) W:NURSZAP'>6!(DUZ(0)="@") ?41,$J($P(NPROD,U),3,0) W ?49,$S(SECT="ATC":" N/A",1:$J($P(NREQ,U,2),3,1))
10 W ?55,$J($P(NDFTEE,U,2),3,1)
11 I '$G(COUNTSW) W ?61,$J($P(NVAR,U,2),4,1) W:NURSZAP'>6!(DUZ(0)="@") ?67,$J($P(NPROD,U,2),3,0) W ?75,$S(SECT="ATC":" N/A",1:$J($P(NREQ,U,3),4,1))
12 W ?81,$J($P(NDFTEE,U,3),4,1)
13 I '$G(COUNTSW) W ?87,$J($P(NVAR,U,3),4,1) W:NURSZAP'>6!(DUZ(0)="@") ?93,$J($P(NPROD,U,3),3,0)
14 W ?98,$J($P(NPC,U),3),?104,$J($P(NPC,U,2),3),?110,$J($P(NPC,U,3),3),?116,$J($P(NPC,U,4),3),?121,$J($P(NPC,U,5),3),?127,$J(NPCC,4)
15A I 'COUNTSW D
16 .F X=1,2,3 D
17 ..S:+$P(NREQ,U,X) $P(NWREQ,U,X)=$P(NWREQ,U,X)+$J($P(NREQ,U,X),0,1) S:+$P(NDFTEE,U,X) $P(NWFTEE,U,X)=$P(NWFTEE,U,X)+$J($P(NDFTEE,U,X),0,1)
18 ..I NURMDSW,NHOS S $P(NFREQ,U,X)=$P(NFREQ,U,X)+$J($P(NREQ,U,X),0,1) S:+$P(NDFTEE,U,X) $P(NFFTEE,U,X)=$P(NFFTEE,U,X)+$J($P(NDFTEE,U,X),0,1)
19 ..Q
20 .F Z=1:1:5 S $P(NWPC,U,Z)=$P(NWPC,U,Z)+$P(NPC,U,Z) S:NURMDSW $P(NFPC,U,Z)=$P(NFPC,U,Z)+$P(NPC,U,Z) S $P(NPC,U,Z)=0
21 .S NWPCC=NWPCC+NPCC S:NURMDSW NFPCC=NFPCC+NPCC
22 .Q
23 I COUNTSW D
24 .F X=1,2,3 S $P(MNHRS(SECT),U,X)=$P(MNHRS(SECT),U,X)+$J($P(NDFTEE,U,X),0,1) S:NURMDSW $P(MFHRS(SECT),U,X)=$P(MNHRS(SECT),U,X)+$J($P(NDFTEE,U,X),0,1)
25 .I NURMDSW,NHOS S FCOUNT(SECT)=FCOUNT(SECT)+NPCC,NFCNT=NFCNT+NPCC
26 .S COUNT(SECT)=COUNT(SECT)+NPCC,NWCNT=NWCNT+NPCC
27 .Q
28 S (COUNTSW,NPCC)=0,NSW1=1
29 Q
30HEADER ; PRINT REPORT HEADING
31 I 'NUROUT,$E(IOST)="C",NSW1 D ENDPG^NURSUT1 S:NUROUT NURQUIT=+NUROUT Q:NURQUIT
32 S NPCT=NPCT+1,NSW1=1
33 U IO W:$E(IOST)="C"!(NPCT>1) @IOF
34 I NURMDSW,NHOS,'$G(NURSUMSW) W ?65,$S($G(NPFAC)=" BLANK":"NO FACILITY",1:$G(NPFAC))
35 W ! D NOW^%DTC S Y=% D DT^DIQ W ?46,$S(NURSHFT="D":"DAY",NURSHFT="N":"NIGHT",1:"EVENING")," SHIFT "_$S($D(NRPTDAT("PWLS")):"PROJECTED",1:"CURRENT")_" WORKLOAD STATISTICS FOR ",$S('NHOS:$G(NPWARD),NHOS:"THE SERVICE",1:"")
36 I $D(NRPTDAT("PWLS")) W " FOR ",$$FMTE^XLFDT(NRPTDAT,"2D")
37 W ?124,"PAGE: ",NPCT
38 W !,?16,"BED",?29,"RN FTEE",?57,"LPN FTEE",?83,"NA FTEE",!,"UNIT",?16,"SECT",?22,"REQ S OD VAR" W:NURSZAP'>6!(DUZ(0)="@") ?39,"%/PRO"
39 W ?49,"REQ S OD VAR" W:NURSZAP'>6 ?66,"%/PRO" W ?75,"REQ S OD VAR" W:NURSZAP'>6!(DUZ(0)="@") ?91,"%/PRO" W ?99,"PC1 PC2 PC3 PC4 PC5 PTOT"
40 S $P(NURSZ,"-",133)="" W !,NURSZ
41 Q
42BRK ; LOCATION TOTALS CURRENT WORKLOAD REPORTS
43 G:$G(NURSUMSW) B
44 W !,?18,$E(NURSY,1,114) F X=1,2,3 S $P(NWVAR,U,X)=$J($P(NWFTEE,U,X),1,1)-$J($P(NWREQ,U,X),1,1) I $J($P(NWFTEE,U,X),1,1),$J($P(NWREQ,U,X),1,1),NURSZAP'>6,NWPCC S $P(NWPROD,U,X)=($J($P(NWREQ,U,X),1,1)/$J($P(NWFTEE,U,X),1,1))*100
45 I $D(NURSPC(NPFAC,1,NURSWARD,$O(^NURSF(213.3,"B","DOMICILIARY",0))))!($D(NURSPC(NPFAC,1,NURSWARD,$O(^NURSF(213.3,"B","HEMODIALYSIS",0)))))!($D(NURSPC(NPFAC,1,NURSWARD,$O(^NURSF(213.3,"B","RECOVERY ROOM",0))))) S COUNTSW=1
46 W !,$E(NPLOC,1,10) W $S(COUNTSW&'(+NWPCC):" COUNT",1:" SUMMARY")
47 I 'COUNTSW W ?23,$J($P(NWREQ,U),3,1)
48 W ?29,$J($P(NWFTEE,U),3,1)
49 I 'COUNTSW W ?35,$J($P(NWVAR,U),4,1) W:NURSZAP'>6 ?41,$J($P(NWPROD,U),3,0) W ?49,$J($P(NWREQ,U,2),3,1)
50 W ?55,$J($P(NWFTEE,U,2),3,1)
51 I 'COUNTSW W ?61,$J($P(NWVAR,U,2),4,1) W:NURSZAP'>6 ?67,$J($P(NWPROD,U,2),3,0) W ?76,$J($P(NWREQ,U,3),3,1)
52 W ?82,$J($P(NWFTEE,U,3),3,1)
53 I 'COUNTSW W ?87,$J($P(NWVAR,U,3),4,1) W:NURSZAP'>6 ?93,$J($P(NWPROD,U,3),3,0) W ?98,$J($P(NWPC,U),3,1),?104,$J($P(NWPC,U,2),3,1),?110,$J($P(NWPC,U,3),3,1),?116,$J($P(NWPC,U,4),3,1),?121,$J($P(NWPC,U,5),3,1),?127,$J(NWPCC,4,1),!
54 I $G(COUNTSW) W ?98,$J($P(NWCNT,U),3,1),?104,$J($P(NWCNT,U,2),3,1),?110,$J($P(NWCNT,U,3),3,1),?116,$J($P(NWCNT,U,4),3,1),?121,$J($P(NWCNT,U,5),3,1),?127,$J(+NWCNT,4,1),!
55B ; VARIABLE AND GLOBAL SET FOR STAFF VARIANCE WORKSHEET
56 I '$G(NURSUMSW) D
57 . S UNIT=$S($E(NPLOC,1,3)="ZZZ":$E(NPLOC,4,99),1:NPLOC)
58 . S ARN=$J($P(NWREQ,U),3,1),ALPN=$J($P(NWREQ,U,2),3,1),ANA=$J($P(NWREQ,U,3),3,1),BRN=$J($P(NWFTEE,U),3,1),BLPN=$J($P(NWFTEE,U,2),3,1),BNA=$J($P(NWFTEE,U,3),3,1),AA=$G(UNIT)_U_ARN_U_ALPN_U_ANA_U_BRN_U_BLPN_U_BNA
59 . I $G(UNIT)'="",$G(NPFAC)'="" S ^TMP("NURVAR",$J,NPFAC,UNIT)=AA
60 . Q
61 I $G(NURSUMSW) D
62 . S ARN=$J($P(NWREQ,U),3,1),ALPN=$J($P(NWREQ,U,2),3,1),ANA=$J($P(NWREQ,U,3),3,1),BRN=$J($P(NWFTEE,U),3,1),BLPN=$J($P(NWFTEE,U,2),3,1),BNA=$J($P(NWFTEE,U,3),3,1),AA=ARN_U_ALPN_U_ANA_U_BRN_U_BLPN_U_BNA
63 . I $G(NPFAC)'="" S:'$D(^TMP("NURVAR",$J,NPFAC)) ^(NPFAC)="" F X=1:1:6 S $P(^TMP("NURVAR",$J,NPFAC),U,X)=+$P(^(NPFAC),U,X)+$P(AA,U,X)
64 . Q
65 I '$G(COUNTSW) F X=1,2,3 D
66 .S $P(NHREQ,U,X)=$P(NHREQ,U,X)+$J($P(NWREQ,U,X),0,1),$P(NHFTEE,U,X)=$P(NHFTEE,U,X)+$J($P(NWFTEE,U,X),0,1)
67 .I NHOS S $P(NWREQ,U,X)=0,$P(NWFTEE,U,X)=0,$P(NWVAR,U,X)=0,$P(NWPROD,U,X)=0
68 .Q
69 S NHPCC=NHPCC+NWPCC
70 F X=1:1:5 S $P(NHPC,U,X)=$P(NHPC,U,X)+$P(NWPC,U,X),$P(NWPC,U,X)=0
71 S (COUNTSW,NWCNT,NWPCC)=0,NBR=1
72 Q
Note: See TracBrowser for help on using the repository browser.