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

GMRYRP0.m

Go to the documentation of this file.
GMRYRP0 ;HIRMFO/YH-PATIENT INTAKE/OUTPUT REPORT ;2/25/91
 ;;4.0;Intake/Output;;Apr 25, 1997
EN1 ;PATIENT I/O SUMMARY REPORT BY DATE AND SHIFT
 S ZTDESC="PATIENT I/O SUMMARY BY DATE AND SHIFT",GRPT=1,GMROUT=0,GMREDB="P" D DATE^GMRYRP1 G:GMROUT Q D PATDAT^GMRYUT0 G:GMROUT Q
RPT2 ;
 S GMRCOL=6*(3+$P(^GMRD(126.56,0),"^",4)+$P(^GMRD(126.58,0),"^",4))
 W:GRPT=5!(GMRCOL>80) !!,"This report should be sent to 132 column PRINTER - PORT !!!",!! D DEV G:POP Q I GRPT=5&(IOM'>130) G RPT2
 I $D(IO("Q")) K IO("Q"),IO("C") S ZTRTN="START^GMRYRP0",ZTIO=ION_";"_IOM_";"_IOSL D LOOP1,^%ZTLOAD,HOME^%ZIS D Q2 Q
START ;
 I '$D(^GMRD(126.95,1,1)) W !,"NUR SHIFT FILE NOT DEFINED",! S GMROUT=1 Q:GRPT>7  D Q G Q2
 S GMRDAY=$P(^GMRD(126.95,1,1),"^",2),GMREVE=$P(^(1),"^",3),GMRNIT=$P(^(1),"^") I GMRDAY=""!(GMREVE="")!(GMRNIT="") W !,"NUR SHIFT STARTING HOUR NOT DEFINED",! S GMROUT=1 Q:GRPT>7  D Q G Q2
 S Y=GMRSTRT D DD^%DT S GMRDT1=Y,Y=GMRFIN D DD^%DT S GMRDT2=Y
 D STARTD^GMRYRP1 U IO S (GQ,GQT,GPC)=0 Q:GRPT>7
 I "Pp"[GMREDB D PATIENT^GMRYUT9 G:GMROUT Q  D ^GMRYRP2 G:GMROUT Q D REPORT1^GMRYRP3 D Q G Q2
 I "SsWw"[GMREDB D:$D(GMRNUR) PATIENT^GMRYUT11
 G:'$D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IO("Q") W:$E(IOST)'="C" @IOF D ^%ZISC,HOME^%ZIS
 K ^TMP("GMRPT",$J),X,Y,X1,X2,XQH,XQUIT,GMRVTYP,GMRYY,GSDC,GMRI,VAERR,VAIN,GMRNUR,GMROUT,GRPT,VAROOT,GTYPI,GTYPO,GN,GNN,GLN Q
DEV S %ZIS="Q" S %ZIS("B")="HOME" D ^%ZIS K:POP IO("Q") Q:POP
 I GRPT=4,$E(IOST)'="C",IOM<80,GMRCOL>80 D ^%ZISC W !,$C(7),"** THIS REPORT NEEDS 132 COLUMNS - PORT **",! G DEV
 Q
LOOP1 ;
 F X="GMRWARD","GMRWARD(","GMRNUR","GNRMBD(","GMROUT","GMRFIN","GMRSTRT","GMREDB","GRPT","DFN","^TMP(""GMRPT"",$J,","GMRCOL" S ZTSAVE(X)=""
 Q
EN2 ;PATIENT I/O SUMMARY REPORT FOR THE PREVIOUS DAY
 S ZTDESC="PATIENT I/O SUMMARY REPORT FOR THE PREVIOUS DAY",GRPT=3,GMROUT=0,X1=DT,X2=-1 D C^%DTC S (GMRSTRT,GMRFIN)=X S GMROP(1)=$S($D(GMRNUR):"WARDPAT^GMRYUT4",1:"MASPT^GMRYRP5") D @GMROP(1) G:'GMROUT RPT2
 D Q,Q2 Q
EN3 ;PATIENT VITAL SIGNS & I/O SHEET - SF511
 S ZTDESC="PATIENT VITAL SIGNS & I/O SHEET - SF511",GRPT=5,GMROUT=0 D DATE^GMRYRP1 G:GMROUT Q S GMROP(1)=$S($D(GMRNUR):"WARDPAT^GMRYUT4",1:"MASPT^GMRYRP5") D @GMROP(1) G:'GMROUT RPT2
 D Q,Q2 Q
EN4 ;PATIENT I/O SUMMARY FOR TODAY
 S ZTDESC="PATIENT I/O SUMMARY FOR TODAY",GRPT=2,GMROUT=0,(GMRSTRT,GMRFIN)=DT S GMROP(1)=$S($D(GMRNUR):"WARDPAT^GMRYUT4",1:"MASPT^GMRYRP5") D @GMROP(1) G:'GMROUT RPT2
 D Q,Q2 Q
EN5 ;I/O SUMMARY FOR 48 HRS
 S ZTDESC="I/O SUMMARY FOR 48 HRS",GRPT=4,GMROUT=0,X1=DT,X2=-1 D C^%DTC S GMRSTRT=X,GMRFIN=DT S GMROP(1)=$S($D(GMRNUR):"WARDPAT^GMRYUT4",1:"MASPT^GMRYRP5") D @GMROP(1) G:'GMROUT RPT2
 D Q,Q2 Q
STOP Q:GMROUT  W "Press return to continue or ""^"" to stop " R X:DTIME
 I '$T!(X="^") S GMROUT=1 Q
 Q