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 |  Marked Items |  All
Print Page as PDF
Routine: PSGSICHK

Package: Inpatient Medications

Routine: PSGSICHK


Information

PSGSICHK ;BIR/CML3-CHECKS SPECIAL INSTRUCTIONS ;19-Oct-2017 12:55;PT

Source Information

Source file <PSGSICHK.m>

Call Graph

Call Graph Total: 14

Package Total Call Graph
Inpatient Medications 5 ($$ENDTC,$$ENMRN)^PSGMI  (ENCV,ENKV)^PSGSETU  (ORDCHK,PAUSE)^PSJLMUT1  $$DRUGNAME^PSJLMUTL  ^PSJRXI  
VA Fileman 4 NOW^%DTC  EN^DDIOL  IX^DIC  ^DIR  
Adverse Reaction Tracking 3 EN1^GMRADPT  ($$ORCHK,GETDATA)^GMRAOR  EN1^GMRAOR2  
Order Entry Results Reporting 1 ($$HAVEHDR,HAVEHDR)^ORRDI1  
Outpatient Pharmacy 1 EN^PSOORDRG  

Caller Graph

Caller Graph Total: 36

Package Total Caller Graph
Inpatient Medications 36 *DRUG  ORDERABLE ITEM  PSGAP0  PSGAPIV  PSGAXR  PSGCAP0  PSGCAPIV  PSGDS0  
PSGLOI  PSGO  PSGOE3  PSGOE41  PSGOE7  PSGOE81  PSGOE82  PSGOE91  
PSGOEF1  PSGOEPO  PSGOER  PSGOES  PSGOESF  PSGOETO1  PSGORVW  PSGPER0  
PSGPER2  PSGPLR0  PSGVW  PSIVEDRG  PSJCOMR  PSJLIFNI  PSJLMGUD  PSJMPRT  
PSJO  PSJO2  PSJU INQ DRUG  PSJUTL  

Entry Points

Name Comments DBIA/ICR reference
ALGC2 ;
PDWCHK(DFN,ON) ; Print Dup Drug order.
END ; used by DRUG (55.06,101 & 53.1,101) x-refs to warn user if patient is receiving or about to receive the drug just ordered
ENSET(X) ; expands the SPECIAL INSTRUCTIONS field contained in X into Y
OCHK ; Add drugs in current order to ^TMP("ORDERS" and call order checker.
; Set PSJOCHK=1 so OP order check doesn't Kill array.
CHK ;
SF ;
IVSOL ;*** Start order check for IV solution at this point.
START ;
ALGCLASS(PSJDD) ; checks any Drug allergies or reactions to see if
; the new drug is the same class
; this call can be removed by commenting out the call on IVSOL+16
CLASSDSP ;
ALGCHK(PSJDD) ;CHECK FOR ALLERGIES
CONT ; Ask user if they wish to continue in spite of an order check.
ENDDC(PSGP,PSJDD) ; Perform Duplicate Drug, Duplicate Class,
; Drug-Drug interaction check, Drug-Allergy interaction check.
ENDL ; used by PSGTRAIN DRUG LOOK-UP option

External References

Name Field # of Occurrence
NOW^%DTC END+3
EN^DDIOL START+3, END+2
IX^DIC ENDL+4
^DIR END+8, CONT+2, CONT+6, CLASSDSP+17
EN1^GMRADPT ALGCLASS+6
$$ORCHK^GMRAOR ALGCHK+4
GETDATA^GMRAOR ALGCLASS+5, ALGC2+2
EN1^GMRAOR2 ALGCLASS+8
$$HAVEHDR^ORRDI1 ENDDC+6
HAVEHDR^ORRDI1 ENDDC+6
$$ENDTC^PSGMI SF+1
$$ENMRN^PSGMI PDWCHK+5
ENCV^PSGSETU ENDL+1
ENKV^PSGSETU ENDL+5
ORDCHK^PSJLMUT1 ENDDC+8, ENDDC+9, IVSOL+2
PAUSE^PSJLMUT1 ENDDC+7
$$DRUGNAME^PSJLMUTL PDWCHK+3
^PSJRXI CONT+6, CLASSDSP+18
EN^PSOORDRG ENDDC+5

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: Y
  • Line Location: START+3
Function Call: WRITE
  • Prompt: !?25,"*** A WARD STOCK ITEM ***"
  • Line Location: ENDDC+4
Function Call: WRITE
  • Prompt: !,"Remote data not available - Only local order checks processed."
  • Line Location: ENDDC+7
Function Call: WRITE
  • Prompt: !,"Ingredients: "
  • Line Location: ALGCHK+9
Function Call: WRITE
  • Prompt: !,?6,"Reactions: "
  • Line Location: ALGCHK+12
Function Call: WRITE
  • Prompt: !?19
  • Condition for execution: $X+$L($G(GMRAREAC(I)))+2>IOM
  • Line Location: ALGCHK+13
Function Call: WRITE
  • Prompt: $G(GMRAREAC(I))_", "
  • Line Location: ALGCHK+13
Function Call: WRITE
  • Prompt: !!,"THIS DRUG IS INACTIVE AS OF ",$E($$ENDTC^PSGMI(PSGID),1,8)
  • Line Location: SF+1
Function Call: WRITE
  • Prompt: !!,$S($P(ND,"^",9):"NON-",1:""),"FORMULARY ITEM"
  • Line Location: SF+2
Function Call: WRITE
  • Prompt: !,$P(ND,"^",10)
  • Condition for execution: $P(ND,"^",10)]""
  • Line Location: SF+2
