source: FOIAVistA/trunk/r/GEN_MED_REC_IO-GMRY/GMRYSE1.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1GMRYSE1 ;HIRMFO/YH-ITEMIZED PATIENT I/O REPORT BY SHIFT PART 2 ;3/11/97
2 ;;4.0;Intake/Output;;Apr 25, 1997
3BODY ;
4 I '$D(^TMP($J)) W !!,?5,"NO DATA FOR THIS PERIOD",!! Q
5 D INITOT^GMRYRP3,INISHFT^GMRYRP3,SHFTP,DAYP S (GRNDIP,GRNDOP)="" D SUM^GMRYSE2
6 Q
7FOOTER ;
8 F X=1:1 W ! Q:IOSL<($Y+$S($E(IOST)="P":4,1:10))
9 D FOOTER^GMRYRP3 Q
10REPORT ;
11 D TITLE^GMRYRP3
12 S GMRDOT="",$P(GMRDOT,".",50)="",GMRX="",$P(GMRX,"-",$S(GRPT=2:53,GRPT=3:32,1:53))="" D HEADER2 S GQT=1 D BODY D:'GMROUT FOOTER I $E(IOST)'="P",'GMROUT W !,"Press return to continue " R X:DTIME I '$T!(X["^") S GMROUT=1
13 K GCATH,GTOTAL,GLEFT,GREASON,GY Q
14HEADER2 ;
15 I GQT D FOOTER
16 I GQT,'GQ,$E(IOST)'="P" W !,"Press return to continue or ""^"" to stop " R X:DTIME I '$T!(X="^") S GMROUT=1 Q
17 W:'($E(IOST)'="C"&'GPC) @IOF
18 S GQT=1,GPC=GPC+1,GCOL=$S(IOM>80:40,1:10) W !,?GCOL,"PATIENT INTAKE/OUTPUT REPORT BY SHIFT AND EVENT TYPE" S GCOL=$S(IOM>80:120,1:70) W ?GCOL,"PAGE: ",GPC
19 S GCOL=$S(IOM>80:40,1:10) W !,?GCOL,$S(GRPT=9:$E(GMRX,1,46),1:GMRX),! S GCOL=GCOL+8 W ?GCOL,GMRDT1," - ",GMRDT2,!
20 I $D(GY) W GY_"(continued)",!
21 Q
22NPOS ;OBTAIN NURSE POSITION
23 S GNURSE=$P(GDATA,"^",3),GTEXT=$P(GDATA,"^",2) D WHR^GMRYSE3
24 W ?14,$S(GIO="IN":$P($G(^GMRD(126.56,+GTYPE,0)),"^")_" intake vol: ",GIO="OUT":$P($G(^GMRD(126.58,+GTYPE,0)),"^")_" output vol: ",1:""),GAMOUNT_$S(GAMOUNT>0!(GAMOUNT="0"):" mls",1:"")
25 I GIO="OUT",(GSUB>0&(GSUB<99)),$D(^GMRD(126.6,GSUB,0)) W " "_$P(^GMRD(126.6,+GSUB,0),"^")
26 I GIO="OUT",$P(GDATA,"^",2)'="" S GTXT(1)="- "_$P(GDATA,"^",2) D WLINE^GMRYSE3
27 S GITEM=$P(GDATA,"^",4) I GITEM'="" S GTXT(1)="- "_GITEM D WLINE^GMRYSE3
28 S GITEM="" G:GNURSE="" Q S GCOL=$S(IOM>80:120,1:70) W ?GCOL,$E($P($P(^VA(200,GNURSE,0),"^"),",",2)),$E($P(^(0),"^"))
29 S GPOS="" I GNURSE'="",$D(^NURSF(211.8,"C",GNURSE)) S GLOC=$O(^NURSF(211.8,"C",GNURSE,0)) S:$D(^NURSF(211.8,GLOC,0)) GPOS=$P(^(0),"^",2)
30 W "/"_$S(GPOS="R":"RN",GPOS="L":"LPN",GPOS="N":"NA",GPOS="C":"CL",1:"OTH")
31Q W ! Q
32ILABEL ;
33 I II>3 S GLAB=$P(^GMRD(126.56,$O(^GMRD(126.56,"C",II-3,0)),0),"^") Q
34 S GLAB=$S(II=1:"IV FLUIDS",II=2:"BLOOD/PRODUCT",II=3:"PARENTERAL NUTR.",1:"") Q
35OLABEL ;
36 S GLAB=$P(^GMRD(126.58,II,0),"^") Q
37CHKPR ;
38 I ($Y+4)>IOSL D HEADER2 Q:GMROUT
39 I GIO="IN",GPRT(1)=0 W ?2,"INTAKE:",! S GPRT(1)=1 Q
40 I GIO="OUT",GPRT(2)=0 W ?2,"OUTPUT:",! S GPRT(2)=1 Q
41 Q
42CHKTYP ;
43 I ($Y+4)>IOSL D HEADER2 Q:GMROUT
44 I GIO="IN" W ?4,$S(GSUB=1:"PO",GSUB=2:"NASOGASTRIC",GSUB=3:"GASTROTOMY",GSUB=4:"PHARYNGOTOMY",1:"OTHER")
45 I GIO="OUT" W ?4,$P(^GMRD(126.6,+GSUB,0),"^")
46 Q
47SHFTP ;FIELD TO SAVE '+' CODE FOR SHIFT TOTAL
48 F II=1:1:GN(1) S GSIP(II)=""
49 F II=1:1:GN(2) S GSOP(II)=""
50 Q
51DAYP ;FIELD TO SAVE '+' CODE FOR DAY TOTAL
52 F II=1:1:GN(1) S GDIP(II)=""
53 F II=1:1:GN(2) S GDOP(II)=""
54 Q
Note: See TracBrowser for help on using the repository browser.