Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: NURSAWL0

NURSAWL0.m

Go to the documentation of this file.
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