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

NURARMH0.m

Go to the documentation of this file.
NURARMH0 ;HIRMFO/RM/MD-DRIVER TO PRINT AMIS 1106 PATIENT CARE MANHOURS REPORTS ;2/17/96
 ;;4.0;NURSING SERVICE;**14**;Apr 25, 1997
 Q:'$D(^DIC(213.9,1,"OFF"))  Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
 S (NUROUT,NURQUEUE)=0 D LOSER^NURARST G QUIT:NUROUT,EN1:SEL=2,EN2:SEL=1
EN1 ;ENTRY FROM OPTION NURAPR-RES-MANSER
 S NHOSPSW=1
 G HSKEEP
EN2 ;ENTRY FROM OPTION NURAPR-RES-MANLOC
 S NHOSPSW=0
HSKEEP ; SET LOCAL VARIABLES
 S (NUROUT,NURPAGE,NURQUEUE,NURMDSW,NURMDSW(3),NPTCEN,NBCEN,NBRK)=0,(NURSWARD,NBDSECT,NURSWHEN,%DT)="",X="T",(NURMDSW(1),NURMDSW(4))=1
 D ^%DT S NRPTDAT=Y
 W !!,?17,"Nursing AMIS 1106 Patient Care Manhours Reports"
 D EN9^NURSAGSP I NURMDSW,NHOSPSW D EN12^NURSAGSP G:$G(NUROUT) QUIT W ! S DIC(0)="AEMQZ" D EN8^NURSAGSP G:$G(NUROUT) QUIT
 D WARDSEL:'NHOSPSW G QUIT:NUROUT
 D BEDSEL^NURARPC0 I NUROUT G QUIT
 D TIMESEL^NURARPC0 I NUROUT G QUIT
 D @$S(NURSWHEN="D":"ASKDAY",NURSWHEN="M":"SETMON^NURARPC1",NURSWHEN="Q":"SETQUART^NURARPC1",NURSWHEN="A":"SETQUART^NURARPC1",1:"ERROR^NURARPC0") W !
 G:NUROUT QUIT
 S ZTRTN="START^NURARMH0" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
START ;
 F X="RN","LPN","NA" S (DTL(X),TL(X),NT(X),FT(X),FNT(X))=0
 K ^TMP($J),^TMP("NURBDSM",$J)
 D ^NURARMH1
QUIT ; KILL LOCAL VARIABLES
 D:$E(IOST)="C"&'NUROUT RERUNRPT^NURARPC3 I $E(IOST)="C",'NURQUEUE,'NUROUT G HSKEEP
 K ^TMP($J) D CLOSE^NURSUT1 D ^NURAKILL
 Q
ASKDAY ;
 D EN8^NURSAGP1 Q:NUROUT
 S HDATE=NDATED,NURSHDR="Daily Report for "_$E(+NDATED,4,5)_"/"_$E(+NDATED,6,7)_"/"_$E(+NDATED,2,3)_$S(+NDATED'=$P(NDATED,U,2):" - "_$E($P(NDATED,U,2),4,5)_"/"_$E($P(NDATED,U,2),6,7)_"/"_$E($P(NDATED,U,2),2,3),1:"")
 Q
WARDSEL R !!,"Select Nursing Unit: ",X:DTIME I "^"[X!('$T) S NUROUT=1 Q
 S DIC="^NURSF(211.4,",DIC(0)="EMZQ"
 D ^DIC K DIC
 I +Y'>0 G WARDSEL
 S NURSWARD(0)=Y(0,0),NURSWARD=+Y
 Q