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 |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables |  All
Print Page as PDF
Routine: PSDOPT0

Package: Controlled Substances

Routine: PSDOPT0


Information

PSDOPT0 ;BIR/JPW,LTL,BJW - Outpatient Rx Entry (cont'd) ;22 Jun 98

Source Information

Source file <PSDOPT0.m>

Call Graph

Call Graph

Call Graph Total: 10

Package Total Call Graph
VA FileMan 7 NOW^%DTC  ^DIC  FILE^DICN  ^DIE  IX^DIK  $$GET1^DIQ  ^DIR  
Controlled Substances 2 (ASKP,CHK)^PSDOPT  RTSMUL^PSDOPT1  
Kernel 1 SIG^XUSESIG  

Caller Graph

Legends:

Legend of Colors

Package Component Superscript legend

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

Caller Graph

Caller Graph Total: 2

Package Total Caller Graph
Controlled Substances 1 PSDOPT  
Outpatient Pharmacy 1 PSORESK  

Entry Points

Name Comments DBIA/ICR reference
PRTLCHK
PSDS(RXIEN,FLNUM) ; Returns the Vault where the fill was last dispensed from or 0 (none)
RTSMUL
FND1
PSDDAVE ;PSD*3*30 (Major overhaul, Dave B)
FIND1
RFLCHK ;
1 ;begin process
RETERR
ESIG
LOCATION
DIE
ASK
RTSCHK ;Check to see if already returned to stock.
CHKALL ;Check to see if any left to post or release
POSTED ;check to see if posted
ERRMSG
LOOP ;loop to find new, refills and partials
PSDRTS(PSDRX,PSDNUM,PSDSITE,PSDQTY) ; API for Outpatient Pharmacy; Patch PSD*3*30
; This subroutine is called each time an Rx is returned to stock
; in Outpatient Pharmacy. The code does the following:
; 1.Check Rx, quit if not a controlled substance.
; 2.Give the user the option to update the transaction and
; balance details

External References

Name Field # of Occurrence
NOW^%DTC ASK+3, LOCATION+10
^DIC LOCATION+1, FIND1+1, DIE+4
FILE^DICN DIE+1
^DIE DIE+5
IX^DIK FIND1+8
$$GET1^DIQ PSDS+9, PSDS+10
^DIR ASK
ASKP^PSDOPT CHKALL+1, CHKALL+2
CHK^PSDOPT CHKALL+6
RTSMUL^PSDOPT1 RTSMUL
SIG^XUSESIG ESIG

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !!,"Accessing the prescription history..."
  • Line Location: LOOP+1
Function Call: WRITE
  • Prompt: !!,"Refill #",JJ," suspended."
  • Line Location: LOOP+8
Function Call: WRITE
  • Prompt: !!,"Partial #",JJ," suspended."
  • Line Location: LOOP+17
Function Call: WRITE
  • Prompt: !!,"Original suspended."
  • Line Location: LOOP+26
Function Call: WRITE
  • Prompt: !!,"ALL FILLS FOR THIS PRESCRIPTION HAVE BEEN POSTED AND RELEASED."
  • Line Location: CHKALL+2
Function Call: WRITE
  • Prompt: !,"Sorry you do not possess the PSDMGR key"
  • Line Location: 1+11
Function Call: WRITE
  • Prompt: !!,"Could not find any posting information in the Controlled Substance package,",!,"balance cannot be updated",!
  • Line Location: POSTED+13
Function Call: WRITE
  • Prompt: !,"No signature code entered, RX not returned to stock."
  • Line Location: ESIG+0
Function Call: WRITE
  • Prompt: !,"An Electronic Signature Code is required to return a Controlled Substance RX to stock.",!
  • Line Location: ESIG+1
Function Call: WRITE
  • Prompt: !,"No selection made, no balance adjusted."
  • Line Location: LOCATION+2
Function Call: WRITE
  • Prompt: !!?5,"Prescription Not Returned to Stock!",$C(7),!
  • Line Location: LOCATION+2
Function Call: WRITE
  • Prompt: !,"The Vault is required. Please, select a valid Vault or '^' to exit.",$C(7),!
  • Line Location: LOCATION+3
Function Call: WRITE
  • Prompt: !,"Sorry, the location type must be a Master Vault, satellite or narcotic location."
  • Line Location: LOCATION+4
Function Call: WRITE
  • Prompt: !,"Sorry, the drug is not stocked in this vault."
  • Line Location: LOCATION+5
Function Call: WRITE
  • Prompt: !,"Previous Balance: ",$G(PSDBAL)_" New Balance: "_($G(PSDBAL)+PSDQTY)
  • Line Location: LOCATION+6
Function Call: WRITE
  • Prompt: !,"Updating balances"
  • Line Location: LOCATION+8
Function Call: WRITE
  • Prompt: "."
  • Line Location: LOCATION+12
Function Call: WRITE
  • Prompt: !!?8,"According to the Controlled Substances package, this fill/refill",!?8,"was returned to stock on "_PSDRTS(1)_" by "_$G(PSDUSER)_".",!?16,"Nothing updated in the Controlled Substances package."
  • Line Location: ERRMSG+1
Routine Call
  • DIE
  • Line Location:
    • DIE+5
Routine Call
  • DIC
  • Line Location:
    • LOCATION+1
    • FIND1+1
    • DIE+4
Routine Call
  • DIR
  • Line Location:
    • ASK

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^PSD(58.8 - [#58.8] Classic Fileman Calls
^PSD(58.81 - [#58.81] Classic Fileman Calls,  GET1^DIQ

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^DD("DD" PSDDAVE+7, RFLCHK+2, PRTLCHK+3, ERRMSG
^PS(52.5 - [#52.5] LOOP+7, LOOP+8, LOOP+16, LOOP+17, LOOP+25, LOOP+26
^PS(59.7 - [#59.7] LOOP+2
^PSD(58.8 - [#58.8] ASK+4, LOCATION+4, LOCATION+5, LOCATION+6, LOCATION+9, LOCATION+10, LOCATION+11*, LOCATION+12, DIE, DIE+3
, DIE+4
^PSD(58.81 - [#58.81] 1+1, POSTED+2, POSTED+3, FND1, FIND1*, FIND1+2, FIND1+4*, FIND1+5*, FIND1+6*, FIND1+7*
, RTSCHK+6, RTSCHK+8, RTSCHK+9, ERRMSG, PSDS+8, PSDS+11
^PSDRUG - [#50] 1+6, 1+9
^PSRX - [#52] LOOP+4, LOOP+6, LOOP+9, LOOP+13, LOOP+15, LOOP+18, LOOP+22, LOOP+24, PSDDAVE+5, PSDDAVE+7
, RFLCHK+2, PRTLCHK+3, 1+2, 1+3, 1+4, 1+6, POSTED+9
^VA(200 - [#200] ERRMSG
^XUSEC("PSDMGR" PSDRTS+17

Label References

Name Line Occurrences
$$PSDS ASK+3
CHKALL PRTLCHK
ERRMSG RTSCHK+8, RTSCHK+9
ESIG ESIG+1
FIND1 FIND1
FND1 ASK+4
LOCATION LOCATION+3, LOCATION+4, LOCATION+5
PRTLCHK RFLCHK+1, PRTLCHK+5
RETERR 1+1, 1+11, ASK, ASK+1, ASK+5, LOCATION+2
RFLCHK RFLCHK+4
RTSCHK 1+1
RTSMUL RTSCHK+1

Naked Globals

Name Field # of Occurrence
^(0 LOOP+4, LOOP+9, LOOP+13, LOOP+18, RFLCHK+2, PRTLCHK+3, DIE*, DIE+3*
^(2 LOOP+24

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
>> % ASK+3, LOCATION+10
>> BAL ASK+4*, LOCATION+10*, FIND1+4
>> CNT CHKALL+5*
DA FIND1+1!, FIND1+8*!, DIE+1!, DIE+4!, DIE+5!*
DA(1 DIE+1*, DIE+4*, DIE+5*
DA(2 DIE+1*, DIE+4*, DIE+5*
>> DAT LOOP+4*, 1+3*, FIND1+7
>> DATA RFLCHK+1*, POSTED+9*, POSTED+10, POSTED+11, POSTED+12, RTSCHK+6*
>> DATA6 RTSCHK+6*
DD DIE+1!
>> DFN 1+4*
DIC LOCATION*, LOCATION+1!, FIND1+1!*, FIND1+8!, DIE+1!*, DIE+4!*
DIC("A" LOCATION*
DIC("S" LOCATION+1*
DIC(0 LOCATION*, FIND1+1*, DIE+1*, DIE+4*
DIE DIE+5!*
DIK FIND1+8*!
>> DILOCKTM LOCATION+9, FND1
DINUM FIND1+1*, DIE+1*!, DIE+4*!
DIR CHKALL+5!, ASK!
DIR("?" ASK*
DIR("A" ASK*
DIR("B" ASK*
DIR(0 ASK*
>> DIRUT ASK
DLAYGO FIND1+1!*, DIE+4*!
DO DIE+1!
DR DIE+5!*
DT DIE+4, DIE+5
>> DTOUT LOCATION+2
>> DUOUT LOCATION+2
DUZ PSDRTS+17, FIND1+4
FLNUM PSDS~, PSDS+12, PSDS+13, PSDS+14
>> JJ LOOP+4*, LOOP+6, LOOP+8, LOOP+9, LOOP+13*, LOOP+15, LOOP+17, LOOP+18, POSTED+1*, POSTED+2*
, POSTED+3
NODE0 PSDS+7~, PSDS+11*, PSDS+12, PSDS+13, PSDS+14
NODE6 POSTED+3*, POSTED+4, POSTED+5, POSTED+6, PSDS+7~, PSDS+11*, PSDS+12, PSDS+13, PSDS+14
>> PRF LOOP+13*
>> PSD1 RTSCHK+2*, RTSCHK+3*, RTSCHK+6*, RTSCHK+8, RTSCHK+9, ERRMSG
PSD1MUL RTSCHK+4!
>> PSDA FIND1*, FIND1+1, FIND1+4, FIND1+5, FIND1+6, FIND1+7, FIND1+8, DIE+1
>> PSDBAL LOCATION+6*
>> PSDCS 1+9*, 1+10*
>> PSDEL ASK+2
>> PSDERR CHKALL+1, 1+1, RTSCHK+5*, ERRMSG+2*
>> PSDFLL RTSCHK+7*, RTSCHK+8, RTSCHK+9
PSDLBL LOOP+2~, LOOP+18!
PSDLBLP LOOP+9!
>> PSDMSG ASK+2*, ASK+6*, FIND1+5
PSDMUL RTSCHK+4!
PSDNUM PSDRTS~, POSTED+4, POSTED+5, POSTED+6, POSTED+10, POSTED+11, POSTED+12, ASK+3, FIND1+3, FIND1+7
, RTSCHK+7
>> PSDNUM1 FIND1+3*, FIND1+7
PSDOIN LOOP+2~*, LOOP+4, LOOP+13, LOOP+24
>> PSDOUT 1+2*
>> PSDPOST POSTED+1*, POSTED+4*, POSTED+5*, POSTED+6*, POSTED+10*, POSTED+11*, POSTED+12*, POSTED+13
>> PSDPR1 PSDDAVE+9*, PRTLCHK*, PRTLCHK+2, PRTLCHK+3, PRTLCHK+4
PSDQTY PSDRTS~, ASK, ASK+2, ASK+3*, LOCATION+6, LOCATION+11, FIND1+4, FIND1+5
>> PSDR 1+6*, 1+8, 1+9, ASK+4, LOCATION+5, LOCATION+6, LOCATION+9, LOCATION+10, LOCATION+11, LOCATION+12
, FIND1+4, DIE, DIE+1, DIE+3, DIE+4, DIE+5
PSDRET ASK+1*, DIE+5!
>> PSDRF1 PSDDAVE+9*, RFLCHK+1*, RFLCHK+2, RFLCHK+3
>> PSDRN 1+6*, 1+8*
>> PSDRS PSDRTS+17*, 1+11
>> PSDRTS(1 ERRMSG*, ERRMSG+1
PSDRX LOOP+4, LOOP+6, LOOP+7, LOOP+9, LOOP+13, LOOP+15, LOOP+16, LOOP+18, LOOP+22, LOOP+24
, LOOP+25, PSDDAVE+5, PSDDAVE+7, RFLCHK+2, PRTLCHK+3, PSDRTS~, 1+1, 1+2, 1+3, 1+4
, 1+6, POSTED+2, POSTED+9, ASK+3, FIND1+7, RTSCHK+6
PSDRX("OR" PSDDAVE+6
PSDRX("PR" PRTLCHK+2
PSDRX("RF" LOOP+9
PSDRX(1 LOOP+22*, LOOP+26*, PSDDAVE+5
PSDRXFD LOOP+2~, LOOP+6*, LOOP+8, LOOP+15*, LOOP+17, LOOP+24*, LOOP+26
PSDS 1+5*, ASK+3*, ASK+4, LOCATION+5*!, LOCATION+6, LOCATION+9, LOCATION+10, LOCATION+11, LOCATION+12, FIND1+4
, DIE, DIE+1, DIE+3, DIE+4, DIE+5, PSDS+7~*, PSDS+8, PSDS+12*, PSDS+13*, PSDS+14*
, PSDS+15
>> PSDSEL("OR" PSDDAVE+5*, PSDDAVE+6*, PSDDAVE+7*, PSDDAVE+8!
>> PSDSEL("PR" LOOP+18*, PRTLCHK, PRTLCHK+2*, PRTLCHK+3*, PRTLCHK+4!
>> PSDSEL("RF" LOOP+9*, RFLCHK+1, RFLCHK+2*, RFLCHK+3!
>> PSDSEL(0 CHKALL+2
PSDSITE PSDRTS~, 1+5
PSDSUPN LOOP+2~, LOOP+7*, LOOP+8, LOOP+16*, LOOP+17, LOOP+25*, LOOP+26
>> PSDT ASK+3*, LOCATION+10*, FIND1+4, FIND1+5
>> PSDUSER ERRMSG*, ERRMSG+1
PSDXXX RTSCHK+3, RTSCHK+4!
>> RETSK ESIG*, ASK*, LOCATION+2*
>> RF LOOP+4*
>> RPDT 1+3*
RXIEN PSDS~, PSDS+8
>> RXNUM 1+2*, FIND1+7
>> RXNUM("OR" PSDDAVE+8!
>> RXNUM("PR" LOOP+18*, PRTLCHK+4!
>> RXNUM("RF" LOOP+9*, RFLCHK+3!
TRX PSDS+7~, PSDS+8*, PSDS+9, PSDS+10, PSDS+11
U LOOP+2, LOOP+4, LOOP+6, LOOP+9, LOOP+13, LOOP+15, LOOP+17, LOOP+18, LOOP+22, LOOP+24
X ESIG!, LOCATION+3, FIND1+1*, DIE+1*, DIE+4*
>> X1 POSTED+9*, ESIG+1
Y PSDDAVE+7*, RFLCHK+2*, PRTLCHK+3*, ASK+1, ASK+6, LOCATION+4!, LOCATION+5, ERRMSG*
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables |  All