GMRVBP1 ;HIRMFO/YH-CALCULATE KYOCERA B/P GRAPH DATA ;5/15/97
;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
;CONTINUTATION OF GMRVBP0
GRAPH D DEM^VADPT,INP^VADPT,SETV^GMRVGR1
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,DATE S ^TMP($J,"GMRK","G200")=GMRRMBD D PAGE,EN1^GMRVBP2,EN2^GMRVBP3,EN3^GMRVBP4 D
. . S ^TMP($J,"GMRK","G82M")=0.6,^TMP($J,"GMRK","G210M")=0.6,^TMP($J,"GMRK","G226M")=0.6
D KVAR^VADPT K VA Q
PAGE ;
I ^TMP($J,"GMRK","G82")="" F GI=83:1:92 S ^TMP($J,"GMRK","G82")=^TMP($J,"GMRK","G"_GI),^TMP($J,"GMRK","G82M")=0.6+(1.6*(GI-82)) Q:^TMP($J,"GMRK","G82")'=""
I ^TMP($J,"GMRK","G210")="" F GI=211:1:219 S ^TMP($J,"GMRK","G210")=^TMP($J,"GMRK","G"_GI),^TMP($J,"GMRK","G210M")=0.6+(1.6*(GI-210)) Q:^TMP($J,"GMRK","G210")'=""
I ^TMP($J,"GMRK","G226")="" F GI=227:1:236 S ^TMP($J,"GMRK","G226")=^TMP($J,"GMRK","G"_GI),^TMP($J,"GMRK","G226M")=0.6+(1.6*(GI-226)) Q:^TMP($J,"GMRK","G226")'=""
I $D(GMRQUAL) D LEGEND^GMRVLGQU
K GG,I,J,GSYNO Q
SETV S ^TMP($J,"GMRK","G194")=$S(VADM(1)'="":VADM(1),1:" ")_" "_$S(VADM(2)'="":$P(VADM(2),"^",2),1:" "),GDOB=$S($D(VADM(3)):$P(VADM(3),"^",2),1:" "),GAGE=$S($D(VADM(4)):VADM(4),1:" ")
S ^TMP($J,"GMRK","G197")=$S($D(VADM(5)):$P(VADM(5),"^",2),1:" "),^TMP($J,"GMRK","G198")=$S($D(GMRWARD(1)):"Unit: "_GMRWARD(1),1:"Unit: ")
S GMRRMBD=$S('(VAIN(5)=""):"Room: "_VAIN(5),1:"Room: "),^TMP($J,"GMRK","G196")=$S($D(GDOB)&($D(GAGE)):GDOB_" ("_GAGE_")",1:" ")
I '$D(GMRVHLOC) S GMRVHLOC=$P($G(^DIC(42,+$G(VAIN(4)),44)),"^")
S GMRDIV="Division: "_$S(GMRVHLOC>0:$$GET1^DIQ(4,+$$GET1^DIQ(44,+GMRVHLOC,3,"I"),.01,"I"),1:"")
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^GMRVBP5
S GI="M",GJ=0,GK=$S($L(GDT1):$O(^TMP($J,"GMRVG",GI,GDT1,"")),1:"") D SETA^GMRVBP5
Q
SETP ;INITIALIZE ^TMP FOR V/M QUALIFIERS
;1120+I - PULSE QUALIFIER
;450+I - BP QUALIFIER
;1240+I - THE THIRD PIECE OF BP
;1220+I - MEAN ARTERIAL PRESSURE
F I=1:1:10 S (^TMP($J,"GMRK","G"_(430+I)),^("G"_(450+I)),^("G"_(1120+I)),^("G"_(1220+I)),^("G"_(1240+I)),^("G"_(1100+I)),^("G"_(1200+I)),^("G"_(210+I)),^("G"_(226+I)))=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRVBP1 2813 printed Dec 13, 2024@01:56:02 Page 2
GMRVBP1 ;HIRMFO/YH-CALCULATE KYOCERA B/P GRAPH DATA ;5/15/97
+1 ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
+2 ;CONTINUTATION OF GMRVBP0
GRAPH DO DEM^VADPT
DO INP^VADPT
DO SETV^GMRVGR1
+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
DO DATE
SET ^TMP($JOB,"GMRK","G200")=GMRRMBD
DO PAGE
DO EN1^GMRVBP2
DO EN2^GMRVBP3
DO EN3^GMRVBP4
Begin DoDot:2
+7 SET ^TMP($JOB,"GMRK","G82M")=0.6
SET ^TMP($JOB,"GMRK","G210M")=0.6
SET ^TMP($JOB,"GMRK","G226M")=0.6
End DoDot:2
End DoDot:1
+8 DO KVAR^VADPT
KILL VA
QUIT
PAGE ;
+1 IF ^TMP($JOB,"GMRK","G82")=""
FOR GI=83:1:92
SET ^TMP($JOB,"GMRK","G82")=^TMP($JOB,"GMRK","G"_GI)
SET ^TMP($JOB,"GMRK","G82M")=0.6+(1.6*(GI-82))
if ^TMP($JOB,"GMRK","G82")'=""
QUIT
+2 IF ^TMP($JOB,"GMRK","G210")=""
FOR GI=211:1:219
SET ^TMP($JOB,"GMRK","G210")=^TMP($JOB,"GMRK","G"_GI)
SET ^TMP($JOB,"GMRK","G210M")=0.6+(1.6*(GI-210))
if ^TMP($JOB,"GMRK","G210")'=""
QUIT
+3 IF ^TMP($JOB,"GMRK","G226")=""
FOR GI=227:1:236
SET ^TMP($JOB,"GMRK","G226")=^TMP($JOB,"GMRK","G"_GI)
SET ^TMP($JOB,"GMRK","G226M")=0.6+(1.6*(GI-226))
if ^TMP($JOB,"GMRK","G226")'=""
QUIT
+4 IF $DATA(GMRQUAL)
DO LEGEND^GMRVLGQU
+5 KILL GG,I,J,GSYNO
QUIT
SETV SET ^TMP($JOB,"GMRK","G194")=$SELECT(VADM(1)'="":VADM(1),1:" ")_" "_$SELECT(VADM(2)'="":$PIECE(VADM(2),"^",2),1:" ")
SET GDOB=$SELECT($DATA(VADM(3)):$PIECE(VADM(3),"^",2),1:" ")
SET GAGE=$SELECT($DATA(VADM(4)):VADM(4),1:" ")
+1 SET ^TMP($JOB,"GMRK","G197")=$SELECT($DATA(VADM(5)):$PIECE(VADM(5),"^",2),1:" ")
SET ^TMP($JOB,"GMRK","G198")=$SELECT($DATA(GMRWARD(1)):"Unit: "_GMRWARD(1),1:"Unit: ")
+2 SET GMRRMBD=$SELECT('(VAIN(5)=""):"Room: "_VAIN(5),1:"Room: ")
SET ^TMP($JOB,"GMRK","G196")=$SELECT($DATA(GDOB)&($DATA(GAGE)):GDOB_" ("_GAGE_")",1:" ")
+3 IF '$DATA(GMRVHLOC)
SET GMRVHLOC=$PIECE($GET(^DIC(42,+$GET(VAIN(4)),44)),"^")
+4 SET GMRDIV="Division: "_$SELECT(GMRVHLOC>0:$$GET1^DIQ(4,+$$GET1^DIQ(44,+GMRVHLOC,3,"I"),.01,"I"),1:"")
+5 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^GMRVBP5
+1 SET GI="M"
SET GJ=0
SET GK=$SELECT($LENGTH(GDT1):$ORDER(^TMP($JOB,"GMRVG",GI,GDT1,"")),1:"")
DO SETA^GMRVBP5
+2 QUIT
SETP ;INITIALIZE ^TMP FOR V/M QUALIFIERS
+1 ;1120+I - PULSE QUALIFIER
+2 ;450+I - BP QUALIFIER
+3 ;1240+I - THE THIRD PIECE OF BP
+4 ;1220+I - MEAN ARTERIAL PRESSURE
+5 FOR I=1:1:10
SET (^TMP($JOB,"GMRK","G"_(430+I)),^("G"_(450+I)),^("G"_(1120+I)),^("G"_(1220+I)),^("G"_(1240+I)),^("G"_(1100+I)),^("G"_(1200+I)),^("G"_(210+I)),^("G"_(226+I)))=""
+6 QUIT