PSGOEM ;BIR/CML3-PSGOE MESSAGES ;26 NOV 97 / 8:28 AM
;;5.0;INPATIENT MEDICATIONS ;**81,260,315**;16 DEC 97;Build 73
;;Per VHA Directive 2004-038, this routine should not be modified.
; 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
;
ENDC ;
W !!,"You must enter 'DC' to discontinue the order or leave blank and press return to continue without discontinuing the order." 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
DURHLP(PSGSTR,PSGRF) ; Help text for Duration of Administration *315 drp
Q:($G(PSGRF,0)<2)!($E(PSGSTR,1)'="?")
D @PSGRF
I $E(PSGSTR,1,2)="??" D
. W !!,"Enter the number of hours the medication will remain on the patient in the"
. W !,"Duration of Administration field. The BCMA user will be prompted to remove the"
. W !,"medication after the Duration of Administration period."
. W !!,"The Duration of Administration cannot match or exceed the order frequency"
. W !,"(the period of time between two Admin Times) except for BID, TID and QID schedules."
.Q
Q
;
2 ;TYPE 2 OI
W !,"The Duration of Administration is the period of time the medication remains on"
W !,"the patient before removal. If this medication order requires a drug-free period"
W !,"prior to the next administration, enter a Duration of Administration here."
W !!,"If this medication order does not require a drug-free period prior to the next"
W !,"administration, this field should be left blank."
Q
;
3 ;TYPE 3 OI
I $E(PSGSTR,1)="?" D
.W !,"The Duration of Administration is the period of time the medication remains on"
.W !,"the patient before removal. The Duration of Administration is required for this"
.W !,"medication order because this medication requires a drug-free period prior to"
.W !,"the next administration."
.Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSGOEM 6455 printed Sep 02, 2024@18:47:37 Page 2
PSGOEM ;BIR/CML3-PSGOE MESSAGES ;26 NOV 97 / 8:28 AM
+1 ;;5.0;INPATIENT MEDICATIONS ;**81,260,315**;16 DEC 97;Build 73
+2 ;;Per VHA Directive 2004-038, this routine should not be modified.
+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 ;
ENDC ;
+1 WRITE !!,"You must enter 'DC' to discontinue the order or leave blank and press return to continue without discontinuing the order."
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
DURHLP(PSGSTR,PSGRF) ; Help text for Duration of Administration *315 drp
+1 if ($GET(PSGRF,0)<2)!($EXTRACT(PSGSTR,1)'="?")
QUIT
+2 DO @PSGRF
+3 IF $EXTRACT(PSGSTR,1,2)="??"
Begin DoDot:1
+4 WRITE !!,"Enter the number of hours the medication will remain on the patient in the"
+5 WRITE !,"Duration of Administration field. The BCMA user will be prompted to remove the"
+6 WRITE !,"medication after the Duration of Administration period."
+7 WRITE !!,"The Duration of Administration cannot match or exceed the order frequency"
+8 WRITE !,"(the period of time between two Admin Times) except for BID, TID and QID schedules."
+9 QUIT
End DoDot:1
+10 QUIT
+11 ;
2 ;TYPE 2 OI
+1 WRITE !,"The Duration of Administration is the period of time the medication remains on"
+2 WRITE !,"the patient before removal. If this medication order requires a drug-free period"
+3 WRITE !,"prior to the next administration, enter a Duration of Administration here."
+4 WRITE !!,"If this medication order does not require a drug-free period prior to the next"
+5 WRITE !,"administration, this field should be left blank."
+6 QUIT
+7 ;
3 ;TYPE 3 OI
+1 IF $EXTRACT(PSGSTR,1)="?"
Begin DoDot:1
+2 WRITE !,"The Duration of Administration is the period of time the medication remains on"
+3 WRITE !,"the patient before removal. The Duration of Administration is required for this"
+4 WRITE !,"medication order because this medication requires a drug-free period prior to"
+5 WRITE !,"the next administration."
+6 QUIT
End DoDot:1
+7 QUIT