VistA-FOIAVistA/r/NURSING_SERVICE-NUR/NURARMC0.m

26 lines
1.1 KiB
Mathematica

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