Function Call: WRITE
  • Prompt: !,$P("NOT^","^",ND+1)," A UNIT DOSE DRUG"
  • Line Location: SF+3
Function Call: WRITE
  • Prompt: !
  • Line Location: SF+3
Function Call: WRITE
  • Prompt: !
  • Line Location: SF+3
Function Call: WRITE
  • Prompt: !
  • Line Location: SF+3
Function Call: WRITE
  • Prompt: !?10,"UNIT DOSE MED ROUTE: "
  • Line Location: SF+4
Function Call: WRITE
  • Prompt: $S($D(^PS(51.2,$P(ND,"^",2),0)):$P(^(0),"^"),1:$P(ND,"^",2))
  • Line Location: SF+4
Function Call: WRITE
  • Prompt: !?6,"UNIT DOSE SCHEDULE TYPE: "
  • Line Location: SF+6
Function Call: WRITE
  • Prompt: $P($P(";"_$P(^(0),"^",3),";"_$P(ND,"^",3)_":",2),";")
  • Line Location: SF+6
Function Call: WRITE
  • Prompt: !?11,"UNIT DOSE SCHEDULE: "
  • Line Location: SF+7
Function Call: WRITE
  • Prompt: $P(ND,"^",4)
  • Line Location: SF+7
Function Call: WRITE
  • Prompt: !?17,"ATC MNEMONIC: "
  • Line Location: SF+9
Function Call: WRITE
  • Prompt: $P(N5,"^",2)
  • Line Location: SF+9
Function Call: WRITE
  • Prompt: !?17,"ATC CANISTER: "
  • Line Location: SF+10
Function Call: WRITE
  • Prompt: ?10,$P(ND,U),!,?13,"Give: ",X," ",$$ENMRN^PSGMI(+$P(ND0,U,3))," ",$P(ND2,U),!!
  • Line Location: PDWCHK+5
Function Call: WRITE
  • Prompt: !?6,"Reaction: "_$G(LIST(PSJL,"S",J))
  • Line Location: ALGCLASS+29
Function Call: WRITE
  • Prompt: !,?19,$G(LIST(PSJL,"S",J))
  • Line Location: ALGCLASS+30
Function Call: WRITE
  • Prompt: $C(7),!,"A Drug-Allergy Reaction exists for this medication and/or class!",!
  • Line Location: CLASSDSP+2
Function Call: WRITE
  • Prompt: !,"Drug: "_$P($G(^PSDRUG(PSJDD,0)),"^")
  • Line Location: CLASSDSP+3
Function Call: WRITE
  • Prompt: !,"Drug Class: "_^TMP($J,"PSJDRCLS",CT)
  • Line Location: CLASSDSP+4
Function Call: WRITE
  • Prompt: !?6,"Reactions: "_$G(^TMP($J,"PSODRCLS","REAC",K))
  • Line Location: CLASSDSP+8
Function Call: WRITE
  • Prompt: !?19,$G(^TMP($J,"PSODRCLS","REAC",K))
  • Line Location: CLASSDSP+9
Function Call: WRITE
  • Prompt: !?6,"Reactions: "_$G(GMRAREAC(K))
  • Line Location: CLASSDSP+11
Function Call: WRITE
  • Prompt: !?19,$G(GMRAREAC(K))
  • Line Location: CLASSDSP+12
Function Call: WRITE
  • Prompt: !
  • Line Location: CLASSDSP+17
Routine Call
  • DIR
  • Line Location:
    • END+8
    • CONT+2
    • CONT+6
    • CLASSDSP+17
