source: WorldVistAEHR/trunk/r/GEN_MED_REC_IO-GMRY/GMRYRP0.m@ 1714

Last change on this file since 1714 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.7 KB
Line 
1GMRYRP0 ;HIRMFO/YH-PATIENT INTAKE/OUTPUT REPORT ;2/25/91
2 ;;4.0;Intake/Output;;Apr 25, 1997
3EN1 ;PATIENT I/O SUMMARY REPORT BY DATE AND SHIFT
4 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
5RPT2 ;
6 S GMRCOL=6*(3+$P(^GMRD(126.56,0),"^",4)+$P(^GMRD(126.58,0),"^",4))
7 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
8 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
9START ;
10 I '$D(^GMRD(126.95,1,1)) W !,"NUR SHIFT FILE NOT DEFINED",! S GMROUT=1 Q:GRPT>7 D Q G Q2
11 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
12 S Y=GMRSTRT D DD^%DT S GMRDT1=Y,Y=GMRFIN D DD^%DT S GMRDT2=Y
13 D STARTD^GMRYRP1 U IO S (GQ,GQT,GPC)=0 Q:GRPT>7
14 I "Pp"[GMREDB D PATIENT^GMRYUT9 G:GMROUT Q D ^GMRYRP2 G:GMROUT Q D REPORT1^GMRYRP3 D Q G Q2
15 I "SsWw"[GMREDB D:$D(GMRN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,GMRFIN,GMREDB,ZTIO,ZTSK,%ZIS,IO("Q") W:$E(IOST)'="C" @IOF D ^%ZISC,HOME^%ZIS
28 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
29DEV S %ZIS="Q" S %ZIS("B")="HOME" D ^%ZIS K:POP IO("Q") Q:POP
30 I GRPT=4,$E(IOST)'="C",IOM<80,GMRCOL>80 D ^%ZISC W !,$C(7),"** THIS REPORT NEEDS 132 COLUMNS - PORT **",! G DEV
31 Q
32LOOP1 ;
33 F X="GMRWARD","GMRWARD(","GMRNUR","GNRMBD(","GMROUT","GMRFIN","GMRSTRT","GMREDB","GRPT","DFN","^TMP(""GMRPT"",$J,","GMRCOL" S ZTSAVE(X)=""
34 Q
35EN2 ;PATIENT I/O SUMMARY REPORT FOR THE PREVIOUS DAY
36 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
37 D Q,Q2 Q
38EN3 ;PATIENT VITAL SIGNS & I/O SHEET - SF511
39 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
40 D Q,Q2 Q
41EN4 ;PATIENT I/O SUMMARY FOR TODAY
42 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
43 D Q,Q2 Q
44EN5 ;I/O SUMMARY FOR 48 HRS
45 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
46 D Q,Q2 Q
47STOP Q:GMROUT W "Press return to continue or ""^"" to stop " R X:DTIME
48 I '$T!(X="^") S GMROUT=1 Q
49 Q
Note: See TracBrowser for help on using the repository browser.