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

Package: Drug Accountability

Routine: PSAOUT


Information

PSAOUT ;BHM/DB/PWC - Return Drugs to Manufacturer ;23 FEB 04

Source Information

Source file <PSAOUT.m>

Call Graph

Call Graph

Call Graph Total: 9

Package Total Call Graph
VA FileMan 5 (,DD)^%DT  (C,NOW)^%DTC  (,FIND)^DIC  ^DIE  ^DIR  
Kernel 3 (,HOME)^%ZIS  ^%ZISC  ^%ZTLOAD  
Drug Accountability 1 ORDER^PSALOC  

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

Package Total Caller Graph
Drug Accountability 1 PSA OUTDATED MEDICATIONS  

Entry Points

Name Comments DBIA/ICR reference
INDEX ;DRUG FILE LOOKUP USING "C" INDEX
HDR
LOC
DONE
PRINT ;Print data
FIND
DRG
CON
NONDRUG
BEGIN
RPT ;print report
QTY
1 ;Select Drug
ASKD
PSTRAN
PROCEED ;On to the next series of questions
NDC ;DRUG LOOKUP USING THE NDC INDEX
UPDT
Q
START ;
IEN
FOUND ;Might have match
ENDDT
EORPT
OK
BGNDT
OU
LOOP ;Loop through "AC" xref

External References

Name Field # of Occurrence
^%DT BGNDT, ENDDT
DD^%DT RPT+3, ENDDT, START+2, START+3, START+5, BEGIN
C^%DTC RPT+3
NOW^%DTC FIND+1, RPT+3, ENDDT, START+4, BEGIN
^%ZIS ENDDT+3
HOME^%ZIS ENDDT+5
^%ZISC EORPT
^%ZTLOAD ENDDT+5
^DIC 1+9, OU, FIND+2, PSTRAN+1, INDEX+11
FIND^DIC NDC+5, INDEX+3
^DIE PSTRAN+2, UPDT+2
^DIR PSAOUT+8, OK, CON, QTY, OU+2, UPDT+4, NDC+11, INDEX+9, DONE+1, RPT+2
, BEGIN+16, NONDRUG+1, HDR
ORDER^PSALOC PSAOUT+9

Interaction Calls

Name Line Occurrences
Function Call: READ
  • Prompt: "Scan Drug barcode or enter a drug name : "
  • Formatting: !!
  • Timeout: DTIME
  • Variable: AN
  • Line Location: 1+2
Function Call: WRITE
  • Prompt: "??"
  • Line Location: 1+2
Function Call: WRITE
  • Prompt: !!,"Sorry, I could not find a match. Please enter the drug name.",!!
  • Line Location: 1+10
Function Call: WRITE
  • Prompt: " ",$G(PSADRUGN)
  • Line Location: FOUND+1
Function Call: WRITE
  • Prompt: !!,"Sorry, Controlled Substances cannot be selected through this option."
  • Line Location: FOUND+2
Function Call: WRITE
  • Prompt: !,"ok, try again,",!
  • Line Location: OU+2
Function Call: WRITE
  • Prompt: !,"Updating Destruction holding file."
  • Line Location: OU+3
Function Call: WRITE
  • Prompt: !,"Updating Drug Accountability Transaction file."
  • Line Location: FIND+4
Function Call: WRITE
  • Prompt: !,"If you are returning the items to the manufacturer at this time, the program",!,"will add today's date to the item to show when it was actually returned.",!
  • Line Location: RPT+1
Function Call: WRITE
  • Prompt: !!,"Ending Date cannot be before the Start Date."
  • Line Location: ENDDT+1
Function Call: WRITE
  • Prompt: !
  • Line Location: ENDDT+3
Function Call: WRITE
  • Prompt: !,"NO DEVICE SELECTED.",!
  • Line Location: ENDDT+3
Function Call: WRITE
  • Prompt: @IOF,!!!,?25,"Items to be Returned Report",?70,"Page : ",$G(PG)
  • Line Location: PRINT+1
Function Call: WRITE
  • Prompt: !,?24,PSABEG(1)," thru ",PSAEND(1)
  • Line Location: PRINT+2
Function Call: WRITE
  • Prompt: !,?40-($L(PSALOCM)/2),PSALOCM
  • Line Location: PRINT+3
Function Call: WRITE
  • Prompt: !,"Printed on: ",PSADT(1),?50,"Printed by: ",$P($G(^VA(200,DUZ,0)),"^"),!
  • Line Location: PRINT+4
