VistA-WorldVistAEHR/r/NURSING_SERVICE-NUR/NURCYRP0.m

29 lines
2.1 KiB
Mathematica

NURCYRP0 ;HIRMFO/YH-PATIENT INTAKE/OUTPUT REPORTS ;2/25/91
;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ;PATIENT I/O SUMMARY REPORT BY DATE AND SHIFT
S X="GMRYRP0" X ^%ZOSF("TEST") Q:'$T S GMRNUR=1 D EN1^GMRYRP0 D QUIT Q
EN2 ;PATIENT I/O SUMMARY REPORT FOR THE PREVIOUS DAY
S X="GMRYRP0" X ^%ZOSF("TEST") Q:'$T S GMRNUR=1 D EN2^GMRYRP0 D QUIT Q
EN3 ;PATIENT VITAL SIGNS & I/O SHEET - SF511
S X="GMRYRP0" X ^%ZOSF("TEST") Q:'$T S X="GMRVVS0" X ^%ZOSF("TEST") Q:'$T S GMRNUR=1,GMROUT=0,NURQUIT=0 D ^NURCVUT0 G:NURQUIT!(NUREDB["S"&'$D(NRMBD)) Q D DATE^GMRVVS0 G:GMROUT Q
DEV W !!,"This report must be queued to a line printer",!,"or a slave printer with 132 columns.",!!
S %ZIS="Q" S %ZIS("B")="" D ^%ZIS K:POP IO("Q") G:POP Q I '(IOST?1"P".E&$D(IO("Q"))),'$D(IO("S")) D ^%ZISC G DEV
I IOM'>130 D ^%ZISC K IO("Q"),IO("C") G DEV
I $D(IO("Q")) K IO("Q"),IO("C") S ZTDESC="EXPANDED SF 511",ZTRTN="START^NURCYRP0",ZTIO=ION_";"_IOM_";"_IOSL D LOOP1,^%ZTLOAD,HOME^%ZIS D Q2^GMRVVS0 Q
START K ^TMP($J,"NURCEN") S GFLAG=0,GMRNUR=1,NURRM="" D ^NURCAS2 I '$D(^TMP($J,"NURCEN")) W !,"NO DATA FOR THIS REPORT",! G Q
F S NURRM=$O(^TMP($J,"NURCEN",NURRM)) Q:NURRM=""!NURQUIT S NBED="" F S NBED=$O(^TMP($J,"NURCEN",NURRM,NBED)) Q:NBED=""!NURQUIT S NURNAM="" F S NURNAM=$O(^TMP($J,"NURCEN",NURRM,NBED,NURNAM)) Q:NURNAM=""!NURQUIT D
.S DFN=+$P($G(^TMP($J,"NURCEN",NURRM,NBED,NURNAM)),"^") D:DFN>0 EN1^GMRVVS0 S:GMROUT NURQUIT=1
Q K ND1,NDA,NORM,NURP,NURRMST,NURSX,NURSY,NWLOC,NURQUIT,GMROUT,^TMP($J),NPWARD,NROOM,NUREDB,NURNAM,NURRM,POP,NBED,NAME,NURWARD D Q2^GMRVVS0 Q
LOOP1 F G="GMROUT","NUREDB","NPWARD","NURWARD","NURQUIT","NRMBD(","GMRFIN","GMRSTRT","DFN" S ZTSAVE(G)=""
K G Q
EN4 ;PATIENT I/O SUMMARY FOR TODAY
S X="GMRYRP0" X ^%ZOSF("TEST") Q:'$T S GMRNUR=1 D EN4^GMRYRP0 D QUIT Q
EN5 ;I/O SUMMARY FOR 48 HRS
S X="GMRYRP0" X ^%ZOSF("TEST") Q:'$T S GMRNUR=1 D EN5^GMRYRP0 D QUIT Q
EN6 ;24 HOURS ITEMIZED SHIFT REPORT
S X="GMRYSE0" X ^%ZOSF("TEST") Q:'$T S GMRNUR=1 D EN1^GMRYSE0 D QUIT Q
EN7 ;INTRAVENOUS INFUSION FLOW SHEET
S X="GMRYFLW0" X ^%ZOSF("TEST") Q:'$T S GMRNUR=1 D EN1^GMRYFLW0 K GMRNUR Q
;
QUIT K I,GMRNUR,DFN Q