source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURARWL6.m@ 1274

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

initial load of FOIAVistA 6/30/08 version

File size: 4.4 KB
Line 
1NURARWL6 ;HIRMFO/MD/-MANHOURS AMIS 1106a WORKLOAD STATISTICS CONT OF NURARWL5 ;9/20/96
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3BEDTOT ;BEDSECTION SUMMARY
4 I COUNTSW S:'$D(WMNHRS(NPLOC,SECT)) WMNHRS(NPLOC,SECT)=0 S:'$D(WCOUNT(NPLOC,SECT)) WCOUNT(NPLOC,SECT)=0
5 F X=1,2,3 D
6 . I 'COUNTSW D
7 . . S $P(NBVAR,U,X)=$J($P(NBFTEE,U,X),1,1)-$J($P(NBREQ,U,X),1,1) I $J($P(NBFTEE,U,X),1,1),$J($P(NBREQ,U,X),1,1),NURSZAP'>6 S $P(NBPROD,U,X)=$S($P(NAPROD,U,X):$J($P(NAPROD,U,X),1,1)/3,1:($J($P(NBREQ,U,X),1,1)/$J($P(NBFTEE,U,X),1,1))*100)
8 . . S $P(NWREQ,U,X)=$P(NWREQ,U,X)+$J($P(NBREQ,U,X),0,1),$P(NDREQ,U,X)=$P(NDREQ,U,X)+$J($P(NBREQ,U,X),0,1),$P(NHREQ,U,X)=$P(NHREQ,U,X)+$J($P(NBREQ,U,X),0,1)
9 . . I NURMDSW S $P(NFREQ,U,X)=$P(NFREQ,U,X)+$J($P(NBREQ,U,X),0,1),$P(NFFTEE,U,X)=$P(NFFTEE,U,X)+$J($P(NBFTEE,U,X),0,1)
10 . . S $P(NWFTEE,U,X)=$P(NWFTEE,U,X)+$J($P(NBFTEE,U,X),0,1),$P(NHFTEE,U,X)=$P(NHFTEE,U,X)+$J($P(NBFTEE,U,X),0,1),$P(NDFTEE,U,X)=$P(NDFTEE,U,X)+$J($P(NBFTEE,U,X),0,1)
11 . . Q
12 . I COUNTSW D
13 . . S $P(WMNHRS(NPLOC,SECT),U,X)=$P(WMNHRS(NPLOC,SECT),U,X)+$J($P(NBFTEE,U,X),0,1)
14 . . I NURMDSW S $P(MFHRS(SECT),U,X)=$P(MFHRS(SECT),U,X)+$J($P(NBFTEE,U,X),0,1)
15 . . S $P(DMNHRS(SECT),U,X)=$P(DMNHRS(SECT),U,X)+$J($P(NBFTEE,U,X),0,1)
16 . . S $P(MNHRS(SECT),U,X)=$P(MNHRS(SECT),U,X)+$J($P(NBFTEE,U,X),0,1)
17 . . Q
18 . Q
19 I COUNTSW D
20 . S WCOUNT(NPLOC,SECT)=WCOUNT(NPLOC,SECT)+NBPCC
21 . I NURMDSW S FCOUNT(SECT)=FCOUNT(SECT)+NBPCC
22 . S DCOUNT(SECT)=DCOUNT(SECT)+NBPCC
23 . S COUNT(SECT)=COUNT(SECT)+NBPCC
24 G:$D(NURSUMSW) TOTAL
25 W !,?18,$$REPEAT^XLFSTR("-",114),!,?3,SECT,$S(COUNTSW:" COUNT",1:" SUMMARY")
26 I 'COUNTSW W ?23,$S(SECT="ATC":" N/A",1:$J($P(NBREQ,U),3,1))
27 W ?29,$J($P(NBFTEE,U),3,1)
28 I 'COUNTSW W ?35,$J($P(NBVAR,U),4,1) W:NURSZAP'>6 ?41,$J($P(NBPROD,U),3,0) W ?49,$S(SECT="ATC":" N/A",1:$J($P(NBREQ,U,2),3,1))
29 W ?55,$J($P(NBFTEE,U,2),3,1)
30 I 'COUNTSW W ?61,$J($P(NBVAR,U,2),4,1) W:NURSZAP'>6 ?67,$J($P(NBPROD,U,2),3,0) W ?75,$S(SECT="ATC":" N/A",1:$J($P(NBREQ,U,3),3,1))
31 W ?81,$J($P(NBFTEE,U,3),3,1)
32 I 'COUNTSW W ?87,$J($P(NBVAR,U,3),4,1) W:NURSZAP'>6 ?93,$J($P(NBPROD,U,3),3,0)
33 W ?98,$J($P(NBPC,U),3,1),?104,$J($P(NBPC,U,2),3,1),?110,$J($P(NBPC,U,3),3,1),?116,$J($P(NBPC,U,4),3,1),?122,$J($P(NBPC,U,5),3,1),?127,$J(NBPCC,4,1),!
34TOTAL F X=1,2,3 S $P(NBREQ,U,X)=0,$P(NBVAR,U,X)=0,$P(NBPROD,U,X)=0,$P(NBFTEE,U,X)=0,$P(NAPROD,U,X)=0
35 I '$G(COUNTSW) D
36 . F X=1:1:5 S $P(NWPC,U,X)=$P(NWPC,U,X)+$P(NBPC,U,X),$P(NDPC,U,X)=$P(NDPC,U,X)+$P(NBPC,U,X),$P(NHPC,U,X)=$P(NHPC,U,X)+$P(NBPC,U,X) S:NURMDSW $P(NFPC,U,X)=$P(NFPC,U,X)+$P(NBPC,U,X) S $P(NBPC,U,X)=0
37 . S NWPCC=NWPCC+NBPCC,NDPCC=NDPCC+NBPCC,NHPCC=NHPCC+NBPCC S:NURMDSW NFPCC=NFPCC+NBPCC
38 . Q
39 S (COUNTSW,NBPCC)=0,NBR=1
40 Q
41BRK ; LOCATION SUMMARY
42 F X=1,2,3 D
43 . I 'COUNTSW(1) D
44 . . 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 . . Q
46 . Q
47 I $D(NURSUMSW),NWARD G TOTAL1
48 W:'$D(NURSUMSW) ?18,$$REPEAT^XLFSTR("-",114)
49 I COUNTSW(1) S ZCNT=0,Z1="" F S Z1=$O(^TMP($J,NDATE,NPFAC,NPLOC,Z1)) Q:Z1="" S ZCNT=ZCNT+1
50 I $S('COUNTSW(1):1,COUNTSW(1)&(ZCNT>1):1,1:0) D
51 . K ZCNT W !,$E(NPLOC,1,10)," SUMMARY",?23,$J($P(NWREQ,U),3,1),?29,$J($P(NWFTEE,U),3,1),?34,$J($P(NWVAR,U),5,1) W:NURSZAP'>6 ?41,$J($P(NWPROD,U),3,0) W ?49,$J($P(NWREQ,U,2),3,1),?55,$J($P(NWFTEE,U,2),3,1)
52 . W ?61,$J($P(NWVAR,U,2),4,1) W:NURSZAP'>6 ?67,$J($P(NWPROD,U,2),3,0) W ?75,$J($P(NWREQ,U,3),3,1),?81,$J($P(NWFTEE,U,3),3,1)
53 . 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),?122,$J($P(NWPC,U,5),3,1),?127,$J(NWPCC,4,1)
54 . Q
55 I COUNTSW(1) F Y="REC","HEM","DOM" I $D(WMNHRS(NPLOC,Y)) D
56 . I (+$G(WMNHRS(NPLOC,Y))!(+$P($G(WMNHRS(NPLOC,Y)),U,2)!(+$P($G(WMNHRS(NPLOC,Y)),U,3)!(+$G(WCOUNT(NPLOC,Y)))))) D
57 . . W !,$E(NPLOC,1,10)," "_Y_" COUNT",?29,$J($P(WMNHRS(NPLOC,Y),U),3,1),?55,$J(+$P(WMNHRS(NPLOC,Y),U,2),3,1),?81,$J(+$P(WMNHRS(NPLOC,Y),U,3),3,1)
58 . . W ?98,$J($P(WCOUNT(NPLOC,Y),U),3,1),?104,$J($P(WCOUNT(NPLOC,Y),U,2),3,1),?110,$J($P(WCOUNT(NPLOC,Y),U,3),3,1),?116,$J($P(WCOUNT(NPLOC,Y),U,4),3,1),?122,$J($P(WCOUNT(NPLOC,Y),U,5),3,1),?127,$J(+WCOUNT(NPLOC,Y),4,1)
59 . . Q
60 . Q
61TOTAL1 ;
62 F X=1,2,3 S $P(NWVAR,U,X)=0,$P(NWPROD,U,X)=0,$P(NWPC,U,X)=0,WCOUNT(NPLOC,Y)=0,$P(NWREQ,U,X)=0,$P(NWFTEE,U,X)=0
63 F X=1:1:5 S $P(NWPC,U,X)=0
64 S (COUNTSW(1),NWPCC)=0
65 Q
Note: See TracBrowser for help on using the repository browser.