Function Call: WRITE
  • Prompt: "- "
  • Line Location: PRINT+5
Function Call: WRITE
  • Prompt: !,?50,"Total Dispense"
  • Line Location: PRINT+6
Function Call: WRITE
  • Prompt: !,"Drug Name",?30,"Containers",?50,"Units / Cost",?66,"Entered by",!
  • Line Location: PRINT+7
Function Call: WRITE
  • Prompt: "-"
  • Line Location: PRINT+7
Function Call: WRITE
  • Prompt: !
  • Line Location: BEGIN+8
Function Call: WRITE
  • Prompt: ?38,$J($P(PSADATA,"^",1),2)," (",$P(PSADATA,"^",8),")",?50,$J($P(PSADATA,"^",3),3)
  • Line Location: BEGIN+9
Function Call: WRITE
  • Prompt: ?55,$J(($P(PSADATA,"^",3)*$P(PSADATA,"^",9)),5,2)
  • Line Location: BEGIN+10
Function Call: WRITE
  • Prompt: ?64,PSANAME
  • Line Location: BEGIN+13
Function Call: WRITE
  • Prompt: " (",$E(DATA,4,5),"/",$E(DATA,6,7),"/",$E(X2,3,4),")"
  • Line Location: BEGIN+14
Function Call: WRITE
  • Prompt: !
  • Line Location: BEGIN+16
Function Call: WRITE
  • Prompt: !!,"End of report"
  • Line Location: EORPT+0
Function Call: WRITE
  • Prompt: !,"The item could not be found in the drug file.",!
  • Line Location: NONDRUG+0
Function Call: READ
  • Timeout: DTIME
  • Variable: AN
  • Line Location: ASKD+0
Function Call: WRITE
  • Prompt: !,PSADRUGN," //"
  • Line Location: ASKD+0
Function Call: WRITE
  • Prompt: " ok, press ENTER to confirm.",!
  • Line Location: ASKD+1
Routine Call
  • %ZIS
  • Line Location:
    • ENDDT+5
Routine Call
  • DIE
  • Line Location:
    • PSTRAN+2
    • UPDT+2
Routine Call
  • DIR
  • Line Location:
    • PSAOUT+8
    • OK
    • CON
    • QTY
    • OU+2
    • UPDT+4
    • NDC+11
    • INDEX+9
    • DONE+1
    • RPT+2
    • BEGIN+16
    • NONDRUG+1
    • HDR
Routine Call
  • %ZIS
  • Line Location:
    • ENDDT+3
Routine Call
  • DIC
  • Line Location:
    • 1+9
    • OU
    • FIND+2
    • PSTRAN+1
    • INDEX+11
