source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVLPO1.m@ 1211

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1GMRVLPO1 ;HIRMFO/YH-DOT MATRIX PULSE OXIMETRY AND RESPIRATION GRAPH ;5/27/97
2 ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
3SETHD ;
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
12DATAPRT ;
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
17SETLINE ;
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
Note: See TracBrowser for help on using the repository browser.