GMVHB0 ;HIOFO/YH,FT-HP LASER B/P GRAPH - DATA ARRAY ;11/6/01 15:36
;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
;
; This routine uses the following IAs:
; #10061 - ^VADPT calls (supported)
;
EN1 ;
K ^TMP($J,"GMR"),^TMP($J,"GMRK"),^TMP($J,"GDT"),^TMP($J,"GMRVG"),^TMP($J,"GTNM") F GI=1:1:200 S ^TMP($J,"GMRK","G"_GI)=""
S GMROUT=0,GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
F GTYPE="B","P" D SETT^GMVBP0
U IO D GRAPH
Q1 D Q1^GMVGR0
Q
GRAPH D DEM^VADPT,INP^VADPT,SETV^GMVWT1
F GK="P","B" S ^TMP($J,"GTNM",GK)=0 F GI=0:0 S GI=$O(^TMP($J,"GMRVG",GK,GI)) Q:GI'>0 S GJ="" F X=0:0 S GJ=$O(^TMP($J,"GMRVG",GK,GI,GJ)) Q:GJ="" S ^TMP($J,"GTNM",GK)=^TMP($J,"GTNM",GK)+1,^TMP($J,"GDT",GI)=""
S GTNM=0 F X=0:0 S X=$O(^TMP($J,"GDT",X)) Q:X'>0 S GTNM=GTNM+1
S GPG=$S(GTNM=0:1,1:GTNM\10+''(GTNM#10)),GDT1=0
F GPGS=1:1:GPG D
. K GMRQUAL
. S ^TMP($J,"GMRK","G199")="Page "_GPGS D SETP^GMVBP1,DATE,PAGE,^GMVHB1
D Q1^GMVHG0,KVAR^VADPT K VA,GRAPHS,GRAPHD Q
PAGE ;
;DATA FOR SYSTOLIC GRAPH
K GRAPHS S GRAPHS=0,I=1,J=1201,GPA=0 F GI=226:1:235 S GRAPHS=0.6+(1.6*(I-1)) D:^TMP($J,"GMRK","G"_GI)'="" S I=I+1,J=J+1
.S GRAPHS(I)=$S(GPA=0:"PA",1:"PD")_GRAPHS_","_^TMP($J,"GMRK","G"_GI)_";LB"_^TMP($J,"GMRK","G"_J)_"#;",GPA=1
K GRAPHD S GRAPHD=0,I=1,J=1101,GPA=0 F GI=210:1:219 S GRAPHD=0.6+(1.6*(I-1)) D:^TMP($J,"GMRK","G"_GI)'="" S I=I+1,J=J+1
.S GRAPHD(I)=$S(GPA=0:"PA",1:"PD")_GRAPHD_","_^TMP($J,"GMRK","G"_GI)_";LB"_^TMP($J,"GMRK","G"_J)_"#;",GPA=1
I $D(GMRQUAL) D LEGEND^GMVLGQU
K GG,GSYNO Q
DATE F GCNTD=1:1:10 S:$L(GDT1) GDT1=$O(^TMP($J,"GDT",GDT1)) S ^TMP($J,"GMRK","G"_GCNTD)=$S($L(GDT1):$E(GDT1,4,5)_"-"_$E(GDT1,6,7)_"-"_$E(GDT1,2,3),1:"") D DATE1
Q
DATE1 S Y=$E($P(GDT1,".",2)_"0000",1,4),^TMP($J,"GMRK","G"_(GCNTD+16))=$S($L(GDT1):$E(Y,1,2)_":"_$E(Y,3,4),1:"") D SETD
Q
SETD F GI="P","B","C","D","S" S GJ=$F("WTXPXRBIOCHDS",GI),GK=$S($L(GDT1):$O(^TMP($J,"GMRVG",GI,GDT1,"")),1:"") D SETA^GMVHB4
S GI="M",GJ=0,GK=$S($L(GDT1):$O(^TMP($J,"GMRVG",GI,GDT1,"")),1:"") D SETA^GMVHB4
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMVHB0 2050 printed Nov 22, 2024@17:09:11 Page 2
GMVHB0 ;HIOFO/YH,FT-HP LASER B/P GRAPH - DATA ARRAY ;11/6/01 15:36
+1 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
+2 ;
+3 ; This routine uses the following IAs:
+4 ; #10061 - ^VADPT calls (supported)
+5 ;
EN1 ;
+1 KILL ^TMP($JOB,"GMR"),^TMP($JOB,"GMRK"),^TMP($JOB,"GDT"),^TMP($JOB,"GMRVG"),^TMP($JOB,"GTNM")
FOR GI=1:1:200
SET ^TMP($JOB,"GMRK","G"_GI)=""
+2 SET GMROUT=0
SET GSTART1=(9999999-GMRFIN)-.0001
SET GEND1=9999999-GMRSTRT
+3 FOR GTYPE="B","P"
DO SETT^GMVBP0
+4 USE IO
DO GRAPH
Q1 DO Q1^GMVGR0
+1 QUIT
GRAPH DO DEM^VADPT
DO INP^VADPT
DO SETV^GMVWT1
+1 FOR GK="P","B"
SET ^TMP($JOB,"GTNM",GK)=0
FOR GI=0:0
SET GI=$ORDER(^TMP($JOB,"GMRVG",GK,GI))
if GI'>0
QUIT
SET GJ=""
FOR X=0:0
SET GJ=$ORDER(^TMP($JOB,"GMRVG",GK,GI,GJ))
if GJ=""
QUIT
SET ^TMP($JOB,"GTNM",GK)=^TMP($JOB,"GTNM",GK)+1
SET ^TMP($JOB,"GDT",GI)=""
+2 SET GTNM=0
FOR X=0:0
SET X=$ORDER(^TMP($JOB,"GDT",X))
if X'>0
QUIT
SET GTNM=GTNM+1
+3 SET GPG=$SELECT(GTNM=0:1,1:GTNM\10+''(GTNM#10))
SET GDT1=0
+4 FOR GPGS=1:1:GPG
Begin DoDot:1
+5 KILL GMRQUAL
+6 SET ^TMP($JOB,"GMRK","G199")="Page "_GPGS
DO SETP^GMVBP1
DO DATE
DO PAGE
DO ^GMVHB1
End DoDot:1
+7 DO Q1^GMVHG0
DO KVAR^VADPT
KILL VA,GRAPHS,GRAPHD
QUIT
PAGE ;
+1 ;DATA FOR SYSTOLIC GRAPH
+2 KILL GRAPHS
SET GRAPHS=0
SET I=1
SET J=1201
SET GPA=0
FOR GI=226:1:235
SET GRAPHS=0.6+(1.6*(I-1))
if ^TMP($JOB,"GMRK","G"_GI)'=""
Begin DoDot:1
+3 SET GRAPHS(I)=$SELECT(GPA=0:"PA",1:"PD")_GRAPHS_","_^TMP($JOB,"GMRK","G"_GI)_";LB"_^TMP($JOB,"GMRK","G"_J)_"#;"
SET GPA=1
End DoDot:1
SET I=I+1
SET J=J+1
+4 KILL GRAPHD
SET GRAPHD=0
SET I=1
SET J=1101
SET GPA=0
FOR GI=210:1:219
SET GRAPHD=0.6+(1.6*(I-1))
if ^TMP($JOB,"GMRK","G"_GI)'=""
Begin DoDot:1
+5 SET GRAPHD(I)=$SELECT(GPA=0:"PA",1:"PD")_GRAPHD_","_^TMP($JOB,"GMRK","G"_GI)_";LB"_^TMP($JOB,"GMRK","G"_J)_"#;"
SET GPA=1
End DoDot:1
SET I=I+1
SET J=J+1
+6 IF $DATA(GMRQUAL)
DO LEGEND^GMVLGQU
+7 KILL GG,GSYNO
QUIT
DATE FOR GCNTD=1:1:10
if $LENGTH(GDT1)
SET GDT1=$ORDER(^TMP($JOB,"GDT",GDT1))
SET ^TMP($JOB,"GMRK","G"_GCNTD)=$SELECT($LENGTH(GDT1):$EXTRACT(GDT1,4,5)_"-"_$EXTRACT(GDT1,6,7)_"-"_$EXTRACT(GDT1,2,3),1:"")
DO DATE1
+1 QUIT
DATE1 SET Y=$EXTRACT($PIECE(GDT1,".",2)_"0000",1,4)
SET ^TMP($JOB,"GMRK","G"_(GCNTD+16))=$SELECT($LENGTH(GDT1):$EXTRACT(Y,1,2)_":"_$EXTRACT(Y,3,4),1:"")
DO SETD
+1 QUIT
SETD FOR GI="P","B","C","D","S"
SET GJ=$FIND("WTXPXRBIOCHDS",GI)
SET GK=$SELECT($LENGTH(GDT1):$ORDER(^TMP($JOB,"GMRVG",GI,GDT1,"")),1:"")
DO SETA^GMVHB4
+1 SET GI="M"
SET GJ=0
SET GK=$SELECT($LENGTH(GDT1):$ORDER(^TMP($JOB,"GMRVG",GI,GDT1,"")),1:"")
DO SETA^GMVHB4
+2 QUIT