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

Package: Drug Accountability

Routine: PSALOCO


Information

PSALOCO ;BIR/MNT,DB-Set Up/Edit a Pharmacy Location ;7/23/97

Source Information

Source file <PSALOCO.m>

Call Graph

Call Graph Total: 10

Package Total Call Graph
Drug Accountability 5 GETDRUG^PSADRUGP  IV^PSAENTO  (,ADD,EXIT)^PSALOC  PSASETUP^PSALOC1  ^PSALOC2  
VA Fileman 4 ^DIC  FILE^DICN  ^DIE  ^DIK  
MailMan 1 $$MG^XMBGRP  

Caller Graph

Caller Graph Total: 1

Package Total Caller Graph
Drug Accountability 1 PSA MSG RECIPIENTS  

Entry Points

Name Comments DBIA/ICR reference
HDR
OPTASK
EOP
82
83
81
OPASK ;get Outpatient site(s)
WARD1 ;not currently assigned
1
3
2
5
4
7
6
9
8
NXT
ASK2
OPSITES ;
WARDASK
PSAOPT
WARDQ ;
Q
ADD
WARDLP
811
INPQ ;End loop through inpatient file
QUIT3
EDTWRD ;Edit Wards
QUIT4
QUIT5
10
INP
PSA10
HLP

External References

Name Field # of Occurrence
^DIC INPQ+5, OPASK+5, 10+1
FILE^DICN WARD1+5
^DIE INPQ+11, OPASK+9, 7+1, 9+1, 10+1
^DIK WARDASK+3
GETDRUG^PSADRUGP 83
IV^PSAENTO 5+1
^PSALOC OPTASK+3, 811
ADD^PSALOC OPTASK+2
EXIT^PSALOC Q
PSASETUP^PSALOC1 PSA10+1
^PSALOC2 1+1
$$MG^XMBGRP ADD

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: @IOF,!!,?20,"<<<< PHARMACY LOCATION OPTION SCREEN >>>>",!
  • Line Location: PSAOPT+0
Function Call: WRITE
  • Prompt: "="
  • Line Location: PSAOPT+0
Function Call: WRITE
  • Prompt: !!,"# OPTION NAME",!,"---------------",!,"1. CHANGE LOCATION TYPE",!,"2. CHANGE LOCATION NAME",!,"3. INPATIENT SITE SELECTION (not available for Outpatient locations)"
  • Line Location: PSAOPT+1
Function Call: WRITE
  • Prompt: !,"4. OUTPATIENT SITE SELECTION (not available for Inpatient locations)"
  • Line Location: PSAOPT+2
Function Call: WRITE
  • Prompt: !,"5. IV ROOM SETUP ",!,"6. WARD SETUP"
  • Line Location: PSAOPT+3
Function Call: WRITE
  • Prompt: !,"7. INACTIVATE PHARMACY LOCATION",!,"8. ADD/EDIT DRUGS",!,"9. SET MAINTAIN REORDER LEVELS FLAG"
  • Line Location: PSAOPT+4
Function Call: WRITE
  • Prompt: !,"10. REACTIVATE A PHARMACY LOCATION."
  • Line Location: PSAOPT+5
Function Call: WRITE
  • Prompt: !,"11. CREATE NEW PHARMACY LOCATION"
  • Line Location: PSAOPT+6
Function Call: READ
  • Timeout: DTIME
  • Variable: AN
  • Line Location: OPTASK+0
Function Call: WRITE
  • Prompt: !!,"Select Option Number: "
  • Line Location: OPTASK+0
Function Call: WRITE
  • Prompt: !,"Please enter a number between 1 & 11."
  • Line Location: OPTASK+0
Function Call: WRITE
  • Prompt: !,"The new location name must at least contain : "
  • Line Location: 2+1
Function Call: WRITE
  • Prompt: PSACHKR
  • Line Location: 2+1
Function Call: READ
  • Prompt: "Please enter the new name : "
  • Formatting: !
  • Timeout: DTIME
  • Variable: AN
  • Line Location: ASK2+0
Function Call: WRITE
  • Prompt: " ??? "
  • Line Location: ASK2+0
Function Call: WRITE
  • Prompt: !,"Sorry, the new name must start with "_PSACHKR
  • Line Location: ASK2+1
Function Call: WRITE
  • Prompt: !,"Sorry, this name is already setup."
  • Line Location: ASK2+2
Function Call: WRITE
  • Prompt: !!,"Sorry, Inpatient Site association is not permitted for an Outpatient Location"
  • Line Location: 3+1
Function Call: WRITE
  • Prompt: !,"Inpatient Site : ",$P($G(^PS(59.4,$P($G(PSALOCA(PSALOCN,PSALOC)),"^"),0)),"^")
  • Line Location: 3+5
