source: FOIAVistA/trunk/r/GEN_MED_OTHER-GMV/GMVVS4.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1GMVVS4 ;HIOFO/YH,FT-PATIENT VITAL SIGNS-GRAPH ;11/6/01 14:44
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; <None>
6 ;
7SETHD ;
8 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
9 S GMRHDR10=$S($Y>8&GMR3&($Y<44):GMRPLO+1.665,1:""),GMRHDR10=$E(" ",$L(GMRHDR10)+1,4)_GMRHDR10
10 S GMRHDR11=$S($Y>8&GMR3&($Y<44):GMRTLO+.1665,$Y=28:98.6,1:""),GMRHDR11=$E(" ",$L(GMRHDR11)+1,4)_GMRHDR11
11 S GMRHDR1=$S($Y'=7:GMRHDR10_" "_GMRHDR11,1:"")
12 S GMRHDR2=$S($Y'=7&GMR3&($Y<44):$J(($Y*(-5)/27+(380/9)),4,1),$Y=28:"37.0",1:"")
13 I GMRHDR1'="",GMRHDR2'="" S GMRHDR1=GMRHDR1_"/"_GMRHDR2
14 Q
15DATAPRT ;
16 S GMRLINE=$S($Y=28:GMRX2,1:GMRX1)
17 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 D SETLINE Q:GMRNM=10
18 W GMRLINE
19 Q
20SETLINE ;
21 N GMRVOK S GMRVOK=0
22 S GMRNM=GMRNM+1,GMROLD=$P(GMRLINE,"|",GMRNM),GMRP=$O(^TMP($J,"GMR","P",GMRDT,""))
23 S GMRT=$O(^TMP($J,"GMR","T",GMRDT,""))
24 S GMRPOFF=($Y=7&(+GMRP>166))!($Y=44&(+GMRP<47)),GMRTOFF=($Y=7&(+GMRT>105.6))!($Y=43&(+GMRT<93.8))
25 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)
26 S GMRVPS=$S(+GMRP:$P($G(^TMP($J,"GMR","P",GMRDT,GMRP)),"^",1),1:"")
27 I GMRVPS'="" D
28 .I GMRVPS'["APICAL",(GMRVPS'["RADIAL"),(GMRVPS'["BRACHIAL") S GMRVOK=1
29 .Q
30 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))
31 Q:GMRVOK S $P(GMRLINE,"|",GMRNM)=GMROLD
32 Q
Note: See TracBrowser for help on using the repository browser.