Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMVVS4

GMVVS4.m

Go to the documentation of this file.
GMVVS4 ;HIOFO/YH,FT-PATIENT VITAL SIGNS-GRAPH ;11/6/01  14:44
 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
 ;
 ; This routine uses the following IAs:
 ; <None>
 ;
SETHD ;
 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
 S GMRHDR10=$S($Y>8&GMR3&($Y<44):GMRPLO+1.665,1:""),GMRHDR10=$E("    ",$L(GMRHDR10)+1,4)_GMRHDR10
 S GMRHDR11=$S($Y>8&GMR3&($Y<44):GMRTLO+.1665,$Y=28:98.6,1:""),GMRHDR11=$E("    ",$L(GMRHDR11)+1,4)_GMRHDR11
 S GMRHDR1=$S($Y'=7:GMRHDR10_" "_GMRHDR11,1:"")
 S GMRHDR2=$S($Y'=7&GMR3&($Y<44):$J(($Y*(-5)/27+(380/9)),4,1),$Y=28:"37.0",1:"")
 I GMRHDR1'="",GMRHDR2'="" S GMRHDR1=GMRHDR1_"/"_GMRHDR2
 Q
DATAPRT ;
 S GMRLINE=$S($Y=28:GMRX2,1:GMRX1)
 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0  D SETLINE Q:GMRNM=10
 W GMRLINE
 Q
SETLINE ;
 N GMRVOK S GMRVOK=0
 S GMRNM=GMRNM+1,GMROLD=$P(GMRLINE,"|",GMRNM),GMRP=$O(^TMP($J,"GMR","P",GMRDT,""))
 S GMRT=$O(^TMP($J,"GMR","T",GMRDT,""))
 S GMRPOFF=($Y=7&(+GMRP>166))!($Y=44&(+GMRP<47)),GMRTOFF=($Y=7&(+GMRT>105.6))!($Y=43&(+GMRT<93.8))
 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)
 S GMRVPS=$S(+GMRP:$P($G(^TMP($J,"GMR","P",GMRDT,GMRP)),"^",1),1:"")
 I GMRVPS'="" D
 .I GMRVPS'["APICAL",(GMRVPS'["RADIAL"),(GMRVPS'["BRACHIAL") S GMRVOK=1
 .Q
 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))
 Q:GMRVOK  S $P(GMRLINE,"|",GMRNM)=GMROLD
 Q