1 | GMRVLPO1 ;HIRMFO/YH-DOT MATRIX PULSE OXIMETRY AND RESPIRATION GRAPH ;5/27/97
|
---|
2 | ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
|
---|
3 | SETHD ;
|
---|
4 | ;GMRPO2 - PO2 VALUE WHEN $Y=1 GMRPO2(1) - LABEL
|
---|
5 | ;GMRY - $Y FOR LABEL
|
---|
6 | ;GMRESP - RESPIRATION VALUE WHEN $Y=1 GMRESP(1) - LABEL
|
---|
7 | S GMR3=(($Y/3)=($Y\3)),GMRPHI=GMRPO2-(($Y-1)*0.666),GMRPLO=GMRPHI-0.666
|
---|
8 | S GMRRHI=GMRESP-(($Y-1)*0.666),GMRRLO=GMRRHI-0.666
|
---|
9 | S GMRHDR10=$S($Y=GMRY&(GMRPO2(1)>62)&($Y>5)&($Y<66):$E(GMRPO2(1)_" ",1,4)_GMRESP(1),1:"")
|
---|
10 | I $Y=GMRY S GMRY=GMRY+3,GMRPO2(1)=GMRPO2(1)-2,GMRESP(1)=GMRESP(1)-2
|
---|
11 | Q
|
---|
12 | DATAPRT ;
|
---|
13 | S GMRLINE=GMRX1
|
---|
14 | S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 D SETLINE Q:GMRNM=10
|
---|
15 | W GMRLINE
|
---|
16 | Q
|
---|
17 | SETLINE ;
|
---|
18 | S GMRNM=GMRNM+1,GMROLD=$P(GMRLINE,"|",GMRNM)
|
---|
19 | S (GP,GMRP)=$O(^TMP($J,"GMRVG","PO2",GMRDT,"")) S:GMRP="0" GP=.1
|
---|
20 | S (GR,GMRR)=$O(^TMP($J,"GMRVG","R",GMRDT,"")) S:GMRR="0" GR=.1
|
---|
21 | S GMRPOFF=($Y=6&(+GP>101))!($Y=62&(+GP<65)),GMRROFF=($Y=6&(+GR>41))!($Y=62&(+GR<5))
|
---|
22 | S GMROLD=$S(+GP>0&(+GP'<GMRPLO&(+GP'>GMRPHI)!GMRPOFF):"POx"_$S('$P(^TMP($J,"GMRVG","PO2",GMRDT,GMRP),"^",2):" ",1:"*")_$S('GMRPOFF:" ",1:"*")_$E(GMROLD,4,10),1:GMROLD)
|
---|
23 | S GMROLD=$E(GMROLD,1,5)_$S(GR>0&(+GR'<GMRRLO&(+GR'>GMRRHI)!GMRROFF):"R"_$S('$P(^TMP($J,"GMRVG","R",GMRDT,GMRR),"^",2):" ",1:"*")_$S('GMRROFF:" ",1:"*")_$E(GMROLD,9,10),1:$E(GMROLD,6,10))
|
---|
24 | S $P(GMRLINE,"|",GMRNM)=GMROLD
|
---|
25 | Q
|
---|