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 |  Local Variables  | All
Print Page as PDF
Routine: PSJPAD50

Package: Inpatient Medications

Routine: PSJPAD50


Information

PSJPAD50 ;BIR/JCH PADE DRUG LOOKUP ;8/25/15

Source Information

Source file <PSJPAD50.m>

Call Graph

Call Graph

Call Graph Total: 9

Package Total Call Graph
VA FileMan 7 EN^DDIOL  $$FIND1^DIC  MIX^DIC1  ^DIE  ^DIK  GETS^DIQ  ^DIR  
Inpatient Medications 1 $$DRGQTY^PSJPADSI  
Registration 1 INP^VADPT  

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: 9

Package Total Caller Graph
Inpatient Medications 9 PSGOE7  PSGOE82  PSGOE92  PSGOEF1  PSGPEN  PSJLMPRU  PSJLMUDE  PSJO  
PSJPADSI  

Entry Points

Name Comments DBIA/ICR reference
READDD(PSJDRG,PSJOI,PSJLOC,PSJORD,PSGORD) ; Get Dispense Drug
; Input : PSJDRG - (required) Pointer to DRUG file (#50)
; PSJOI - (optional) Pointer to PHARMACY ORDERABLE ITEM (#50.7) file
; PSJLOC - (required) Pointer to WARD (#42) file if input value is purely numeric
; Pointer to Hospital Location (#44) if last character of input value is "C"
; PSJORD - (optional) Inpatient Order number, pointer to NON-VERIFIED ORDERS (#53.1) file or PHARAMCY PATIENT (#55) file
; PSGORD - (optional) Inpatient Order number, pointer to NON-VERIFIED ORDERS (#53.1) file or PHARMACY PATIENT (#55) file
READLOOP(PSJDRG,PSJOI,PSJLOC,PSJORD,PSGORD,PSII,PSJDONE)
PROMPT(DRGIEN,DRGSRCH,PSJOI,PSJLOC,PSJORD,PSJSRCH,PSII)
SEARCH(DRGIEN,DRGSRCH,PSJLOC,NEWDRG,PSJOI,PSJHELP) ; Search Drug (#50) file using user input
; Input: DRGIEN - Pointer to DRUG file (#50) passed in - default dispense drug
; DRGSRCH - Search value for DRUG file (user input)
; PSJLOC - Location of current order - Patient Ward (inpatient) or Clinic (clinic order)
; NEWDRG - Pointer to DRUG file (#50) selected by user
; PSJOI - Pointer to Pharmacy Orderable Item (#50.7), associated with order
; PSJHELP - Flag indicating search is for 1) display only: $G(PSJHELP)
; or 2) allows selection: '$G(PSJHELP)
SELECT(PSJLIST,PSJHELP) ; Select a drug from the list PSJLIST
SELSRCH(DRGIEN,NEWDRIEN,PSJOI,PSJLOC,TMPSRCH,PSJSCRN) ; Select drug
; OR, select drug from Orderable Item screened DRUG file (#50).
FILE(DRGIEN,PSJSRCH) ; File drug into ^PS(53.45
PSDRUG(DRGIEN,DRGSRCH,PSJLIST,PSJLOC,PSJOI,PSJOSCRN)
ORDLOC(PSJORD,PSGP) ; Get clinic location from PSJORD order, if it exists
CHKWG(CAB,WARD) ; Return flag indicating WARD is linked to cabinet's WARD GROUPS
CHKCG(CAB,CLINIC) ; Return flag indicating CLINIC is linked to cabinet's CLINIC GROUPS
PADEWD(WARD) ; Return flag indicating if WARD is linked to any active PADE ward groups
PADECL(CLINIC) ; Return flag indicating if CLINIC is linked to any PADE devices
DDLIST(DRGARRAY)
CHK5345(PSJSYSP,DRGIEN) ; Check if file 50 pointer DRGIEN exists in Dispense Drug temp global ^PS(53.45,PSJSYSP,2,n
; PSJSYSP=User DUZ
; DRGIEN=pointer to drug IEN in file 50

External References

Name Field # of Occurrence
EN^DDIOL PROMPT+33, PROMPT+36, PROMPT+37, SELECT+6, SELECT+7, DDLIST+17
$$FIND1^DIC SELSRCH+36
MIX^DIC1 PSDRUG+13
^DIE FILE+17, FILE+22, FILE+26
^DIK FILE+12
GETS^DIQ SELSRCH+21, PADECL+14
^DIR PROMPT+28, PROMPT+38, SELECT+9, SELSRCH+13, SELSRCH+26, SELSRCH+41, SELSRCH+46
$$DRGQTY^PSJPADSI SELSRCH+20
INP^VADPT READDD+13, PSDRUG+6

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: PARTNAM
  • Line Location: SELSRCH+12
Function Call: WRITE
  • Prompt: PARTNAM
  • Line Location: SELSRCH+45
Function Call: WRITE
  • Prompt: " You should consult",!,"with your pharmacy before ordering any non-formulary medication."
  • Condition for execution: PSJSYSU<3
  • Line Location: PSDRUG+9
Function Call: WRITE
  • Prompt: !
  • Line Location: PSDRUG+9
Routine Call
  • DIC
  • Line Location:
    • SELSRCH+36
Routine Call
  • DIE
  • Line Location:
    • FILE+17
    • FILE+22
    • FILE+26
Routine Call
  • DIR
  • Line Location:
    • PROMPT+28
    • PROMPT+38
    • SELECT+9
    • SELSRCH+13
    • SELSRCH+26
    • SELSRCH+41
    • SELSRCH+46

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^SC - [#44] GETS^DIQ
^PSDRUG - [#50] Classic Fileman Calls,  FIND1^DIC,  GETS^DIQ

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^PS(53.1 - [#53.1] READDD+14, PROMPT+35, FILE+8, ORDLOC+7
^PS(53.45 - [#53.45] PROMPT+11, PROMPT+13, FILE+20, CHK5345+6
^PS(55 - [#55] READDD+14, ORDLOC+4
^PS(57.5 - [#57.5] CHKWG+3, PADEWD+7
^PS(57.8 - [#57.8] CHKCG+3, CHKCG+4, PADECL+7
^PS(58.63 - [#58.63] CHKWG+2, CHKCG+2, PADEWD+4, PADEWD+5, PADEWD+6, PADEWD+9, PADEWD+10, PADEWD+11, PADECL+4, PADECL+5
, PADECL+6, PADECL+9, PADECL+10, PADECL+11, PADECL+16, PADECL+19, PADECL+20
^PSDRUG - [#50] PROMPT+15, PROMPT+24, SELSRCH+11, SELSRCH+18, SELSRCH+40, SELSRCH+42, DDLIST+10
^SC - [#44] READDD+15

Label References

Name Line Occurrences
$$CHK5345 FILE+6
$$ORDLOC PROMPT+20, SELSRCH+6, SELSRCH+17
$$PROMPT READLOOP+9
$$PSDRUG SEARCH+15, SELSRCH+51
DDLIST SEARCH+12
FILE READLOOP+13
READLOOP READDD+17
SELSRCH PROMPT+42

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
CAB CHKWG~, CHKWG+2, CHKCG~, CHKCG+2
CG CHKCG+1~, CHKCG+2*, CHKCG+3, CHKCG+4, PADECL+2~, PADECL+4*, PADECL+5, PADECL+7
CG( CHKCG+5*, CHKCG+6
CL CHKCG+1~, CHKCG+3*, CHKCG+4
CLFLAG READDD+10~, READDD+11*, READDD+14*, READDD+15, READDD+16
CLIEN CHKCG+1~, CHKCG+4*, CHKCG+5
CLINAM PADECL+2~, PADECL+15*, PADECL+17, PADECL+22
CLINAM(44 PADECL+15
CLINIC CHKCG~, CHKCG+6, PADECL~, PADECL+1, PADECL+8, PADECL+9, PADECL+10, PADECL+14, PADECL+15
CNT SELECT+1~, SELECT+4*
D PSDRUG+2~, PSDRUG+8*
DA PROMPT+6~, FILE+2~, FILE+11~*, FILE+15*, FILE+22*, FILE+25*
DA(1 FILE+11*, FILE+15*, FILE+22*, FILE+25*
DCT PROMPT+6~, PROMPT+11*, PROMPT+13, PROMPT+16, SELSRCH+3~, SELSRCH+9*, SELSRCH+10*, SELSRCH+11, SELSRCH+14, SELSRCH+15*
, SELSRCH+18, SELSRCH+20, SELSRCH+21
DDCOUNT CHK5345+3~, CHK5345+6*
DFN READDD+12~*, READDD+13, READDD+14
DI PROMPT+6~
DIC FILE+2~, PSDRUG+2~, PSDRUG+8*
DIC("?" PSDRUG+9*
DIC("S" PSDRUG+10*
DIC("W" PSDRUG+12*
DIC(0 PSDRUG+11*
DIE FILE+2~, FILE+15*, FILE+22*, FILE+25*
DIK FILE+11~*
DIR PROMPT+6~, PROMPT+38~, SELECT+1~, SELSRCH+4!, SELSRCH+8~, SELSRCH+40~, SELSRCH+46~, FILE+2~
DIR("?" PROMPT+26*
DIR("A" PROMPT+25*, PROMPT+38*, SELECT+9*, SELSRCH+13*, SELSRCH+22*, SELSRCH+25*, SELSRCH+40*, SELSRCH+46*
DIR("B" SELSRCH+13*, SELSRCH+40*, SELSRCH+46*
DIR(0 PROMPT+8*, PROMPT+38*, SELECT+9*, SELSRCH+13*, SELSRCH+25*, SELSRCH+40*, SELSRCH+46*
DR FILE+2~, FILE+16*, FILE+17*, FILE+22*, FILE+26*
DRG PROMPT+7!
DRGARRAY DDLIST~
DRGARRAY( DDLIST+7, DDLIST+9
DRGIEN PROMPT~, PROMPT+10*, PROMPT+13*, PROMPT+14, PROMPT+15, PROMPT+16, PROMPT+17*, PROMPT+19*, PROMPT+24, PROMPT+28
, PROMPT+29, PROMPT+31, PROMPT+39, PROMPT+42, SEARCH~, SEARCH+12, SEARCH+15, SELSRCH~, SELSRCH+7, SELSRCH+22
, SELSRCH+38, SELSRCH+51, FILE~, FILE+6, FILE+10, FILE+22, PSDRUG~, DDLIST+8~, DDLIST+9*, DDLIST+10
, DDLIST+11, CHK5345~, CHK5345+4, CHK5345+6
DRGIEN( PROMPT+16*, PROMPT+17, SELSRCH+9, SELSRCH+11, SELSRCH+14, SELSRCH+15, SELSRCH+18, SELSRCH+20, SELSRCH+21, SELSRCH+27
, SELSRCH+33, SELSRCH+42*, SELSRCH+45, SELSRCH+47
DRGIEN("" PROMPT+17
DRGIEN("NAM" PROMPT+16*
DRGIEN("NUM" PROMPT+16*
DRGIEN(0 SELSRCH+10
DRGIEN(999 SELSRCH+23, SELSRCH+42
DRGNAME PROMPT+6~, PROMPT+9*, PROMPT+12~, PROMPT+15*, PROMPT+16, PROMPT+24*, PROMPT+25, SELSRCH+8~, SELSRCH+11*, SELSRCH+12
, SELSRCH+18*, SELSRCH+19, SELSRCH+22, DDLIST+8~, DDLIST+10*, DDLIST+11
DRGSRCH PROMPT~, PROMPT+23!, PROMPT+45!, SEARCH~, SEARCH+14*, SEARCH+15, PSDRUG~, PSDRUG+11
DTOUT READDD+8~, READDD+17, READLOOP+7, READLOOP+11, PROMPT+28
DUOUT READDD+8~, READDD+17, READLOOP+7, READLOOP+11, PROMPT+28
FOUND SELSRCH+3~, SELSRCH+33, SELSRCH+42*, SELSRCH+44, SELSRCH+45, SELSRCH+47, SELSRCH+51*, SELSRCH+53, CHK5345+3~, CHK5345+5*
, CHK5345+6*, CHK5345+7
I SELSRCH+8~, SELSRCH+9*, SELSRCH+11, SELSRCH+15*, SELSRCH+19, SELSRCH+22
LAST SELECT+1~, SELECT+3*, SELECT+9
LNCOUNT DDLIST+3~, DDLIST+4*, DDLIST+5*, DDLIST+6*, DDLIST+11*, DDLIST+12*, DDLIST+13*, DDLIST+14*, DDLIST+15*, DDLIST+16*
LOCTYP READDD+10~, READDD+11*, READDD+15*, READDD+16
NEWDRG READLOOP+2~, READLOOP+7, READLOOP+9*, READLOOP+13, SEARCH~, SEARCH+17*
NEWDRIEN PROMPT+6~, PROMPT+22*, PROMPT+31, PROMPT+32*, PROMPT+35*, PROMPT+39*, PROMPT+42, PROMPT+44*, PROMPT+45, PROMPT+46
, SELSRCH~, SELSRCH+14*, SELSRCH+27*, SELSRCH+29, SELSRCH+33*, SELSRCH+47*, SELSRCH+48, SELSRCH+53*
NXTDRG DDLIST+3~, DDLIST+7*, DDLIST+9
PADE PADEWD+2~, PADEWD+5*, PADEWD+6, PADEWD+10*, PADEWD+11, PADECL+2~, PADECL+5*, PADECL+6, PADECL+10*, PADECL+11
, PADECL+18~, PADECL+19*, PADECL+20
PARTIAL PADECL+2~, PADECL+15*, PADECL+16*, PADECL+17, PADECL+19, PADECL+22
PARTNAM SELSRCH+3~, SELSRCH+12*, SELSRCH+45*
PCL PADECL+2~, PADECL+7*
PCL( PADECL+7*, PADECL+8
PDCLINS PADECL+2~
PDLINK PADEWD+2~, PADEWD+3*, PADEWD+8*, PADEWD+9, PADEWD+12*, PADEWD+13, PADECL+2~, PADECL+3*, PADECL+8*, PADECL+9
, PADECL+12*, PADECL+14, PADECL+16, PADECL+19, PADECL+22*, PADECL+23
PDWARDS PADEWD+2~
PSDD FILE+2~, FILE+6*, FILE+11, FILE+15, FILE+20*, FILE+22, FILE+25
PSGORD READDD~, READDD+17, READLOOP~, PROMPT+35, FILE+8
PSGP READDD+12, PROMPT+20, SELSRCH+6, SELSRCH+17, ORDLOC~, ORDLOC+4
PSII READDD+8~, READDD+17*, READLOOP~, READLOOP+9, PROMPT~, PROMPT+19
PSJCONT SEARCH+9~, SEARCH+10*
PSJDCNT SEARCH+9~
PSJDDAR DDLIST+3~, DDLIST+17
PSJDDAR( DDLIST+5*, DDLIST+6*, DDLIST+11*, DDLIST+12*, DDLIST+13*, DDLIST+14*, DDLIST+16*
>> PSJDDR( DDLIST+15*
PSJDIEN SEARCH+9~
PSJDIR SELSRCH+8~, SELSRCH+15~, SELSRCH+19*, SELSRCH+23, SELSRCH+25
PSJDONE READDD+8~, READDD+17, READLOOP~, READLOOP+3!, READLOOP+7, PROMPT+29*
PSJDRG READDD~, READDD+17, READLOOP~, READLOOP+2~, READLOOP+9
PSJDSRCH READLOOP+2~, READLOOP+9
PSJFIND SELSRCH+34~, SELSRCH+36*, SELSRCH+38, SELSRCH+39, SELSRCH+40, SELSRCH+42
PSJHELP SEARCH~, SELECT~, SELECT+5, SELECT+8
PSJLAST SELSRCH+8~, SELSRCH+23*, SELSRCH+24, SELSRCH+25
PSJLIST SEARCH+9~, SEARCH+14*, SEARCH+15, SELECT~, SELSRCH+3~, SELSRCH+50*, SELSRCH+51, PSDRUG~
PSJLIST(1 SELECT+3, SELECT+4
PSJLIST(2 SELECT+10
PSJLOC READDD~, READDD+9, READDD+16*, READDD+17, READLOOP~, READLOOP+6*, READLOOP+9, PROMPT~, PROMPT+20~*, PROMPT+42
, SEARCH~, SEARCH+15, SELSRCH~, SELSRCH+3~, SELSRCH+6*, SELSRCH+17*, SELSRCH+20, SELSRCH+51, PSDRUG~, PSDRUG+4
, PSDRUG+6*, PSDRUG+7*, ORDLOC+1~, ORDLOC+4*, ORDLOC+5*, ORDLOC+6*, ORDLOC+7*, ORDLOC+8*, ORDLOC+9*
PSJLT PSDRUG+2~, PSDRUG+4*, PSDRUG+6
PSJMSG SELSRCH+16~
PSJMSG(50 SELSRCH+22
PSJOI READDD~, READDD+17, READLOOP~, READLOOP+9, PROMPT~, PROMPT+42, SEARCH~, SEARCH+15, SELSRCH~, SELSRCH+51
, PSDRUG~
PSJORD READDD~, READDD+14, READDD+17, READLOOP~, READLOOP+9, PROMPT~, PROMPT+20, PROMPT+32, SELSRCH+6, SELSRCH+17
, FILE+17, FILE+26, ORDLOC~, ORDLOC+2, ORDLOC+3, ORDLOC+4, ORDLOC+7
PSJOSCRN SEARCH+14*, SEARCH+15, SELSRCH+50*, SELSRCH+51, PSDRUG~
PSJOUT SELECT+1~, SELECT+5, SELECT+7
PSJOUT( SELECT+4*
PSJPNDRN PROMPT+35~, FILE+8~*, FILE+17, FILE+26
PSJQSRCH SELSRCH+3~, SELSRCH+32*, SELSRCH+33, SELSRCH+38*
PSJQTY SELSRCH+16~, SELSRCH+20*, SELSRCH+22
PSJSCR SELSRCH+34~
PSJSCRN SELSRCH~, SELSRCH+35*, SELSRCH+36
PSJSEL SEARCH+9~, SEARCH+15*, SEARCH+17, SELECT+1~, SELECT+2*, SELECT+10*, SELECT+11
PSJSRCH READLOOP+2~, READLOOP+5*, READLOOP+8*, READLOOP+9, READLOOP+13, PROMPT~, PROMPT+41*, FILE~, FILE+16
PSJSYSP PROMPT+11, PROMPT+13, FILE+6, FILE+11, FILE+15, FILE+20, FILE+22, FILE+25, CHK5345~, CHK5345+6
>> PSJSYSU PSDRUG+9
PSJTABLN PSDRUG+2~, PSDRUG+12*
PWD PADEWD+2~, PADEWD+7*
PWD( PADEWD+7*, PADEWD+8
STATUS PADECL+18~*, PADECL+20*, PADECL+21
TMPSRCH PROMPT+6~, PROMPT+41*, PROMPT+42, SELSRCH~, SELSRCH+7, SELSRCH+11, SELSRCH+12, SELSRCH+36, SELSRCH+45, SELSRCH+51
VAHOW READDD+13~, PSDRUG+6~
VAIN READDD+13~, PSDRUG+6~
VAIN(4 READDD+13, READDD+16, PSDRUG+6, PSDRUG+7, ORDLOC+6, ORDLOC+9
VAINDT READDD+13~, PSDRUG+6~
VAROOT READDD+13~, PSDRUG+6~
WARD CHKWG~, CHKWG+4, PADEWD~, PADEWD+1, PADEWD+8, PADEWD+9, PADEWD+10
WD CHKWG+1~, CHKWG+3*
WG CHKWG+1~, CHKWG+2*, CHKWG+3, PADEWD+2~, PADEWD+4*, PADEWD+5, PADEWD+7
WG( CHKWG+3*, CHKWG+4
X PROMPT+6~, PROMPT+28, PROMPT+31, PROMPT+32!, PROMPT+35!, PROMPT+37, PROMPT+41, PROMPT+42, PSDRUG+11*
Y PROMPT+6~, SELECT+10, SELSRCH+8~, SELSRCH+14, SELSRCH+26, SELSRCH+27, SELSRCH+41, SELSRCH+46~, SELSRCH+47, PSDRUG+14
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 |  Local Variables  | All