GMRVLWT2 ;HIRMFO/YH-DOT MATRIX WEIGHT GRAPH - 3 ;5/27/97
;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
SETHD ;
;GMRWT = WEIGHT VALUE WHEN $Y=1
;GMRWT(1) = $Y
;GMRWT(2) = GWT LOCAL GLOBAL COUNT
S GMRWHI=GMRWT-(($Y-1)*1.666),GMRWLO=GMRWHI-1.666
S GMR3=(($Y/3)=($Y\3))
S GMRHDR10=$S($Y>5&GMR3&($Y<57)&($Y'=GMRWT(1)):" 5",$Y=GMRWT(1)&(GMRWT(2)<9):GWT(GMRWT(2)),1:"")
I $Y=GMRWT(1) S GMRWT(1)=GMRWT(1)+6,GMRWT(2)=GMRWT(2)+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),GMRW=$O(^TMP($J,"GMRVG","W",GMRDT,""))
S GMRWOFF=($Y=6&(+GMRW>(GWT(1)+5)))!($Y=56&(+GMRW<(GWT(8)-7)))
S GMROLD=$E($S(+GMRW>0&(+GMRW'<GMRWLO&(+GMRW'>GMRWHI)!GMRWOFF):"W"_$S('GMRWOFF:" ",1:"**"),1:"")_" ",1,10)
S $P(GMRLINE,"|",GMRNM)=GMROLD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRVLWT2 901 printed Oct 16, 2024@17:57:53 Page 2
GMRVLWT2 ;HIRMFO/YH-DOT MATRIX WEIGHT GRAPH - 3 ;5/27/97
+1 ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
SETHD ;
+1 ;GMRWT = WEIGHT VALUE WHEN $Y=1
+2 ;GMRWT(1) = $Y
+3 ;GMRWT(2) = GWT LOCAL GLOBAL COUNT
+4 SET GMRWHI=GMRWT-(($Y-1)*1.666)
SET GMRWLO=GMRWHI-1.666
+5 SET GMR3=(($Y/3)=($Y\3))
+6 SET GMRHDR10=$SELECT($Y>5&GMR3&($Y<57)&($Y'=GMRWT(1)):" 5",$Y=GMRWT(1)&(GMRWT(2)<9):GWT(GMRWT(2)),1:"")
+7 IF $Y=GMRWT(1)
SET GMRWT(1)=GMRWT(1)+6
SET GMRWT(2)=GMRWT(2)+1
+8 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 GMRW=$ORDER(^TMP($JOB,"GMRVG","W",GMRDT,""))
+2 SET GMRWOFF=($Y=6&(+GMRW>(GWT(1)+5)))!($Y=56&(+GMRW<(GWT(8)-7)))
+3 SET GMROLD=$EXTRACT($SELECT(+GMRW>0&(+GMRW'<GMRWLO&(+GMRW'>GMRWHI)!GMRWOFF):"W"_$SELECT('GMRWOFF:" ",1:"**"),1:"")_" ",1,10)
+4 SET $PIECE(GMRLINE,"|",GMRNM)=GMROLD
+5 QUIT