Function Call: READ
  • Timeout: DTIME
  • Variable: AN
  • Line Location: 3+6
Function Call: WRITE
  • Prompt: !,"Change this site? NO// "
  • Line Location: 3+6
Function Call: WRITE
  • Prompt: !,"Answer 'Y' for yes to change which Inpatient Site is associated with this",!,"pharmacy location.",!
  • Line Location: 3+7
Function Call: WRITE
  • Prompt: !,"An Inpatient Site has not been identified for AR/WS.",!,"AR/WS dispensing data cannot be gathered"
  • Line Location: INPQ+1
Function Call: WRITE
  • Prompt: !,"Sorry, but this is the only inpatient site in the Inpatient Site file ? ",!
  • Line Location: INPQ+3
Function Call: WRITE
  • Prompt: !,"Already Assigned to : "_$P($G(^PSD(58.8,PSALOCI,0)),"^")
  • Line Location: INPQ+10
Function Call: WRITE
  • Prompt: !!,"Sorry, Outpatient Site association is not permitted for an Inpatient Location.",!
  • Line Location: 4+1
Function Call: WRITE
  • Prompt: !!,"Outpatient site selection affects the collection of dispensing data.",!,"When a prescription is released through Outpatient pharmacy, the data is stored "
  • Line Location: 4+4
Function Call: WRITE
  • Prompt: !,"then retrieved by the Drug Accountability back-ground job that runs each night.",!!
  • Line Location: 4+5
Function Call: WRITE
  • Prompt: !,"Primary Outpatient Site : ",$S($G(PSAOSIT)="":"Unknown",1:$G(PSAOSIT(1)))
  • Line Location: OPASK+2
Function Call: WRITE
  • Prompt: ?34,$P($G(^PS(59,PSAOSIT(X),0)),"^"),!
  • Line Location: OPASK+3
Function Call: WRITE
  • Prompt: !!,"Sorry, I cannot find an Inpatient Site associated with this location.",!
  • Line Location: 6+2
Function Call: WRITE
  • Prompt: !,"No wards are currently assigned to this location."
  • Line Location: 6+3
Function Call: WRITE
  • Prompt: !,PSALOCN," is set up to gather AR/WS dispensing data for : ",!!,$P($G(^PS(59.4,+PSAISIT,0)),U),","
  • Line Location: 6+4
Function Call: WRITE
  • Prompt: !
  • Condition for execution: $X+10>IOM
  • Line Location: 6+5
Function Call: WRITE
  • Prompt: $P($G(^DIC(42,+PSA(3),0)),U),$S($O(^PSD(58.8,+PSALOC,3,+PSA(3))):", ",1:".")
  • Line Location: 6+5
Function Call: READ
  • Prompt: "Do you want to add/edit the wards accociated with this location? NO // "
  • Formatting: !!
  • Timeout: DTIME
  • Variable: AN
  • Line Location: EDTWRD+1
Function Call: WRITE
  • Prompt: !,"Answer Yes, and we'll loop through the ward file, and either add new wards,",!,"or delete wards already associated with this location. "
  • Line Location: EDTWRD+2
Function Call: WRITE
  • Prompt: !,$P($G(^DIC(42,PSAWARD,0)),"^")
  • Line Location: WARDLP+0
Function Call: READ
  • Prompt: "Remove association with location? NO // "
  • Formatting: ?25
  • Timeout: DTIME
  • Variable: AN
  • Line Location: WARDASK+0
Function Call: WRITE
  • Prompt: !
  • Line Location: WARDASK+2
Function Call: WRITE
  • Prompt: ?(IOM-9),"removed"
  • Line Location: WARDASK+3
Function Call: WRITE
  • Prompt: ?30,"This ward is already associated with : "_$P($G(^PSD(58.8,$O(^PSD(58.8,"AB",PSAWARD,0)),0)),"^")
  • Line Location: WARD1+1
Function Call: READ
  • Prompt: "Add to location ? NO // : "
  • Formatting: ?40
  • Timeout: DTIME
  • Variable: AN
  • Line Location: WARD1+2
Function Call: WRITE
  • Prompt: !,"Do you want to add this ward to this location?"
  • Line Location: WARD1+3
Function Call: WRITE
  • Prompt: ?(IOM-7),"Adding"
  • Line Location: WARD1+5
Function Call: READ
  • Prompt: "Do you want to transfer drugs from another location? NO// "
  • Formatting: !
  • Timeout: DTIME
  • Variable: AN
  • Line Location: 81+0
Function Call: WRITE
  • Prompt: !,"Answer 'Y'es to transfer all the drugs from another location to this location.",!,"Please note that the drugs will be inactivated in the old location."
  • Line Location: 81+1
