NURARWL6 ;HIRMFO/MD/-MANHOURS AMIS 1106a WORKLOAD STATISTICS CONT OF NURARWL5 ;9/20/96
;;4.0;NURSING SERVICE;;Apr 25, 1997
BEDTOT ;BEDSECTION SUMMARY
I COUNTSW S:'$D(WMNHRS(NPLOC,SECT)) WMNHRS(NPLOC,SECT)=0 S:'$D(WCOUNT(NPLOC,SECT)) WCOUNT(NPLOC,SECT)=0
F X=1,2,3 D
. I 'COUNTSW D
. . 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)
. . 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)
. . 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)
. . 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)
. . Q
. I COUNTSW D
. . S $P(WMNHRS(NPLOC,SECT),U,X)=$P(WMNHRS(NPLOC,SECT),U,X)+$J($P(NBFTEE,U,X),0,1)
. . I NURMDSW S $P(MFHRS(SECT),U,X)=$P(MFHRS(SECT),U,X)+$J($P(NBFTEE,U,X),0,1)
. . S $P(DMNHRS(SECT),U,X)=$P(DMNHRS(SECT),U,X)+$J($P(NBFTEE,U,X),0,1)
. . S $P(MNHRS(SECT),U,X)=$P(MNHRS(SECT),U,X)+$J($P(NBFTEE,U,X),0,1)
. . Q
. Q
I COUNTSW D
. S WCOUNT(NPLOC,SECT)=WCOUNT(NPLOC,SECT)+NBPCC
. I NURMDSW S FCOUNT(SECT)=FCOUNT(SECT)+NBPCC
. S DCOUNT(SECT)=DCOUNT(SECT)+NBPCC
. S COUNT(SECT)=COUNT(SECT)+NBPCC
G:$D(NURSUMSW) TOTAL
W !,?18,$$REPEAT^XLFSTR("-",114),!,?3,SECT,$S(COUNTSW:" COUNT",1:" SUMMARY")
I 'COUNTSW W ?23,$S(SECT="ATC":" N/A",1:$J($P(NBREQ,U),3,1))
W ?29,$J($P(NBFTEE,U),3,1)
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))
W ?55,$J($P(NBFTEE,U,2),3,1)
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))
W ?81,$J($P(NBFTEE,U,3),3,1)
I 'COUNTSW W ?87,$J($P(NBVAR,U,3),4,1) W:NURSZAP'>6 ?93,$J($P(NBPROD,U,3),3,0)
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),!
TOTAL 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
I '$G(COUNTSW) D
. 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
. S NWPCC=NWPCC+NBPCC,NDPCC=NDPCC+NBPCC,NHPCC=NHPCC+NBPCC S:NURMDSW NFPCC=NFPCC+NBPCC
. Q
S (COUNTSW,NBPCC)=0,NBR=1
Q
BRK ; LOCATION SUMMARY
F X=1,2,3 D
. I 'COUNTSW(1) D
. . 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
. . Q
. Q
I $D(NURSUMSW),NWARD G TOTAL1
W:'$D(NURSUMSW) ?18,$$REPEAT^XLFSTR("-",114)
I COUNTSW(1) S ZCNT=0,Z1="" F S Z1=$O(^TMP($J,NDATE,NPFAC,NPLOC,Z1)) Q:Z1="" S ZCNT=ZCNT+1
I $S('COUNTSW(1):1,COUNTSW(1)&(ZCNT>1):1,1:0) D
. 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)
. 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)
. 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)
. Q
I COUNTSW(1) F Y="REC","HEM","DOM" I $D(WMNHRS(NPLOC,Y)) D
. I (+$G(WMNHRS(NPLOC,Y))!(+$P($G(WMNHRS(NPLOC,Y)),U,2)!(+$P($G(WMNHRS(NPLOC,Y)),U,3)!(+$G(WCOUNT(NPLOC,Y)))))) D
. . 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)
. . 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)
. . Q
. Q
TOTAL1 ;
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
F X=1:1:5 S $P(NWPC,U,X)=0
S (COUNTSW(1),NWPCC)=0
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HNURARWL6 4538 printed Nov 22, 2024@17:30:04 Page 2
NURARWL6 ;HIRMFO/MD/-MANHOURS AMIS 1106a WORKLOAD STATISTICS CONT OF NURARWL5 ;9/20/96
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
BEDTOT ;BEDSECTION SUMMARY
+1 IF COUNTSW
if '$DATA(WMNHRS(NPLOC,SECT))
SET WMNHRS(NPLOC,SECT)=0
if '$DATA(WCOUNT(NPLOC,SECT))
SET WCOUNT(NPLOC,SECT)=0
+2 FOR X=1,2,3
Begin DoDot:1
+3 IF 'COUNTSW
Begin DoDot:2
+4 SET $PIECE(NBVAR,U,X)=$JUSTIFY($PIECE(NBFTEE,U,X),1,1)-$JUSTIFY($PIECE(NBREQ,U,X),1,1)
IF $JUSTIFY($PIECE(NBFTEE,U,X),1,1)
IF $JUSTIFY($PIECE(NBREQ,U,X),1,1)
IF NURSZAP'>6
SET $PIECE(NBPROD,U,X)=$SELECT($PIECE(NAPROD,U,X):$JUSTIFY($PIECE(NAPROD,U,X),1,1)/3,1:($JUSTIFY($PIECE(NBREQ,U,X),1,1)/$JUSTIFY($PIECE(NBFTEE,U,X),1,1))*100)
+5 SET $PIECE(NWREQ,U,X)=$PIECE(NWREQ,U,X)+$JUSTIFY($PIECE(NBREQ,U,X),0,1)
SET $PIECE(NDREQ,U,X)=$PIECE(NDREQ,U,X)+$JUSTIFY($PIECE(NBREQ,U,X),0,1)
SET $PIECE(NHREQ,U,X)=$PIECE(NHREQ,U,X)+$JUSTIFY($PIECE(NBREQ,U,X),0,1)
+6 IF NURMDSW
SET $PIECE(NFREQ,U,X)=$PIECE(NFREQ,U,X)+$JUSTIFY($PIECE(NBREQ,U,X),0,1)
SET $PIECE(NFFTEE,U,X)=$PIECE(NFFTEE,U,X)+$JUSTIFY($PIECE(NBFTEE,U,X),0,1)
+7 SET $PIECE(NWFTEE,U,X)=$PIECE(NWFTEE,U,X)+$JUSTIFY($PIECE(NBFTEE,U,X),0,1)
SET $PIECE(NHFTEE,U,X)=$PIECE(NHFTEE,U,X)+$JUSTIFY($PIECE(NBFTEE,U,X),0,1)
SET $PIECE(NDFTEE,U,X)=$PIECE(NDFTEE,U,X)+$JUSTIFY($PIECE(NBFTEE,U,X),0,1)
+8 QUIT
End DoDot:2
+9 IF COUNTSW
Begin DoDot:2
+10 SET $PIECE(WMNHRS(NPLOC,SECT),U,X)=$PIECE(WMNHRS(NPLOC,SECT),U,X)+$JUSTIFY($PIECE(NBFTEE,U,X),0,1)
+11 IF NURMDSW
SET $PIECE(MFHRS(SECT),U,X)=$PIECE(MFHRS(SECT),U,X)+$JUSTIFY($PIECE(NBFTEE,U,X),0,1)
+12 SET $PIECE(DMNHRS(SECT),U,X)=$PIECE(DMNHRS(SECT),U,X)+$JUSTIFY($PIECE(NBFTEE,U,X),0,1)
+13 SET $PIECE(MNHRS(SECT),U,X)=$PIECE(MNHRS(SECT),U,X)+$JUSTIFY($PIECE(NBFTEE,U,X),0,1)
+14 QUIT
End DoDot:2
+15 QUIT
End DoDot:1
+16 IF COUNTSW
Begin DoDot:1
+17 SET WCOUNT(NPLOC,SECT)=WCOUNT(NPLOC,SECT)+NBPCC
+18 IF NURMDSW
SET FCOUNT(SECT)=FCOUNT(SECT)+NBPCC
+19 SET DCOUNT(SECT)=DCOUNT(SECT)+NBPCC
+20 SET COUNT(SECT)=COUNT(SECT)+NBPCC
End DoDot:1
+21 if $DATA(NURSUMSW)
GOTO TOTAL
+22 WRITE !,?18,$$REPEAT^XLFSTR("-",114),!,?3,SECT,$SELECT(COUNTSW:" COUNT",1:" SUMMARY")
+23 IF 'COUNTSW
WRITE ?23,$SELECT(SECT="ATC":" N/A",1:$JUSTIFY($PIECE(NBREQ,U),3,1))
+24 WRITE ?29,$JUSTIFY($PIECE(NBFTEE,U),3,1)
+25 IF 'COUNTSW
WRITE ?35,$JUSTIFY($PIECE(NBVAR,U),4,1)
if NURSZAP'>6
WRITE ?41,$JUSTIFY($PIECE(NBPROD,U),3,0)
WRITE ?49,$SELECT(SECT="ATC":" N/A",1:$JUSTIFY($PIECE(NBREQ,U,2),3,1))
+26 WRITE ?55,$JUSTIFY($PIECE(NBFTEE,U,2),3,1)
+27 IF 'COUNTSW
WRITE ?61,$JUSTIFY($PIECE(NBVAR,U,2),4,1)
if NURSZAP'>6
WRITE ?67,$JUSTIFY($PIECE(NBPROD,U,2),3,0)
WRITE ?75,$SELECT(SECT="ATC":" N/A",1:$JUSTIFY($PIECE(NBREQ,U,3),3,1))
+28 WRITE ?81,$JUSTIFY($PIECE(NBFTEE,U,3),3,1)
+29 IF 'COUNTSW
WRITE ?87,$JUSTIFY($PIECE(NBVAR,U,3),4,1)
if NURSZAP'>6
WRITE ?93,$JUSTIFY($PIECE(NBPROD,U,3),3,0)
+30 WRITE ?98,$JUSTIFY($PIECE(NBPC,U),3,1),?104,$JUSTIFY($PIECE(NBPC,U,2),3,1),?110,$JUSTIFY($PIECE(NBPC,U,3),3,1),?116,$JUSTIFY($PIECE(NBPC,U,4),3,1),?122,$JUSTIFY($PIECE(NBPC,U,5),3,1),?127,$JUSTIFY(NBPCC,4,1),!
TOTAL FOR X=1,2,3
SET $PIECE(NBREQ,U,X)=0
SET $PIECE(NBVAR,U,X)=0
SET $PIECE(NBPROD,U,X)=0
SET $PIECE(NBFTEE,U,X)=0
SET $PIECE(NAPROD,U,X)=0
+1 IF '$GET(COUNTSW)
Begin DoDot:1
+2 FOR X=1:1:5
SET $PIECE(NWPC,U,X)=$PIECE(NWPC,U,X)+$PIECE(NBPC,U,X)
SET $PIECE(NDPC,U,X)=$PIECE(NDPC,U,X)+$PIECE(NBPC,U,X)
SET $PIECE(NHPC,U,X)=$PIECE(NHPC,U,X)+$PIECE(NBPC,U,X)
if NURMDSW
SET $PIECE(NFPC,U,X)=$PIECE(NFPC,U,X)+$PIECE(NBPC,U,X)
SET $PIECE(NBPC,U,X)=0
+3 SET NWPCC=NWPCC+NBPCC
SET NDPCC=NDPCC+NBPCC
SET NHPCC=NHPCC+NBPCC
if NURMDSW
SET NFPCC=NFPCC+NBPCC
+4 QUIT
End DoDot:1
+5 SET (COUNTSW,NBPCC)=0
SET NBR=1
+6 QUIT
BRK ; LOCATION SUMMARY
+1 FOR X=1,2,3
Begin DoDot:1
+2 IF 'COUNTSW(1)
Begin DoDot:2
+3 SET $PIECE(NWVAR,U,X)=$JUSTIFY($PIECE(NWFTEE,U,X),1,1)-$JUSTIFY($PIECE(NWREQ,U,X),1,1)
IF $JUSTIFY($PIECE(NWFTEE,U,X),1,1)
IF $JUSTIFY($PIECE(NWREQ,U,X),1,1)
IF NURSZAP'>6
IF NWPCC
SET $PIECE(NWPROD,U,X)=($JUSTIFY($PIECE(NWREQ,U,X),1,1)/$JUSTIFY($PIECE(NWFTEE,U,X),1,1))*100
+4 QUIT
End DoDot:2
+5 QUIT
End DoDot:1
+6 IF $DATA(NURSUMSW)
IF NWARD
GOTO TOTAL1
+7 if '$DATA(NURSUMSW)
WRITE ?18,$$REPEAT^XLFSTR("-",114)
+8 IF COUNTSW(1)
SET ZCNT=0
SET Z1=""
FOR
SET Z1=$ORDER(^TMP($JOB,NDATE,NPFAC,NPLOC,Z1))
if Z1=""
QUIT
SET ZCNT=ZCNT+1
+9 IF $SELECT('COUNTSW(1):1,COUNTSW(1)&(ZCNT>1):1,1:0)
Begin DoDot:1
+10 KILL ZCNT
WRITE !,$EXTRACT(NPLOC,1,10)," SUMMARY",?23,$JUSTIFY($PIECE(NWREQ,U),3,1),?29,$JUSTIFY($PIECE(NWFTEE,U),3,1),?34,$JUSTIFY($PIECE(NWVAR,U),5,1)
if NURSZAP'>6
WRITE ?41,$JUSTIFY($PIECE(NWPROD,U),3,0)
WRITE ?49,$JUSTIFY($PIECE(NWREQ,U,2),3,1),?55,$JUSTIFY($PIECE(NWFTEE,U,2),3,1)
+11 WRITE ?61,$JUSTIFY($PIECE(NWVAR,U,2),4,1)
if NURSZAP'>6
WRITE ?67,$JUSTIFY($PIECE(NWPROD,U,2),3,0)
WRITE ?75,$JUSTIFY($PIECE(NWREQ,U,3),3,1),?81,$JUSTIFY($PIECE(NWFTEE,U,3),3,1)
+12 WRITE ?87,$JUSTIFY($PIECE(NWVAR,U,3),4,1)
if NURSZAP'>6
WRITE ?93,$JUSTIFY($PIECE(NWPROD,U,3),3,0)
WRITE ?98,$JUSTIFY($PIECE(NWPC,U),3,1),?104,$JUSTIFY($PIECE(NWPC,U,2),3,1),?110,$JUSTIFY($PIECE(NWPC,U,3),3,1),?116,$JUSTIFY($PIECE(NWPC,U,4),3,1),?122,$JUSTIFY($PIECE(NWPC,U,5),3,1),?127,$JUSTIFY(NWPCC,4,1)
+13 QUIT
End DoDot:1
+14 IF COUNTSW(1)
FOR Y="REC","HEM","DOM"
IF $DATA(WMNHRS(NPLOC,Y))
Begin DoDot:1
+15 IF (+$GET(WMNHRS(NPLOC,Y))!(+$PIECE($GET(WMNHRS(NPLOC,Y)),U,2)!(+$PIECE($GET(WMNHRS(NPLOC,Y)),U,3)!(+$GET(WCOUNT(NPLOC,Y))))))
Begin DoDot:2
+16 WRITE !,$EXTRACT(NPLOC,1,10)," "_Y_" COUNT",?29,$JUSTIFY($PIECE(WMNHRS(NPLOC,Y),U),3,1),?55,$JUSTIFY(+$PIECE(WMNHRS(NPLOC,Y),U,2),3,1),?81,$JUSTIFY(+$PIECE(WMNHRS(NPLOC,Y),U,3),3,1)
+17 WRITE ?98,$JUSTIFY($PIECE(WCOUNT(NPLOC,Y),U),3,1),?104,$JUSTIFY($PIECE(WCOUNT(NPLOC,Y),U,2),3,1),?110,$JUSTIFY($PIECE(WCOUNT(NPLOC,Y),U,3),3,1),?116,$JUSTIFY(...
... $PIECE(WCOUNT(NPLOC,Y),U,4),3,1),?122,$JUSTIFY($PIECE(WCOUNT(NPLOC,Y),U,5),3,1),?127,$JUSTIFY(+WCOUNT(NPLOC,Y),4,1)
+18 QUIT
End DoDot:2
+19 QUIT
End DoDot:1
TOTAL1 ;
+1 FOR X=1,2,3
SET $PIECE(NWVAR,U,X)=0
SET $PIECE(NWPROD,U,X)=0
SET $PIECE(NWPC,U,X)=0
SET WCOUNT(NPLOC,Y)=0
SET $PIECE(NWREQ,U,X)=0
SET $PIECE(NWFTEE,U,X)=0
+2 FOR X=1:1:5
SET $PIECE(NWPC,U,X)=0
+3 SET (COUNTSW(1),NWPCC)=0
+4 QUIT