1 | GMRVER0 ;HIRMFO/RM,YH-REPORT OF VITALS ENTERED IN ERROR FOR A PATIENT ;2/6/99
|
---|
2 | ;;4.0;Vitals/Measurements;**7**;Apr 25, 1997
|
---|
3 | EN1 ; ENTRY FROM OPTION GMRV ERROR PRINT
|
---|
4 | K ^TMP($J) S DIC="^DPT(",DIC(0)="AEQM" D ^DIC K DIC Q:+Y'>0 S DFN=+Y
|
---|
5 | DTS S %DT="AET",%DT("A")="Start with DATE (TIME optional): ",%DT("B")="T-7" D ^%DT K %DT I +Y'>0 G Q
|
---|
6 | S GMRVSDT=+Y
|
---|
7 | S %DT="AET",%DT("A")="go to DATE (TIME optional): ",%DT("B")="NOW" D ^%DT K %DT I X="^" G Q
|
---|
8 | I +Y'>0!($P(Y,".",2)'>0&(DT=Y)) D NOW^%DTC S Y=%
|
---|
9 | I $P(Y,".",2)'>0 S Y=Y_$S(Y[".":"2400",1:".2400")
|
---|
10 | I GMRVSDT>+Y W !,?3,$C(7),"THE START DATE MUST BE BEFORE THE END DATE OF THIS REPORT" G DTS
|
---|
11 | S GMRVFDT=+Y
|
---|
12 | DEV S %ZIS="Q" D ^%ZIS K %ZIS G:POP Q I $E(IOST)="P",'$D(IO("Q")),'$D(IO("S")) D ^%ZISC W !,?3,"PRINTED REPORTS MUST BE QUEUED!!",$C(7) G DEV
|
---|
13 | I $D(IO("Q")) S (ZTSAVE("DFN"),ZTSAVE("GMRVSDT"),ZTSAVE("GMRVFDT"))="",ZTIO=ION,ZTDESC="Entered in error vital/measurement report",ZTRTN="EN1^GMRVER1" D ^%ZTLOAD K IO("Q"),ZTSK,ZTIO G Q
|
---|
14 | G EN1^GMRVER1
|
---|
15 | Q G Q^GMRVER1
|
---|
16 | ERREASON ;ERROR REASON
|
---|
17 | Q:'$D(^GMR(120.5,+GMRVDA,2.1))
|
---|
18 | S GER=0 F S GER=$O(^GMR(120.5,+GMRVDA,2.1,GER)) Q:GER'>0 S GER(1)=+$G(^GMR(120.5,+GMRVDA,2.1,GER,0)) D
|
---|
19 | . S GER(2)=$S(GER(1)=1:"incorrect date/time",GER(1)=2:"incorrect reading",GER(1)=3:"incorrect patient",GER(1)=4:"invalid record",1:"")
|
---|
20 | . I GER(2)'="" S GREASON=GREASON_$S(GREASON'="":", ",1:"")_GER(2)
|
---|
21 | .Q
|
---|
22 | K GER Q
|
---|
23 | WRTDAT(TYPE,DATA) ;
|
---|
24 | I '((TYPE="BP")!(TYPE="P")!(TYPE="R")),DATA>0 D @TYPE
|
---|
25 | Q DATA
|
---|
26 | T S DATA=DATA_" F ("_$J(+DATA-32*5/9,0,1)_" C)" Q
|
---|
27 | WT S DATA=DATA_" lb ("_$J(DATA/2.2,0,2)_" kg)" Q
|
---|
28 | HT S DATA=$S(DATA\12:DATA\12_" ft ",1:"")_$S(DATA#12:DATA#12_" in",1:"")_" ("_$J(DATA*2.54,0,2)_" cm)" Q
|
---|
29 | CG S DATA=DATA_" in ("_$J(+DATA/.3937,0,2)_" cm)" Q
|
---|
30 | CVP S DATA=DATA_" cmH2O ("_$J(DATA/1.36,0,1)_" mmHg)" Q
|
---|
31 | PO2 S DATA=DATA_"%" Q
|
---|
32 | PN I DATA=0 S DATA=DATA_" No pain " Q
|
---|
33 | I DATA=99 S DATA=DATA_" Unable to respond " Q
|
---|
34 | I DATA=10 S DATA=DATA_" Worst imaginable pain " Q
|
---|
35 | Q
|
---|