PSJUTL5 ;BIR/MLM-UTILITY TO HANDLE NATURE OF ORDER FOR OE/RR ;04 AUG 97 / 2:20 PM
;;5.0; INPATIENT MEDICATIONS ;**40**;16 DEC 97
;
ENNOO(X) ; nature of order (for oe/rr)
; X - Action taken on order.
N Y S Y="W" I 'PSJSYSU Q Y
K Y N DA,DIR,ACT S ACT=X
D FULL^VALM1
I $G(ACT)]"" D @ACT
E S Y=-1 Q Y
Q:$D(Y) Y
S DIR("A")="NATURE OF ORDER: ",DIR("B")="WRITTEN"
S DIR("?",1)="This specifies the nature of the order, how it originated, or how any",DIR("?",2)="action performed on the order originated."
S DIR("?",3)="Nature of order controls whether CPRS will ask for a provider's signature",DIR("?",4)="for the order and whether a chart copy will be printed."
S DIR("?")="Nature of order MUST be entered, but if the package sees the user as a ward clerk or pharmacy technician, the nature of order may only be written."
S DIR("??")="^D HELP^PSJUTL5"
D ^DIR I $D(DIRUT) K DIRUT S Y=-1 Q Y
Q Y
;Sets DIR(0) based on action being taken.
N I $T(NA^ORX1)]"" S Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIE") S:Y'="^" Y=$P(Y,"^",3) S:Y="^" Y=-1 Q
I $T(NA^ORX1)="" S DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;X:REJECTED;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;" Q
E I $T(NA^ORX1)]"" S Y=$$NA^ORX1("S",0,"B","NATURE OF ORDER",0,"WVPSXDIE") S:Y'="^" Y=$P(Y,"^",3) S:Y="^" Y=-1 Q
I $T(NA^ORX1)="" S DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;X:REJECTED;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;" Q
R I $T(NA^ORX1)]"" S Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIE") S:Y'="^" Y=$P(Y,"^",3) S:Y="^" Y=-1 Q
I $T(NA^ORX1)="" S DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;X:REJECTED;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;" Q
D I $T(NA^ORX1)]"" S Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIE") S:Y'="^" Y=$P(Y,"^",3) S:Y="^" Y=-1 Q
I $T(NA^ORX1)="" S DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;X:REJECTED;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;" Q
H I $T(NA^ORX1)]"" S Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSDIE") S:Y'="^" Y=$P(Y,"^",3) S:Y="^" Y=-1 Q
I $T(NA^ORX1)="" S DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;" Q
;
HELP ;Extended Help
W !?55,"Prompted for Chart Copy",!?55,"Signature in Printed?",!?55,"CPRS?",!
D @$S("N^E^R^D"[ACT:"WH,VH,PH,SH,XH,DH,IH,EH",1:"WH,VH,PH,SH,DH,IH,EH") Q
WH W !?2,"Written",?12," - The source of the order is a written",?59,"No",?74,"No",!?15,"doctor's order." Q
VH W !?2,"Verbal",?12," - A doctor verbally requested the order.",?59,"Yes",?74,"Yes" Q
PH W !?2,"Telephoned",?12," - A doctor phoned the service to request",?59,"Yes",?74,"Yes",!?15,"the order." Q
SH W !?2,"Service",?12," - The service is discontinuing or adding",?59,"No",?74,"No",!?2,"Correction",?15,"new orders to carry out the intent of",!?15,"an order already received." Q
XH W !?2,"Rejected",?12," - The service discontinued the order",?59,"No",?74,"No",!?15,"because it was unable to perform the",!?15,"task." Q
DH W !?2,"Duplicate",?12," - This applies to orders that are",?59,"No",?74,"Yes",!?15,"discontinued because they are a",!?15,"duplicate of another order." Q
IH W !?2,"Policy",?12," - These are orders that are created as",?59,"No",?74,"Yes",!?15,"a matter of hospital policy." Q
EH W !?2,"Physician",?12," - These are orders that are entered by",?59,"Yes",?74,"Yes",!?2,"Entered",?15,"the ordering provider." Q
PSJUTL5 ;BIR/MLM-UTILITY TO HANDLE NATURE OF ORDER FOR OE/RR ;04 AUG 97 / 2:20 PM
+1 ;;5.0; INPATIENT MEDICATIONS ;**40**;16 DEC 97
+2 ;
ENNOO(X) ; nature of order (for oe/rr)
+1 ; X - Action taken on order.
+2 NEW Y
SET Y="W"
IF 'PSJSYSU
QUIT Y
+3 KILL Y
NEW DA,DIR,ACT
SET ACT=X
+4 DO FULL^VALM1
+5 IF $GET(ACT)]""
DO @ACT
+6 IF '$TEST
SET Y=-1
QUIT Y
+7 IF $DATA(Y)
QUIT Y
+8 SET DIR("A")="NATURE OF ORDER: "
SET DIR("B")="WRITTEN"
+9 SET DIR("?",1)="This specifies the nature of the order, how it originated, or how any"
SET DIR("?",2)="action performed on the order originated."
+10 SET DIR("?",3)="Nature of order controls whether CPRS will ask for a provider's signature"
SET DIR("?",4)="for the order and whether a chart copy will be printed."
+11 SET DIR("?")="Nature of order MUST be entered, but if the package sees the user as a ward clerk or pharmacy technician, the nature of order may only be written."
+12 SET DIR("??")="^D HELP^PSJUTL5"
+13 DO ^DIR
IF $DATA(DIRUT)
KILL DIRUT
SET Y=-1
QUIT Y
+14 QUIT Y
+15 ;Sets DIR(0) based on action being taken.
N IF $TEXT(NA^ORX1)]""
SET Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIE")
IF Y'="^"
SET Y=$PIECE(Y,"^",3)
IF Y="^"
SET Y=-1
QUIT
+1 IF $TEXT(NA^ORX1)=""
SET DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;X:REJECTED;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;"
QUIT
E IF $TEXT(NA^ORX1)]""
SET Y=$$NA^ORX1("S",0,"B","NATURE OF ORDER",0,"WVPSXDIE")
IF Y'="^"
SET Y=$PIECE(Y,"^",3)
IF Y="^"
SET Y=-1
QUIT
+1 IF $TEXT(NA^ORX1)=""
SET DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;X:REJECTED;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;"
QUIT
R IF $TEXT(NA^ORX1)]""
SET Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIE")
IF Y'="^"
SET Y=$PIECE(Y,"^",3)
IF Y="^"
SET Y=-1
QUIT
+1 IF $TEXT(NA^ORX1)=""
SET DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;X:REJECTED;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;"
QUIT
D IF $TEXT(NA^ORX1)]""
SET Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIE")
IF Y'="^"
SET Y=$PIECE(Y,"^",3)
IF Y="^"
SET Y=-1
QUIT
+1 IF $TEXT(NA^ORX1)=""
SET DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;X:REJECTED;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;"
QUIT
H IF $TEXT(NA^ORX1)]""
SET Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSDIE")
IF Y'="^"
SET Y=$PIECE(Y,"^",3)
IF Y="^"
SET Y=-1
QUIT
+1 IF $TEXT(NA^ORX1)=""
SET DIR(0)="SA^W:WRITTEN;V:VERBAL;P:TELEPHONED;S:SERVICE CORRECTION;D:DUPLICATE;I:POLICY;E:PHYSICIAN ENTERED;"
QUIT
+2 ;
HELP ;Extended Help
+1 WRITE !?55,"Prompted for Chart Copy",!?55,"Signature in Printed?",!?55,"CPRS?",!
+2 DO @$SELECT("N^E^R^D"[ACT:"WH,VH,PH,SH,XH,DH,IH,EH",1:"WH,VH,PH,SH,DH,IH,EH")
QUIT
WH WRITE !?2,"Written",?12," - The source of the order is a written",?59,"No",?74,"No",!?15,"doctor's order."
QUIT
VH WRITE !?2,"Verbal",?12," - A doctor verbally requested the order.",?59,"Yes",?74,"Yes"
QUIT
PH WRITE !?2,"Telephoned",?12," - A doctor phoned the service to request",?59,"Yes",?74,"Yes",!?15,"the order."
QUIT
SH WRITE !?2,"Service",?12," - The service is discontinuing or adding",?59,"No",?74,"No",!?2,"Correction",?15,"new orders to carry out the intent of",!?15,"an order already received."
QUIT
XH WRITE !?2,"Rejected",?12," - The service discontinued the order",?59,"No",?74,"No",!?15,"because it was unable to perform the",!?15,"task."
QUIT
DH WRITE !?2,"Duplicate",?12," - This applies to orders that are",?59,"No",?74,"Yes",!?15,"discontinued because they are a",!?15,"duplicate of another order."
QUIT
IH WRITE !?2,"Policy",?12," - These are orders that are created as",?59,"No",?74,"Yes",!?15,"a matter of hospital policy."
QUIT
EH WRITE !?2,"Physician",?12," - These are orders that are entered by",?59,"Yes",?74,"Yes",!?2,"Entered",?15,"the ordering provider."
QUIT