GMRVLWT3 ;HIRMFO/YH-DOT MATRIX PATIENT WEIGHT GRAPH - 4 ;7/15/97
;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
W ! W:GMRNAM'="" ?$X-3,$E(GMRNAM,1,35) W " "_$P($G(VADM(2)),"^",2)_" "_$P($G(VADM(3)),"^",2)_" "_$P($G(VADM(4)),"^")_" YRS "_$P($G(VADM),"^",2)
W ?95,"MEDICAL RECORD" W !,"Unit: "_$S(GMRWARD(1)'="":GMRWARD(1),1:" ")," "_"Room: "_$S($P(VAIN(5),"^")'="":$P($P(VAIN(5),"^"),"-",1,2),1:" "),?95,"WEIGHT CHART"
D INP^VADPT S GMRVHLOC=$P($G(^DIC(42,+$G(VAIN(4)),44)),"^")
W !,"Division: "_$S(GMRVHLOC>0:$$GET1^DIQ(4,+$$GET1^DIQ(44,+GMRVHLOC,3,"I"),.01,"I"),1:""),?55,"Page "_GMRPGC,?95,"VAF 10-2614f",!
W GSTRFIN Q
STLNP ;
S GMR(GMRI)=$O(^TMP($J,"GMRVG",GMRI,GMRDT,"")) Q:GMR(GMRI)=""
S (GMRSITE,GMRSITE(1),GMRINF,GMRVJ)=""
S GMRSITE(1)=$P($G(^TMP($J,"GMRVG",GMRI,GMRDT,GMR(GMRI))),"^"),GMRSITE(2)=$P($G(^(GMR(GMRI))),"^",3),GMRINF=$P($G(^(GMR(GMRI))),"^",4) I GMRSITE(1)'="" S GI=GMRI D SYNOARY^GMRVLGQU
I GMR(GMRI)>0 S GMR(GMRI)=$J(GMR(GMRI),0,2)
S $P(GMRLINE(GMRI),"|",GMRNM)=$E(GMR(GMRI)_" ",1,10)
I GMRI="H" S:GMR(GMRI)>0 $P(GMRLINE("H1"),"|",GMRNM)=$E($J(GMR(GMRI)*2.54,0,2)_" ",1,10),$P(GMRLINE("HQUAL"),"|",GMRNM)=$E(GMRSITE_" ",1,10)
I GMRI="W" S:GMR(GMRI)>0 $P(GMRLINE("W1"),"|",GMRNM)=$E($S(GMR(GMRI)>0:$J(GMR(GMRI)/2.2,0,2),1:GMR(GMRI))_" ",1,10),$P(GMRLINE("WQUAL"),"|",GMRNM)=$E(GMRSITE_" ",1,10)
I GMRI="W",GMR(GMRI)>0 D
. S GMRBMI="",GMRBMI(1)=GMRDT,GMRBMI(2)=GMR(GMRI) D CALBMI^GMRVBMI(.GMRBMI)
. S $P(GMRLINE("BMI"),"|",GMRNM)=$E(GMRBMI_" ",1,10) K GMRBMI
K GI Q
GMRVLWT3 ;HIRMFO/YH-DOT MATRIX PATIENT WEIGHT GRAPH - 4 ;7/15/97
+1 ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
+1 WRITE !
IF GMRNAM'=""
WRITE ?$X-3,$EXTRACT(GMRNAM,1,35)
WRITE " "_$PIECE($GET(VADM(2)),"^",2)_" "_$PIECE($GET(VADM(3)),"^",2)_" "_$PIECE($GET(VADM(4)),"^")_" YRS "_$PIECE($GET(VADM),"^",2)
+2 WRITE ?95,"MEDICAL RECORD"
WRITE !,"Unit: "_$SELECT(GMRWARD(1)'="":GMRWARD(1),1:" ")," "_"Room: "_$SELECT($PIECE(VAIN(5),"^")'="":$PIECE($PIECE(VAIN(5),"^"),"-",1,2),1:" "),?95,"WEIGHT CHART"
+3 DO INP^VADPT
SET GMRVHLOC=$PIECE($GET(^DIC(42,+$GET(VAIN(4)),44)),"^")
+4 WRITE !,"Division: "_$SELECT(GMRVHLOC>0:$$GET1^DIQ(4,+$$GET1^DIQ(44,+GMRVHLOC,3,"I"),.01,"I"),1:""),?55,"Page "_GMRPGC,?95,"VAF 10-2614f",!
+5 WRITE GSTRFIN
QUIT
STLNP ;
+1 SET GMR(GMRI)=$ORDER(^TMP($JOB,"GMRVG",GMRI,GMRDT,""))
IF GMR(GMRI)=""
QUIT
+2 SET (GMRSITE,GMRSITE(1),GMRINF,GMRVJ)=""
+3 SET GMRSITE(1)=$PIECE($GET(^TMP($JOB,"GMRVG",GMRI,GMRDT,GMR(GMRI))),"^")
SET GMRSITE(2)=$PIECE($GET(^(GMR(GMRI))),"^",3)
SET GMRINF=$PIECE($GET(^(GMR(GMRI))),"^",4)
IF GMRSITE(1)'=""
SET GI=GMRI
DO SYNOARY^GMRVLGQU
+4 IF GMR(GMRI)>0
SET GMR(GMRI)=$JUSTIFY(GMR(GMRI),0,2)
+5 SET $PIECE(GMRLINE(GMRI),"|",GMRNM)=$EXTRACT(GMR(GMRI)_" ",1,10)
+6 IF GMRI="H"
IF GMR(GMRI)>0
SET $PIECE(GMRLINE("H1"),"|",GMRNM)=$EXTRACT($JUSTIFY(GMR(GMRI)*2.54,0,2)_" ",1,10)
SET $PIECE(GMRLINE("HQUAL"),"|",GMRNM)=$EXTRACT(GMRSITE_" ",1,10)
+7 IF GMRI="W"
IF GMR(GMRI)>0
SET $PIECE(GMRLINE("W1"),"|",GMRNM)=$EXTRACT($SELECT(GMR(GMRI)>0:$JUSTIFY(GMR(GMRI)/2.2,0,2),1:GMR(GMRI))_" ",1,10)
SET $PIECE(GMRLINE("WQUAL"),"|",GMRNM)=$EXTRACT(GMRSITE_" ",1,10)
+8 IF GMRI="W"
IF GMR(GMRI)>0
Begin DoDot:1
+9 SET GMRBMI=""
SET GMRBMI(1)=GMRDT
SET GMRBMI(2)=GMR(GMRI)
DO CALBMI^GMRVBMI(.GMRBMI)
+10 SET $PIECE(GMRLINE("BMI"),"|",GMRNM)=$EXTRACT(GMRBMI_" ",1,10)
KILL GMRBMI
End DoDot:1
+11 KILL GI
QUIT