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
GMVVS4 ;HIOFO/YH,FT-PATIENT VITAL SIGNS-GRAPH ;11/6/01 14:44
+1 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
+2 ;
+3 ; This routine uses the following IAs:
+4 ; <None>
+5 ;
SETHD ;
+1 SET GMR3=(($Y/3)=($Y\3))
SET GMRPHI=GMRPLO
SET GMRPLO=$Y*(-10)/3+188.335
SET GMRTHI=GMRTLO
SET GMRTLO=-$Y/3+107.8335
SET GMRTDIF=GMRTHI-GMRTLO
SET GMRPDIF=GMRPHI-GMRPLO
+2 SET GMRHDR10=$SELECT($Y>8&GMR3&($Y<44):GMRPLO+1.665,1:"")
SET GMRHDR10=$EXTRACT(" ",$LENGTH(GMRHDR10)+1,4)_GMRHDR10
+3 SET GMRHDR11=$SELECT($Y>8&GMR3&($Y<44):GMRTLO+.1665,$Y=28:98.6,1:"")
SET GMRHDR11=$EXTRACT(" ",$LENGTH(GMRHDR11)+1,4)_GMRHDR11
+4 SET GMRHDR1=$SELECT($Y'=7:GMRHDR10_" "_GMRHDR11,1:"")
+5 SET GMRHDR2=$SELECT($Y'=7&GMR3&($Y<44):$JUSTIFY(($Y*(-5)/27+(380/9)),4,1),$Y=28:"37.0",1:"")
+6 IF GMRHDR1'=""
IF GMRHDR2'=""
SET GMRHDR1=GMRHDR1_"/"_GMRHDR2
+7 QUIT
DATAPRT ;
+1 SET GMRLINE=$SELECT($Y=28:GMRX2,1:GMRX1)
+2 SET GMRNM=0
FOR GMRDT=0:0
SET GMRDT=$ORDER(^TMP($JOB,"GMRDT",GMRDT))
IF GMRDT'>0
QUIT
DO SETLINE
IF GMRNM=10
QUIT
+3 WRITE GMRLINE
+4 QUIT
SETLINE ;
+1 NEW GMRVOK
SET GMRVOK=0
+2 SET GMRNM=GMRNM+1
SET GMROLD=$PIECE(GMRLINE,"|",GMRNM)
SET GMRP=$ORDER(^TMP($JOB,"GMR","P",GMRDT,""))
+3 SET GMRT=$ORDER(^TMP($JOB,"GMR","T",GMRDT,""))
+4 SET GMRPOFF=($Y=7&(+GMRP>166))!($Y=44&(+GMRP<47))
SET GMRTOFF=($Y=7&(+GMRT>105.6))!($Y=43&(+GMRT<93.8))
+5 SET GMROLD=$SELECT(+GMRT>0&(+GMRT'<GMRTLO&(+GMRT'>GMRTHI)!GMRTOFF):"T"_$SELECT('$PIECE(^TMP($JOB,"GMR","T",GMRDT,GMRT),"^",2):" ",1:"*")_$SELECT('GMRTOFF:" ",1:"*")_$EXTRACT(GMROLD,4,10),1:GMROLD)
+6 SET GMRVPS=$SELECT(+GMRP:$PIECE($GET(^TMP($JOB,"GMR","P",GMRDT,GMRP)),"^",1),1:"")
+7 IF GMRVPS'=""
Begin DoDot:1
+8 IF GMRVPS'["APICAL"
IF (GMRVPS'["RADIAL")
IF (GMRVPS'["BRACHIAL")
SET GMRVOK=1
+9 QUIT
End DoDot:1
+10 SET GMROLD=$EXTRACT(GMROLD,1,5)_$SELECT(GMRP>0&(+GMRP'<GMRPLO&(+GMRP'>GMRPHI)!GMRPOFF):"P"_$SELECT('$PIECE(^TMP($JOB,"GMR","P",GMRDT,GMRP),"^",2):" ",1:"*")_$SELECT('GMRPOFF:" ",1:"*")_$EXTRACT(GMROLD,9,10),1:$EXTRACT(GMROLD,6,10))
+11 IF GMRVOK
QUIT
SET $PIECE(GMRLINE,"|",GMRNM)=GMROLD
+12 QUIT