Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Interaction Calls |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables  | All
Print Page as PDF
Routine: PSDEST

Package: Controlled Substances

Routine: PSDEST


Information

PSDEST ;BIR/BJW - Destroy a Drug from the Holding file ;9 Feb 98

Source Information

Source file <PSDEST.m>

Call Graph

Call Graph

Call Graph Total: 6

Package Total Call Graph
VA FileMan 4 ^%DT  ^DIC  ^DIE  ^DIR  
Controlled Substances 1 ^PSDSET  
Kernel 1 $$FMTE^XLFDT  

Caller Graph

Legends:

Legend of Colors

Package Component Superscript legend

action A extended action Ea event driver Ed subscriber Su protocol O limited protocol LP run routine RR broker B edit E server Se print P screenman SM inquire I

Caller Graph

Caller Graph Total: 1

Package Total Caller Graph
Controlled Substances 1 PSD DESTROY DRUGS  

Entry Points

Name Comments DBIA/ICR reference
SETDATE ;7/17/96,inital set to current date
ASKD ;ask disp location
ASKN ;ask holding number
DISPLAY ;
OK ;ask ok
DATE ; ask date,7/17/96 added %DT("B")default date or user can enter new date
OK1 ;ask if entry error
OK2 ;ask do you want to cancel holding #,E3R# 4990
DIRC ;enter reason,date and pharmacist cancelling holding #,E3R# 4990
COM ; enter free-text information(comments)
DIE1 ;update 58.86 for cancelling holding #,E3R# 4990
DIE ;update 58.86
END
MSG
MSG1 ;msg when already destroyed
MSG2 ;msg when cancelled,E3R# 4990

External References

Name Field # of Occurrence
^%DT DATE+2
^DIC ASKD+5, ASKN+4
^DIE DIE1+3, DIE+2
^DIR OK+3, OK1+3, OK2+3, COM+1
^PSDSET PSDEST+3
$$FMTE^XLFDT DATE+2

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !!,"Please contact your Pharmacy Coordinator for access to",!,"destroy Controlled Substances.",!!,"PSDMGR security key required.",!
  • Line Location: PSDEST+4
Function Call: WRITE
  • Prompt: !!,?3,"**Searching for the next available drug awaiting destruction**",!
  • Line Location: ASKN+1
Function Call: WRITE
  • Prompt: !!,?3,"**You Must enter a DATE to destroy or cancel this Holding Num**"
  • Line Location: ASKN+5
Function Call: WRITE
  • Prompt: @IOF,!,"HOLDING FOR DESTRUCTION",!,LN,!!,"Holding Number: ",NUM
  • Line Location: DISPLAY+5
Function Call: WRITE
  • Prompt: !,"Drug: ",PSDRN,!,"Quantity "_$S($D(^PSD(58.8,+PSDR,0)):"("_NBKU_")",1:"")_": ",QTY,!
  • Line Location: DISPLAY+6
Function Call: WRITE
  • Prompt: !
  • Line Location: DATE+1
Function Call: WRITE
  • Prompt: !
  • Line Location: DATE+2
Function Call: WRITE
  • Prompt: !,"A semicolon is not allowed in the COMMENTS field. Please edit your entry.",$C(7)
  • Line Location: COM+2
Function Call: WRITE
  • Prompt: !,"DATE/TIME CANCELLED: ",PSDT
  • Line Location: COM+6
Function Call: WRITE
  • Prompt: !,"CANCELLED BY: ",PSDUZAN
  • Line Location: COM+7
Function Call: WRITE
  • Prompt: !!,"Holding Number: ",NUM,?19," flagged as entry error"
  • Line Location: DIE1+4
Function Call: WRITE
  • Prompt: !,?3,"** Updating the record **",!
  • Line Location: DIE+2
Function Call: WRITE
  • Prompt: !!,?3,"=> Holding Number: ",NUM," has been destroyed.",!!
  • Line Location: DIE+4
Function Call: WRITE
  • Prompt: !!,"No action taken",!!
  • Line Location: MSG+0
Function Call: WRITE
  • Prompt: $C(7),!!,"Drug: ",PSDRN,!,"=> Destruction #: ",NUM," was destroyed on ",PSDST,".",!!
  • Line Location: MSG1+1
Function Call: WRITE
  • Prompt: $C(7),!!,"Drug: ",PSDRN,!,"=> Destruction #: ",NUM," was cancelled on ",PSDCAN,".",!!
  • Line Location: MSG2+1
Routine Call
  • DIC
  • Line Location:
    • ASKD+5
    • ASKN+4
Routine Call
  • DIE
  • Line Location:
    • DIE1+3
    • DIE+2
