PSGOEM ;BIR/CML3-PSGOE MESSAGES ;26 NOV 97 / 8:28 AM
;;5.0; INPATIENT MEDICATIONS ;**81**;16 DEC 97
;
; Reference to ^DD(53.1 is supported by DBIA# 2256.
; Reference to ^PS(55 is supported by DBIA# 2191.
;
ENVM ;
W !!," Enter ORDER",$S(PSJON>1:"S (1-"_PSJON,1:" (1"),") you wish to ",$S('$D(PSJPRF):"select.",1:"view.") Q
;
ENCAM ;
W !!,"Enter a 'Y' (or press the RETURN key) to ",$S(PSJSYSU:"",1:"mark for "),"discontinu",$S(PSJSYSU:"e",1:"ation")," all of this"
W:'PSJSYSU ! W:PSJSYSU " " W "patient's" W:PSJSYSU ! W:'PSJSYSU " " W "orders. Enter an 'N' (or '^') to leave this option now." Q
;
ENCOM ;
W !!,"Enter a 'Y' to ",$S(CF:"discontinue this order",1:"mark this order for discontinuation"),". Press the RETURN key (or" W:'CF ! W:CF " " W "enter an 'N'" W:CF ! W:'CF " " W "or '^') to leave this option now." Q
;
ENUMK ;
W " BEEN 'MARKED FOR DISCONTINUATION'."
F W !,"DO YOU WANT TO 'UNMARK' ",$S($D(PSGORD):"IT",1:"THEM") S %=2 D YN^DICN Q:% W !!?2,"Enter 'Y' to UNMARK "_$S($D(PSGORD):"this order",1:"these orders")_". Enter 'N' to leave the order"_$E("s",$D(PSGORD)[0)_" MARKED AS IS.",!
Q
;
ENHLP(F1,F2) ; order entry fields' help
; Input: F1 - File #
; F2 - Field #
N F,F0,F3,PSJD,PSJHP,PSJX
;I X="?",$D(^DD(F1,F2,3)) S F=^(3) W !?5 F F0=1:1:$L(F," ") S F3=$P(F," ",F0) W:$L(F3)+$X>78 !?5 W F3_" "
;
D FIELD^DID(F1,F2,"","HELP-PROMPT","PSJHP")
I X="?",$D(PSJHP("HELP-PROMPT")) S F=$G(PSJHP("HELP-PROMPT")) W !?5 F F0=1:1:$L(F," ") S F3=$P(F," ",F0) W:$L(F3)+$X>78 !?5 W F3_" "
;
;W:$D(^DD(F1,F2,12)) !,"("_^(12)_")" I $D(^(4)) X ^(4)
W:$D(^DD(F1,F2,12)) !,"("_^(12)_")" D FIELD^DID(F1,F2,"","XECUTABLE HELP","PSJX") I $D(PSJX("XECUTABLE HELP")) X PSJX("XECUTABLE HELP")
;
; new code
D FIELD^DID(F1,F2,"","DESCRIPTION","PSJD")
G:$S(X="?":1,1:'$O(PSJD("DESCRIPTION",0))) SC F F=0:0 S F=$O(PSJD("DESCRIPTION",F)) Q:'F I $D(PSJD("DESCRIPTION",F)) W !?2,PSJD("DESCRIPTION",F)
;I F W:X="??" !?2,"..." I X?3."?" F F=F-1:0 S F=$O(^DD(F1,F2,21,F)) Q:'F I $D(^(F,0)) W !?2,^(0)
I F2=106 W !?5,"CHOOSE FROM:",!?7,"W",?16,"WRITTEN",!?7,"P",?16,"TELEPHONE",!?7,"V",?16,"VERBAL",!
; old code
;G:$S(X="?":1,1:'$O(^DD(F1,F2,21,0))) SC F F=0:0 S F=$O(^DD(F1,F2,21,F)) Q:'F I $D(^(F,0)) W !?2,^(0)
;I F W:X="??" !?2,"..." I X?3."?" F F=F-1:0 S F=$O(^DD(F1,F2,21,F)) Q:'F I $D(^(F,0)) W !?2,^(0),"RB.."
;I F2=106 W !?5,"CHOOSE FROM:",!?7,"W",?16,"WRITTEN",!?7,"P",?16,"TELEPHONE",!?7,"V",?16,"VERBAL",!
;
SC ;
I F2=5!(F2=6) W !,"CHOOSE FROM:",!?8,0,?16,"NO",!?8,1,?16,"YES" Q
Q
;
ENFF ; up-arrow to another field
S Y=-1 I '$D(PSGFOK) W $C(7)," ??" Q
;I X="^301"!($P("^DOSAGE ORDERED",X)="") W:X="^301" " " S:X="^301" X="^" W $P("^DOSAGE ORDERED",X,2) S Y=301 Q
S X=$E(X,2,99) I X=+X S Y=$S($D(PSGFOK(X)):X,1:-1) W " " W:Y>0 $$CODES2^PSIVUTL(53.1,X) W:Y'>0 $C(7),"??" Q
K DIC S DIC="^DD(53.1,",DIC(0)="QEM",DIC("S")="I $D(PSGFOK(+Y))" D ^DIC K DIC S Y=+Y Q
;
ENAH ; help text for "ACTION" prompt
W !!,"YOU MAY SELECT:"
W:PSGACT["B" !?5,"B to bypass (take no action on) a pending order."
W:PSGACT["D" !?5,"D (or DC) to discontinue an order. *WARNING* If you discontinue a",!?7,"non-verified order it is deleted from the system."
W:PSGACT["E" !?5,"E to edit an active or non-verified order. NOTE: Nursing must be notified",!?7,"of all changes."
W:PSGACT["F" !?5,"F to finish a pending order."
I PSGACT["H" S HF=$S('$D(^PS(55,PSGP,5,+PSGORD,0)):1,1:$P(^(0),"^",9)'="H") W !?5,"H to ",$S(HF:"place this order on",1:"take this order off of")," hold."
W:PSGACT["I" !?5,"I to mark a non-verified order as incomplete, or to unmark a non-verified",!?7,"order so marked. An order marked as incomplete may not be verified."
W:PSGACT["L" !?5,"L to display either the activity log or the dispense log associated with",!,?7,"this order."
W:PSGACT["N" !?5,"N to mark this order as 'NOT TO BE GIVEN'. Orders so marked may not be",!?7,"renewed,"_$S(PSJSYSU:"",1:" or")_" reinstated"_$S(PSJSYSU:", or copied.",1:".")
W:PSGACT["R" !?5,"R to ",$S(PSGRRF:"reinstate",1:"renew")," this order."
W:PSGACT["V" !?5,"V to verify (make active) a non-verified order. NOTE: You cannot verify",!?7,"an order that has been marked as incomplete."
I $D(PSGOEA),PSGOEA?2."?" W !!,"You may also select:" I 'PSGOENG,'$D(PSGODF),PSJPCAF,'PSGDI,'PSGPI W !?5,"C to copy (duplicate) this order into a new, non-verified order."
I $D(PSGOEA),PSGOEA?2."?" W !?5,"P to print this order to a device.",!?5,"S to show this order again."
I PSGOEAV W !!,"PLEASE NOTE: This order is automatically verified, and unless discontinued",!?13,"now, will show as active."
W !!?2,"You may also press the RETURN key if you are finished with this order or wish",!,"to take no action on it." W:'$D(PSGOETOF) " Enter an '^' if you do not wish to take any action on any other orders."
Q
PSGOEM ;BIR/CML3-PSGOE MESSAGES ;26 NOV 97 / 8:28 AM
+1 ;;5.0; INPATIENT MEDICATIONS ;**81**;16 DEC 97
+2 ;
+3 ; Reference to ^DD(53.1 is supported by DBIA# 2256.
+4 ; Reference to ^PS(55 is supported by DBIA# 2191.
+5 ;
ENVM ;
+1 WRITE !!," Enter ORDER",$SELECT(PSJON>1:"S (1-"_PSJON,1:" (1"),") you wish to ",$SELECT('$DATA(PSJPRF):"select.",1:"view.")
QUIT
+2 ;
ENCAM ;
+1 WRITE !!,"Enter a 'Y' (or press the RETURN key) to ",$SELECT(PSJSYSU:"",1:"mark for "),"discontinu",$SELECT(PSJSYSU:"e",1:"ation")," all of this"
+2 IF 'PSJSYSU
WRITE !
IF PSJSYSU
WRITE " "
WRITE "patient's"
IF PSJSYSU
WRITE !
IF 'PSJSYSU
WRITE " "
WRITE "orders. Enter an 'N' (or '^') to leave this option now."
QUIT
+3 ;
ENCOM ;
+1 WRITE !!,"Enter a 'Y' to ",$SELECT(CF:"discontinue this order",1:"mark this order for discontinuation"),". Press the RETURN key (or"
IF 'CF
WRITE !
IF CF
WRITE " "
WRITE "enter an 'N'"
IF CF
WRITE !
IF 'CF
WRITE " "
WRITE "or '^') to leave this option now."
QUIT
+2 ;
ENUMK ;
+1 WRITE " BEEN 'MARKED FOR DISCONTINUATION'."
+2 FOR
WRITE !,"DO YOU WANT TO 'UNMARK' ",$SELECT($DATA(PSGORD):"IT",1:"THEM")
SET %=2
DO YN^DICN
IF %
QUIT
WRITE !!?2,"Enter 'Y' to UNMARK "_$SELECT($DATA(PSGORD):"this order",1:"these orders")_". Enter 'N' to leave the order"_$EXTRACT("s",$DATA(PSGORD)[0)_" MARKED AS IS.",!
+3 QUIT
+4 ;
ENHLP(F1,F2) ; order entry fields' help
+1 ; Input: F1 - File #
+2 ; F2 - Field #
+3 NEW F,F0,F3,PSJD,PSJHP,PSJX
+4 ;I X="?",$D(^DD(F1,F2,3)) S F=^(3) W !?5 F F0=1:1:$L(F," ") S F3=$P(F," ",F0) W:$L(F3)+$X>78 !?5 W F3_" "
+5 ;
+6 DO FIELD^DID(F1,F2,"","HELP-PROMPT","PSJHP")
+7 IF X="?"
IF $DATA(PSJHP("HELP-PROMPT"))
SET F=$GET(PSJHP("HELP-PROMPT"))
WRITE !?5
FOR F0=1:1:$LENGTH(F," ")
SET F3=$PIECE(F," ",F0)
IF $LENGTH(F3)+$X>78
WRITE !?5
WRITE F3_" "
+8 ;
+9 ;W:$D(^DD(F1,F2,12)) !,"("_^(12)_")" I $D(^(4)) X ^(4)
+10 IF $DATA(^DD(F1,F2,12))
WRITE !,"("_^(12)_")"
DO FIELD^DID(F1,F2,"","XECUTABLE HELP","PSJX")
IF $DATA(PSJX("XECUTABLE HELP"))
XECUTE PSJX("XECUTABLE HELP")
+11 ;
+12 ; new code
+13 DO FIELD^DID(F1,F2,"","DESCRIPTION","PSJD")
+14 IF $SELECT(X="?"
GOTO SC
FOR F=0:0
SET F=$ORDER(PSJD("DESCRIPTION",F))
IF 'F
QUIT
IF $DATA(PSJD("DESCRIPTION",F))
WRITE !?2,PSJD("DESCRIPTION",F)
+15 ;I F W:X="??" !?2,"..." I X?3."?" F F=F-1:0 S F=$O(^DD(F1,F2,21,F)) Q:'F I $D(^(F,0)) W !?2,^(0)
+16 IF F2=106
WRITE !?5,"CHOOSE FROM:",!?7,"W",?16,"WRITTEN",!?7,"P",?16,"TELEPHONE",!?7,"V",?16,"VERBAL",!
+17 ; old code
+18 ;G:$S(X="?":1,1:'$O(^DD(F1,F2,21,0))) SC F F=0:0 S F=$O(^DD(F1,F2,21,F)) Q:'F I $D(^(F,0)) W !?2,^(0)
+19 ;I F W:X="??" !?2,"..." I X?3."?" F F=F-1:0 S F=$O(^DD(F1,F2,21,F)) Q:'F I $D(^(F,0)) W !?2,^(0),"RB.."
+20 ;I F2=106 W !?5,"CHOOSE FROM:",!?7,"W",?16,"WRITTEN",!?7,"P",?16,"TELEPHONE",!?7,"V",?16,"VERBAL",!
+21 ;
SC ;
+1 IF F2=5!(F2=6)
WRITE !,"CHOOSE FROM:",!?8,0,?16,"NO",!?8,1,?16,"YES"
QUIT
+2 QUIT
+3 ;
ENFF ; up-arrow to another field
+1 SET Y=-1
IF '$DATA(PSGFOK)
WRITE $CHAR(7)," ??"
QUIT
+2 ;I X="^301"!($P("^DOSAGE ORDERED",X)="") W:X="^301" " " S:X="^301" X="^" W $P("^DOSAGE ORDERED",X,2) S Y=301 Q
+3 SET X=$EXTRACT(X,2,99)
IF X=+X
SET Y=$SELECT($DATA(PSGFOK(X)):X,1:-1)
WRITE " "
IF Y>0
WRITE $$CODES2^PSIVUTL(53.1,X)
IF Y'>0
WRITE $CHAR(7),"??"
QUIT
+4 KILL DIC
SET DIC="^DD(53.1,"
SET DIC(0)="QEM"
SET DIC("S")="I $D(PSGFOK(+Y))"
DO ^DIC
KILL DIC
SET Y=+Y
QUIT
+5 ;
ENAH ; help text for "ACTION" prompt
+1 WRITE !!,"YOU MAY SELECT:"
+2 IF PSGACT["B"
WRITE !?5,"B to bypass (take no action on) a pending order."
+3 IF PSGACT["D"
WRITE !?5,"D (or DC) to discontinue an order. *WARNING* If you discontinue a",!?7,"non-verified order it is deleted from the system."
+4 IF PSGACT["E"
WRITE !?5,"E to edit an active or non-verified order. NOTE: Nursing must be notified",!?7,"of all changes."
+5 IF PSGACT["F"
WRITE !?5,"F to finish a pending order."
+6 IF PSGACT["H"
SET HF=$SELECT('$DATA(^PS(55,PSGP,5,+PSGORD,0)):1,1:$PIECE(^(0),"^",9)'="H")
WRITE !?5,"H to ",$SELECT(HF:"place this order on",1:"take this order off of")," hold."
+7 IF PSGACT["I"
WRITE !?5,"I to mark a non-verified order as incomplete, or to unmark a non-verified",!?7,"order so marked. An order marked as incomplete may not be verified."
+8 IF PSGACT["L"
WRITE !?5,"L to display either the activity log or the dispense log associated with",!,?7,"this order."
+9 IF PSGACT["N"
WRITE !?5,"N to mark this order as 'NOT TO BE GIVEN'. Orders so marked may not be",!?7,"renewed,"_$SELECT(PSJSYSU:"",1:" or")_" reinstated"_$SELECT(PSJSYSU:", or copied.",1:".")
+10 IF PSGACT["R"
WRITE !?5,"R to ",$SELECT(PSGRRF:"reinstate",1:"renew")," this order."
+11 IF PSGACT["V"
WRITE !?5,"V to verify (make active) a non-verified order. NOTE: You cannot verify",!?7,"an order that has been marked as incomplete."
+12 IF $DATA(PSGOEA)
IF PSGOEA?2."?"
WRITE !!,"You may also select:"
IF 'PSGOENG
IF '$DATA(PSGODF)
IF PSJPCAF
IF 'PSGDI
IF 'PSGPI
WRITE !?5,"C to copy (duplicate) this order into a new, non-verified order."
+13 IF $DATA(PSGOEA)
IF PSGOEA?2."?"
WRITE !?5,"P to print this order to a device.",!?5,"S to show this order again."
+14 IF PSGOEAV
WRITE !!,"PLEASE NOTE: This order is automatically verified, and unless discontinued",!?13,"now, will show as active."
+15 WRITE !!?2,"You may also press the RETURN key if you are finished with this order or wish",!,"to take no action on it."
IF '$DATA(PSGOETOF)
WRITE " Enter an '^' if you do not wish to take any action on any other orders."
+16 QUIT