source: FOIAVistA/trunk/r/GEN_MED_REC_IO-GMRY/GMRYSE0.m@ 1015

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1GMRYSE0 ;HIRMFO/YH-ITEMIZED PATIENT I/O REPORT BY SHIFT PART 1 ;5/13/96
2 ;;4.0;Intake/Output;;Apr 25, 1997
3EN1 ;PATIENT INTAKE/OUTPUT BY SHIFT AND EVENT
4 S GRPT=8,GMROUT=0 D DATE^GMRYRP1 G:GMROUT Q S GMROP(1)=$S($D(GMRNUR):"WARDPAT^GMRYUT4",1:"MASPT^GMRYRP5") D @GMROP(1) G:GMROUT Q
5 D DEV^GMRYRP0 G:POP Q
6 I $D(IO("Q")) K IO("Q"),IO("C") S ZTDESC="ITEMIZED PATIENT I/O REPORT BY SHIFT",ZTRTN="START^GMRYSE0",ZTIO=ION_";"_IOM_";"_IOSL D LOOP1^GMRYRP0,^%ZTLOAD,HOME^%ZIS D Q2^GMRYRP0 K GMROUT Q
7START ;
8 D START^GMRYRP0 I GMROUT D Q K GMROUT Q
9 I "Pp"[GMREDB D PATIENT^GMRYUT9 G:GMROUT Q D SETARRY G:GMROUT Q D REPORT^GMRYSE1 D Q,Q2^GMRYRP0 K GMROUT Q
10 I "SsWw"[GMREDB D:$D(GMRNUR) PATIENT^GMRYUT11
11 G:'$D(^TMP("GMRPT",$J)) Q0
12 S GROOM="" F J=0:0 S GROOM=$O(^TMP("GMRPT",$J,GROOM)) Q:GROOM=""!GMROUT S GBED="" F J=0:0 S GBED=$O(^TMP("GMRPT",$J,GROOM,GBED)) Q:GBED=""!GMROUT S DFN=0 F J=0:0 S DFN=$O(^TMP("GMRPT",$J,GROOM,GBED,DFN)) Q:DFN'>0!GMROUT D
13 .S GMRNAM=^TMP("GMRPT",$J,GROOM,GBED,DFN)
14 .D PRNT
15Q0 D Q D Q2^GMRYRP0 Q
16PRNT S (GQ,GQT)=0 K ^TMP($J) D PT^GMRYUT0,SETARRY D REPORT^GMRYSE1
17 Q
18Q ;
19 K GMRVHLOC,GMRVWLOC,GPORT,GSTAR,GDA,GMRY,GSAVE,GSAVEH,GMRHLOC,GDATA D Q^GMRYRP0
20 K VAROOT,GTYPI,GTYPO,GN,GNN,GLN,GTXT,GMR100,GMRLEN,GMROP,GMRFIN,GMRSTRT,GRPT,GMROUT,DFN,GMREDB Q
21SETARRY ;SET DATA IN ^TMP($J,"GMRY", FOR EACH PATIENT
22 I '$D(^GMR(126,"B",DFN)) Q
23 S GSAVEH=0,DA(1)=$O(^GMR(126,"B",DFN,0)) K ^TMP($J,"GMRY")
24 F II="IN","OUT" D SAVE^GMRYRP2
25 D SAVEIV^GMRYRP2,IVM
26 Q
27IVM ;SET IV MAINTENANCE IN ^TMP($J,"GMRY"
28 Q:'$D(^GMR(126,DFN,"IVM","B"))
29 S GSITE="" F S GSITE=$O(^GMR(126,DA(1),"IVM","B",GSITE)) Q:GSITE="" S DA=$O(^(GSITE,0)) Q:DA'>0 D SCARE
30 Q
31SCARE ;
32 Q:'$D(^GMR(126,DA(1),"IVM",DA,1,"B"))
33 S GSTRT=0 F S GSTRT=$O(^GMR(126,DA(1),"IVM",DA,1,"B",GSTRT)) Q:GSTRT'>0 S GDA=0 F S GDA=$O(^GMR(126,DA(1),"IVM",DA,1,"B",GSTRT,GDA)) Q:GDA'>0 D
34 . S GMRINDT=GSTRT,GDAY=0 D NEXT^GMRYRP1 I '(GMRINDT<GMRSTRT!(GMRINDT>GMRFIN)) D SETSIFT^GMRYRP2,SETUT
35 Q
36SETUT S ^TMP($J,"GMRY",$P(GMRINDT,"."),GSHIFT,"IV",GMRINDT,GSTRT,"Z",DA,GDA)=$P(^GMR(126,DA(1),"IVM",DA,1,GDA,0)_"^^^^","^",1,8)_GSITE Q
Note: See TracBrowser for help on using the repository browser.