NURARMC0 ;HIRMFO/MD-DRIVER TO PRINT MIDNIGHT ACUITY REPORTS 2/2/96
;;4.0;NURSING SERVICE;;Apr 25, 1997
Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
S (NURQUEUE,NUROUT,NURMDSW,NURMDSW(3))=0 D LOSER^NURARST G QUIT:NUROUT,EN1:SEL=2,EN2:SEL=1
EN1 ; ENTRY FROM OPTION NURAPR-RES-MDPC
S NHOSPSW=1,NURSTYPE="",NURSUMSW=0
G HSKEEP
EN2 ; ENTRY FROM OPTION NURAPR-RES-MDPC
S NHOSPSW=0,NURSTYPE="W"
HSKEEP ; SET LOCAL VARIABLES
S NURPAGE=0,(NURSWARD,NBDSECT,NURSWHEN)="",%DT="",X="T",(NURMDSW(1),NURMDSW(2))=1
D ^%DT S NRPTDAT=Y
D RPTYPSEL^NURARPC0,REPTYPE^NURARPC0:NHOSPSW,WARDSEL^NURARPC0:'NHOSPSW I NUROUT G QUIT
D @$S(NURSTYPE="W"&(NHOSPSW):"HOSPSEL^NURARPC0",1:"BEDSEL^NURARPC0") I NUROUT G QUIT
D TIMESEL^NURARPC0 I NUROUT G QUIT
D @$S(NURSWHEN="D":"SETDAY^NURARPC1",NURSWHEN="M":"SETMON^NURARPC1",NURSWHEN="Q"!(NURSWHEN="A"):"SETQUART^NURARPC1",1:"ERROR^NURARPC0") W !
G:NUROUT QUIT
S ZTRTN="START^NURARMC0" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
START ;
K ^TMP($J),^TMP("NURBDSUM",$J)
D ^NURARPC3
I '$D(ZTSK),'NUROUT G HSKEEP
QUIT ; KILL LOCAL VARIABLES
D QUIT^NURARPC0
Q
NURARMC0 ;HIRMFO/MD-DRIVER TO PRINT MIDNIGHT ACUITY REPORTS 2/2/96
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
+2 IF '$DATA(^DIC(213.9,1,"OFF"))
QUIT
IF $PIECE(^DIC(213.9,1,"OFF"),"^",1)=1
QUIT
+3 SET (NURQUEUE,NUROUT,NURMDSW,NURMDSW(3))=0
DO LOSER^NURARST
IF NUROUT
GOTO QUIT
IF SEL=2
GOTO EN1
IF SEL=1
GOTO EN2
EN1 ; ENTRY FROM OPTION NURAPR-RES-MDPC
+1 SET NHOSPSW=1
SET NURSTYPE=""
SET NURSUMSW=0
+2 GOTO HSKEEP
EN2 ; ENTRY FROM OPTION NURAPR-RES-MDPC
+1 SET NHOSPSW=0
SET NURSTYPE="W"
HSKEEP ; SET LOCAL VARIABLES
+1 SET NURPAGE=0
SET (NURSWARD,NBDSECT,NURSWHEN)=""
SET %DT=""
SET X="T"
SET (NURMDSW(1),NURMDSW(2))=1
+2 DO ^%DT
SET NRPTDAT=Y
+3 DO RPTYPSEL^NURARPC0
IF NHOSPSW
DO REPTYPE^NURARPC0
IF 'NHOSPSW
DO WARDSEL^NURARPC0
IF NUROUT
GOTO QUIT
+4 DO @$SELECT(NURSTYPE="W"&(NHOSPSW):"HOSPSEL^NURARPC0",1:"BEDSEL^NURARPC0")
IF NUROUT
GOTO QUIT
+5 DO TIMESEL^NURARPC0
IF NUROUT
GOTO QUIT
+6 DO @$SELECT(NURSWHEN="D":"SETDAY^NURARPC1",NURSWHEN="M":"SETMON^NURARPC1",NURSWHEN="Q"!(NURSWHEN="A"):"SETQUART^NURARPC1",1:"ERROR^NURARPC0")
WRITE !
+7 IF NUROUT
GOTO QUIT
+8 SET ZTRTN="START^NURARMC0"
DO EN7^NURSUT0
IF POP!($DATA(ZTSK))
GOTO QUIT
START ;
+1 KILL ^TMP($JOB),^TMP("NURBDSUM",$JOB)
+2 DO ^NURARPC3
+3 IF '$DATA(ZTSK)
IF 'NUROUT
GOTO HSKEEP
QUIT ; KILL LOCAL VARIABLES
+1 DO QUIT^NURARPC0
+2 QUIT