GMVLBP2 ;HIOFO/YH,FT-SET GRAPH LOWER BOX DATA ;9/30/02 15:03
;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
;
; This routine uses the following IAs:
; #10061 - ^VADPT call (supported)
; #10104 - ^XLFSTR calls (supported)
;
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,"B/P PLOTTING CHART"
D INP^VADPT S GMRVHLOC=$$HOSPLOC^GMVUTL1(+$G(VAIN(4)))
W !,"Division: "_$$DIVISION^GMVUTL1(+GMRVHLOC),?55,"Page "_GMRPGC,?95,"VA STANDARD FORM 512-A",!
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^GMVLGQU
I "UNAVAILABLEPASSREFUSED"'[$$UP^XLFSTR(GMR(GMRI)) S GMR(GMRI)=GMR(GMRI)_$S($P(^TMP($J,"GMRVG",GMRI,GMRDT,GMR(GMRI)),"^",2)'=1:" ",1:"*")
I GMRI="P" D Q
. S $P(GMRLINE(GMRI),"|",GMRNM)=$E(GMR(GMRI)_$S($L(GMRSITE," ")>3:" "_$P(GMRSITE," "),1:"")_" ",1,10)
. S $P(GMRLINE("P1"),"|",GMRNM)=$E($S($L(GMRSITE," ")>3:$P(GMRSITE," ",2,4),1:GMRSITE)_" ",1,10)
I GMRI="B" D Q
. S $P(GMRLINE(GMRI),"|",GMRNM)=$E(GMR(GMRI)_" ",1,10)
. S $P(GMRLINE("D"),"|",GMRNM)=$E($O(^TMP($J,"GMRVG","C",GMRDT,""))_$S($L(GMRSITE," ")>3:" "_$P(GMRSITE," "),1:"")_" ",1,10)
. S $P(GMRLINE("BQUAL"),"|",GMRNM)=$E($S($L(GMRSITE," ")>3:$P(GMRSITE," ",2,4),1:GMRSITE)_" ",1,10)
. S $P(GMRLINE("MAP"),"|",GMRNM)=$E($O(^TMP($J,"GMRVG","M",GMRDT,""))_" ",1,10)
K GI Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMVLBP2 1904 printed Dec 13, 2024@01:59:36 Page 2
GMVLBP2 ;HIOFO/YH,FT-SET GRAPH LOWER BOX DATA ;9/30/02 15:03
+1 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
+2 ;
+3 ; This routine uses the following IAs:
+4 ; #10061 - ^VADPT call (supported)
+5 ; #10104 - ^XLFSTR calls (supported)
+6 ;
+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,"B/P PLOTTING CHART"
+3 DO INP^VADPT
SET GMRVHLOC=$$HOSPLOC^GMVUTL1(+$GET(VAIN(4)))
+4 WRITE !,"Division: "_$$DIVISION^GMVUTL1(+GMRVHLOC),?55,"Page "_GMRPGC,?95,"VA STANDARD FORM 512-A",!
+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^GMVLGQU
+4 IF "UNAVAILABLEPASSREFUSED"'[$$UP^XLFSTR(GMR(GMRI))
SET GMR(GMRI)=GMR(GMRI)_$SELECT($PIECE(^TMP($JOB,"GMRVG",GMRI,GMRDT,GMR(GMRI)),"^",2)'=1:" ",1:"*")
+5 IF GMRI="P"
Begin DoDot:1
+6 SET $PIECE(GMRLINE(GMRI),"|",GMRNM)=$EXTRACT(GMR(GMRI)_$SELECT($LENGTH(GMRSITE," ")>3:" "_$PIECE(GMRSITE," "),1:"")_" ",1,10)
+7 SET $PIECE(GMRLINE("P1"),"|",GMRNM)=$EXTRACT($SELECT($LENGTH(GMRSITE," ")>3:$PIECE(GMRSITE," ",2,4),1:GMRSITE)_" ",1,10)
End DoDot:1
QUIT
+8 IF GMRI="B"
Begin DoDot:1
+9 SET $PIECE(GMRLINE(GMRI),"|",GMRNM)=$EXTRACT(GMR(GMRI)_" ",1,10)
+10 SET $PIECE(GMRLINE("D"),"|",GMRNM)=$EXTRACT($ORDER(^TMP($JOB,"GMRVG","C",GMRDT,""))_$SELECT($LENGTH(GMRSITE," ")>3:" "_$PIECE(GMRSITE," "),1:"")_" ",1,10)
+11 SET $PIECE(GMRLINE("BQUAL"),"|",GMRNM)=$EXTRACT($SELECT($LENGTH(GMRSITE," ")>3:$PIECE(GMRSITE," ",2,4),1:GMRSITE)_" ",1,10)
+12 SET $PIECE(GMRLINE("MAP"),"|",GMRNM)=$EXTRACT($ORDER(^TMP($JOB,"GMRVG","M",GMRDT,""))_" ",1,10)
End DoDot:1
QUIT
+13 KILL GI
QUIT