Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Entry Points |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call
Print Page as PDF
Routine: PSOCLO1

Package: Outpatient Pharmacy

Routine: PSOCLO1


Information

PSOCLO1 ;BHAM ISC/SAB, HEC/hrubovcak - Clozapine Rx lockout logic ;24 Feb 2020 14:00:01

Source Information

Source file <PSOCLO1.m>

Entry Points

Name Comments DBIA/ICR reference
OV1 ;
CHECK ;
OVRD ;
GDOSE ; ask daily dose
DOSE ;
EXIT ;
OVPRMPT ; ask user to override
PKEYCHK ; does user have PSOLOCKCLOZ key
MH ;
DSP ; subroutine: NCC remediation PSO*7.0*457
DIR ;
END ;
QU ; no med prescribed
NOREG ; Register a new/discontinued non-registered cloz patient
CONT
QUIT ;
OVRD2 ;
OVRREA ; Override reason when order is NCCC Approved
CHK4REG(PSCLDFN) ; See if patient already has a clozapine registration number
CHK4DFN(PSCLRGNO) ; See if this Clozapine registration is assigned
CHK4EXP(PSCLRGNO,PSCLDFN) ; Check for registration expiration
; returns zero if expired, 1 if not
CRXTMP(DFN,PSOYS) ; create XTMP entry for 4 day supply tracking
CRXTMPI(DFN,PSOYS) ; create XTMP entry for 4 day supply tracking
HASKEY(USRNUM) ; Boolean function, does USRNUM hold the PSOLOCKCLOZ security key?
EXPDT(PSORXARY,CLOZPT) ; PSORXARY,CLOZPAT passed by ref., determine expiration date (for Clozapine only)
; PSORXARY can be a new Rx (PSONEW) or an edited Rx (PSORXED and PSODIR)
QTYCHK(PSORXARY,NUMDAYS) ; check/adjust quantity, PSORXARY passed by ref., NUMDAYS is # of days

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !!,"Now doing Clozapine Order checks. Please wait...",!
  • Line Location: PSOCLO1+8
Function Call: WRITE
  • Prompt: !!,"*** This patient has no clozapine registration number ***",!
  • Line Location: PSOCLO1+25
Function Call: WRITE
  • Prompt: !!,"Permission to dispense clozapine has been authorized by NCCC",!
  • Line Location: PSOCLO1+42
Function Call: WRITE
  • Prompt: !!,"Permission to dispense clozapine has been authorized by NCCC",!
  • Line Location: OV1+1
Function Call: WRITE
  • Prompt: !,"Emergency overrides for non-registered clozapine patients require",!,"ANC levels greater than or equal to 1500",!
  • Line Location: CHECK+10
Function Call: WRITE
  • Prompt: !,"*** No previous results to display ***",!
  • Line Location: CHECK+12
Function Call: WRITE
  • Prompt: !,"*** Last "_$S(ANQ=4:"Four ",ANQ=3:"Three ",ANQ=2:"Two ",1:"")_"WBC and NEUTROPHILS ABSOLUTE (ANC) results ***",!
  • Line Location: CHECK+14
Function Call: WRITE
  • Prompt: !,$J("WBC ANC",49),!
  • Line Location: CHECK+15
Function Call: WRITE
  • Prompt: $$FMTE^XLFDT(ANQD,"5Z")
  • Line Location: CHECK+18
Function Call: WRITE
  • Prompt: "@",$E(ANQD,9,10),":",$E(ANQD,11,12)
  • Condition for execution: ANQD["."
  • Line Location: CHECK+18
Function Call: WRITE
  • Prompt: ?29,"Results: "_$J($P(ANQ(ANQJ),U),4)_" ",$J($P(ANQ(ANQJ),U,2),4),!
  • Line Location: CHECK+19
Function Call: WRITE
  • Prompt: !!,"You Are Not Authorized to Override! See Clozapine Manager with PSOLOCKCLOZ key."
  • Line Location: OVRD+4
Function Call: WRITE
  • Prompt: !,"Test ANC labs daily until levels stabilize to ANC greater than or equal to 1000.",!
  • Line Location: OVRD+7
Function Call: WRITE
  • Prompt: !,"Override reason: "_$$OVRDTXT^PSOCLOU(ANQRE),!
  • Line Location: OVRD+8
Function Call: WRITE
  • Prompt: !,$P(PSREASON,":"),!
  • Line Location: OVRD+36
Function Call: WRITE
  • Prompt: !,"Test ANC Results 3x weekly until ANC stabilize to greater than or equal to 1500",!
  • Line Location: OVRD+42
Function Call: WRITE
  • Prompt: !!,"No "_PSMSGTXT_" entered!"
  • Line Location: EXIT+3
Function Call: WRITE
  • Prompt: !,"You Are Not Authorized to Override! See Clozapine Manager with PSOLOCKCLOZ key."
  • Line Location: PKEYCHK+3
Function Call: WRITE
  • Prompt: !!,"Also make sure that the LAB test, ANC is set up correctly in the"
  • Line Location: MH+1
Function Call: WRITE
  • Prompt: !,"Mental Health package using the CLOZAPINE MULTI TEST LINK option.",!
  • Line Location: MH+2
Function Call: WRITE
  • Prompt: !,"*** Most recent WBC and "_$P(PSOYS,U,5)_" (ANC) results ***"
  • Line Location: DSP+3
Function Call: WRITE
  • Prompt: !," performed on "_Y_" are: "
  • Line Location: DSP+4
Function Call: WRITE
  • Prompt: !!," "_$P(PSOYS,U,3)_": "_PSOYS("rWBC")
  • Line Location: DSP+5
Function Call: WRITE
  • Prompt: !," ANC: "_PSOYS("rANC"),!
  • Line Location: DSP+6
Function Call: WRITE
  • Prompt: !
  • Line Location: DSP+7
Function Call: WRITE
  • Prompt: !!
  • Line Location: DIR+1
Function Call: WRITE
  • Prompt: !,"You Are Not Authorized to Override! See Clozapine Manager with PSOLOCKCLOZ key."
  • Line Location: NOREG+5
Function Call: WRITE
  • Prompt: !!,"No order entered!"
  • Condition for execution: PSTYPE=1
  • Line Location: NOREG+5
Function Call: WRITE
  • Prompt: !,"Do you want to register this patient with a temporary local"
  • Line Location: NOREG+7
Function Call: WRITE
  • Prompt: !," authorization number in the Clozapine registry? Y/N "
  • Line Location: NOREG+8
Function Call: WRITE
  • Prompt: !,"Patient Not Registered",!
  • Line Location: NOREG+9
Function Call: WRITE
  • Prompt: !
  • Line Location: NOREG+10
Function Call: WRITE
  • Prompt: !!,"All emergency registration numbers have been used."
  • Line Location: NOREG+14
Function Call: WRITE
  • Prompt: !,"Emergency registration may no longer be done at this site",!!
  • Line Location: NOREG+15
Function Call: WRITE
  • Prompt: !,"Patient Not Registered",!
  • Line Location: NOREG+16
Function Call: WRITE
  • Prompt: !!,"Failed to connect with the NCCC."
  • Line Location: CONT+20

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^DPT - [#2] GET1^DIQ
^PSRX - [#52] GET1^DIQ
52.0113 GET1^DIQ
^PS(55 - [#55] GET1^DIQ
^YSCL(603.01 - [#603.01] Classic Fileman Calls
^XTV(8989.3 - [#8989.3] GET1^DIQ
Info |  Source |  Entry Points |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call