GMRVORD0 ;HISC/RM,YH-OE/RR PRINT ACTION HOOKS ;11/20/95
;;4.0;Vitals/Measurements;;Apr 25, 1997
EN1 ; ENTRY FROM ORDER PRINT ACTION OF GMRVORADMIT V/M OPTION
S GMRX=$S($D(^ORD(101,+$P(GMRVORD(2),"^",4),0)):$P(^(0),"^"),1:"")
S GMRSTR=$S(GMRX="GMRVORADMIT V/M":"T;P;R;BP;HT;WT",GMRX="GMRVORTPR B/P":"T;P;R;BP",GMRX="GMRVORTPR":"T;P;R",GMRX="GMRVORTEMP":"T",GMRX="GMRVORPULSE":"P",1:"")
I GMRSTR="" S GMRSTR=$S(GMRX="GMRVORRESP":"R",GMRX="GMRVORB/P":"BP",GMRX="GMRVORHT":"HT",GMRX="GMRVORWT":"WT",1:"T;P;R;BP;HT;WT")
I $D(ORIFN) D EN^ORX8(ORIFN) S ORSTS=+ORUPCHUK("ORSTS"),GMROUT=0,DFN=$P(ORVP,";")
S GMRVOERR=1,GMRVSTRT=$S(+ORUPCHUK("ORSTRT"):9999999-ORUPCHUK("ORSTRT"),1:""),GMRVSTOP=$S(+ORUPCHUK("ORSTOP"):9999999-ORUPCHUK("ORSTOP"),1:"")
S GMRVORD(0)=$S(ORSTS=11:ORIFN_"^"_$P(ORUPCHUK("ORPK"),"^",3,5),1:$G(^GMR(120.55,ORIFN,0))),GMRVORD("O")=$S(ORSTS=11:$P(ORUPCHUK("ORPK"),"^",6),1:$G(^GMR(120.55,ORIFN,"O")))
D PGBRK W !!,"Schedule: "_$P(GMRVORD(0),"^",2)
W:GMRVORD("O")'="" !,"Special Instructions: "_$P(GMRVORD("O"),"^")
;DISPLAY DETAILED VITALS/MEASUREMENTS
S GMRVSTR=GMRSTR,GMRVSTR(0)=ORUPCHUK("ORSTRT")_"^"_ORUPCHUK("ORSTOP")_"^100^1" W ! D EN1^GMRVUT0 D K GMRORST,ORUPCHUK,^UTILITY($J,"GMRVD"),GMRVX Q
.I '$D(^UTILITY($J)) W !,"There are no results to report.",!
.E D
..N Y,X K GMRVX S GMRVX(6)=0,GMRVX=0 F S GMRVX=$O(^UTILITY($J,"GMRVD",GMRVX)) Q:GMRVX'>0!+$G(OREND) D:GMRVX(6)>0&(GMRVX(6)'=$P(GMRVX,"."))!(IOSL-7<$Y) PGBRK W ! S Y=9999999-GMRVX X ^DD("DD") W ?5,Y,! S GMRVX(6)=$P(GMRVX,".") D
...S GMRVX(1)="" F S GMRVX(1)=$O(^UTILITY($J,"GMRVD",GMRVX,GMRVX(1))) Q:GMRVX(1)="" D
....W ?7,$S(GMRVX(1)="BP":"B/P: ",GMRVX(1)="P":"Pulse: ",GMRVX(1)="T":"Temp: ",GMRVX(1)="R":"Resp: ",GMRVX(1)="HT":"Ht: ",GMRVX(1)="WT":"Wt: ",1:"")
....S GMRVX(2)=0 F S GMRVX(2)=$O(^UTILITY($J,"GMRVD",GMRVX,GMRVX(1),GMRVX(2))) Q:GMRVX(2)'>0!+$G(OREND) D W !
.....S GMRVX(3)=^UTILITY($J,"GMRVD",GMRVX,GMRVX(1),GMRVX(2)) W ?15,$P(GMRVX(3),"^",8),$S($P(GMRVX(3),"^",12)'="":" ("_$P(GMRVX(3),"^",12)_") ",1:" ")
.....I GMRVX(1)="HT" W "IN ","("_$P(GMRVX(3),"^",13)_" CM)" Q
.....I GMRVX(1)="WT" W "LB ","("_$P(GMRVX(3),"^",13)_" KG)" Q
.....I GMRVX(1)'="BP" W $S($P(GMRVX(3),"^",10)'="":"("_$P(GMRVX(3),"^",10)_")",1:"") Q
.....I GMRVX(1)="BP" S (GMRVX(4),GMRVX(5))="" S GMRVX(4)=$P($G(^GMRD(120.52,+$P(GMRVX(3),"^",7),0)),"^"),GMRVX(5)=$P($G(^GMRD(120.53,+$P(GMRVX(3),"^",9),0)),"^") W:GMRVX(4)'=""!(GMRVX(5)'="") "("
.....I GMRVX(1)="BP" W $S(GMRVX(4)'="":GMRVX(4),1:" ") W $S(GMRVX(5)="":" ",1:"/"_GMRVX(5)) W:GMRVX(4)'=""!(GMRVX(5)'="") ")"
Q
PGBRK ; DO PAGE BREAK, THEN WRITE FORM FEED
D PGBRK^ORUHDR
W @IOF
Q
GMRVORD0 ;HISC/RM,YH-OE/RR PRINT ACTION HOOKS ;11/20/95
+1 ;;4.0;Vitals/Measurements;;Apr 25, 1997
EN1 ; ENTRY FROM ORDER PRINT ACTION OF GMRVORADMIT V/M OPTION
+1 SET GMRX=$SELECT($DATA(^ORD(101,+$PIECE(GMRVORD(2),"^",4),0)):$PIECE(^(0),"^"),1:"")
+2 SET GMRSTR=$SELECT(GMRX="GMRVORADMIT V/M":"T;P;R;BP;HT;WT",GMRX="GMRVORTPR B/P":"T;P;R;BP",GMRX="GMRVORTPR":"T;P;R",GMRX="GMRVORTEMP":"T",GMRX="GMRVORPULSE":"P",1:"")
+3 IF GMRSTR=""
SET GMRSTR=$SELECT(GMRX="GMRVORRESP":"R",GMRX="GMRVORB/P":"BP",GMRX="GMRVORHT":"HT",GMRX="GMRVORWT":"WT",1:"T;P;R;BP;HT;WT")
+4 IF $DATA(ORIFN)
DO EN^ORX8(ORIFN)
SET ORSTS=+ORUPCHUK("ORSTS")
SET GMROUT=0
SET DFN=$PIECE(ORVP,";")
+5 SET GMRVOERR=1
SET GMRVSTRT=$SELECT(+ORUPCHUK("ORSTRT"):9999999-ORUPCHUK("ORSTRT"),1:"")
SET GMRVSTOP=$SELECT(+ORUPCHUK("ORSTOP"):9999999-ORUPCHUK("ORSTOP"),1:"")
+6 SET GMRVORD(0)=$SELECT(ORSTS=11:ORIFN_"^"_$PIECE(ORUPCHUK("ORPK"),"^",3,5),1:$GET(^GMR(120.55,ORIFN,0)))
SET GMRVORD("O")=$SELECT(ORSTS=11:$PIECE(ORUPCHUK("ORPK"),"^",6),1:$GET(^GMR(120.55,ORIFN,"O")))
+7 DO PGBRK
WRITE !!,"Schedule: "_$PIECE(GMRVORD(0),"^",2)
+8 IF GMRVORD("O")'=""
WRITE !,"Special Instructions: "_$PIECE(GMRVORD("O"),"^")
+9 ;DISPLAY DETAILED VITALS/MEASUREMENTS
+10 SET GMRVSTR=GMRSTR
SET GMRVSTR(0)=ORUPCHUK("ORSTRT")_"^"_ORUPCHUK("ORSTOP")_"^100^1"
WRITE !
DO EN1^GMRVUT0
Begin DoDot:1
+11 IF '$DATA(^UTILITY($JOB))
WRITE !,"There are no results to report.",!
+12 IF '$TEST
Begin DoDot:2
+13 NEW Y,X
KILL GMRVX
SET GMRVX(6)=0
SET GMRVX=0
FOR
SET GMRVX=$ORDER(^UTILITY($JOB,"GMRVD",GMRVX))
IF GMRVX'>0!+$GET(OREND)
QUIT
IF GMRVX(6)>0&(GMRVX(6)'=$PIECE(GMRVX,"."))!(IOSL-7<$Y)
DO PGBRK
WRITE !
SET Y=9999999-GMRVX
XECUTE ^DD("DD")
WRITE ?5,Y,!
SET GMRVX(6)=$PIECE(GMRVX,".")
Begin DoDot:3
+14 SET GMRVX(1)=""
FOR
SET GMRVX(1)=$ORDER(^UTILITY($JOB,"GMRVD",GMRVX,GMRVX(1)))
IF GMRVX(1)=""
QUIT
Begin DoDot:4
+15 WRITE ?7,$SELECT(GMRVX(1)="BP":"B/P: ",GMRVX(1)="P":"Pulse: ",GMRVX(1)="T":"Temp: ",GMRVX(1)="R":"Resp: ",GMRVX(1)="HT":"Ht: ",GMRVX(1)="WT":"Wt: ",1:"")
+16 SET GMRVX(2)=0
FOR
SET GMRVX(2)=$ORDER(^UTILITY($JOB,"GMRVD",GMRVX,GMRVX(1),GMRVX(2)))
IF GMRVX(2)'>0!+$GET(OREND)
QUIT
Begin DoDot:5
+17 SET GMRVX(3)=^UTILITY($JOB,"GMRVD",GMRVX,GMRVX(1),GMRVX(2))
WRITE ?15,$PIECE(GMRVX(3),"^",8),$SELECT($PIECE(GMRVX(3),"^",12)'="":" ("_$PIECE(GMRVX(3),"^",12)_") ",1:" ")
+18 IF GMRVX(1)="HT"
WRITE "IN ","("_$PIECE(GMRVX(3),"^",13)_" CM)"
QUIT
+19 IF GMRVX(1)="WT"
WRITE "LB ","("_$PIECE(GMRVX(3),"^",13)_" KG)"
QUIT
+20 IF GMRVX(1)'="BP"
WRITE $SELECT($PIECE(GMRVX(3),"^",10)'="":"("_$PIECE(GMRVX(3),"^",10)_")",1:"")
QUIT
+21 IF GMRVX(1)="BP"
SET (GMRVX(4),GMRVX(5))=""
SET GMRVX(4)=$PIECE($GET(^GMRD(120.52,+$PIECE(GMRVX(3),"^",7),0)),"^")
SET GMRVX(5)=$PIECE($GET(^GMRD(120.53,+$PIECE(GMRVX(3),"^",9),0)),"^")
IF GMRVX(4)'=""!(GMRVX(5)'="")
WRITE "("
+22 IF GMRVX(1)="BP"
WRITE $SELECT(GMRVX(4)'="":GMRVX(4),1:" ")
WRITE $SELECT(GMRVX(5)="":" ",1:"/"_GMRVX(5))
IF GMRVX(4)'=""!(GMRVX(5)'="")
WRITE ")"
End DoDot:5
WRITE !
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
KILL GMRORST,ORUPCHUK,^UTILITY($JOB,"GMRVD"),GMRVX
QUIT
+23 QUIT
PGBRK ; DO PAGE BREAK, THEN WRITE FORM FEED
+1 DO PGBRK^ORUHDR
+2 WRITE @IOF
+3 QUIT