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

Package: Outpatient Pharmacy

Routine: PSODRG


Information

PSODRG ;IHS/DSD/JCM - ORDER ENTRY DRUG SELECTION ;10/23/18 8:47am

Source Information

Source file <PSODRG.m>

Call Graph

Call Graph

Call Graph Total: 29

Package Total Call Graph
Outpatient Pharmacy 15 ($$RXRLDT,$$STATUS)^PSOBPSUT  ^PSOBUILD  ^PSOCLO1  CK^PSOCROC  HD^PSODDPR2  DATACK^PSODDPRE  ^PSODGAL1  JUMP^PSODIR1  
($$GETNDC,NDCEDT)^PSONDCUT  TD^PSONFI  $$CSBLOCK^PSOORNEW  ALLERGY^PSOORUT2  $$FIND^PSOREJUT  (,DUPINV,EN1)^PSORXI  PRFLP^PSOUTL  
VA FileMan 6 LIST^DIC  MIX^DIC1  ^DIE  $$GET1^DIQ  ^DIR  ^DIWP  
Pharmacy Data Management 4 ($$PROMPT,EN)^PSSDIN  IN^PSSHRQ2  $$GETNDC^PSSNDCUT  ($$HAZ,HAZWARNG)^PSSUTIL  
Order Entry Results Reporting 2 ($$AOC,$$DOC,$$GOC)^OROCAPI  $$OITM^ORX8  
Kernel 1 $$REPEAT^XLFSTR  
Registration 1 DEM^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: 21

Package Total Caller Graph
Outpatient Pharmacy 20 PSOBKDED  PSOCAN2  PSOCROC  PSODDPR5  PSODIR5  PSODRGN  PSOERXU4  PSONEW1  
PSONEW3  PSOORED2  PSOORED6  PSOORED7  PSOOREDT  PSOORNE1  PSOORNE2  PSOORNEW  
PSOORNW1  PSORENW0  PSORENW4  PSOVER1  
Order Entry Results Reporting 1 ORKLR  

Entry Points

