NURSAWL0 ;HIRMFO/RM,FT-WORK LOAD STATISTICS ;2/27/98 14:25
;;4.0;NURSING SERVICE;**9**;Apr 25, 1997
;LAST MODIFIED BY MD-7/13/87
D DATESEL I NUROUTSW D QUIT Q
DEV S %ZIS="Q" D ^%ZIS K %ZIS K:POP IO("Q") G:POP QUIT I IO'=IO(0),IOST'?1"P".E!'$D(IO("Q")) S XQH="NURS-PRINTER QUEUE" W $C(7) D EN^XQH K XQH D ^%ZISC G DEV
I $D(IO("Q")) K IO("Q") S NURQUEUE=1,ZTDESC="Nursing Workload Stats",ZTIO=ION,ZTRTN="START^NURSAWL0" D LOOP,^%ZTLOAD S NURQUEUE=0 K ZTIO,ZTRTN,ZTSAVE G QUIT
START ;
K ^TMP($J)
S X=$O(^TMP($J,"")) I X="" S NUROUTSW=1 W !," THERE IS NO DATA FOR THIS REPORT " G QUIT
D QUIT
Q
HSKEEP ; SET LOCAL VARIABLES
S (NUROUTSW,NURPAGE,NURSW1,NSW2,NURQUEUE)=0
Q
DATESEL ; SELECT DATE FOR REPORT
S X="T-1" D ^%DT X ^DD("DD") S %DT("B")=Y
S %DT="AET",%DT("A")="Select DATE for report: " W ! D ^%DT K %DT W !
I X["^" S NUROUTSW=1 Q
G:Y'>0 DATESEL
S NRPTDAT=$P(Y,".",1)
Q
EN1 ; ENTRY FROM AMIS LOCATION WORKLOAD STATISTICS OPTION
Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
S NURSWARD="" D HSKEEP
G NURSAWL0
EN2 ; ENTRY FROM AMIS SERVICE WORKLOAD STATISTICS OPTION
Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
D HSKEEP W ! S DIC="^NURSF(211.4,",DIC(0)="AEMZ",DIC("A")="Select UNIT for report: " D ^DIC W !
G:X="^"!(X="") QUIT
G:(X["?")!(+Y<0) EN2
S NURSWARD=Y(0)
G NURSAWL0
LOOP F X="NURQUEUE","NUROUTSW","NURSW1","NSW2","NURPAGE","NURSWARD","NRPTDAT" S ZTSAVE(X)=""
Q
QUIT ; KILL LOCAL VARIABLES
D CLOSE^NURSUT1,^NURSKILL
Q
NURSAWL0 ;HIRMFO/RM,FT-WORK LOAD STATISTICS ;2/27/98 14:25
+1 ;;4.0;NURSING SERVICE;**9**;Apr 25, 1997
+2 ;LAST MODIFIED BY MD-7/13/87
+3 DO DATESEL
IF NUROUTSW
DO QUIT
QUIT
DEV SET %ZIS="Q"
DO ^%ZIS
KILL %ZIS
IF POP
KILL IO("Q")
IF POP
GOTO QUIT
IF IO'=IO(0)
IF IOST'?1"P".E!'$DATA(IO("Q"))
SET XQH="NURS-PRINTER QUEUE"
WRITE $CHAR(7)
DO EN^XQH
KILL XQH
DO ^%ZISC
GOTO DEV
+1 IF $DATA(IO("Q"))
KILL IO("Q")
SET NURQUEUE=1
SET ZTDESC="Nursing Workload Stats"
SET ZTIO=ION
SET ZTRTN="START^NURSAWL0"
DO LOOP
DO ^%ZTLOAD
SET NURQUEUE=0
KILL ZTIO,ZTRTN,ZTSAVE
GOTO QUIT
START ;
+1 KILL ^TMP($JOB)
+2 SET X=$ORDER(^TMP($JOB,""))
IF X=""
SET NUROUTSW=1
WRITE !," THERE IS NO DATA FOR THIS REPORT "
GOTO QUIT
+3 DO QUIT
+4 QUIT
HSKEEP ; SET LOCAL VARIABLES
+1 SET (NUROUTSW,NURPAGE,NURSW1,NSW2,NURQUEUE)=0
+2 QUIT
DATESEL ; SELECT DATE FOR REPORT
+1 SET X="T-1"
DO ^%DT
XECUTE ^DD("DD")
SET %DT("B")=Y
+2 SET %DT="AET"
SET %DT("A")="Select DATE for report: "
WRITE !
DO ^%DT
KILL %DT
WRITE !
+3 IF X["^"
SET NUROUTSW=1
QUIT
+4 IF Y'>0
GOTO DATESEL
+5 SET NRPTDAT=$PIECE(Y,".",1)
+6 QUIT
EN1 ; ENTRY FROM AMIS LOCATION WORKLOAD STATISTICS OPTION
+1 IF '$DATA(^DIC(213.9,1,"OFF"))
QUIT
IF $PIECE(^DIC(213.9,1,"OFF"),"^",1)=1
QUIT
+2 SET NURSWARD=""
DO HSKEEP
+3 GOTO NURSAWL0
EN2 ; ENTRY FROM AMIS SERVICE WORKLOAD STATISTICS OPTION
+1 IF '$DATA(^DIC(213.9,1,"OFF"))
QUIT
IF $PIECE(^DIC(213.9,1,"OFF"),"^",1)=1
QUIT
+2 DO HSKEEP
WRITE !
SET DIC="^NURSF(211.4,"
SET DIC(0)="AEMZ"
SET DIC("A")="Select UNIT for report: "
DO ^DIC
WRITE !
+3 IF X="^"!(X="")
GOTO QUIT
+4 IF (X["?")!(+Y<0)
GOTO EN2
+5 SET NURSWARD=Y(0)
+6 GOTO NURSAWL0
LOOP FOR X="NURQUEUE","NUROUTSW","NURSW1","NSW2","NURPAGE","NURSWARD","NRPTDAT"
SET ZTSAVE(X)=""
+1 QUIT
QUIT ; KILL LOCAL VARIABLES
+1 DO CLOSE^NURSUT1
DO ^NURSKILL
+2 QUIT