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

Package: Outpatient Pharmacy

Routine: PSOERUT


Information

PSOERUT ;ALB/MFR - eRx Utilities; 06/25/2022 5:14pm

Source Information

Source file <PSOERUT.m>

Entry Points

Name Comments DBIA/ICR reference
DSPERX(ERXIEN) ; Displays eRx Info to the Screen
; Input: ERXIEN - Pointer to the ERX HOLDING QUEUE (#52.49)
XML2GBL(XML,OUTARR) ;Transfers XML incoming data into a TMP Gobal
; Input: XML - XML Message to be transferred to a Temp Global or Local Array
; OUTARR - Output Array (Temp Global or Local Array, e.g. $NA(^TMP($J,"PSOERUT")), "XMLMSG", "MSG(""ERX"")", etc.
PATNAME(ERXIEN) ; Returns the eRx Patient Name for a specific eRx Record
; Input: ERXIEN - eRx IEN - Pointer to #52.49
EPATFLST(MAXSIZE) ; Returns the eRx Patient Filter as a String List
VPATFLST(MAXSIZE) ; Returns the VistA Patient Filter as a String List
VPRVFLST(MAXSIZE) ; Returns the VistA Provider Filter as a String List
EPRVFLST(MAXSIZE) ; Returns the eRx Provider Filter as a String List
STATEABB(FILE,IEN) ; Returns the Patient or Provider State Abbreviation (eRx and VistA)
; Input: FILE - VistA File # (Can be 2, 200, 52.46 or 52.48)
; IEN - Internal Entry #
LASTREDT(XREF,IEN) ; Returns the Last eRx Received Date for a VistA Patient OR Provider
SSN(SSN) ; Returns the formatted SSN (999-99-9999)
; Input: SSN - Unformatted SSN (999999999)
ACTIONSTS(STS) ; Returns whether the eRx status is Actionable or no
; Input: STS - eRx Status. It can be external (e.g.,"N","RXF","RRN", etc...) or internal value (pointer to #52.45)
C2S(STR) ; Replaces commas with spaces (for auto-wrap to work) - Arbitrarily using '@' (not likely to be on the string)
S2C(STR) ; Replaces spaces with commas (for auto-wrap to work)
SORT(STR) ; Sorts a comma (,) separated list alphabetically
WRAP(STRING,LENGTH,WRPSTR) ; Formats a String into an Array
; Input: STRING - String to be formatted/wrapped in multiple lines
; LENGHT - Text line length
SADRGVRX(ERXIEN,RXIEN) ; Sets the "ADRGVRX" cross-reference on the ERX HOLDING QUEUE file (#52.49),
; PHARMACY PRESCRIPTION NUMBER field (#.13)
; Input: ERXIEN - Pointer to the ERX HOLDING QUEUE file (#52.49)
; RXIEN - Pointer to the PRESCRIPTION file (#52)
KADRGVRX(ERXIEN,RXIEN) ; Kills the "ADRGVRX" cross-reference on the ERX HOLDING QUEUE file (#52.49),
; PHARMACY PRESCRIPTION NUMBER field (#.13)
; Input: ERXIEN - Pointer to the ERX HOLDING QUEUE file (#52.49)
; RXIEN - Pointer to the PRESCRIPTION file (#52)
DRUGHASH(ERXIEN,FACTOR) ; Return the Drug Information corresponding Hash Value (Recursivity used)
; Input: ERXIEN - Pointer to the eRx being worked on (Pointer to #52.49)
; FACTOR - Counter used to prevent wrong matches
SAMESIG(ERXIEN,HASH) ; Check if SIG matches other eRx with same Hash code
; Input: ERXIEN - Pointer to the eRx being worked on (Pointer to #52.49)
; DRUGHASH - Hash value calculated based on the Drug information for the eRx passed in
UANSIG(ERXIEN) ; Returns the SIG in upper case with alphanumeric chars only
; Input: ERXIEN - Pointer to the eRx being worked on (Pointer to #52.49)
SUGFLDT(ORDIEN) ; Returns the Suggested Fill Date for the eRx Pending Order
; Input: ORDIEN - Ponter to the Pending Order (Pointer to #52.41)
VARXSIG(RXIEN) ; Returns the VistA Rx SIG (From the PRESCRIPTION file (#52))
; Input: RXIEN - Pointer to the PRESCRIPTION file (#52)
CMOPSTS(RXIEN,FILL) ; Returns the CMOP Status for the Rx Fill
; Input: RXIEN - Rx IEN (#52)
; FILL - Fill # (0 for original)

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !,$G(IOUON),XX,$G(IOUOFF)
  • Line Location: DSPERX+6
Function Call: WRITE
  • Prompt: !,"eRx Drug : ",HIGH,$$GET1^DIQ(52.49,ERXIEN,3.1),NORM
  • Line Location: DSPERX+7
Function Call: WRITE
  • Prompt: !,"eRx SIG :"
  • Line Location: DSPERX+8
Function Call: WRITE
  • Prompt: ?11,HIGH,$E(ERXSIG,1,69),NORM,!
  • Line Location: DSPERX+9
Function Call: WRITE
  • Prompt: "eRx Notes:"
  • Line Location: DSPERX+11
Function Call: WRITE
  • Prompt: ?11,HIGH,$E(NOTES,1,68),NORM,!
  • Line Location: DSPERX+11
Function Call: WRITE
  • Prompt: "Drug Form: ",HIGH,$E($$GET1^DIQ(52.49,ERXIEN,41),1,44),NORM,?55,"Strength: ",HIGH,$E($$GET1^DIQ(52.49,ERXIEN,43),1,25),NORM
  • Line Location: DSPERX+12
Function Call: WRITE
  • Prompt: !,"Qty Qualifier: ",HIGH,QTYQUAL,NORM,?40,"Qty Unit of Measure: ",HIGH,$$GET1^DIQ(52.49,ERXIEN,42),NORM
  • Line Location: DSPERX+14
Function Call: WRITE
  • Prompt: !,"Qty: ",HIGH,$$GET1^DIQ(52.49,ERXIEN,5.1),NORM
  • Line Location: DSPERX+15
Function Call: WRITE
  • Prompt: ?13,"Days Supply: ",HIGH,$$GET1^DIQ(52.49,ERXIEN,5.5),NORM
  • Line Location: DSPERX+16
Function Call: WRITE
  • Prompt: ?34,"Refills: ",HIGH,$$GET1^DIQ(52.49,ERXIEN,5.6),NORM
  • Line Location: DSPERX+17
Function Call: WRITE
  • Prompt: ?51,"Substitutions: ",HIGH,$S($$GET1^DIQ(52.49,ERXIEN,5.8,"I"):"NO",1:"YES"),NORM
  • Line Location: DSPERX+18
Function Call: WRITE
  • Prompt: !,$G(IOUON),XX,$G(IOUOFF)
  • Line Location: DSPERX+19

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^DPT - [#2] GET1^DIQ
^VA(200 - [#200] GET1^DIQ
^DIC(5 - [#5] GET1^DIQ
^PSRX - [#52] GET1^DIQ
^PS(52.41 - [#52.41] GET1^DIQ
^PS(52.45 - [#52.45] GET1^DIQ
^PS(52.46 - [#52.46] GET1^DIQ
^PS(52.48 - [#52.48] GET1^DIQ
^PS(52.49 - [#52.49] GET1^DIQ
52.49311 GET1^DIQ
Info |  Source |  Entry Points |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call