Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRVSR2

GMRVSR2.m

Go to the documentation of this file.
GMRVSR2 ;HIRMFO/YH-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 2 ;5/8/97
 ;;4.0;Vitals/Measurements;**1,9**;Apr 25, 1997
SETT ; SET GMRT
 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:"")
 I GMRT(1)="" S GMRT(1)=$S(GMRTY="CVP":"CENTRAL VENOUS PRESSURE",1:"")
 I GMRT(1)="" S GMRT(1)=$S(GMRTY="PN":"PAIN",1:"")
 Q:GMRT(1)=""
 S GMRT=$O(^GMRD(120.51,"B",GMRT(1),""))
 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
 Q
BLDARR ; BUILD DATA ARRAY
 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
 K GMRVARY S GMRVARY="" I $P($G(^GMR(120.5,GMREN,5,0)),"^",4)>0 D CHAR^GMRVCHAR(GMREN,.GMRVARY,GMRT)
 K GG S GG="" I $O(GMRVARY(0)) D
 . 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)
 S ^TMP($J,"GMR",GMRTY,9999999-GMRX,$P(GMRDAT,"^",8))=GG_"^"_$S('$D(GMRVX(1)):"",'GMRVX(1):"",1:1)_"^^"_$P(GMRDAT,"^",10)
 K GG Q