NURARWL7 ;HIRMFO/MD,FT-DAILY TOTAL ROUTINE FOR AMIS WORKLOAD STATISTICS REPORT ;9/20/96
;;4.0;NURSING SERVICE;;Apr 25, 1997
DAYTL ; DAY SUMMARY FOR AMIS WORKLOAD REPORTS
I $G(NWARD),$G(NURSUMSW) D
. I $Y>(IOSL-4) D HEADER^NURARWL8 Q:NUROUT
. D DATE^NURARWL8
. Q
F Y=1,2,3 D
. S $P(NDVAR,U,Y)=$J($P(NDFTEE,U,Y),1,1)-$J($P(NDREQ,U,Y),1,1) I $J($P(NDFTEE,U,Y),1,1),$J($P(NDREQ,U,Y),1,1),NURSZAP'>6,NDPCC S $P(NDPROD,U,Y)=($J($P(NDREQ,U,Y),1,1)/$J($P(NDFTEE,U,Y),1,1))*100
. S $P(NCVAR,U,Y)=$J($P(NCFT,U,Y),1,1)-$J($P(NCRQ,U,Y),1,1) I $J($P(NCFT,U,Y),1,1),$J($P(NCRQ,U,Y),1,1),NURSZAP'>6,NCPCC S $P(NCPROD,U,Y)=($J($P(NCRQ,U,Y),1,1)/$J($P(NCFT,U,Y),1,1))*100
. Q
W !,?18,$$REPEAT^XLFSTR("-",114) S NDATED(2)=$E(NDATE,4,5)_"/"_$E(NDATE,6,7)_"/"_$E(NDATE,2,3)
D
. W !,NDATED(2)," SUMMARY",?22,$J($P(NDREQ,U),4,1),?28,$J($P(NDFTEE,U),4,1),?34,$J($P(NDVAR,U),5,1) W:NURSZAP'>6 ?41,$J($P(NDPROD,U),3,0) W ?48,$J($P(NDREQ,U,2),4,1),?54,$J($P(NDFTEE,U,2),4,1)
. W ?60,$J($P(NDVAR,U,2),5,1) W:NURSZAP'>6 ?67,$J($P(NDPROD,U,2),3,0) W ?74,$J($P(NDREQ,U,3),4,1),?80,$J($P(NDFTEE,U,3),4,1),?86,$J($P(NDVAR,U,3),5,1) W:NURSZAP'>6 ?93,$J($P(NDPROD,U,3),3,0)
. W ?97,$J($P(NDPC,U),4,1),?103,$J($P(NDPC,U,2),4,1),?109,$J($P(NDPC,U,3),4,1),?115,$J($P(NDPC,U,4),4,1),?122,$J($P(NDPC,U,5),3,1),?126,$J(NDPCC,5,1)
. Q
F Z="DOM","REC","HEM" I +DMNHRS(Z)!(+$P(DMNHRS(Z),U,2))!(+$P(DMNHRS(Z),U,3))!(+DCOUNT(Z)) D
. W !,NDATED(2)," ",Z," COUNT",?28,$J(+DMNHRS(Z),4,1),?54,$J($P(DMNHRS(Z),U,2),4,1),?80,$J($P(DMNHRS(Z),U,3),4,1)
. W ?97,$J(+DCOUNT(Z),4,1),?103,$J($P(DCOUNT(Z),U,2),4,1),?109,$J($P(DCOUNT(Z),U,3),4,1),?115,$J($P(DCOUNT(Z),U,4),4,1),?122,$J($P(DCOUNT(Z),U,5),3,1),?126,$J(+DCOUNT(Z),5,1)
. S DCOUNT(Z)=0
. Q
F X=1:1:3 S $P(NDREQ,U,X)=0,$P(NDFTEE,U,X)=0,$P(NDVAR,U,X)=0,$P(NDPROD,U,X)=0,$P(NCFT,U,X)=0,$P(NCVAR,U,X)=0,$P(NCPROD,U,X)=0 F Z="DOM","REC","HEM" S $P(DMNHRS(Z),U,X)=0
F X=1:1:5 S $P(NDPC,U,X)=0
S NDPCC=0,NBR=1
Q
PRINT ;
; DETAIL LINE PRINT FOR AMIS WORKLOAD REPORT
;
Q:$G(NURSUMSW)
I ($Y>(IOSL-9)) S:'NURMDSW NBRK=0 D HEADER^NURARWL8 Q:NUROUT
W ! I NBR W !,$E(NPLOC,1,10)
W ?11,$S(NSHFT=1:"NIGHT",NSHFT=2:"DAY",NSHFT=3:"EVE"),?17,$J(NSEC,3) S:NBR NBR=0
I 'COUNTSW W ?23,$S(SECT="ATC":" N/A",1:$J($P(NREQ(NSHFT),U),3,1))
W ?29,$J($P(NDFTEE(NSHFT),U),3,1)
I 'COUNTSW W ?35,$J($P(NVAR(NSHFT),U),4,1) W:NURSZAP'>6 ?41,$J($P(NPROD(NSHFT),U),3,0) W ?49,$S($P(NURS213,U)="ATC":" N/A",1:$J($P(NREQ(NSHFT),U,2),3,1))
W ?55,$J($P(NDFTEE(NSHFT),U,2),3,1)
I 'COUNTSW W ?61,$J($P(NVAR(NSHFT),U,2),4,1) W:NURSZAP'>6 ?67,$J($P(NPROD(NSHFT),U,2),3,0) W ?75,$S($P(NURS213,U)="ATC":" N/A",1:$J($P(NREQ(NSHFT),U,3),3,1))
W ?81,$J($P(NDFTEE(NSHFT),U,3),3,1)
I 'COUNTSW W ?87,$J($P(NVAR(NSHFT),U,3),4,1) W:NURSZAP'>6 ?93,$J($P(NPROD(NSHFT),U,3),3,0)
W ?98,$J($P(NPC(NSHFT),U),3),?104,$J($P(NPC(NSHFT),U,2),3),?110,$J($P(NPC(NSHFT),U,3),3),?116,$J($P(NPC(NSHFT),U,4),3),?122,$J($P(NPC(NSHFT),U,5),3),?126,$J(NPCC(NSHFT),4)
Q
EN1 ; ENTRY POINT TO OPTION NURAPR-RES-CURWKL-QUEUE
S NHOS=1,NURSZAP=6,(NUROUT,NPCT,NURQUIT,NURMDSW,NURPLSW,NSW1,NURQUEUE)=0 D EN9^NURSAGSP S:NURMDSW NURFAC=1 S:NURPLSW NPROG=1
I '$P($G(^DIC(213.9,1,0)),U,7) D S DIE="^DIC(213.9,",DA=1,DR="8" D ^DIE K DIE,DR I "^"[X S NUROUT=1 Q
. W !,$C(7),?5,"The professional percentage default site parameter, for wards without an",!,?5,"entry in the professional percentage field, in the NURS LOCATION File",!,?5,"entry must be entered: ",!
. Q
I '$D(^NURSF(211.4,"ABS")) W !!,$C(7),"To generate this report AMIS Bedsections must be associated with MAS locations",!,"Contact the NURSING ADP Coordinator." S NUROUT=1 Q
S NURY(1)=$P(^DIC(213.9,1,0),"^",4,6) D NOW^%DTC S NURY(0)=$E($P(%,".",2)_"0001",1,4)
S NURY(2)=$S(NURY(0)>+$P(NURY(1),U,2)!(NURY(0)'>+$P(NURY(1),U,3)):"N",NURY(0)>+$P(NURY(1),U,3)&((NURY(0)'>+$P(NURY(1),U))):"D",1:"E")
I NURY(2)="" S NUROUT=1 Q
S NURY=$S(NURY(2)="N":"D",NURY(2)="D":"E",1:"N") ;use next shift
S NURSHFT=NURY
S NRPTDAT("PWLS")="" ;flag to indicate projected output
Q
EN2 ;
S (NURQUIT,NURMDSW,NSW1,NURQUEUE)=0,REQWRD="" D EN9^NURSAGSP S:NURMDSW NURFAC=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HNURARWL7 4153 printed Dec 13, 2024@02:20:01 Page 2
NURARWL7 ;HIRMFO/MD,FT-DAILY TOTAL ROUTINE FOR AMIS WORKLOAD STATISTICS REPORT ;9/20/96
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
DAYTL ; DAY SUMMARY FOR AMIS WORKLOAD REPORTS
+1 IF $GET(NWARD)
IF $GET(NURSUMSW)
Begin DoDot:1
+2 IF $Y>(IOSL-4)
DO HEADER^NURARWL8
if NUROUT
QUIT
+3 DO DATE^NURARWL8
+4 QUIT
End DoDot:1
+5 FOR Y=1,2,3
Begin DoDot:1
+6 SET $PIECE(NDVAR,U,Y)=$JUSTIFY($PIECE(NDFTEE,U,Y),1,1)-$JUSTIFY($PIECE(NDREQ,U,Y),1,1)
IF $JUSTIFY($PIECE(NDFTEE,U,Y),1,1)
IF $JUSTIFY($PIECE(NDREQ,U,Y),1,1)
IF NURSZAP'>6
IF NDPCC
SET $PIECE(NDPROD,U,Y)=($JUSTIFY($PIECE(NDREQ,U,Y),1,1)/$JUSTIFY($PIECE(NDFTEE,U,Y),1,1))*100
+7 SET $PIECE(NCVAR,U,Y)=$JUSTIFY($PIECE(NCFT,U,Y),1,1)-$JUSTIFY($PIECE(NCRQ,U,Y),1,1)
IF $JUSTIFY($PIECE(NCFT,U,Y),1,1)
IF $JUSTIFY($PIECE(NCRQ,U,Y),1,1)
IF NURSZAP'>6
IF NCPCC
SET $PIECE(NCPROD,U,Y)=($JUSTIFY($PIECE(NCRQ,U,Y),1,1)/$JUSTIFY($PIECE(NCFT,U,Y),1,1))*100
+8 QUIT
End DoDot:1
+9 WRITE !,?18,$$REPEAT^XLFSTR("-",114)
SET NDATED(2)=$EXTRACT(NDATE,4,5)_"/"_$EXTRACT(NDATE,6,7)_"/"_$EXTRACT(NDATE,2,3)
+10 Begin DoDot:1
+11 WRITE !,NDATED(2)," SUMMARY",?22,$JUSTIFY($PIECE(NDREQ,U),4,1),?28,$JUSTIFY($PIECE(NDFTEE,U),4,1),?34,$JUSTIFY($PIECE(NDVAR,U),5,1)
if NURSZAP'>6
WRITE ?41,$JUSTIFY($PIECE(NDPROD,U),3,0)
WRITE ?48,$JUSTIFY($PIECE(NDREQ,U,2),4,1),?54,$JUSTIFY($PIECE(NDFTEE,U,2),4,1)
+12 WRITE ?60,$JUSTIFY($PIECE(NDVAR,U,2),5,1)
if NURSZAP'>6
WRITE ?67,$JUSTIFY($PIECE(NDPROD,U,2),3,0)
WRITE ?74,$JUSTIFY($PIECE(NDREQ,U,3),4,1),?80,$JUSTIFY($PIECE(NDFTEE,U,3),4,1),?86,$JUSTIFY($PIECE(NDVAR,U,3),5,1)
if NURSZAP'>6
WRITE ?93,$JUSTIFY($PIECE(NDPROD,U,3),3,0)
+13 WRITE ?97,$JUSTIFY($PIECE(NDPC,U),4,1),?103,$JUSTIFY($PIECE(NDPC,U,2),4,1),?109,$JUSTIFY($PIECE(NDPC,U,3),4,1),?115,$JUSTIFY($PIECE(NDPC,U,4),4,1),?122,$JUSTIFY($PIECE(NDPC,U,5),3,1),?126,$JUSTIFY(NDPCC,5,1)
+14 QUIT
End DoDot:1
+15 FOR Z="DOM","REC","HEM"
IF +DMNHRS(Z)!(+$PIECE(DMNHRS(Z),U,2))!(+$PIECE(DMNHRS(Z),U,3))!(+DCOUNT(Z))
Begin DoDot:1
+16 WRITE !,NDATED(2)," ",Z," COUNT",?28,$JUSTIFY(+DMNHRS(Z),4,1),?54,$JUSTIFY($PIECE(DMNHRS(Z),U,2),4,1),?80,$JUSTIFY($PIECE(DMNHRS(Z),U,3),4,1)
+17 WRITE ?97,$JUSTIFY(+DCOUNT(Z),4,1),?103,$JUSTIFY($PIECE(DCOUNT(Z),U,2),4,1),?109,$JUSTIFY($PIECE(DCOUNT(Z),U,3),4,1),?115,$JUSTIFY($PIECE(DCOUNT(Z),U,4),4,1),?122,$JUSTIFY($PIECE(DCOUNT(Z),U,5),3,1),?126,$JUSTIFY(+DCOUNT(Z),5,1)
+18 SET DCOUNT(Z)=0
+19 QUIT
End DoDot:1
+20 FOR X=1:1:3
SET $PIECE(NDREQ,U,X)=0
SET $PIECE(NDFTEE,U,X)=0
SET $PIECE(NDVAR,U,X)=0
SET $PIECE(NDPROD,U,X)=0
SET $PIECE(NCFT,U,X)=0
SET $PIECE(NCVAR,U,X)=0
SET $PIECE(NCPROD,U,X)=0
FOR Z="DOM","REC","HEM"
SET $PIECE(DMNHRS(Z),U,X)=0
+21 FOR X=1:1:5
SET $PIECE(NDPC,U,X)=0
+22 SET NDPCC=0
SET NBR=1
+23 QUIT
PRINT ;
+1 ; DETAIL LINE PRINT FOR AMIS WORKLOAD REPORT
+2 ;
+3 if $GET(NURSUMSW)
QUIT
+4 IF ($Y>(IOSL-9))
if 'NURMDSW
SET NBRK=0
DO HEADER^NURARWL8
if NUROUT
QUIT
+5 WRITE !
IF NBR
WRITE !,$EXTRACT(NPLOC,1,10)
+6 WRITE ?11,$SELECT(NSHFT=1:"NIGHT",NSHFT=2:"DAY",NSHFT=3:"EVE"),?17,$JUSTIFY(NSEC,3)
if NBR
SET NBR=0
+7 IF 'COUNTSW
WRITE ?23,$SELECT(SECT="ATC":" N/A",1:$JUSTIFY($PIECE(NREQ(NSHFT),U),3,1))
+8 WRITE ?29,$JUSTIFY($PIECE(NDFTEE(NSHFT),U),3,1)
+9 IF 'COUNTSW
WRITE ?35,$JUSTIFY($PIECE(NVAR(NSHFT),U),4,1)
if NURSZAP'>6
WRITE ?41,$JUSTIFY($PIECE(NPROD(NSHFT),U),3,0)
WRITE ?49,$SELECT($PIECE(NURS213,U)="ATC":" N/A",1:$JUSTIFY($PIECE(NREQ(NSHFT),U,2),3,1))
+10 WRITE ?55,$JUSTIFY($PIECE(NDFTEE(NSHFT),U,2),3,1)
+11 IF 'COUNTSW
WRITE ?61,$JUSTIFY($PIECE(NVAR(NSHFT),U,2),4,1)
if NURSZAP'>6
WRITE ?67,$JUSTIFY($PIECE(NPROD(NSHFT),U,2),3,0)
WRITE ?75,$SELECT($PIECE(NURS213,U)="ATC":" N/A",1:$JUSTIFY($PIECE(NREQ(NSHFT),U,3),3,1))
+12 WRITE ?81,$JUSTIFY($PIECE(NDFTEE(NSHFT),U,3),3,1)
+13 IF 'COUNTSW
WRITE ?87,$JUSTIFY($PIECE(NVAR(NSHFT),U,3),4,1)
if NURSZAP'>6
WRITE ?93,$JUSTIFY($PIECE(NPROD(NSHFT),U,3),3,0)
+14 WRITE ?98,$JUSTIFY($PIECE(NPC(NSHFT),U),3),?104,$JUSTIFY($PIECE(NPC(NSHFT),U,2),3),?110,$JUSTIFY($PIECE(NPC(NSHFT),U,3),3),?116,$JUSTIFY($PIECE(NPC(NSHFT),U,4),3),?122,$JUSTIFY($PIECE(NPC(NSHFT),U,5),3),?126,$JUSTIFY(NPCC(NSHFT),4)
+15 QUIT
EN1 ; ENTRY POINT TO OPTION NURAPR-RES-CURWKL-QUEUE
+1 SET NHOS=1
SET NURSZAP=6
SET (NUROUT,NPCT,NURQUIT,NURMDSW,NURPLSW,NSW1,NURQUEUE)=0
DO EN9^NURSAGSP
if NURMDSW
SET NURFAC=1
if NURPLSW
SET NPROG=1
+2 IF '$PIECE($GET(^DIC(213.9,1,0)),U,7)
Begin DoDot:1
+3 WRITE !,$CHAR(7),?5,"The professional percentage default site parameter, for wards without an",!,?5,"entry in the professional percentage field, in the NURS LOCATION File",!,?5,"entry must be entered: ",!
+4 QUIT
End DoDot:1
SET DIE="^DIC(213.9,"
SET DA=1
SET DR="8"
DO ^DIE
KILL DIE,DR
IF "^"[X
SET NUROUT=1
QUIT
+5 IF '$DATA(^NURSF(211.4,"ABS"))
WRITE !!,$CHAR(7),"To generate this report AMIS Bedsections must be associated with MAS locations",!,"Contact the NURSING ADP Coordinator."
SET NUROUT=1
QUIT
+6 SET NURY(1)=$PIECE(^DIC(213.9,1,0),"^",4,6)
DO NOW^%DTC
SET NURY(0)=$EXTRACT($PIECE(%,".",2)_"0001",1,4)
+7 SET NURY(2)=$SELECT(NURY(0)>+$PIECE(NURY(1),U,2)!(NURY(0)'>+$PIECE(NURY(1),U,3)):"N",NURY(0)>+$PIECE(NURY(1),U,3)&((NURY(0)'>+$PIECE(NURY(1),U))):"D",1:"E")
+8 IF NURY(2)=""
SET NUROUT=1
QUIT
+9 ;use next shift
SET NURY=$SELECT(NURY(2)="N":"D",NURY(2)="D":"E",1:"N")
+10 SET NURSHFT=NURY
+11 ;flag to indicate projected output
SET NRPTDAT("PWLS")=""
+12 QUIT
EN2 ;
+1 SET (NURQUIT,NURMDSW,NSW1,NURQUEUE)=0
SET REQWRD=""
DO EN9^NURSAGSP
if NURMDSW
SET NURFAC=1
+2 QUIT