Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRVORD0

GMRVORD0.m

Go to the documentation of this file.
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