Function Call: READ
  • Timeout: DTIME
  • Line Location: 82+0
Function Call: WRITE
  • Prompt: !!,"Answer 'Y'es to transfer all the current information about the drug to the new",!," location.",!!
  • Line Location: 82+1
Function Call: WRITE
  • Prompt: !!,"Sorry, that is the current location."
  • Line Location: 811+0
Function Call: WRITE
  • Prompt: !,$P($G(^PSDRUG(X1,0)),"^")
  • Line Location: 811+1
Function Call: WRITE
  • Prompt: !,$P(^PSD(58.8,DA,0),"^")," Reactivated."
  • Line Location: 10+2
Function Call: WRITE
  • Prompt: @IOF,!,PSAHDR_" SCREEN",!
  • Line Location: PSA10+0
Function Call: WRITE
  • Prompt: "="
  • Line Location: PSA10+0
Function Call: READ
  • Timeout: DTIME
  • Variable: AN
  • Line Location: HLP+0
Function Call: WRITE
  • Prompt: !!,"Display help for which item # ?"
  • Line Location: HLP+0
Function Call: WRITE
  • Prompt: !
  • Line Location: EOP+0
Function Call: WRITE
  • Prompt: @IOF,!,PSAHDR_" for : "_PSALOCN,!
  • Line Location: HDR+0
Function Call: WRITE
  • Prompt: "="
  • Line Location: HDR+0
Function Call: WRITE
  • Prompt: !
  • Line Location: HDR+2
Function Call: WRITE
  • Prompt: !,$S($G(X6)>0:"Ok, addition completed.",1:"error in adding users ? "),!
  • Line Location: ADD+1
Routine Call
  • DIE
  • Line Location:
    • INPQ+11
    • OPASK+9
    • 7+1
    • 9+1
    • 10+1
