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

Package: Inpatient Medications

Routine: PSGVBW


Information

PSGVBW ;BIR/CML3,MV - VERIFY ORDERS BY WARD, WARD GROUP, PATIENT, OR PRIORITY ;10/22/98 3:14 PM

Source Information

Source file <PSGVBW.m>

Call Graph

Call Graph

Call Graph Total: 15

Package Total Call Graph
Inpatient Medications 11 ^PSGPER1  PRI^PSGSEL  (ENCV,ENKV)^PSGSETU  ^PSGVBW0  OUTPT^PSGVBW1  CNTORDRS^PSGVBWU  START^PSIVARH  ^PSIVXU  
^PSJAC  LOCKERR^PSJOE  ^PSJP  
VA FileMan 3 (C,NOW)^%DTC  ^DIC  ^DIR  
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: 5

Package Total Caller Graph
Inpatient Medications 5 PSGPR  PSGVBW1  PSJU OR PAT VBW  PSJU OR VBW  PSJU VBW  

Entry Points

Name Comments DBIA/ICR reference
START ; Lookup patient by ward group, ward, priority, or patient; depending on value of PSGSS
;
DONE ; Cleanup
DONE2 ; Partial Cleanup
GO ; Find and display matching patients
  • ICR #2169
    • Status: Pending
    • Usage: Private
    G ; Select a Ward Group
    GDIC ; Ward Group lookup
    C ; Select a Clinic
    CDIC ; Clinic lookup
    L ; Select a Clinic Group
    LDIC ; Clinic Group lookup
    W ; Select a Ward
    WDIC ; Ward lookup
    PR ; Select order priority
    P ; Select patient
    ARRAY ; put patient(s) with non-verified orders into array
    CG ; Find all clinics in selected clinic group
    CL ; Find all patients in selected clinic
    WD ; Find all patients in selected ward
    PRI ; Find orders with selected Priority
    ; Once a patient is identified in any status index ("I", "N", or "P"), all orders for that patient are checked in the
    ; IF subroutine. To prevent unnecessary duplication of processing, "PSGVBW3" node of ^TMP, sorted by patient, will be
    ; set when a patient's orders are processed, and checked for each status index. If patient exists in the "PSGVBW3" node,
    ; patient has already been processed, so quit.
    IF ;BHW;PSJ*5*155;Added PSGCLF and PS(53.1,"AD" Check below. If called from CL subroutine and the order Doesn't exist for that Clinic, then QUIT.;PSJ*5*241:Changed quit conditions
    IFT ; Loop through active UD orders in ^PS(55 that have not been verified by pharmacist.
    IFT2 ; Loop through active IV orders in ^PS(55 that have not been verified by pharmacist.
    SET ; Set patient specific variables for ^TMP subscripts
    SETPN ; If searching for specific priority:
    ; - set patient into ^TMP("PSGBW" sorted by Priority Name, Priority #, Team, Patient Name^IEN^SSN
    ; If not searching for specific priority:
    ; - set patient into ^TMP("PSGVBW2" sorted by 'Patient Name^IEN^SSN', then Priority
    ; - set patient into ^TMP("PSGVBW3" sorted by Patient IEN
    SET2 ; If not searching for a specific priority,find the highest priority order associated with patient.
    ; Set the patient into ^TMP("PSGVBW" sorted by highest Priority Name, Priority #, Team, Patient Name^IEN^SSN
    GTOOP ; Get 'Type Of Order' and Package
    GTPAC ; Prompt user for Package
    EXIT(X) ; Generic user error message
    TOH ; Help text

    External References

    Name Field # of Occurrence
    C^%DTC P+8, ARRAY+2, IF+17
    NOW^%DTC START+4, P+7, ARRAY+1
    ^DIC GDIC+1, CDIC+1, LDIC+1, WDIC+1, SET+5
    ^DIR START+8, G+2, C+2, L+2, W+2, PR+4, GTOOP+3, GTPAC+4
    ^PSGPER1 DONE+6
    PRI^PSGSEL START+12
    ENCV^PSGSETU START+2
    ENKV^PSGSETU DONE+6
    ^PSGVBW0 GO+4
    OUTPT^PSGVBW1 G+3, W+3
    CNTORDRS^PSGVBWU START+8
    START^PSIVARH GO+1
    ^PSIVXU START+3
    ^PSJAC P+6, CL+2, WD+3, PRI+6
    LOCKERR^PSJOE START+9
    ^PSJP P+1
    DEM^VADPT SETPN+5

    Interaction Calls

    Name Line Occurrences
    Function Call: WRITE
    • Prompt: !,"...a few moments, please..."
    • Line Location: GO+2
    Function Call: WRITE
    • Prompt: !,$C(7),"NO ",PSGVBWW," ORDERS FOR ",$S(PSGSS="P":"PATIENT",PSGSS="L":"CLINIC GROUP",PSGSS="C":"CLINIC",PSGSS="PR":"PRIORITY",1:"WARD"),$S(PSGSS="G":" GROUP",1:"")," SELECTED."
    • Line Location: GO+3
    Function Call: WRITE
    • Prompt: !
    • Line Location: G+2
    Function Call: WRITE
    • Prompt: !
    • Line Location: C+2
    Function Call: WRITE
    • Prompt: !
    • Line Location: L+2
    Function Call: WRITE
    • Prompt: !
    • Line Location: W+2
    Function Call: WRITE
    • Prompt: !!,"1) Non-Verified Orders",!,"2) Pending Orders",!!
    • Line Location: GTOOP+2
    Function Call: WRITE
    • Prompt: !!,"1) Unit Dose Orders",!,"2) IV Orders",!
    • Line Location: GTPAC+3
    Function Call: WRITE
    • Prompt: !
    • Line Location: GTPAC+4
    Function Call: WRITE
    • Prompt: !!,X," not selected, option terminated."
    • Line Location: EXIT+1
    Function Call: WRITE
    • Prompt: !!,"SELECT FROM:",!?5,"1 - NON-VERIFIED ORDERS",!?5,"2 - PENDING ORDERS"
    • Line Location: TOH+1
    Function Call: WRITE
    • Prompt: !!?2,"Enter '1' if you want to verify non-verified orders. Enter '2' if you",!,"want to complete pending orders. Enter '1,2' or '1-2' if you want to do both."
    • Line Location: TOH+2
    Routine Call
    • DIC
    • Line Location:
      • GDIC+1
      • CDIC+1
      • LDIC+1
      • WDIC+1
      • SET+5
    Routine Call
    • DIR
    • Line Location:
      • START+8
      • G+2
      • C+2
      • L+2
      • W+2
      • PR+4
      • GTOOP+3
      • GTPAC+4

    FileMan Files Accessed Via FileMan Db Call

    FileNo Call Tags
    ^DIC(42 - [#42] Classic Fileman Calls
    ^SC - [#44] Classic Fileman Calls
    ^PS(57.5 - [#57.5] Classic Fileman Calls
    ^PS(57.8 - [#57.8] Classic Fileman Calls

    Global Variables Directly Accessed

    Name Line Occurrences  (* Changed,  ! Killed)
    ^DIC(42 - [#42] WD+1
    ^DPT - [#2] SET+5
    ^DPT("CN" WD+2
    ^PS(51.1 - [#51.1] IF+22
    ^PS(53.1 - [#53.1] P+3, P+5, CL+2, WD+3, PRI+6, IF+1, IF+2, IF+3, IF+5, IF+11
    IF+12, IF+13, SET+2
    ^PS(53.45 - [#53.45] START+9, DONE+6
    ^PS(55 - [#55] P+9, P+10, WD+3, IF+18, IF+20, IF+21, IF+23, IFT+1, IFT2+2, IFT2+3
    ^PS(57.5 - [#57.5] ARRAY+3
    ^PS(57.7 - [#57.7] SET+6
    ^PS(57.8 - [#57.8] CG+1
    ^SC - [#44] CL+1
    ^TMP("PSGVBW" DONE2+1!, GO+2!, GO+3, ARRAY+2*, SETPN+8*, SET2+5*
    ^TMP("PSGVBW2" DONE2+1!, GO+2!, IF+10, IF+24, SETPN+9*, SET2+2, SET2+3, SET2+4, SET2+6!
    ^TMP("PSGVBW3" DONE2+1!, PRI+5!, PRI+6, PRI+7!, SETPN+9*
    ^TMP("PSJ" START+9!
    ^TMP("PSJLIST" DONE2+1!
    ^TMP("PSJON" DONE2+1!
    ^TMP("PSJSELECT" START+12!, DONE2+1!, P+1!, P+12*, P+14
    ^XTMP("PSJPVNV" START+5

    Label References

    Name Line Occurrences
    @( START+12
    ARRAY GO+2
    CG ARRAY+3
    CL ARRAY+3, CG+1
    DONE START+9
    DONE2 DONE+1, GO+4
    EXIT GTOOP+4, GTOOP+7
    GO START+12
    GTOOP START+9
    GTPAC GTOOP+1, GTOOP+6
    IF ARRAY+2, CL+2, WD+3, PRI+6
    IFT P+9, IF+18
    IFT2 P+10, IF+23
    PRI ARRAY+3
    SET IF+3, IF+11, IF+18, IF+23
    SET2 IF+10, IF+24
    SETPN P+12
    WD ARRAY+3

    Naked Globals

    Name Field # of Occurrence
    ^(0 P+9, P+10, CL+1, WD+1, IF+18, IF+23

    Local Variables

    Legend:

    >> Not killed explicitly
    * Changed
    ! Killed
    ~ Newed

    Name Field # of Occurrence
    >> % START+4, P+7, ARRAY+1
    CG PSGVBW+7~, LDIC+1*, CG+1
    CHK DONE+3!, GO+2!
    CL PSGVBW+7~, CDIC+1*, CG+1*, CL+1, CL+2, IF+2
    D0 DONE+3!
    DIC GDIC+1!*, CDIC+1!*, LDIC+1!*, WDIC+1!*, SET+5!*
    DIC(0 GDIC+1*, CDIC+1*, LDIC+1*, WDIC+1*, SET+5*
    DIR START+6!, START+8!, G+1!, C+1!, L+1!, W+1!, PR+1!, GTOOP+3~, GTPAC+4!
    DIR("?" START+7*, G+2*, C+2*, L+2*, W+2*, PR+2*, PR+3*, GTOOP+3*, GTPAC+4*
    DIR("A" START+6*, G+1*, C+1*, L+1*, W+1*, PR+2*, GTOOP+3*, GTPAC+4*
    DIR("B" START+6*
    DIR(0 START+6*, G+1*, C+1*, L+1*, W+1*, PR+1*, GTOOP+3*, GTPAC+4*
    >> DIRUT START+8, START+9
    DRGI DONE+3!
    >> DUOUT START+8
    FQC DONE+3!
    IFPRI DONE+3!, IF+3*, IF+4, IF+5*
    J DONE+3!
    LIDT DONE+3!
    ND DONE+3!, DONE+6!, P+3*, IF+12*, IFT+1*, IFT2+2*, IFT2+3, IFT2+4
    ND0 PRI+5~
    NDP2 PRI+5~
    ON DONE+3!, GO+2!, P+3~*, P+9*, P+10*, IF+1*, IF+2, IF+3, IF+5, IF+11!
    IF+12*, IF+13, IF+15, IF+16*, IF+18*, IF+20*, IF+21, IF+23, IFT+1, IFT2+2
    IFT2+3, SET+2
    ORDT DONE+5!
    PN DONE+3!, GO+2!, P+12, SETPN+6*, SETPN+8, SETPN+9
    PPAGE PSGVBW+7~, START+12*
    PPN DONE+5!
    PRD DONE+5!, DONE2+2!, PR+4*, IF+5, IF+12, IF+14, IF+16, SET+4
    PRDNS DONE+5!
    PRDON DONE+5!, SET+1*, SET+2*, SET+3
    PRI DONE+3!
    PRIO IF+5~*
    PRIOAR IF+12~, IF+13*, IF+14, IF+15
    PRIOAR( IF+15*
    PRIOAR("A" IF+16
    PRIOAR("R" IF+16
    PRIOAR("S" IF+16
    PSGALL PRI+5~
    PSGCLF DONE+3!, CL+2*, CL+3!, IF+2
    >> PSGDT START+4*, P+7*, P+8, ARRAY+1*, ARRAY+2, WD+3, IF+17, IFT+1, IFT2+4
    PSGINCL DONE+5!
    PSGINWD DONE+5!
    PSGODDD DONE+4!
    PSGODT DONE+3!, P+8*, P+9, ARRAY+2*, IF+17*, IF+18
    PSGOEA DONE+3!
    PSGOEAV DONE+4!
    PSGOENOF DONE+4!
    PSGOEORF DONE+4!
    PSGONV DONE+4!
    PSGOP DONE+3!
    >> PSGP START+12*, P+1, P+3, P+5, P+9, P+10, ARRAY+2, CL+2*, WD+2*, WD+3
    PRI+6*, IF+1, IF+2, IF+11, IF+12, IF+18, IF+20, IF+21, IF+23, IFT+1
    IFT2+2, IFT2+3, SET+5, SETPN+6, SETPN+9
    >> PSGP(0 ARRAY+2, SETPN+5*, SETPN+6
    PSGPRD DONE+5!
    PSGPRIF START+12!, DONE+3!, PRI+6*, IF+4, IF+10, IF+24, SET+4, SETPN+8
    PSGPRIFZ PRI+5~
    PSGPRIN DONE+5!
    PSGPTMP PSGVBW+7~, START+12*
    PSGPX DONE+4!
    PSGPXN START+9*, START+10*, DONE+5!, DONE+6
    PSGSS START+12, DONE+3!, GO+2, GO+3, ARRAY+2, ARRAY+3, SETPN+7
    PSGSSH START+10*, DONE+3!
    PSGTOL DONE+4!
    PSGUOW DONE+4!
    PSGVBPN DONE+5!
    PSGVBTM DONE+5!
    PSGVBWN DONE+5!
    PSGVBWTO DONE+4!
    PSGVBWW START+11*, DONE+4!, GO+3, P+13, ARRAY+2*
    PSGVBY DONE+5!
    PSGWORP1 DONE+5!
    PSGWORP2 DONE+5!
    PSIVSN DONE+5!
    PSJASK DONE+4!
    PSJCNT DONE+5!, P+1*, P+12*
    PSJCT DONE+3!
    PSJINDEX DONE+5!
    >> PSJIRNF START+10, GTOOP+1, GTPAC+1, GTPAC+2
    PSJLM DONE+4!
    PSJNEW PSGVBW+7~*
    >> PSJNV P+2*, P+3*, P+6, P+9*, P+10*, P+11
    PSJOPC DONE+4!
    PSJORL DONE+4!
    PSJORPCL DONE+4!
    PSJORTOU DONE+4!
    PSJORVP DONE+4!
    PSJPAC DONE+5!, P+3, P+9, P+10, IF+6, IF+7, IF+8, IF+12, IF+18, IF+20
    GTOOP+1*, GTOOP+2*, GTOOP+7, GTPAC+1*, GTPAC+2*, GTPAC+5*
    >> PSJPAD P+9, P+10, IF+18, IF+20
    >> PSJPBID SETPN+6
    >> PSJPEN P+5*, P+11
    PSJPNV DONE+3!
    >> PSJPRB SET+6
    PSJPROT START+10*, DONE+4!
    >> PSJRNF START+10, GTOOP+1, GTPAC+1, GTPAC+2
    >> PSJSYSP START+9, DONE+6
    >> PSJSYSU START+10, IFT+1, IFT2+3, IFT2+4, GTOOP+1
    PSJTOO START+11, DONE+4!, P+11, ARRAY+2, IF+1, IF+9, GTOOP+1*, GTOOP+2*, GTOOP+5*, GTPAC+1
    GTPAC+2
    PTPRI DONE+2!, SET+3*, SET+4, SETPN+8, SETPN+9, SET2+3*, SET2+4, SET2+5
    PX DONE+4!
    RB DONE+3!, GO+2!
    SCH IF+21~*, IF+22*
    SD DONE+3!, GO+2!, P+9*, P+10*, IF+18*, IF+20*, IFT+1, IFT2+4
    SETPN DONE+2!, SET2+2*, SET2+3, SET2+4, SET2+5
    SETTM DONE+2!, SET2+4*, SET2+5
    SETWDN DONE+2!, SET2+4*, SET2+5
    ST DONE+3!, P+9*, IF+18*, IFT+1
    STATUS DONE+2!, PRI+6*
    STYPE IF+21~*, IF+22*, IF+23
    SUBS DONE+2!, SET2+4*
    TM DONE+3!, GO+2!, SET+6*, SETPN+8, SETPN+9
    TMPWD DONE+2!, SET+5!*, SET+6
    U P+3, P+12, IF+1, IF+3, IF+12, IF+13, IF+21, IF+22, SETPN+6
    >> VADM(1 SETPN+5
    WD START+12*, DONE+3!, GO+2!, WDIC+1*, ARRAY+3*, WD+1
    WDN DONE+3!, GO+2!, PR+4*, CL+1*, WD+1*, WD+2, IF+1, IF+12, SETPN+8, SETPN+9
    WDNAME DONE+3!, SET+5!*
    WG START+12*, DONE+3!, GO+2!, GDIC+1*, ARRAY+3
    X GO+2!, GDIC+2, CDIC+2, LDIC+2, WDIC+2, P+8, P+11*, P+12, ARRAY+2, IF+3*
    IF+7, IF+8, IF+11*, IF+12, IF+17, SET+5!*, EXIT~, EXIT+1
    >> X1 P+8*, ARRAY+2*, IF+17*
    >> X2 P+8*, ARRAY+2*, IF+17*
    XQUIT START+2!, START+3!
    XX P+3~*, IF+11~*, IF+12*, IF+14*
    Y START+8, START+12, GO+2!, G+3, GDIC+1, CDIC+1, LDIC+1, W+3, WDIC+1, PR+4
    P+14*, IF+3*, IF+6*, IF+7*, IF+8*, SET+5!, GTOOP+4, GTOOP+5, GTPAC+5
    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