source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVORD0.m@ 1166

Last change on this file since 1166 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1GMRVORD0 ;HISC/RM,YH-OE/RR PRINT ACTION HOOKS ;11/20/95
2 ;;4.0;Vitals/Measurements;;Apr 25, 1997
3EN1 ; ENTRY FROM ORDER PRINT ACTION OF GMRVORADMIT V/M OPTION
4 S GMRX=$S($D(^ORD(101,+$P(GMRVORD(2),"^",4),0)):$P(^(0),"^"),1:"")
5 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:"")
6 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")
7 I $D(ORIFN) D EN^ORX8(ORIFN) S ORSTS=+ORUPCHUK("ORSTS"),GMROUT=0,DFN=$P(ORVP,";")
8 S GMRVOERR=1,GMRVSTRT=$S(+ORUPCHUK("ORSTRT"):9999999-ORUPCHUK("ORSTRT"),1:""),GMRVSTOP=$S(+ORUPCHUK("ORSTOP"):9999999-ORUPCHUK("ORSTOP"),1:"")
9 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")))
10 D PGBRK W !!,"Schedule: "_$P(GMRVORD(0),"^",2)
11 W:GMRVORD("O")'="" !,"Special Instructions: "_$P(GMRVORD("O"),"^")
12 ;DISPLAY DETAILED VITALS/MEASUREMENTS
13 S GMRVSTR=GMRSTR,GMRVSTR(0)=ORUPCHUK("ORSTRT")_"^"_ORUPCHUK("ORSTOP")_"^100^1" W ! D EN1^GMRVUT0 D K GMRORST,ORUPCHUK,^UTILITY($J,"GMRVD"),GMRVX Q
14 .I '$D(^UTILITY($J)) W !,"There are no results to report.",!
15 .E D
16 ..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
17 ...S GMRVX(1)="" F S GMRVX(1)=$O(^UTILITY($J,"GMRVD",GMRVX,GMRVX(1))) Q:GMRVX(1)="" D
18 ....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:"")
19 ....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 !
20 .....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:" ")
21 .....I GMRVX(1)="HT" W "IN ","("_$P(GMRVX(3),"^",13)_" CM)" Q
22 .....I GMRVX(1)="WT" W "LB ","("_$P(GMRVX(3),"^",13)_" KG)" Q
23 .....I GMRVX(1)'="BP" W $S($P(GMRVX(3),"^",10)'="":"("_$P(GMRVX(3),"^",10)_")",1:"") Q
24 .....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)'="") "("
25 .....I GMRVX(1)="BP" W $S(GMRVX(4)'="":GMRVX(4),1:" ") W $S(GMRVX(5)="":" ",1:"/"_GMRVX(5)) W:GMRVX(4)'=""!(GMRVX(5)'="") ")"
26 Q
27PGBRK ; DO PAGE BREAK, THEN WRITE FORM FEED
28 D PGBRK^ORUHDR
29 W @IOF
30 Q
Note: See TracBrowser for help on using the repository browser.