Routine Call
  • DIR
  • Line Location:
    • OK+3
    • OK1+3
    • OK2+3
    • COM+1

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^DD("DD" DISPLAY+3, DISPLAY+4, COM+5
^PSD(58.8 - [#58.8] DISPLAY+2, DISPLAY+6
^PSD(58.86 - [#58.86] ASKN+3, DISPLAY+1, DISPLAY+3
^PSDRUG - [#50] DISPLAY+1
^VA(200 - [#200] PSDEST+6
^XUSEC("PSDMGR" PSDEST+4

Label References

Name Line Occurrences
ASKN ASKD+2, DISPLAY+3, DISPLAY+4, OK2+4, DIE1+5, DIE+5
COM COM+2
DATE OK+4, DIRC+1
DIE OK+4
END PSDEST+4, ASKD+5, ASKN+4, OK+3, OK+4, OK+5, DATE+2, OK1+3, OK2+3, DIRC+1
COM+1, DIE1+3, DIE+3
MSG OK+3, OK1+3, OK2+3, OK2+4, COM+1, DIE1+3, DIE+3
MSG1 DISPLAY+4
MSG2 DISPLAY+3
OK1 OK+5

Naked Globals

Name Field # of Occurrence
^(0 ASKN+3

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
% END!
%DT DATE+1!, DATE+2*, END!
%DT("A" DATE+2*
%DT("B" DATE+2*
%DT(0 DATE+2*
%H END!
%I END!
ANS OK+4*, OK+5, END!
DA ASKD+3!, ASKN+2!, ASKN+4!, OK+1!, OK1+1!, OK2+1!, COM+1!, DIE1+3!*, DIE+2!*, END!
DIC ASKD+3!*, ASKD+5!, ASKN+2!*, ASKN+4!, END!
DIC("A" ASKD+4*, ASKN+2*
DIC("B" ASKD+4*, ASKN+3*
DIC("S" ASKD+3*, ASKN+2*
DIC(0 ASKD+3*, ASKN+2*
DIE DIE1+3!*, DIE+2!*, END!
DIR OK+1!, OK+3!, OK1+1!, OK1+3!, OK2+1!, OK2+3!, COM+1!, END!
DIR("?" OK+2*, OK1+2*, OK2+2*
DIR("A" OK+1*, OK1+1*, OK2+1*
DIR("B" OK+1*, OK1+1*, OK2+1*
DIR(0 OK+1*, OK1+1*, OK2+1*, COM+1*
DIROUT END!
DIRUT OK+1!, OK+3, OK1+1!, OK1+3, OK2+1!, OK2+3, COM+1!, COM+4!, END!
DR DIE1+3!*, DIE+2!*, END!
DT SETDATE+1
DTOUT COM+4!, END!
DUOUT COM+4!, END!
DUZ PSDEST+4, PSDEST+5
IOF DISPLAY+5
LN DISPLAY+1!*, DISPLAY+5, END!
NBKU DISPLAY+2*, DISPLAY+6, END!
NUM DISPLAY+1*, DISPLAY+5, DIE1+4, DIE+4, END!, MSG1+1, MSG2+1
PSD ASKN+3*, END+1!
PSDA ASKN+4*, DISPLAY+1, DISPLAY+3, DIE1+3, DIE+2, END+1!
PSDCAN DISPLAY+3*, END+1!, MSG2+1
PSDCOM3 COM+3*, DIE1+3, END+1!
PSDCT DISPLAY+2*, END+1!
PSDR DISPLAY+1*, DISPLAY+2, DISPLAY+6, END+1!
PSDRN DISPLAY+1*, DISPLAY+6, END+1!, MSG1+1, MSG2+1
PSDS ASKD+1*, ASKD+6*, ASKN+3, DISPLAY+2, END+1!
>> PSDSITE PSDEST+3, ASKD+1, ASKD+2, ASKD+6*
PSDSN ASKD+1*, ASKD+4, ASKD+6*, END+1!
PSDST DISPLAY+4*, END+1!, MSG1+1
PSDT SETDATE+1*, OK+4, OK+5, DATE+2*, DIRC+1, COM+5*, COM+6, DIE1+3, DIE1+5*, DIE+2
END+1!
PSDUZ PSDEST+5*, PSDEST+6, DIE1+3, DIE+2, END+1!
PSDUZAN PSDEST+6*, COM+7, END+1!
QTY DISPLAY+1*, DISPLAY+6, END+1!
U ASKD+1, ASKD+2, ASKD+6
X END+1!
Y ASKD+5, ASKD+6, ASKN+4, DISPLAY+3*, DISPLAY+4*, DATE+2, OK2+4, COM+2, COM+3, COM+5*
DIE1+3, DIE+3, END+1!
Y(0 DISPLAY+1, DISPLAY+2, DISPLAY+4, OK+4
YYY COM+5*, DIE1+5, END+1!
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Interaction Calls |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables  | All