| 1 | LREXECU ;SLC/RWF - EXECUTE CODE UTILITY ;8/11/97
|
---|
| 2 | ;;5.2;LAB SERVICE;**121,200,362**;Sep 27, 1994;Build 11
|
---|
| 3 | TDM ;DRUG MONITORING
|
---|
| 4 | N DIR,DTOUT,DUOUT,DIRUT
|
---|
| 5 | ;Set the DIR array for sample to be drawn question
|
---|
| 6 | S DIR(0)="SO^P:Peak;T:Trough;M:Mid;U:Unknown"
|
---|
| 7 | S DIR("A")="Please select"
|
---|
| 8 | S DIR("L",1)="Will (is) the sample to be drawn at"
|
---|
| 9 | S DIR("L")=" Peak, Trough, Mid, or Unknown"
|
---|
| 10 | S DIR("T")=60
|
---|
| 11 | S DIR("?",1)="Enter a 'P', 'T', 'M', 'U', or hit the Enter Key."
|
---|
| 12 | S DIR("?",2)="Hitting the Enter key will default to Unknown "
|
---|
| 13 | S DIR("?")="Entering ""^"" or a timeout will cancel the order."
|
---|
| 14 | D ^DIR K DIR ;Prompt for user selection
|
---|
| 15 | ;Process user selection
|
---|
| 16 | I $D(DUOUT)!($D(DTOUT)) W !!!,$C(7),"ORDER CANCELED" S LRKIL=1 Q
|
---|
| 17 | I Y="" S Y(0)="Unknown" W !!!,$C(7),"Defaulted to Unknown"
|
---|
| 18 | E W !!!,$C(7),Y(0)_" has been selected."
|
---|
| 19 | S LRCCOM="~Dose is expected to be at "_Y(0)_" level."
|
---|
| 20 | I $$VER^LR7OU1>2.5 D TCOM^LRORD2(+LRTEST(LRTSTN),LRCCOM)
|
---|
| 21 | I $$VER^LR7OU1<3 D RCS^LRXO9 I '$D(ORACTION) D TCOM^LRORD2(+LRTEST(LRTSTN),LRCCOM) ;OE/RR 2.5
|
---|
| 22 | ;Set DIR array for additional comment question
|
---|
| 23 | S DIR(0)="FO^1:250"
|
---|
| 24 | S DIR("A")="ADDITIONAL COMMENT"
|
---|
| 25 | S DIR("T")=60
|
---|
| 26 | S DIR("?")="This is a free text field, up to 250 characters in length."
|
---|
| 27 | D ^DIR K DIR
|
---|
| 28 | I $D(DUOUT)!($D(DTOUT)) S Y=""
|
---|
| 29 | S LRCCOM=Y
|
---|
| 30 | Q
|
---|
| 31 | DOSE ;DOSE/DRAW TIMES
|
---|
| 32 | EN ;
|
---|
| 33 | S %DT("A")="Enter the last dose time: ",%DT="AT" D ^%DT S LRDOSE=Y
|
---|
| 34 | I Y<1 W !,"Time unknown" S %=2 D YN^DICN S:%=1 LRDOSE="UNKNOWN" G:%'=1 EN
|
---|
| 35 | I Y>1,Y'["." W !,"You must enter a time, e.g. T@6AM" G EN
|
---|
| 36 | I LRDOSE["." S Y=LRDOSE D DD^LRX S LRDOSE=Y
|
---|
| 37 | DRAW W ! S %DT("A")="Enter draw time: ",%DT="AT" D ^%DT S LRDRAW=Y
|
---|
| 38 | I Y<1 W !,"Time unknown" S %=2 D YN^DICN S:%=1 LRDRAW="UNKNOWN" G:%'=1 DRAW
|
---|
| 39 | I Y>1,Y'["." W !,"You must enter a time, e.g. T@6AM" G DRAW
|
---|
| 40 | I LRDRAW["." S Y=LRDRAW D DD^LRX S LRDRAW=Y
|
---|
| 41 | S LRCCOM="~Last dose: "_LRDOSE_" draw time: "_LRDRAW W !,LRCCOM
|
---|
| 42 | W !,"OK" S %=1 D YN^DICN G EN:%'=1
|
---|
| 43 | K LRDOSE,LRDRAW,%DT Q
|
---|