source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMVSR2.m@ 1351

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

initial load of WorldVistAEHR

File size: 1.4 KB
Line 
1GMVSR2 ;HIOFO/YH,FT-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 2 ;11/6/01 16:01
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; <None>
6 ;
7SETT ; SET GMRT
8 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:"")
9 I GMRT(1)="" S GMRT(1)=$S(GMRTY="CVP":"CENTRAL VENOUS PRESSURE",1:"")
10 I GMRT(1)="" S GMRT(1)=$S(GMRTY="PN":"PAIN",1:"")
11 Q:GMRT(1)=""
12 S GMRT=$O(^GMRD(120.51,"B",GMRT(1),""))
13 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
14 Q
15BLDARR ; BUILD DATA ARRAY
16 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^GMVSAS0
17 K GMRVARY S GMRVARY="" I $P($G(^GMR(120.5,GMREN,5,0)),"^",4)>0 D CHAR^GMVCHAR(GMREN,.GMRVARY,GMRT)
18 K GG S GG="" I $O(GMRVARY(0)) D
19 . 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)
20 S ^TMP($J,"GMR",GMRTY,9999999-GMRX,$P(GMRDAT,"^",8))=GG_"^"_$S('$D(GMRVX(1)):"",'GMRVX(1):"",1:1)_"^^"_$P(GMRDAT,"^",10)
21 K GG Q
Note: See TracBrowser for help on using the repository browser.