Routine Call
  • DIC
  • Line Location:
    • INPQ+5
    • OPASK+5
    • 10+1

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^PSD(58.8 - [#58.8] Classic Fileman Calls
^PS(59.4 - [#59.4] Classic Fileman Calls

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^DIC(42 - [#42] 6+5, WARDLP
^PS(59 - [#59] OPASK+1, OPASK+3
^PS(59.4 - [#59.4] 3+4, 3+5, INP, 6+4
^PSD(58.8 - [#58.8] ASK2+2, ASK2+3*, ASK2+4!, ASK2+5*, INPQ+10, 6+3, 6+4, 6+5, WARDLP+1, WARD1+1
, 8+1, 811+1, 811+2*, 811+3*, 10+2!
^PSDRUG - [#50] 811+1

Label References

Name Line Occurrences
10 OPTASK+1
3 3+7
81 81+1
811 811
82 82+1
83 8+1, 81
@( OPTASK+3, HLP+1
ASK2 ASK2, ASK2+1, ASK2+2
EDTWRD EDTWRD+2
EOP 3+7, 811, 811+4, PSA10+1, NXT
HDR 1, 2, 3, 4, 5, 6, 7, 8
HLP OPTASK
INP 3+2, INP+1
INPQ INP
NXT 1+2, ASK2, ASK2+10, QUIT3, QUIT4, QUIT5, WARDQ+1, 7+2, 811+4, 83+1
, 9+2
OPSITES OPASK+3
OPTASK OPTASK, HLP, HLP+1
PSALOCO HLP, NXT
Q OPTASK, OPTASK+3, 81, 82, 811, 10+1
QUIT3 3+1, 3+6, 3+8, INPQ+1, INPQ+3, INPQ+4, INPQ+9
QUIT4 4+1, 4+2, OPASK+6, OPASK+11
WARD1 WARDLP+1, WARD1+3
WARDLP WARDASK+1, WARDASK+4, WARD1+1, WARD1+2, WARD1+4, WARD1+6
WARDQ 6+2, EDTWRD+1, EDTWRD+3, WARDLP, WARDASK, WARD1+2

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
AN OPTASK*!, OPTASK+1, ASK2*, ASK2+1, 3+6*, 3+7*, 3+8, EDTWRD+1*, EDTWRD+2*, EDTWRD+3
, WARDASK*, WARDASK+1, WARDASK+2, WARDASK+3, WARD1+2*, WARD1+3*!, WARD1+4, 81*, 81+1, 82*
, 82+1, 82+2, HLP*, HLP+1, EOP+1*
>> CNTR OPASK+12*, OPASK+13
DA INPQ+11*, OPASK+4!, OPASK+8*, WARDASK+3*, 7+1*, 9+1*!, 10+1*, 10+2
DA(1 OPASK+5*, WARDASK+3*, WARD1+5*
DIC INPQ+5*, INPQ+6!, OPASK+4!, OPASK+5*, WARD1+5*, 83!, 10*
DIC("A" INPQ+5*, OPASK+5*, 10*
DIC("S" INPQ+5*, 10*
DIC(0 INPQ+5*, OPASK+5*, WARDASK+3*, WARD1+5*, 10*
DIE INPQ+11*, OPASK+4!, OPASK+9*, 7+1*, 9+1*!, 10+1*
>> DIK WARDASK+3*
>> DINUM WARD1+5*
DIR OPASK+4!, 83!
DO OPASK+4!
DR INPQ+11*, OPASK+4!, OPASK+9*, 7+1*, 9+1*, 10+1*
DTIME OPTASK, ASK2, 3+6, EDTWRD+1, WARDASK, WARD1+2, 81, 82, HLP, EOP+1
>> DTOUT INPQ+6
>> DUOUT INPQ+6
DUZ ADD
IOF PSAOPT, PSA10, HDR
IOM PSAOPT, 6+5, WARDASK+3, WARD1+5, PSA10, HDR
IOSL EOP
>> NOMATCH OPASK+12*, OPASK+13
>> PSA(1 3+2*, 3+10*, INP*
>> PSA(2 3+2*, 3+10*, INP*, INPQ+1, INPQ+2, INPQ+3, INPQ+4
>> PSA(3 6+5*
>> PSAB INP*, INPQ+2
>> PSACHKR 2+1*, ASK2+1
>> PSAERR INPQ+6*, INPQ+7*, INPQ+9, INPQ+10*, INPQ+11, WARDASK*
>> PSAGROUP ADD
>> PSAHDR 1*, 2*, 3*, 4*, 5*, 6*, 7*, 8*, 9*, PSA10*
, HDR*
>> PSAISIT 3+3*, 3+4, INPQ+2*, INPQ+5*, INPQ+8*, INPQ+10, INPQ+11, 6+1*, 6+2, 6+4
>> PSAISIT(1 3+4*
>> PSAITY INPQ+7, 4+2
>> PSAIVCHG 3+9*, INPQ+3
PSALOC PSALOCO+10!, OPTASK+3, ASK2+3, ASK2+4, ASK2+5, ASK2+6, ASK2+7, ASK2+8, 3+2, 3+3
, 3+5, INPQ+11, 4+3, OPASK+5, OPASK+11, OPASK+13, 6+1, 6+3, 6+4, 6+5
, WARDLP+1, WARDASK+3, WARD1+1, WARD1+5, 7+1, 8+1, 811!*, 811+2, 811+3, 9+1
, OPSITES+2
>> PSALOC2 811*, 811+1, 811+2
>> PSALOCA( ASK2+6*, ASK2+7*, 3+2, 3+3, 3+5, INPQ+11*, 4+3, OPASK+11*, OPASK+13*, 6+1
, OPSITES+2
PSALOCB 811*!
>> PSALOCI INPQ+10*
>> PSALOCN 2+1, ASK2+4, ASK2+6, ASK2+7, ASK2+8, ASK2+9*, 3+1, 3+2, 3+3, 3+5
, INPQ+11, 4+1, 4+3, OPASK+11, OPASK+13, 6+1, 6+4, HDR, OPSITES+2
PSALOCN1 ASK2+1*, ASK2+2!, ASK2+3, ASK2+5, ASK2+6, ASK2+7, ASK2+8, ASK2+9!
>> PSAMNU( ASK2+8*!
>> PSANUM ASK2+8
PSAOPT OPTASK+1*, OPTASK+2, OPTASK+3, 83*!
>> PSAOSIT 4+3*, OPASK+1, OPASK+2, OPASK+3, OPASK+9*, OPASK+11, OPASK+12, OPASK+13
>> PSAOSIT( OPASK+3, OPASK+12, OPSITES+1!, OPSITES+2*
>> PSAOSIT(1 OPASK+1*, OPASK+2, OPASK+3, OPASK+9*
>> PSAOU INPQ+4*, INPQ+7*
>> PSATFER 82*, 82+2*, 811+2
>> PSAWARD 6+4*, EDTWRD+4*, WARDLP*, WARDLP+1, WARDASK+3, WARD1+1, WARD1+5
U 6+4, 6+5
>> X PSAOPT*, INPQ+6, OPASK+3*, OPASK+12*, WARD1+5*, PSA10*, HLP+1*, EOP*, HDR*, OPSITES+1*
, OPSITES+2*
>> X1 811+1*, 811+2, 811+3
>> X6 ADD*, ADD+1
>> XMY ADD
>> Y INPQ+4, INPQ+5, INPQ+7, INPQ+8, OPASK+6, OPASK+8, OPASK+9, 10+1
>> Y(0 OPASK+9
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