GMRVVS3 ;HIRMFO/YH-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 3 ;3/17/97
;;4.0;Vitals/Measurements;;Apr 25, 1997
SF511 ;PRODUCE PATIENT VITAL SIGNS-I/O GRAPH
S GMRHT=0,GMRS=(9999999-GMRFIN)-.0001,GMRQ=9999999-GMRSTRT D INP^VADPT
F GMRTY="B","P","R","T","H","W" D SETT^GMRVSR1
F GMRK="P","T","B","H","W","R","XI1" D GMRDT
I $D(^TMP($J,"GMR","XI"_GN(1))) F GMRI=0:0 S GMRI=$O(^TMP($J,"GMR","XI"_GN(1),GMRI)) Q:GMRI'>0 S GFOUND=0 D CKDT S:GFOUND=0 ^TMP($J,"GMRDT",GMRI)=""
I $D(^TMP($J,"GMR","XO"_GN(2))) F GMRI=0:0 S GMRI=$O(^TMP($J,"GMR","XO"_GN(2),GMRI)) Q:GMRI'>0 S GFOUND=0 D CKDT S:GFOUND=0 ^TMP($J,"GMRDT",GMRI)=""
S (GMRTNM,GMRI)=0 F S GMRI=$O(^TMP($J,"GMRDT",GMRI)) Q:GMRI'>0 S GMRTNM=GMRTNM+1
D ^GMRVVS1 K GMR3,GMRDAT,GMREN,GMRHDR1,GMRHDR11,GMRHDR10,GMRHDR2,GMRHT,GMRI,GMRJ,GMRK,GMRLINE,GDATA,GMROLD,GMRP,GMRPDIF,GMRPG,GMRPGC,GMRPGS,GMRPHI,GMRPLO,GMRPOFF,GMRSITE,GMRT,GMRTDIF,GMRTHI,GMRTLO,GMRTNM
K GMRTOFF,GMRTY,GMRNM,GMRVX,GMRVX1,GMRVX2,^TMP($J,"GMRY")
Q
CKDT F GMRJ=0:0 S GMRJ=$O(^TMP($J,"GMRDT",GMRJ)) Q:GMRJ'>0!(+$P(GMRJ,".")>GMRI) S:+$P(GMRJ,".")=GMRI GFOUND=1
Q
GMRDT S GMRTNM(GMRK)=0 F GMRI=0:0 S GMRI=$O(^TMP($J,"GMR",GMRK,GMRI)) Q:GMRI'>0 S GMRJ="" F X=0:0 S GMRJ=$O(^TMP($J,"GMR",GMRK,GMRI,GMRJ)) Q:GMRJ="" S GMRTNM(GMRK)=GMRTNM(GMRK)+1 S:GMRK'="XI1" ^TMP($J,"GMRDT",GMRI)=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRVVS3 1327 printed Dec 13, 2024@01:57:45 Page 2
GMRVVS3 ;HIRMFO/YH-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 3 ;3/17/97
+1 ;;4.0;Vitals/Measurements;;Apr 25, 1997
SF511 ;PRODUCE PATIENT VITAL SIGNS-I/O GRAPH
+1 SET GMRHT=0
SET GMRS=(9999999-GMRFIN)-.0001
SET GMRQ=9999999-GMRSTRT
DO INP^VADPT
+2 FOR GMRTY="B","P","R","T","H","W"
DO SETT^GMRVSR1
+3 FOR GMRK="P","T","B","H","W","R","XI1"
DO GMRDT
+4 IF $DATA(^TMP($JOB,"GMR","XI"_GN(1)))
FOR GMRI=0:0
SET GMRI=$ORDER(^TMP($JOB,"GMR","XI"_GN(1),GMRI))
if GMRI'>0
QUIT
SET GFOUND=0
DO CKDT
if GFOUND=0
SET ^TMP($JOB,"GMRDT",GMRI)=""
+5 IF $DATA(^TMP($JOB,"GMR","XO"_GN(2)))
FOR GMRI=0:0
SET GMRI=$ORDER(^TMP($JOB,"GMR","XO"_GN(2),GMRI))
if GMRI'>0
QUIT
SET GFOUND=0
DO CKDT
if GFOUND=0
SET ^TMP($JOB,"GMRDT",GMRI)=""
+6 SET (GMRTNM,GMRI)=0
FOR
SET GMRI=$ORDER(^TMP($JOB,"GMRDT",GMRI))
if GMRI'>0
QUIT
SET GMRTNM=GMRTNM+1
+7 DO ^GMRVVS1
KILL GMR3,GMRDAT,GMREN,GMRHDR1,GMRHDR11,GMRHDR10,GMRHDR2,GMRHT,GMRI,GMRJ,GMRK,GMRLINE,GDATA,GMROLD,GMRP,GMRPDIF,GMRPG,GMRPGC,GMRPGS,GMRPHI,GMRPLO,GMRPOFF,GMRSITE,GMRT,GMRTDIF,GMRTHI,GMRTLO,GMRTNM
+8 KILL GMRTOFF,GMRTY,GMRNM,GMRVX,GMRVX1,GMRVX2,^TMP($JOB,"GMRY")
+9 QUIT
CKDT FOR GMRJ=0:0
SET GMRJ=$ORDER(^TMP($JOB,"GMRDT",GMRJ))
if GMRJ'>0!(+$PIECE(GMRJ,".")>GMRI)
QUIT
if +$PIECE(GMRJ,".")=GMRI
SET GFOUND=1
+1 QUIT
GMRDT SET GMRTNM(GMRK)=0
FOR GMRI=0:0
SET GMRI=$ORDER(^TMP($JOB,"GMR",GMRK,GMRI))
if GMRI'>0
QUIT
SET GMRJ=""
FOR X=0:0
SET GMRJ=$ORDER(^TMP($JOB,"GMR",GMRK,GMRI,GMRJ))
if GMRJ=""
QUIT
SET GMRTNM(GMRK)=GMRTNM(GMRK)+1
if GMRK'="XI1"
SET ^TMP($JOB,"GMRDT",GMRI)=""
+1 QUIT