PSJUTL5 ;BIR/MLM-UTILITY TO HANDLE NATURE OF ORDER FOR OE/RR ; 3/22/10 1:53pm
;;5.0;INPATIENT MEDICATIONS;**40,218,260,217**;16 DEC 97;Build 25
;
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
K:$G(PSJNOO)=-1 PSJNOO ;Prevents nature of order -1
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
;*218 Added R to DC
D I $T(NA^ORX1)]"" S Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIER") 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;R:SERVICE REJECT;" 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
V I $T(NA^ORX1)]"" S Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIER") 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;R:SERVICE REJECT;" 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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSJUTL5 3843 printed Oct 16, 2024@18:10 Page 2
PSJUTL5 ;BIR/MLM-UTILITY TO HANDLE NATURE OF ORDER FOR OE/RR ; 3/22/10 1:53pm
+1 ;;5.0;INPATIENT MEDICATIONS;**40,218,260,217**;16 DEC 97;Build 25
+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 ;Prevents nature of order -1
if $GET(PSJNOO)=-1
KILL PSJNOO
+5 DO FULL^VALM1
+6 IF $GET(ACT)]""
DO @ACT
+7 IF '$TEST
SET Y=-1
QUIT Y
+8 if $DATA(Y)
QUIT Y
+9 SET DIR("A")="NATURE OF ORDER: "
SET DIR("B")="WRITTEN"
+10 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."
+11 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."
+12 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."
+13 SET DIR("??")="^D HELP^PSJUTL5"
+14 DO ^DIR
IF $DATA(DIRUT)
KILL DIRUT
SET Y=-1
QUIT Y
+15 QUIT Y
+16 ;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
+2 ;*218 Added R to DC
D IF $TEXT(NA^ORX1)]""
SET Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIER")
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;R:SERVICE REJECT;"
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
V IF $TEXT(NA^ORX1)]""
SET Y=$$NA^ORX1("W",0,"B","NATURE OF ORDER",0,"WVPSXDIER")
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;R:SERVICE REJECT;"
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