source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVER0.m@ 623

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1GMRVER0 ;HIRMFO/RM,YH-REPORT OF VITALS ENTERED IN ERROR FOR A PATIENT ;2/6/99
2 ;;4.0;Vitals/Measurements;**7**;Apr 25, 1997
3EN1 ; 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
5DTS 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
12DEV 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
15Q G Q^GMRVER1
16ERREASON ;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
23WRTDAT(TYPE,DATA) ;
24 I '((TYPE="BP")!(TYPE="P")!(TYPE="R")),DATA>0 D @TYPE
25 Q DATA
26T S DATA=DATA_" F ("_$J(+DATA-32*5/9,0,1)_" C)" Q
27WT S DATA=DATA_" lb ("_$J(DATA/2.2,0,2)_" kg)" Q
28HT S DATA=$S(DATA\12:DATA\12_" ft ",1:"")_$S(DATA#12:DATA#12_" in",1:"")_" ("_$J(DATA*2.54,0,2)_" cm)" Q
29CG S DATA=DATA_" in ("_$J(+DATA/.3937,0,2)_" cm)" Q
30CVP S DATA=DATA_" cmH2O ("_$J(DATA/1.36,0,1)_" mmHg)" Q
31PO2 S DATA=DATA_"%" Q
32PN 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
Note: See TracBrowser for help on using the repository browser.