source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVBP0.m@ 862

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1GMRVBP0 ;HIRMFO/YH-KYOCERA B/P GRAPH - STORE DATA IN ^TMP($J) ;5/24/99 12:40
2 ;;4.0;Vitals/Measurements;**1,11**;Apr 25, 1997
3EN1 ;
4 N GAPICAL,GRADIAL,GBRACHI S GAPICAL=$O(^GMRD(120.52,"B","APICAL",0)),GRADIAL=$O(^GMRD(120.52,"B","RADIAL",0)),GBRACHI=$O(^GMRD(120.52,"B","BRACHIAL",0))
5 K ^TMP($J,"GMR"),^TMP($J,"GMRK"),^TMP($J,"GDT"),^TMP($J,"GMRVG"),^TMP($J,"GTNM") F GI=1:1:200 S ^TMP($J,"GMRK","G"_GI)=""
6 S GMROUT=0,(^TMP($J,"GMRK","G82M"),^TMP($J,"GMRK","G210M"),^TMP($J,"GMRK","G226M"))=0.6
7 S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
8 F GTYPE="B","P" D SETT
9 U IO D ^GMRVBP1
10Q1 D Q1^GMRVGR0
11 Q
12SETT ;
13 S GTYPE(1)=$S(GTYPE="B":"BLOOD PRESSURE",GTYPE="P":"PULSE",1:"") Q:GTYPE(1)
14 S GTYP=$O(^GMRD(120.51,"B",GTYPE(1),0)) Q:GTYP'>0
15 F GX=GSTART1:0 S GX=$O(^GMR(120.5,"AA",DFN,GTYP,GX)) Q:GX>GEND1!(GX'>0) F GEN=0:0 S GEN=$O(^GMR(120.5,"AA",DFN,GTYP,GX,GEN)) Q:GEN'>0 I '$D(^GMR(120.5,GEN,2)) D BLDARR
16 Q
17BLDARR S GDATA=$G(^GMR(120.5,GEN,0)) Q:GDATA=""
18 S GMRVX=GTYPE,GMRVX(0)=$P(GDATA,"^",8),GMRVX(1)=0 D:GMRVX(0)>0!(GMRVX(0)="0") EN1^GMRVSAS0
19 K GMRVARY S GMRVARY="" I $P($G(^GMR(120.5,GEN,5,0)),"^",4)>0 D CHAR^GMRVCHAR(GEN,.GMRVARY,GTYP)
20 K GG S GG="" I $O(GMRVARY(0)) D
21 . 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)
22 S GDATA(1)=GG_"^"_$S($G(GMRVX(1))>0:1,1:"")_"^"
23 I GTYPE="P" D Q
24 . I '$D(^GMR(120.5,GEN,5,"B")) S ^TMP($J,"GMRVG",GTYPE,9999999-GX,GMRVX(0))=GDATA(1) Q
25 . I $D(^GMR(120.5,GEN,5,"B",GBRACHI)) S ^TMP($J,"GMRVG",GTYPE,9999999-GX,GMRVX(0))=GDATA(1) Q
26 . I $D(^GMR(120.5,GEN,5,"B",GAPICAL)) S ^TMP($J,"GMRVG",GTYPE,9999999-GX,GMRVX(0))=GDATA(1) Q
27 . I $D(^GMR(120.5,GEN,5,"B",GRADIAL)) S ^TMP($J,"GMRVG",GTYPE,9999999-GX,GMRVX(0))=GDATA(1) Q
28 I GMRVX(0)>0 S ^TMP($J,"GMRVG","S",9999999-GX,$P(GMRVX(0),"/"))=$S($P(GMRVX(0),"/")<$P(^GMRD(120.57,1,1),"^",7)&($P(GMRVX(0),"/")>$P(^(1),"^",9)):"",1:"^1^")
29 I $P($G(GMRVX(0)),"/",3)'="" D
30 . S ^TMP($J,"GMRVG","B",9999999-GX,$P(GMRVX(0),"/",1,2))=GDATA(1) S ^TMP($J,"GMRVG","C",9999999-GX,"/"_$P(GMRVX(0),"/",3))=GDATA(1)
31 . S ^TMP($J,"GMRVG","D",9999999-GX,$P(GMRVX(0),"/",3))=$S($P(GMRVX(0),"/",3)<$P(^GMRD(120.57,1,1),"^",8)&($P(GMRVX(0),"/",3)>$P(^(1),"^",10)):"",1:"^1^")
32 I $P($G(GMRVX(0)),"/",3)="" D
33 . S ^TMP($J,"GMRVG",GTYPE,9999999-GX,GMRVX(0))=GDATA(1)
34 . S:$P(GMRVX(0),"/",2)>0 ^TMP($J,"GMRVG","D",9999999-GX,$P(GMRVX(0),"/",2))=$S($P(GMRVX(0),"/",2)<$P(^GMRD(120.57,1,1),"^",8)&($P(GMRVX(0),"/",2)>$P(^(1),"^",10)):"",1:"^1^")
35 S GDIAS=$S($D(^TMP($J,"GMRVG","D",9999999-GX)):$O(^TMP($J,"GMRVG","D",9999999-GX,0)),1:0)
36 S GSYS=$S($D(^TMP($J,"GMRVG","S",9999999-GX)):$O(^TMP($J,"GMRVG","S",9999999-GX,0)),1:0)
37 I GDIAS,GSYS S GMAP=$J(GDIAS+((GSYS-GDIAS)/3),0,0),^TMP($J,"GMRVG","M",9999999-GX,GMAP)=""
38 K GSYS,GDIAS Q
Note: See TracBrowser for help on using the repository browser.