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

Package: Outpatient Pharmacy

Routine: PSOUTIL


Information

PSOUTIL ;IHS/DSD/JCM - outpatient pharmacy utility routine ;12/28/15 4:01pm

Source Information

Source file <PSOUTIL.m>

Entry Points

Name Comments DBIA/ICR reference
NPSOSD(PSORX) ; Entry point to add newly added rx to patients PSOSD array
RNPSOSD ;update PSOSD array for renewals
PROV(PSORENW) ;called from psoornew
CHKPRV ;check inactive providers and cosinging providers called from PSORENW (renew rx)
CHKPRVX
NEXT(PSOX) ;
NEXTX ;
SUSDATE(PSOX) ;
SUSDATEK(PSOX) ;
STATUS(PSOREA,PSOSTAT) ;
ACP
RENFDT(PSOX) ;gets the correct fill date
SDTX ;
GFDT ;
ISSPLY() ;is the drug a supply item
DAYSUP(DRUG,RXARR,RCLQTY) ; Adjusts DAYS SUPPLY and QUANTITY based on the maximum allowed
; Input: DRUG - DRUG file (#50) IEN
; RXARR - Array containing prescription information
; RVWQTY - Re-calculate Quantity (1: YES / 0: NO)
MAXNUMRF(DRUG,DAYSUP,PTST,CLOZPAT) ; Returns the Maximum Number of Refills Allowed
; Input: DRUG - DRUG file (#50) IEN
; DAYSUP - Number of DAYS SUPPLY per fill
; PTST - RX PATIENT STATUES (#53) IEN
; CLOZPAT - Clozapine Indicator Variable (used throughout PSO)
BADADDFL(RXIEN) ; Indicate whether an Rx should be flagged with a Bad Address
; Input: RXIEN - Rx IEN (#52) to be checked
PRVDETOX(PRVIEN) ; Returns the Provider DETOX#, if available and not expired
; Input: (r) PRVIEN - Provider IEN (Pointer to VA PERSON file (#200))
RXDEA(RXIEN,ORIEN) ; Returns the Provider DEA# associated with the Prescription/CPRS Order (At least one of RXIEN or ORIEN is required)
; Input: (o) RXIEN - Prescription IEN (Pointer to the PRESCRIPTION file (#52))
; (o) ORIEN - CPRS Order IEN (Pointer to ORDER file (#100))
RXDETOX(RXIEN,ORIEN) ; Returns the Provider DETOX# associated with the Prescription/CPRS Order (At least one of RXIEN or ORIEN is required)
; Input: (o) RXIEN - Prescription IEN (Pointer to the PRESCRIPTION file (#52))
; (o) ORIEN - CPRS Order IEN (Pointer to the ORDER file (#100))
CHKRXPRV(RXIEN,PRVIEN) ; Check if the Provider can be assigned to a specific Prescription (Used for Rx Copy, Rx Renewal, etc.)
; Input: (r) RXIEN - Prescription IEN (Pointer to the PRESCRIPTION file (#52))
; (o) PRVIEN - Provider IEN (Pointer to the NEW PERSON file (#200))
DRUGSCHD(DRUGIEN) ; Return Drug DEA Schedule or "" (blank) for non-controlled substances
; Input: (r) DRUGIEN - Dispense Drug IEN (Pointer to the DRUG file (#50))

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !,$C(7),$P(^VA(200,PSORENW("PROVIDER"),0),"^")_" is not a Valid provider .. You must select a new provider"
  • Line Location: CHKPRV+9
Function Call: WRITE
  • Prompt: !!,"The current DAYS SUPPLY value (",RXDAYSUP,") exceeds the Maximum allowed"
  • Line Location: DAYSUP+12
Function Call: WRITE
  • Prompt: !,"for ",$$GET1^DIQ(50,DRUG,.01)," (",MXDAYSUP,") and will be reset.",$C(7)
  • Line Location: DAYSUP+13
Function Call: WRITE
  • Prompt: !!,"The Quantity was changed from ",RXQTY," to ",NEWQTY,"."
  • Line Location: DAYSUP+18
Function Call: WRITE
  • Prompt: !!,"Please, review the modified order before accepting it."
  • Line Location: DAYSUP+20
Function Call: WRITE
  • Prompt: !
  • Line Location: DAYSUP+21

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^PSDRUG - [#50] GET1^DIQ
^PSNDF(50.68 - [#50.68] GET1^DIQ
^PSRX - [#52] GET1^DIQ
^PS(53 - [#53] GET1^DIQ
Info |  Source |  Entry Points |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call