source: WorldVistAEHR/trunk/r/GEN_MED_REC_IO-GMRY/GMRYUT2.m@ 1742

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

initial load of WorldVistAEHR

File size: 1.4 KB
Line 
1GMRYUT2 ;HIRMFO/YH-PATIENT I/O UTILITIES - CALLS FROM DD AND IV SITE CHECK ;5/10/91
2 ;;4.0;Intake/Output;;Apr 25, 1997
3EN1(GOUT,GDA,GDT) ;SCREEN PATIENT'S ADMISSION STATUS FOR THE INTAKE/OUTPUT DATE/TIME
4 ;CHECK FOR ABSENCE & PASS
5 N DFN S DFN=GDA,VAIP("D")=GDT D IN5^VADPT,DEM^VADPT K VAIP("D")
6 I VADM(6)>0 W !!,$P(VADM(1),"^")_" died on "_$P(VADM(6),"^",2) S GOUT(1)=2 G Q
7 I $G(VAIP(10))=0 W !!,VADM(1)_" on "_$P($G(VAIP(4)),"^",2),! S GOUT(1)=1
8Q Q GOUT(1)
9EN3 ;SUM UP INTAKE ITEM VOLUME
10 S GMRX=0 F GMRN=0:0 S GMRN=$O(^GMR(126,DA(2),"IN",DA(1),1,GMRN)) Q:GMRN'>0 S GMRX=GMRX+$P(^GMR(126,DA(2),"IN",DA(1),1,GMRN,0),"^",2)
11 S $P(^GMR(126,DA(2),"IN",DA(1),0),"^",5)=GMRX K GMRX,GMRN Q
12EN4 ;TYPE AND VOLUME OF IV STARTED
13 S GTYPE=$P(^GMRD(126.9,+X,0),"^",2),$P(^GMR(126,DA(1),"IV",DA,0),"^",3)=GTYPE S:+$P(^GMRD(126.9,+X,0),"^",3)>0 $P(^GMR(126,DA(1),"IV",DA,0),"^",12)=+$P(^GMRD(126.9,+X,0),"^",3)
14 S:$D(^GMR(126,DA(1),"IV",DA,0)) GMRVDT=$P(^(0),U) S:GMRVDT'="" ^GMR(126,DA(1),"IV","TYP",9999999-GMRVDT,GTYPE,DA)="" K GMRVDT,GTYPE
15 Q
16EN5 ;KILL X-REF OF IV TYPE WHEN DELETE IV SOLUTION
17 S $P(^GMR(126,DA(1),"IV",DA,0),"^",12)="" S GTYPE=$P(^GMR(126,DA(1),"IV",DA,0),"^",3),GMRVDT=$P(^(0),U) K:GMRVDT'=""&(GTYPE'="") ^GMR(126,DA(1),"IV","TYP",9999999-GMRVDT,GTYPE,DA) K GTYPE,GMRVDT
18 Q
19EN6 ;CALL FROM DD(126 TO SCREEN INTAKE ITEM BY INPUT TYPE
20 S:'$D(GEDIT) GMRYTYP=+$P($G(^GMR(126,D0,"IN",D1,0)),U,2) S DIC("S")="I $D(^GMRD(126.8,""C"",+GMRYTYP,+Y))"
21 Q
Note: See TracBrowser for help on using the repository browser.