GMVLBP1 ;HIOFO/YH,FT-SYSTOLIC/DIASTOLIC GRAPH ;12/17/01 09:30
;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
;
; This routine uses the following IAs:
; <None>
;
SETHD ;
S GMR3=(($Y/3)=($Y\3)),(GMRSHI,GMRDHI)=GMRSLO,(GMRSLO,GMRDLO)=$Y*(-10)/3+248.335,(GMRSDIF,GMRDDIF)=GMRSHI-GMRSLO
S GMRHDR10=$S($Y>8&GMR3&($Y<62):GMRSLO+1.665,1:"")
Q
DATAPRT ;
S GMRLINE=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 ;
S GMRNM=GMRNM+1,GMROLD=$P(GMRLINE,"|",GMRNM),GMRS=$O(^TMP($J,"GMRVG","S",GMRDT,""))
S GMRD=$O(^TMP($J,"GMRVG","D",GMRDT,""))
S GMRSOFF=($Y=7&(+GMRS>225))!($Y=61&(+GMRS<48)),GMRDOFF=($Y=7&(+GMRD>226))!($Y=61&(+GMRD<48))
S GMROLD=$S(+GMRS>0&(+GMRS'<GMRSLO&(+GMRS'>GMRSHI)!GMRSOFF):"S"_$S('$P(^TMP($J,"GMRVG","S",GMRDT,GMRS),"^",2):" ",1:"*")_$S('GMRSOFF:" ",1:"*")_$E(GMROLD,4,10),1:GMROLD)
S GMROLD=$E(GMROLD,1,5)_$S(GMRD>0&(+GMRD'<GMRDLO&(+GMRD'>GMRDHI)!GMRDOFF):"D"_$S('$P(^TMP($J,"GMRVG","D",GMRDT,GMRD),"^",2):" ",1:"*")_$S('GMRDOFF:" ",1:"*")_$E(GMROLD,9,10),1:$E(GMROLD,6,10))
S $P(GMRLINE,"|",GMRNM)=GMROLD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMVLBP1 1128 printed Dec 13, 2024@01:59:35 Page 2
GMVLBP1 ;HIOFO/YH,FT-SYSTOLIC/DIASTOLIC GRAPH ;12/17/01 09:30
+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 (GMRSHI,GMRDHI)=GMRSLO
SET (GMRSLO,GMRDLO)=$Y*(-10)/3+248.335
SET (GMRSDIF,GMRDDIF)=GMRSHI-GMRSLO
+2 SET GMRHDR10=$SELECT($Y>8&GMR3&($Y<62):GMRSLO+1.665,1:"")
+3 QUIT
DATAPRT ;
+1 SET GMRLINE=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 SET GMRNM=GMRNM+1
SET GMROLD=$PIECE(GMRLINE,"|",GMRNM)
SET GMRS=$ORDER(^TMP($JOB,"GMRVG","S",GMRDT,""))
+2 SET GMRD=$ORDER(^TMP($JOB,"GMRVG","D",GMRDT,""))
+3 SET GMRSOFF=($Y=7&(+GMRS>225))!($Y=61&(+GMRS<48))
SET GMRDOFF=($Y=7&(+GMRD>226))!($Y=61&(+GMRD<48))
+4 SET GMROLD=$SELECT(+GMRS>0&(+GMRS'<GMRSLO&(+GMRS'>GMRSHI)!GMRSOFF):"S"_$SELECT('$PIECE(^TMP($JOB,"GMRVG","S",GMRDT,GMRS),"^",2):" ",1:"*")_$SELECT('GMRSOFF:" ",1:"*")_$EXTRACT(GMROLD,4,10),1:GMROLD)
+5 SET GMROLD=$EXTRACT(GMROLD,1,5)_$SELECT(GMRD>0&(+GMRD'<GMRDLO&(+GMRD'>GMRDHI)!GMRDOFF):"D"_$SELECT('$PIECE(^TMP($JOB,"GMRVG","D",GMRDT,GMRD),"^",2):" ",1:"*")_$SELECT('GMRDOFF:" ",1:"*")_$EXTRACT(GMROLD,9,10),1:$EXTRACT(GMROLD,6,10))
+6 SET $PIECE(GMRLINE,"|",GMRNM)=GMROLD
+7 QUIT