GMVLWT2 ;HIOFO/YH,FT-DOT MATRIX WEIGHT GRAPH - 3 ;11/6/01 15:32
;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
;
; This routine uses the following IAs:
; <None>
;
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[HGMVLWT2 968 printed Dec 13, 2024@01:59:42 Page 2
GMVLWT2 ;HIOFO/YH,FT-DOT MATRIX WEIGHT GRAPH - 3 ;11/6/01 15:32
+1 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
+2 ;
+3 ; This routine uses the following IAs:
+4 ; <None>
+5 ;
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