Routine Call
  • DIC
  • Line Location:
    • NDC+5
    • INDEX+3

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^PSDRUG - [#50] Classic Fileman Calls,  FIND^DIC
^DIC(51.5 - [#51.5] Classic Fileman Calls
^PSD(58.81 - [#58.81] Classic Fileman Calls

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^DIC(51.5 - [#51.5] CON+2
^PS(59.4 - [#59.4] PRINT+3
^PSD(58.8 - [#58.8] PRINT+3
^PSD(58.81 - [#58.81] PSTRAN*
^PSD(58.86 - [#58.86] OU+4, FIND*, FIND+3, UPDT+1*, UPDT+2*, LOOP+2, LOC, DRG, IEN, IEN+1
, IEN+4, IEN+5, IEN+6*
^PSDRUG - [#50] 1+7, FOUND+1, FOUND+2, CON+2, CON+3, BEGIN+7
^PSDRUG("C" 1+4
^PSDRUG("NDC" 1+3, NDC+4
^PSRX - [#52] 1+6
^VA(200 - [#200] PRINT+4, BEGIN+11
^XTMP("PSAOUT" UPDT+3*, START+1!, START+4*, IEN+5*, BEGIN+3, BEGIN+5, BEGIN+6, BEGIN+16, Q+2!

Label References

Name Line Occurrences
1 1+2, 1+10, FOUND+2, OK+2, UPDT+5, NONDRUG+2
ASKD ASKD+1
BEGIN LOOP+2
CON OU+2, ASKD
DONE 1+2, 1+3, 1+4, 1+5, 1+8, OK, CON, QTY, OU, UPDT+4
DRG IEN
ENDDT ENDDT+1
EORPT BEGIN+3
FIND FIND
FOUND 1+3, 1+4, 1+5, 1+6, 1+7, 1+8
HDR BEGIN+15
IEN IEN+2, IEN+7
INDEX 1+4
LOC DRG
LOOP LOC
NDC 1+3, 1+5
PRINT BEGIN+4, HDR+1
PROCEED OK+1
PSTRAN PSTRAN
Q PSAOUT+7, PSAOUT+8, OU+2, DONE, DONE+1, RPT+2, BGNDT, ENDDT, ENDDT+3, ENDDT+5
, NONDRUG+1, ASKD+1
RPT PSAOUT+8

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
>> % FIND+1, ENDDT, START+4, BEGIN
>> %DT BGNDT*, ENDDT*
>> %DT("A" BGNDT*, ENDDT*
>> %DT("B" RPT+3*, ENDDT*
>> %ZIS ENDDT+3*
AN 1+2*, 1+3, 1+4, 1+5, 1+6, 1+7, 1+9, FOUND+2!, NDC+3, NDC+10
, INDEX+3, INDEX+8, INDEX+11, Q!, NONDRUG+3, ASKD*, ASKD+1
DA FIND+2!, PSTRAN+2*, UPDT!*, UPDT+1, UPDT+2!, UPDT+4!, Q!, HDR!
DATA BEGIN+13*, BEGIN+14, Q!
DIC 1+9*!, OU!*, FIND+2!*, PSTRAN+1*!, INDEX+11*!, Q!
DIC("A" 1+9*, OU*, INDEX+11*
DIC("B" FOUND+1*, OU*
DIC("S" 1+9*, INDEX+11*
DIC(0 1+9*, OU*, FIND+2*, PSTRAN+1*, INDEX+11*
DIE PSTRAN+2*, UPDT!*, UPDT+2!, Q!
>> DILOCKTM OU+4
DINUM FIND+2*!, PSTRAN+1*
DIR PSAOUT+8!, OK!, CON!, QTY!, OU+2!, UPDT+4!, NDC+1~, INDEX+1~, DONE+1!, RPT+2!
, BEGIN+16!, Q!, NONDRUG+1!, HDR!
DIR("A" OK*, CON*, QTY*, OU+2*, DONE+1*, RPT+2*, NONDRUG+1*
DIR("B" OK*, OU+2*, DONE+1*, RPT+2*, NONDRUG+1*
DIR(0 PSAOUT+8*, OK*, CON*, QTY*, OU+2*, UPDT+4*, NDC+11*, INDEX+9*, DONE+1*, RPT+2*
, BEGIN+16*, NONDRUG+1*, HDR*
DIRUT PSAOUT+8, OK, CON, QTY, OU+2, DONE+1, RPT+2, Q!, NONDRUG+1
DLAYG0 PSTRAN+1*, Q!
DLAYGO FIND+2!*, PSTRAN+1!
DR OU*, PSTRAN+2*, UPDT!*, UPDT+2!, Q!
DTIME 1+2, ASKD
DTOUT BGNDT, ENDDT, Q!
DUOUT 1+3, 1+4, 1+5, 1+8, NDC+12, INDEX+10, Q!
DUZ PRINT+4
IO ENDDT+6
IO("Q" ENDDT+3!, ENDDT+4
IOF PRINT+1
IOM PRINT+5, PRINT+7
IOSL BEGIN+15
IOST BEGIN+16, HDR
PG START+1*, PRINT+1*, BEGIN+4*, Q!, HDR
>> POP ENDDT+3
PSA Q!
PSA( IEN+3*
PSA(1 IEN+5
PSA(10 IEN+5
PSA(12 IEN+5
PSA(14 IEN+5
PSA(2 IEN+4*, IEN+5
PSA(3 IEN+5
PSA(7 IEN+5
PSA(8 IEN+5
PSA(9 IEN+5
PSABEG BGNDT+1*, ENDDT+1, START+2, Q!
PSABEG(1 START+2*, PRINT+2
PSACHK Q!
PSACNT PSAOUT+6*, 1+2*, UPDT+3, DONE, Q!
PSACOMB Q!
PSACON CON*, UPDT, UPDT+3, Q!
PSADATA IEN+1*, IEN+3, BEGIN+6*, BEGIN+9, BEGIN+10, BEGIN+11, BEGIN+13, Q!
PSADATA2 IEN+1*, IEN+2, Q!
PSADRG 1+1!, 1+3, 1+4, 1+5, 1+6*, 1+7*, 1+8, 1+9*, FOUND+1, FOUND+2!
, CON+2, CON+3, UPDT, UPDT+1, UPDT+3, NDC+6*, NDC+12*, INDEX+4*, INDEX+10*, INDEX+11*
, LOC*, DRG*, IEN, Q!, NONDRUG+3*
PSADRUGN FOUND+1*, FOUND+2!, UPDT+1, BEGIN+6*, BEGIN+7, BEGIN+8, Q+1!, NONDRUG+3*, ASKD, ASKD+1*
PSADT FIND+1*, START+2*, LOOP+2*, LOC, DRG, IEN, IEN+5, Q+1!
PSADT(1 PRINT+4, BEGIN*
PSAEND ENDDT+2*, START+3*, LOOP+2, Q+1!
PSAEND(1 START+3*, PRINT+2
PSAHLD FIND*, FIND+2, UPDT, UPDT+2, Q+1!
PSAIEN PSTRAN*, PSTRAN+1, PSTRAN+2, DRG*, IEN*, IEN+1, IEN+4, IEN+5, IEN+6, BEGIN+4*
, BEGIN+5*, BEGIN+6, Q+1!
PSAINDX 1+1!, 1+4, 1+5, 1+8, NDC+2*, INDEX+2*, Q+1!
PSAISITN Q+1!
PSAITY Q+1!
PSALL1 PRINT+3*, Q+2!
PSALOC PRINT+3, BEGIN+3*, BEGIN+5, BEGIN+6, BEGIN+16, Q+1!
PSALOC1 LOOP+3*, LOC*, DRG, IEN, Q+1!
PSALOCA Q+1!
PSALOCM PRINT+3*, Q+2!
PSALOCN Q+1!
PSAMNU Q+1!
PSANAME BEGIN+11*, BEGIN+12*, BEGIN+13, Q+1!
PSANDC 1+3*, NDC+3*, NDC+4, NDC+5, Q+1!
PSANM1 BEGIN+12*, Q+1!
PSANM2 BEGIN+12*, Q+1!
PSANUM Q+2!
PSAONE Q+2!
PSAOSITN Q+2!
PSAOU CON+1!, CON+2*, UPDT+3, Q+2!
PSAOU(1 CON+2*, OU, OU+1*, UPDT
PSAOUT NDC+1~, INDEX+1~, ENDDT*, BEGIN+3, Q+2!, HDR*
PSAOUT("DILIST" NDC+6, NDC+7, NDC+9, NDC+10, NDC+11, NDC+12, INDEX+4, INDEX+5, INDEX+7, INDEX+8
, INDEX+9, INDEX+10
PSAPDUOU CON+3*, Q+2!
PSAQTY QTY*, UPDT, UPDT+3, Q+2!
PSARET RPT+2*, IEN+6, Q+2!
PSARETD START+4*, START+5*, IEN+6, Q+2!
PSARX 1+6*, Q+2!
TMP1 NDC+1~, NDC+8*, NDC+9*, NDC+10, INDEX+1~, INDEX+6*, INDEX+7*, INDEX+8
U UPDT
X 1+9*, FOUND+2!, OU!, FIND+2*, PSTRAN+1*, INDEX+11*, RPT+3, BGNDT, ENDDT, ENDDT+4*
, IEN+3*, PRINT+5*, PRINT+7*, BEGIN+3*, Q+2!
X1 RPT+3*, Q+2!
X2 RPT+3*, BEGIN+13*, BEGIN+14, Q+2!
XX BEGIN+5*, Q+2!
Y PSAOUT+8, 1+9, OK+1, CON, QTY, OU!, OU+2, UPDT+4, NDC+1~, NDC+12
, INDEX+1~, INDEX+10, INDEX+11, DONE+1, RPT+2, RPT+3*, BGNDT, BGNDT+1, ENDDT*, ENDDT+1
, ENDDT+2, START+2*, START+3*, START+4*, START+5!, BEGIN*, Q+2!, NONDRUG+2, HDR
Y(0 OU+1
ZTDESC ENDDT+4!*
ZTDTH ENDDT+4!*
ZTIO ENDDT+4!
ZTRTN ENDDT+4!*
ZTSAVE ENDDT+4!
ZTSAVE( ENDDT+4*
ZTSK ENDDT+4!
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