Name Comments DBIA/ICR reference
START ;
END ;D EOJ
SELECT ;
SELECTX
NDC(RX,RFL,DRG,NDC) ; Editing NDC for Released Rx's or for Unresolved ECME Rejects
TRADE ;
TRADEX
SET ;
SETX
NFI ;display restriction/guidelines
POST ;order checks
POSTX ;
EOJ ;
WAIT ;
CLOZ ;
EN(DRG) ;returns lab test identified for clozapine order checking
  • ICR #3478
    • Status: Active
    • Usage: Private
    NOALRGY ;
    WRAPTEXT(TEXT,LIMIT,CSPACES) ;Wrap text util copied in from a PSO routine originally *524

    External References

    Name Field # of Occurrence
    LIST^DIC EN+2
    MIX^DIC1 SELECT+13
    ^DIE NOALRGY+25
    $$GET1^DIQ SELECT+2, SET+4, SET+5, SET+8, SET+11, SET+13, SET+17, SET+18, SET+19, POST+28
    CLOZ+1, EN+1, NOALRGY+22
    ^DIR START+6, TRADE+2, POST+11, WAIT+2, NOALRGY+5, NOALRGY+12, NOALRGY+15
    ^DIWP POST+46, POST+58, POST+68
    $$AOC^OROCAPI POST+43
    $$DOC^OROCAPI POST+55
    $$GOC^OROCAPI POST+65
    $$OITM^ORX8 POST+54
    $$RXRLDT^PSOBPSUT NDC+7
    $$STATUS^PSOBPSUT NDC+8
    ^PSOBUILD POST+24
    ^PSOCLO1 CLOZ+3
    CK^PSOCROC POST+75
    HD^PSODDPR2 POST+23, POST+27, POST+30, POST+33, POST+42, POST+47, POST+51, POST+57, POST+59, POST+63
    POST+69, POST+73, POST+80, NOALRGY+1
    DATACK^PSODDPRE POST+18
    ^PSODGAL1 POST+34
    JUMP^PSODIR1 SELECT+10
    $$GETNDC^PSONDCUT NDC+1, NDC+11
    NDCEDT^PSONDCUT NDC+12
    TD^PSONFI NFI+2
    $$CSBLOCK^PSOORNEW START+6
    ALLERGY^PSOORUT2 POST+32
    $$FIND^PSOREJUT NDC+8
    ^PSORXI NOALRGY+7, NOALRGY+27
    DUPINV^PSORXI NOALRGY+9
    EN1^PSORXI NOALRGY+26
    PRFLP^PSOUTL POST+37
    $$PROMPT^PSSDIN NFI+1
    EN^PSSDIN NFI+1
    IN^PSSHRQ2 POST+16
    $$GETNDC^PSSNDCUT SET+10
    $$HAZ^PSSUTIL POST+2
    HAZWARNG^PSSUTIL POST+5
    DEM^VADPT POST+57
    $$REPEAT^XLFSTR WRAPTEXT+8, WRAPTEXT+13

    Interaction Calls

    Name Line Occurrences
    Function Call: WRITE
    • Prompt: !
    • Line Location: START+6
    Function Call: READ
    • Variable: X
    • Timeout: $S($D(DTIME):DTIME,1:300)
    • Line Location: SELECT+4
    Function Call: WRITE
    • Prompt: !!,"Answer with DRUG NUMBER, or GENERIC NAME, or VA PRODUCT NAME, or",!,"NATIONAL DRUG CLASS, or SYNONYM"
    • Line Location: SELECT+7
    Function Call: WRITE
    • Prompt: #,$C(7),LL,!
    • Line Location: POST+7
    Function Call: WRITE
    • Prompt: $J("***** WARNING *****",47)
    • Line Location: POST+8
    Function Call: WRITE
    • Prompt: !
    • Line Location: POST+9
    Function Call: WRITE
    • Prompt: LL,!
    • Line Location: POST+10
    Function Call: WRITE
    • Prompt: !,"Now doing allergy checks. Please wait...",!
    • Line Location: POST+31
    Function Call: WRITE
    • Prompt: !!,"***Dangerous Meds for Patient >64***",!!
    • Line Location: POST+57
    Function Call: WRITE
    • Prompt: !
    • Line Location: POST+81
    Function Call: WRITE
    • Prompt: !
    • Line Location: WAIT+1
    Function Call: WRITE
    • Prompt: $C(7),!,"There is no allergy assessment on file for this patient."
    • Line Location: NOALRGY+10
    Function Call: WRITE
    • Prompt: !,"You will be prompted to intervene if you continue with this prescription"
    • Line Location: NOALRGY+11
    Function Call: WRITE
    • Prompt: !
    • Line Location: NOALRGY+12
    Function Call: WRITE
    • Prompt: !,$$REPEAT^XLFSTR(" ",CSPACES)
    • Line Location: WRAPTEXT+8
    Function Call: WRITE
    • Prompt: !,$$REPEAT^XLFSTR(" ",CSPACES)
    • Line Location: WRAPTEXT+13
    Function Call: WRITE
    • Prompt: NEXTWORD_" "
    • Line Location: WRAPTEXT+14
    Routine Call
    • DIC
    • Line Location:
      • EN+2
    Routine Call
    • DIE
    • Line Location:
      • NOALRGY+25
    Routine Call
    • DIR
    • Line Location:
      • START+6
      • TRADE+2
      • POST+11
      • WAIT+2
      • NOALRGY+5
      • NOALRGY+12
      • NOALRGY+15

    FileMan Files Accessed Via FileMan Db Call

    FileNo Call Tags
    ^PSDRUG - [#50] GET1^DIQ
    50.02 LIST^DIC
    ^PSRX - [#52] Classic Fileman Calls,  GET1^DIQ

    Global Variables Directly Accessed

    Name Line Occurrences  (* Changed,  ! Killed)
    ^%ZOSF("TEST" CLOZ+3
    ^PSDRUG - [#50] SET+15, SET+16
    ^TMP("PSODAOC" POST+13!, POST+15*, POST+19*, POST+49*, POST+61*, POST+71*
    ^TMP("PSORXDC" POST+13!
    ^TMP($J POST+13!, POST+16*, POST+17, POST+19, POST+20!, POSTX+1!, NOALRGY+3
    ^UTILITY($J POST+46!, POST+47, POST+48!, POST+58!, POST+59, POST+60!, POST+68!, POST+69, POST+70!
    ^XTMP("ORRDI" POST+15

    Label References

    Name Line Occurrences
    @( START+2, POST+25, POST+81
    CLOZ POST+28
    END START+3, START+6, START+12, START+17
    NDC START+13
    NFI START+19
    NOALRGY POST+32
    POST START+20
    POSTX POST+21, POST+26, POST+29, POST+35, POST+38, POST+39, POST+77
    SELECT SELECT+6, SELECT+7, SELECT+15, SELECT+16
    SELECTX SELECT+8, SELECT+9, SELECT+10, SELECT+14
    SET START+18
    SETX SET+15
    TRADE START+16, SELECT+19
    TRADEX TRADE+4
    WRAPTEXT POST+9

    Local Variables

    Legend:

    >> Not killed explicitly
    * Changed
    ! Killed
    ~ Newed

    Name Field # of Occurrence
    ANQRTN CLOZ+1*, CLOZ+2, CLOZ+4!
    ANQX CLOZ+1*, CLOZ+3, CLOZ+4!
    AOC POST+41~, POST+43*, POST+46, POST+49
    CLOZPAT SELECT+1!
    CNT EN+3!, EN+4!
    >> COPY POST+25, POST+81
    COUNT WRAPTEXT+3~, WRAPTEXT+9*, WRAPTEXT+10
    CROCPFLG POST+41~*, POST+44*, POST+56*, POST+66*, POST+75!, POST+76!
    CSPACES WRAPTEXT~, WRAPTEXT+6*, WRAPTEXT+8, WRAPTEXT+13
    D SELECT+11*, SELECT+13!
    DA START+2, TRADE+1!, TRADEX+1!, POSTX+1!, NOALRGY+24*
    DFN POST+57*, POST+76!, CLOZ+2*, CLOZ+4!
    DIC SELECT+2!, SELECT+11*, SELECT+13!, TRADE+1!, TRADE+2!
    DIC("S" SELECT+12*
    DIC("T" SELECT+11*
    DIC(0 SELECT+11*
    DIE TRADEX+1!, NOALRGY+24*
    DIR START+6!, TRADE+1!, TRADE+2!, POST+11!, POST+17!, WAIT+1!, WAIT+2!, NOALRGY+2~, NOALRGY+12!
    DIR("?" POST+11*, WAIT+1*
    DIR("A" POST+11*, WAIT+1*, NOALRGY+4*, NOALRGY+12*, NOALRGY+15*
    DIR("B" TRADE+2*, NOALRGY+4*, NOALRGY+15*
    DIR(0 START+6*, TRADE+2*, POST+11*, WAIT+1*, NOALRGY+2*, NOALRGY+12*
    DIRUT TRADE+3!, TRADE+4, TRADEXTRADEX+1!, WAIT+2!
    DIWF POST+46*, POST+58*, POST+68*, POST+76!
    DIWL POST+46*, POST+58*, POST+68*, POST+76!
    DIWR POST+46*, POST+58*, POST+68*, POST+76!
    DR TRADEX+1!, NOALRGY+24*
    DRG NDC~, NDC+12, EN~, EN+1, EN+2
    DRGIEN START+5~*, START+6
    DTIME SELECT+4
    DTOUT SELECT+4*, SELECT+9, SELECT+14, SELECTX!, TRADE+4, TRADEX+1!, NOALRGY+14~, NOALRGY+16
    DUOUT SELECT+15!, SELECTX!, TRADE+4, TRADEX+1!, WAIT+2!, NOALRGY+14~, NOALRGY+16
    GOC POST+65~*, POST+68, POST+71
    HAZ POST+2~*
    HAZD POST+2~*, POST+3, POST+5
    HAZH POST+2~*, POST+3, POST+5
    HTXT POST+2~, POST+5, POST+9
    I EN+4*, EN+5, EN+6, EN+7!
    IOSL POST+23, POST+27, POST+30, POST+33, POST+42, POST+47, POST+51, POST+57, POST+59, POST+63
    POST+69, POST+73, POST+80, NOALRGY+1
    IT SELECT+2!, POST+14!, POSTX+1!
    LAB EN+1!
    LAB( EN+6*
    LAB("BAD TEST " , EN+3*
    LAB("NOT" EN+1*
    LABARR EN+2~
    LABARR("DILIST" EN+3, EN+4, EN+5, EN+6
    LABT EN+5*, EN+6, EN+7!
    LIMIT WRAPTEXT~, WRAPTEXT+5*, WRAPTEXT+13
    LINE WRAPTEXT+3~, WRAPTEXT+12*, WRAPTEXT+13!
    LIST POST+12~*, POST+13, POST+16, POST+17, POST+19, POST+20
    LL POST+2~, POST+6*, POST+7, POST+10
    NDC START+13~, START+14, NDC~, NDC+1*, NDC+11*, NDC+12
    NDF POST+22~
    NEXTWORD WRAPTEXT+3~, WRAPTEXT+10*, WRAPTEXT+11, WRAPTEXT+12, WRAPTEXT+14
    NFI NFI+1*, NFI+2, NFI+3!
    OI POST+54~*, POST+55
    OIR POST+54~, POST+55*, POST+58, POST+61
    >> OR0 SELECT+2
    >> P(5 CLOZ+2*, CLOZ+4!
    >> POERR SELECT+2, SELECT+10
    >> PSCAN( NOALRGY+21
    >> PSCAN(0 NOALRGY+19
    PSOCONT NDC+5~*, NDC+6, NDC+7*, NDC+8*
    >> PSODFN START+6, POST+43, POST+55, POST+57, POST+65, POSTX+1, CLOZ+2, NOALRGY+3
    >> PSODGCK POST+25, POST+37, POST+77, NOALRGY+12, NOALRGY+13
    >> PSODGCKX POST+34
    PSODIR SELECT+10!
    PSODIR("FIELD" SELECT+10
    PSODIR("FLD" SELECT+10*
    PSODLQT POST+14!
    PSODOSD POST+13!, POST+14!
    PSODRG EOJ+1!
    PSODRG("QFLG" START+1*, START+17, SELECT+10*, SELECT+17*
    >> PSODRUG("BAD" SELECT+2!
    >> PSODRUG("CLN" SET+8*
    >> PSODRUG("COST" SET+17*
    >> PSODRUG("DAW" SELECT+2!, SET+11*, SET+12*
    >> PSODRUG("DEA" SET+6*, POST+77
    >> PSODRUG("EXPI RATION DATE" , SET+19*
    >> PSODRUG("IEN" START+12, SELECT+3, SELECT+5, SET+2*, NFI+1, POST+2, POST+3, POST+4, POST+5, POST+28
    POST+49, POST+61, POST+71, CLOZ+1, CLOZ+2
    >> PSODRUG("MAXDOSE" SET+6*
    >> PSODRUG("NAME" SELECT+3, SET+3*, POST+65
    >> PSODRUG("NDC" START+14*, SELECT+2!, SET+10*
    >> PSODRUG("NDF" SET+5*, POST+43
    >> PSODRUG("OI" SET+4*, SET+5, NFI+1, POST+53, POST+54
    >> PSODRUG("OIN" SET+4*
    >> PSODRUG("SIG" SET+9*
    >> PSODRUG("STKLVL" SET+13*
    >> PSODRUG("TRAD E NAME" , SELECT+2!, TRADE+5*
    >> PSODRUG("UNIT" SET+18*
    >> PSODRUG("VA C LASS" , SET+2*, POST+77
    >> PSOEDIT START+2, START+20, SELECT+17
    PSOHZ SET+1~*, POST+3, POST+4*
    >> PSOLSTDR POST+3, POST+4*
    >> PSONCROC POST+75
    >> PSONEW("DFLG" START+1*, START+10*, START+17, START+20*, SELECT+9*, SELECT+14*, TRADE+4*
    >> PSONEW("FIELD" START+1*, START+16, SELECT+10*
    >> PSONEW("FLD" SELECT+10
    >> PSONEW("OLD V AL" , SELECT+3*, SELECT+17, SELECTX!
    PSONOAL POST+32*!
    >> PSONV NOALRGY+17, NOALRGY+26
    PSOQUIT POST+22!, POST+35, POSTX+2!
    >> PSOREINS POSTX+2
    >> PSORENW("DFLG" POST+39
    >> PSORX("DFLG" START+1!, START+20!, POST+21, POST+22*, POST+26, POST+29, POST+35, POST+38, POST+75, CLOZ+3*
    NOALRGY+8*, NOALRGY+18*
    >> PSORX("EDIT" START+12, START+16, START+20, TRADE+4
    >> PSORX("INTERVENE" POST+22!, POST+34!, POSTX+1!, NOALRGY+26*
    >> PSORXED SELECT+1, SELECT+8, POSTX+2
    >> PSORXED("DFLG" START+3, START+12, START+13*, START+17, SELECT+8*, TRADEX*, POST+21
    >> PSORXED("FLD" START+14*
    >> PSORXED("IRXN" START+13
    >> PSOSD POST+37
    >> PSOSITE NDC+12, SET+10
    >> PSOSPRNW POST+39
    >> PSOTRN TRADE+2
    PSOX1 SET+16*, SETX!
    PSOY START+5, START+12, START+13, SELECT+18!*, SET+2, SET+4, SET+5, SET+8, SET+10, SET+11
    SET+13, SET+15, SET+16, SET+17, SET+18, SET+19, SETX!
    PSOY(0 SELECT+18*, SELECT+19, SET+2, SET+3, SET+6, SET+9
    PSZZQUIT POSTX+1!, NOALRGY+17*
    PTR POST+22~
    >> REA NOALRGY+20
    RFL NDC~, NDC+1, NDC+7, NDC+8, NDC+11, NDC+12
    RX NDC~, NDC+1, NDC+7, NDC+8, NDC+11, NDC+12, NOALRGY+21
    RXIEN NOALRGY+14~, NOALRGY+21*, NOALRGY+22, NOALRGY+24
    RXSTA NOALRGY+14~, NOALRGY+22*, NOALRGY+23
    SIG POST+22~
    STAT SET+2~, POST+22~
    TEXT WRAPTEXT~, WRAPTEXT+4, WRAPTEXT+7, WRAPTEXT+10
    U START+5, SELECT+10, POST+2
    VAP POST+22~
    WORDS WRAPTEXT+3~, WRAPTEXT+7*, WRAPTEXT+9
    X SELECT+2!, SELECT+4*, SELECT+5*, SELECT+6, SELECT+7, SELECT+8, SELECT+9, SELECT+10, SELECTX!, TRADE+1!
    TRADE+3, TRADEX+1!, POST+46*, POST+58*, POST+68*, WAIT+2!, CLOZ+2*, CLOZ+4!
    Y START+6!, SELECT+2!*, SELECT+3*, SELECT+4, SELECT+5, SELECT+16, SELECT+17, SELECT+18, SELECTX!, TRADE+1!
    TRADE+3*, TRADE+5, TRADEX+1!, WAIT+2!, NOALRGY+6, NOALRGY+7, NOALRGY+16
    Y(0 SELECT+18
    ZDGDG POST+14!, POSTX+1!
    ZTHER POST+14!, POSTX+1!
    ZX POST+47*, POST+59*, POST+69*, POST+76!
    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