Routine Call
  • DIC
  • Line Location:
    • ENDL+4

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^PSDRUG - [#50] Classic Fileman Calls

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^PS(50.605 - [#50.605] ALGC2+7
^PS(51 - [#51] CHK+1, ENSET+6
^PS(51.2 - [#51.2] SF+4
^PS(53.1 - [#53.1] END+5
^PS(55 - [#55] END+4
^PS(57.5 - [#57.5] SF+10
^PSD(58.8 - [#58.8] END+2, ENDDC+4
^PSDRUG - [#50] IVSOL+5, IVSOL+6, IVSOL+11, IVSOL+12, IVSOL+13, ALGCHK+9, SF+1, SF+3, SF+8, SF+10
, ALGCLASS+4, CLASSDSP+3
^PSI(58.1 - [#58.1] END+2, ENDDC+4
^TMP("GMRAOC" ALGC2+2, ALGC2+4, ALGC2+6, ALGC2+10, ALGC2+11, ALGC2+14!
^TMP("PSJDAI" ALGCHK+4!, ALGCHK+5*, ALGCHK+6*, ALGCHK+7, ALGCHK+9, ALGCHK+10
^TMP($J ENDDC+8, ENDDC+9, IVSOL+2, ALGCHK+16!, OCHK+3!, ALGC2+18*, ALGC2+20*, ALGC2+21*, CLASSDSP+1, CLASSDSP+4
, CLASSDSP+7, CLASSDSP+8, CLASSDSP+9, CLASSDSP+14!
^XTMP("ORRDI" ENDDC+6, ENDDC+7

Label References

Name Line Occurrences
ALGC2 ALGCLASS+5
ALGCHK IVSOL+7, IVSOL+14
ALGCLASS ALGCHK+17
CHK START+2
PDWCHK END+4, END+5
SF ENDL+4

Naked Globals

Name Field # of Occurrence
^( ALGCHK+10, SF+10, PDWCHK+4
^("I" SF+1
^(0 CHK+1, ENSET+6, SF+4, SF+6, SF+8, SF+10
^(2 PDWCHK+4
^(8 SF+3
^(8.5 SF+3

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
>> % END+4
CDRG IVSOL+4~, IVSOL+12*, IVSOL+13, IVSOL+14
CLCHK ALGCLASS+3~, ALGCLASS+17*, ALGCLASS+23, ALGC2+16*, ALGC2+18*
CLS ALGCLASS+3~, ALGCLASS+11*
CMP IVSOL+4~, IVSOL+5*, IVSOL+7, IVSOL+9
CMPDR IVSOL+4~, IVSOL+10*, IVSOL+11*, IVSOL+12
CNT ALGCLASS+3~, ALGCLASS+17*, ALGCLASS+18, ALGCLASS+21
>> COMQUIT CONT+2*, CONT+7*
CT ALGCLASS+3~, ALGCLASS+11*, ALGC2+16*, ALGC2+17, ALGC2+18, ALGC2+19, ALGC2+20, ALGC2+21, CLASSDSP+4*
>> D ENDL+4*
DCCNT ALGCLASS+3~, ALGCLASS+11*, ALGCLASS+15*, ALGCLASS+16, ALGCLASS+18
DFN ENDDC+5*, ALGCHK+4, PDWCHK~, PDWCHK+3, PDWCHK+4, ALGC2+2
DIC ENDL+4*!
DIC("A" ENDL+4*
DIC(0 ENDL+4*
DIR END+6~, CONT+1~, CLASSDSP+19!
DIR("?" END+7*, END+8*, CONT+1*, CONT+2*, CONT+6*, CLASSDSP+15*, CLASSDSP+16*
DIR("A" END+7*, CONT+1*, CONT+6*, CLASSDSP+17*
DIR("B" CONT+2*, CLASSDSP+17*
DIR(0 END+7*, CONT+1*, CONT+6*, CLASSDSP+17*
DIROUT CLASSDSP+19!
DIRUT CLASSDSP+19!
DTOUT CLASSDSP+19!
DUOUT END+4, END+5, CLASSDSP+19!
>> F PDWCHK+4*
>> GMRA ALGCLASS+6*
GMRACL ALGC2+3~, ALGC2+4*, ALGC2+6, ALGC2+7, ALGC2+8, ALGC2+10, ALGC2+11
GMRADRCL ALGC2+1!
GMRADRCL( ALGC2+8*, ALGC2+16, ALGC2+18
GMRAING ALGCHK+16!
GMRAING( ALGCHK+6
>> GMRAL( ALGCLASS+7
GMRALOC ALGC2+5~, ALGC2+6*, ALGC2+8
GMRANM ALGC2+5~, ALGC2+7*, ALGC2+8
GMRAREAC ALGCHK+16!
GMRAREAC( ALGCHK+13, ALGC2+11*, ALGC2+19, ALGC2+20, ALGC2+21
GMRAREAC(0 ALGCHK+12
I ALGCHK+6*, ALGCHK+10*, ALGCHK+13*, ALGCHK+16!
INTERVEN ENDDC+5~*, IVSOL+2*, CONT+3
IOM ALGCHK+10, ALGCHK+13
J ALGCLASS+28~*, ALGCLASS+29, ALGCLASS+30, ALGC2+10*, ALGC2+11
K ALGCLASS+20~*, ALGCLASS+21, ALGC2+19*, ALGC2+20, ALGC2+21, CLASSDSP+7*, CLASSDSP+8, CLASSDSP+9
LEN ALGCLASS+3~, ALGCLASS+4*, ALGCLASS+16, ALGC2+17
LIST ALGCLASS+3~
LIST( ALGCLASS+18*, ALGCLASS+21*, ALGCLASS+25, ALGCLASS+26, ALGCLASS+28, ALGCLASS+29, ALGCLASS+30
N5 ENDL+5!, SF+3*, SF+9
ND ENDL+5!, SF+1*, SF+2, SF+3*, SF+4, SF+6, SF+7, SF+8, SF+10*, PDWCHK+1~
, PDWCHK+3*, PDWCHK+4, PDWCHK+5
ND0 PDWCHK+1~, PDWCHK+4*, PDWCHK+5
ND2 PDWCHK+1~, PDWCHK+4*, PDWCHK+5
ON PDWCHK~, PDWCHK+3, PDWCHK+4
PSCLASS ALGCLASS+3~, ALGCLASS+4*, ALGCLASS+16, ALGC2+17
>> PSGDRG END+2
>> PSGID SF+1*
>> PSGORQF CONT+2*, CONT+7*
PSGP END+4, END+5, ENDDC~, ENDDC+5, ENDDC+7, ENDDC+8, ENDDC+9, IVSOL+2
>> PSGX END+4, END+5
PSJACK ALGCHK+3*, ALGCHK+4*, ALGCHK+16!
PSJAGL ALGCLASS+8!, ALGCLASS+18
PSJAGL("S" ALGCLASS+19, ALGCLASS+20, ALGCLASS+21
PSJAGL("V" ALGCLASS+12, ALGCLASS+15, ALGCLASS+16, ALGCLASS+18
PSJDCHK END+4~*, END+5*, END+6, PDWCHK+2
PSJDD ENDDC~, ENDDC+4, ENDDC+5, IVSOL+5, IVSOL+6, IVSOL+7, IVSOL+11, IVSOL+12, ALGCHK~, ALGCHK+9
, ALGCHK+17, ALGCLASS~, ALGCLASS+4, CLASSDSP+3
PSJFST ENDDC+2~, ENDDC+3*, IVSOL+1~*
>> PSJHLSKP END+1
PSJIREQ ENDDC+5~*, CONT+5, CONT+7
PSJL ALGCLASS+3~, ALGCLASS+25*, ALGCLASS+26, ALGCLASS+28, ALGCLASS+29, ALGCLASS+30
PSJLINE ENDDC+2~, ENDDC+3*
PSJLIST ALGCLASS+3~, ALGCLASS+7*, ALGCLASS+8
PSJOCHK OCHK+4~*
PSJPDRG ENDDC+5!, CONT+1, ALGCHK+7*, ALGCLASS+17*
>> PSJPWD END+2, ENDDC+4
PSJRXREQ ENDDC+5~*
>> PSJSYSU END+2, ENDDC+4, CONT+3
PSJY CONT+4~, CONT+6*, CONT+7
PTR IVSOL+4~, IVSOL+6*, IVSOL+13*, ALGCHK+4
Q ENDL+5!, SF+10*
RET ALGC2+3~, ALGC2+4*, ALGC2+13*, ALGC2+14
STATUSNP END+2~, END+5*
U IVSOL+5, IVSOL+6, IVSOL+12, IVSOL+13, PDWCHK+4, PDWCHK+5, ALGC2+7, ALGC2+8
X START+1!, START+2, START+3, CHK+2!, ENSET~, ENSET+4, END+8*, ENDDC+5*, IVSOL+4~, CONT+2*
, PDWCHK+1~, PDWCHK+4*, PDWCHK+5
X1 ENSET+1~, ENSET+4*, ENSET+9*
X2 ENSET+1~, ENSET+4*, ENSET+5, ENSET+6
>> XQUIT ENDL+1
Y START+2*, START+3, CHK+2, CHK+3*, ENSET+1~*, ENSET+5*, ENSET+6*, ENSET+9*, ENSET+10, END+8*
, ENDDC+5*, CONT+2, CONT+6, ENDL+4, ENDL+5!, SF+1*, SF+3, SF+10, CLASSDSP+18, CLASSDSP+19!
Y(1 START+2*, START+3*
Y(2 START+2*, START+3*, CHK+1*, CHK+2, CHK+3
Z END+2~, END+4*, END+5*, END+9!, ENDDC+2~
ZZ END+2~, END+4*, END+9!, ENDDC+2~

Marked Items

Name Field # of Occurrence
$T(GETDATA^GMRAOR ALGCLASS+5
$T(HAVEHDR^ORRDI1 ENDDC+6
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 |  Marked Items |  All