GMVBP5 ;HIOFO/YH,FT-CALCULATE KYOCERA B/P GRAPH DATA (CONT.) ;11/6/01 14:36
;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
;
; This routine uses the following IAs:
; <None>
;
SETA ;
I GK="Unavailable" S GK="Unavail"
S (GMRSITE,GMRSITE(1),GMRSITE(2),GMRINF,GMRVJ)=""
I GK'="" D
. S GMRSITE(1)=$P($G(^TMP($J,"GMRVG",GI,GDT1,GK)),"^"),GMRVJ=$P($G(^(GK)),"^",2),GMRINF=$P($G(^(GK)),"^",4)
. I GMRSITE(1)'="" D SYNOARY^GMVLGQU
I GI="C" S ^TMP($J,"GMRK","G"_(1240+GCNTD))=GK_^TMP($J,"GMRK","G"_(1240+GCNTD)) Q
I GK'="" S GK=GK_$S(GMRVJ=1:"*",1:" ")
I GI="B" S ^TMP($J,"GMRK","G"_(450+GCNTD))=$S($L(GMRSITE," ")>3:$P(GMRSITE," ",2,4),1:GMRSITE),^TMP($J,"GMRK","G"_(GJ*16+GCNTD+1))=GK S:$L(GMRSITE," ")>3 ^TMP($J,"GMRK","G"_(1240+GCNTD))=" "_$P(GMRSITE," ") Q
I GI="P" D Q
. S ^TMP($J,"GMRK","G"_(GJ+1*16+GCNTD+1))=GK_" "_$S($L(GMRSITE," ")>3:$P(GMRSITE," "),1:"")
. S ^TMP($J,"GMRK","G"_(1120+GCNTD))=$S($L(GMRSITE," ")>3:$P(GMRSITE," ",2,4),1:GMRSITE)
I GI="M" S ^TMP($J,"GMRK","G"_(1220+GCNTD))=GK Q
I GI="S"!(GI="D") S ^TMP($J,"GMRK","G"_(GJ*16+GCNTD+1))=$S(GK>0:240-GK/10,1:""),^TMP($J,"GMRK","G"_(GJ+1*16+GCNTD+1))=GK
I GI="P",(GK>0!(GK="0")) S ^TMP($J,"GMRK","G"_(430+GCNTD))=$S(GK["*":"P*",1:"P")
I GI="S",GK>0 S ^TMP($J,"GMRK","G"_(1200+GCNTD))=$S(GK["*":"S*",1:"S")
I GI="D",GK>0 S ^TMP($J,"GMRK","G"_(1100+GCNTD))=$S(GK["*":"D*",1:"D")
I GK>0,GI="P" S ^TMP($J,"GMRK","G"_(GJ*16+GCNTD+1))=$S(^("G"_(GJ*16+GCNTD+1))<1.4:1.4,^("G"_(GJ*16+GCNTD+1))>19.5:19.5,1:^("G"_(GJ*16+GCNTD+1))) S:^("G"_(GJ*16+GCNTD+1))<1.4!(^("G"_(GJ*16+GCNTD+1))>19.4) ^TMP($J,"GMRK","G"_(430+GCNTD))="P**"
I GK>0,GI="S" S ^TMP($J,"GMRK","G"_(GJ*16+GCNTD+1))=$S(^("G"_(GJ*16+GCNTD+1))<1.4:1.4,^("G"_(GJ*16+GCNTD+1))>19.5:19.5,1:^("G"_(GJ*16+GCNTD+1))) S:^("G"_(GJ*16+GCNTD+1))<1.5!(^("G"_(GJ*16+GCNTD+1))>19.4) ^TMP($J,"GMRK","G"_(1200+GCNTD))="S**"
I GK>0,GI="D" S ^TMP($J,"GMRK","G"_(GJ*16+GCNTD+1))=$S(^("G"_(GJ*16+GCNTD+1))<1.4:1.4,^("G"_(GJ*16+GCNTD+1))>19.5:19.5,1:^("G"_(GJ*16+GCNTD+1))) S:^("G"_(GJ*16+GCNTD+1))<1.5!(^("G"_(GJ*16+GCNTD+1))>19.4) ^TMP($J,"GMRK","G"_(1100+GCNTD))="D**"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMVBP5 2121 printed Dec 13, 2024@01:58:26 Page 2
GMVBP5 ;HIOFO/YH,FT-CALCULATE KYOCERA B/P GRAPH DATA (CONT.) ;11/6/01 14:36
+1 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
+2 ;
+3 ; This routine uses the following IAs:
+4 ; <None>
+5 ;
SETA ;
+1 IF GK="Unavailable"
SET GK="Unavail"
+2 SET (GMRSITE,GMRSITE(1),GMRSITE(2),GMRINF,GMRVJ)=""
+3 IF GK'=""
Begin DoDot:1
+4 SET GMRSITE(1)=$PIECE($GET(^TMP($JOB,"GMRVG",GI,GDT1,GK)),"^")
SET GMRVJ=$PIECE($GET(^(GK)),"^",2)
SET GMRINF=$PIECE($GET(^(GK)),"^",4)
+5 IF GMRSITE(1)'=""
DO SYNOARY^GMVLGQU
End DoDot:1
+6 IF GI="C"
SET ^TMP($JOB,"GMRK","G"_(1240+GCNTD))=GK_^TMP($JOB,"GMRK","G"_(1240+GCNTD))
QUIT
+7 IF GK'=""
SET GK=GK_$SELECT(GMRVJ=1:"*",1:" ")
+8 IF GI="B"
SET ^TMP($JOB,"GMRK","G"_(450+GCNTD))=$SELECT($LENGTH(GMRSITE," ")>3:$PIECE(GMRSITE," ",2,4),1:GMRSITE)
SET ^TMP($JOB,"GMRK","G"_(GJ*16+GCNTD+1))=GK
if $LENGTH(GMRSITE," ")>3
SET ^TMP($JOB,"GMRK","G"_(1240+GCNTD))=" "_$PIECE(GMRSITE," ")
QUIT
+9 IF GI="P"
Begin DoDot:1
+10 SET ^TMP($JOB,"GMRK","G"_(GJ+1*16+GCNTD+1))=GK_" "_$SELECT($LENGTH(GMRSITE," ")>3:$PIECE(GMRSITE," "),1:"")
+11 SET ^TMP($JOB,"GMRK","G"_(1120+GCNTD))=$SELECT($LENGTH(GMRSITE," ")>3:$PIECE(GMRSITE," ",2,4),1:GMRSITE)
End DoDot:1
QUIT
+12 IF GI="M"
SET ^TMP($JOB,"GMRK","G"_(1220+GCNTD))=GK
QUIT
+13 IF GI="S"!(GI="D")
SET ^TMP($JOB,"GMRK","G"_(GJ*16+GCNTD+1))=$SELECT(GK>0:240-GK/10,1:"")
SET ^TMP($JOB,"GMRK","G"_(GJ+1*16+GCNTD+1))=GK
+14 IF GI="P"
IF (GK>0!(GK="0"))
SET ^TMP($JOB,"GMRK","G"_(430+GCNTD))=$SELECT(GK["*":"P*",1:"P")
+15 IF GI="S"
IF GK>0
SET ^TMP($JOB,"GMRK","G"_(1200+GCNTD))=$SELECT(GK["*":"S*",1:"S")
+16 IF GI="D"
IF GK>0
SET ^TMP($JOB,"GMRK","G"_(1100+GCNTD))=$SELECT(GK["*":"D*",1:"D")
+17 IF GK>0
IF GI="P"
SET ^TMP($JOB,"GMRK","G"_(GJ*16+GCNTD+1))=$SELECT(^("G"_(GJ*16+GCNTD+1))<1.4:1.4,^("G"_(GJ*16+GCNTD+1))>19.5:19.5,1:^("G"_(GJ*16+GCNTD+1)))
if ^("G"_(GJ*16+GCNTD+1))<1.4!(^("G"_(GJ*16+GCNTD+1))>19.4)
SET ^TMP($JOB,"GMRK","G"_(430+GCNTD))="P**"
+18 IF GK>0
IF GI="S"
SET ^TMP($JOB,"GMRK","G"_(GJ*16+GCNTD+1))=$SELECT(^("G"_(GJ*16+GCNTD+1))<1.4:1.4,^("G"_(GJ*16+GCNTD+1))>19.5:19.5,1:^("G"_(GJ*16+GCNTD+1)))
if ^("G"_(GJ*16+GCNTD+1))<1.5!(^("G"_(GJ*16+GCNTD+1))>19.4)
SET ^TMP($JOB,"GMRK","G"_(1200+GCNTD))="S**"
+19 IF GK>0
IF GI="D"
SET ^TMP($JOB,"GMRK","G"_(GJ*16+GCNTD+1))=$SELECT(^("G"_(GJ*16+GCNTD+1))<1.4:1.4,^("G"_(GJ*16+GCNTD+1))>19.5:19.5,1:^("G"_(GJ*16+GCNTD+1)))
if ^("G"_(GJ*16+GCNTD+1))<1.5!(^("G"_(GJ*16+GCNTD+1))>19.4)
SET ^TMP($JOB,"GMRK","G"_(1100+GCNTD))="D**"
+20 QUIT