source: FOIAVistA/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVSR2.m@ 1071

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1GMRVSR2 ;HIRMFO/YH-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 2 ;5/8/97
2 ;;4.0;Vitals/Measurements;**1,9**;Apr 25, 1997
3SETT ; SET GMRT
4 S GMRT(1)=$S(GMRTY="B":"BLOOD PRESSURE",GMRTY="P":"PULSE",GMRTY="R":"RESPIRATION",GMRTY="T":"TEMPERATURE",GMRTY="H":"HEIGHT",GMRTY="W":"WEIGHT",GMRTY="CG":"CIRCUMFERENCE/GIRTH",GMRTY="PO2":"PULSE OXIMETRY",1:"")
5 I GMRT(1)="" S GMRT(1)=$S(GMRTY="CVP":"CENTRAL VENOUS PRESSURE",1:"")
6 I GMRT(1)="" S GMRT(1)=$S(GMRTY="PN":"PAIN",1:"")
7 Q:GMRT(1)=""
8 S GMRT=$O(^GMRD(120.51,"B",GMRT(1),""))
9 I GMRT>0 F GMRX=GMRS:0 S GMRX=$O(^GMR(120.5,"AA",DFN,GMRT,GMRX)) Q:GMRX>GMRQ!(GMRX'>0) F GMREN=0:0 S GMREN=$O(^GMR(120.5,"AA",DFN,GMRT,GMRX,GMREN)) Q:GMREN'>0 I '$D(^GMR(120.5,GMREN,2)) D BLDARR
10 Q
11BLDARR ; BUILD DATA ARRAY
12 S GMRDAT=$S($D(^GMR(120.5,GMREN,0)):^(0),1:""),GMRVX=GMRTY,GMRVX(0)=$P(GMRDAT,"^",8) D:GMRVX(0)>0!(GMRVX(0)<0)!($E(GMRVX(0))="0") EN1^GMRVSAS0
13 K GMRVARY S GMRVARY="" I $P($G(^GMR(120.5,GMREN,5,0)),"^",4)>0 D CHAR^GMRVCHAR(GMREN,.GMRVARY,GMRT)
14 K GG S GG="" I $O(GMRVARY(0)) D
15 . S GG(1)=0 F S GG(1)=$O(GMRVARY(GG(1))) Q:GG(1)'>0 S GG(2)=0 F S GG(2)=$O(GMRVARY(GG(1),GG(2))) Q:GG(2)'>0 S GG(3)="" F S GG(3)=$O(GMRVARY(GG(1),GG(2),GG(3))) Q:GG(3)="" S GG=GG_$S(GG="":"",1:";")_GG(3)
16 S ^TMP($J,"GMR",GMRTY,9999999-GMRX,$P(GMRDAT,"^",8))=GG_"^"_$S('$D(GMRVX(1)):"",'GMRVX(1):"",1:1)_"^^"_$P(GMRDAT,"^",10)
17 K GG Q
Note: See TracBrowser for help on using the repository browser.