source: FOIAVistA/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVVS4.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1GMRVVS4 ;HIRMFO/YH-PATIENT VITAL SIGNS-GRAPH ;5/8/97
2 ;;4.0;Vitals/Measurements;**1,11**;Apr 25, 1997
3SETHD ;
4 S GMR3=(($Y/3)=($Y\3)),GMRPHI=GMRPLO,GMRPLO=$Y*(-10)/3+188.335,GMRTHI=GMRTLO,GMRTLO=-$Y/3+107.8335,GMRTDIF=GMRTHI-GMRTLO,GMRPDIF=GMRPHI-GMRPLO
5 S GMRHDR10=$S($Y>8&GMR3&($Y<44):GMRPLO+1.665,1:""),GMRHDR10=$E(" ",$L(GMRHDR10)+1,4)_GMRHDR10
6 S GMRHDR11=$S($Y>8&GMR3&($Y<44):GMRTLO+.1665,$Y=28:98.6,1:""),GMRHDR11=$E(" ",$L(GMRHDR11)+1,4)_GMRHDR11
7 S GMRHDR1=$S($Y'=7:GMRHDR10_" "_GMRHDR11,1:"")
8 S GMRHDR2=$S($Y'=7&GMR3&($Y<44):$J(($Y*(-5)/27+(380/9)),4,1),$Y=28:"37.0",1:"")
9 I GMRHDR1'="",GMRHDR2'="" S GMRHDR1=GMRHDR1_"/"_GMRHDR2
10 Q
11DATAPRT ;
12 S GMRLINE=$S($Y=28:GMRX2,1:GMRX1)
13 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 D SETLINE Q:GMRNM=10
14 W GMRLINE
15 Q
16SETLINE ;
17 N GMRVOK S GMRVOK=0
18 S GMRNM=GMRNM+1,GMROLD=$P(GMRLINE,"|",GMRNM),GMRP=$O(^TMP($J,"GMR","P",GMRDT,""))
19 S GMRT=$O(^TMP($J,"GMR","T",GMRDT,""))
20 S GMRPOFF=($Y=7&(+GMRP>166))!($Y=44&(+GMRP<47)),GMRTOFF=($Y=7&(+GMRT>105.6))!($Y=43&(+GMRT<93.8))
21 S GMROLD=$S(+GMRT>0&(+GMRT'<GMRTLO&(+GMRT'>GMRTHI)!GMRTOFF):"T"_$S('$P(^TMP($J,"GMR","T",GMRDT,GMRT),"^",2):" ",1:"*")_$S('GMRTOFF:" ",1:"*")_$E(GMROLD,4,10),1:GMROLD)
22 S GMRVPS=$S(+GMRP:$P($G(^TMP($J,"GMR","P",GMRDT,GMRP)),"^",1),1:"")
23 I GMRVPS'="" D
24 .I GMRVPS'["APICAL",(GMRVPS'["RADIAL"),(GMRVPS'["BRACHIAL") S GMRVOK=1
25 .Q
26 S GMROLD=$E(GMROLD,1,5)_$S(GMRP>0&(+GMRP'<GMRPLO&(+GMRP'>GMRPHI)!GMRPOFF):"P"_$S('$P(^TMP($J,"GMR","P",GMRDT,GMRP),"^",2):" ",1:"*")_$S('GMRPOFF:" ",1:"*")_$E(GMROLD,9,10),1:$E(GMROLD,6,10))
27 Q:GMRVOK S $P(GMRLINE,"|",GMRNM)=GMROLD
28 Q
Note: See TracBrowser for help on using the repository browser.