source: FOIAVistA/trunk/r/GEN_MED_OTHER-GMV/GMVLPO1.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1GMVLPO1 ;HIOFO/YH,FT-DOT MATRIX PULSE OXIMETRY AND RESPIRATION GRAPH ;11/6/01 15:44
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; <None>
6 ;
7SETHD ;
8 ;GMRPO2 - PO2 VALUE WHEN $Y=1 GMRPO2(1) - LABEL
9 ;GMRY - $Y FOR LABEL
10 ;GMRESP - RESPIRATION VALUE WHEN $Y=1 GMRESP(1) - LABEL
11 S GMR3=(($Y/3)=($Y\3)),GMRPHI=GMRPO2-(($Y-1)*0.666),GMRPLO=GMRPHI-0.666
12 S GMRRHI=GMRESP-(($Y-1)*0.666),GMRRLO=GMRRHI-0.666
13 S GMRHDR10=$S($Y=GMRY&(GMRPO2(1)>62)&($Y>5)&($Y<66):$E(GMRPO2(1)_" ",1,4)_GMRESP(1),1:"")
14 I $Y=GMRY S GMRY=GMRY+3,GMRPO2(1)=GMRPO2(1)-2,GMRESP(1)=GMRESP(1)-2
15 Q
16DATAPRT ;
17 S GMRLINE=GMRX1
18 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 D SETLINE Q:GMRNM=10
19 W GMRLINE
20 Q
21SETLINE ;
22 S GMRNM=GMRNM+1,GMROLD=$P(GMRLINE,"|",GMRNM)
23 S (GP,GMRP)=$O(^TMP($J,"GMRVG","PO2",GMRDT,"")) S:GMRP="0" GP=.1
24 S (GR,GMRR)=$O(^TMP($J,"GMRVG","R",GMRDT,""))
25 ;S:GMRR="0" GR=.1
26 S GMRPOFF=($Y=6&(+GP>101))!($Y=62&(+GP<65)),GMRROFF=($Y=6&(+GR>41))!($Y=62&(+GR<5))
27 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)
28 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))
29 S $P(GMRLINE,"|",GMRNM)=GMROLD
30 Q
Note: See TracBrowser for help on using the repository browser.