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

Package: Accounts Receivable

Routine: RCDPEU1


Information

RCDPEU1 ;AITC/CJE - ELECTRONIC PAYER UTILITIES ; 7/1/19 1:08pm

Source Information

Source file <RCDPEU1.m>

Entry Points

Name Comments DBIA/ICR reference
SELPAY(PARAM) ; EP
; New all purpose payer selection subroutine. Based off file 344.6
; Including options to include only given payer types (CHAMPVA/Medical/Pharmacy/Tricare/All)
; and to filter selection to include only payers that have entries in file 344.4 or 344.31
; This subroutine may be used to replace all previous payer seletion prompts.
; Input - PARAM array of parameters passed by reference
; PARAM("TYPE") - Types of payers to include in the selection (optional defaults to A)
; C - CHAMPVA, P - Pharmacy, T - Tricare, M - Medical (neither P nor T), A - All
; PARAM("FILE") - Only include payers that have entries on the ERA or EFT file (optional)
; 344.4 - ERA, 344.31 - EFT
; PARAM("SRCH") - Search by payer name or TIN (optional defaults to N)
; N - Payer Name, T - TIN
; PARAM("SELC") - Seclect individual payers, or range of payers (optional defaults to S)
; S - Selected payers, R - Range of payers
; PARAM("DICA") - Text that will be used to prompt the user (optional)
; defaults to "Select payer "_$S(PARAM("SRCH")="N":"name",1:"TIN")
PROMPT(PARAM,RCA) ; Prompt for a payer from file 344.6 with various filter options
; Input: PARAM - array of parameters defined in subroutine SELPAY above
; Output: ^TMP("RCDPEU1",$J) as defined in subroutine SELPAY above
; Returns: 1 - Payer selected
; 0 - No payer selected
; -1 - user typed '^' or timed out
EXPAND ; Expand range of payer names given start and end points.
; Input: Start and end points of the range in the global ^TMP("RCDPEU1",$J) documented in SELPAY above.
; Output: More enntries in ^TMP("RCDPEU1",$J), one for each matching payer in the range.
EXPANDX(NAME) ; Add all payers with the same name into the list
; Input: NAME - Payer Name
; PARAM - Input parameters
; Output: ^TMP("RCDPEU1",$J)
ADDPAY(PAYIEN) ; Add payer to the output array.
; Input - PAYIEN = Internal entry number from file #344.6
; Output - New entries in ^TMP("RCDPEU1",$J
ADDTIN(TIN) ; Add all payers with TIN to the output array
; Input - Payer Identifer string (TIN) matching one or more entries in file #344.6
SRCHTIN(RCX,PARAM) ; Given user input narrow down the TIN that the user wants
; Input: RCX - User input to use in TIN lookup.
; PARAM - array of input parameters (see subroutine SELPAY for detailed description)
CHKPAY(PAYIEN,TYPE,FILE) ; Check if payer meets the filter requirements
; Input: PAYIEN - Internal entry number of the payer from file 344.6
; TYPE - C - CHAMPVA, M - Medical, P - Pharmacy, T- Tricare, A - All
; FILE - 344.4 - ERA, 344.31 EFT - Payer must have entries in the given file
; Return: 1 - Payer matches the filter criteria, otherwise 0.
CHKRNG(PAYIEN) ; Check if second picked payer name follows the first
; Input: PAYIEN = Internal entry number of payer from file #344.6
; ^TMP("RCDPEU1",$J global array contains previously picked payer
; Return: 1 - if PAYIEN's name follows that of payer in ^TMP, otherwise 0
CHKTIN(TIN,PARAM,OUT) ; Given a TIN check filter criteria and add passing entries to the OUT array
; Input: TIN = Payer Identifier string that matches one or more payers in file #344.6
; PARAM = Input parameter array. See subroutine SELPAY for detailed documentation
; Output: OUT (passed by reference) array of payers matching filter parameters. Sorted by TIN then NAME
TLIST ; List TINS for user help. Only TINS matching filter criteria are displayed.
INIT ; Initialize parameters and return array
; Input - PARAM array see comments for SELPAY above
CLEAN ; Clean up output array if user aborts
RTYPE(DEF) ;EP
; Input: DEF - Value to use a default
; Returns: -1 - User ^ or timed out
; A - User selected ALL
; C - User selected CHAMPVA
; M - User selected MEDICAL
; P - User selected PHARMACY
; B - User selected BOTH
CLOSEDC(DEF) ;EP
; PRCA*4.5*349 - Added subroutine
; Input: DEF - Value to use a default
; Optional, Defaults to ""
; Returns: -1 - User ^ or timed out
; A - User selected ALL
; C - User selected CLOSED
PAYTYPE(NAME,TIN,TYPE) ; EP
; Is a payer Medical, Pharmacy or Tricare based on flags in the payer exclusion file.
; Inputs: NAME - The free text name of the payer
; TIN - The ID if the payer
; TYPE - M : Medical, P : Pharmacy, T: Tricare
; Returns : 1 - Yes, payer matches type, 0 - No, payer does not match type
GETPAY(NAME,TIN) ; EP - Get payer IEN given name and TIN
; Inputs: NAME - The free text name of the payer
; TIN - The ID if the payer
; Returns: Internal entry number from file 344.6
CHKTYPE(IEN,TYPE) ; EP
; Inputs: IEN - Internal entry number from file 344.6
; TYPE - C - CHAMPVA, M : Medical, P : Pharmacy, T: Tricare, A: All
; Returns: 1 if the payer matches the type, otherwise 0
ISTYPE(FILE,IEN,TYPE) ; EP
; Check if payer is a given type based on IEN from a FILE
; Input: FILE - file from which to get Payer name and TIN
; allowed values 344.4 - ERA, 344.31 - EFT, 361.1 - EOB
; IEN - Internal entry number of entry in FILE
; TYPE - C : CHAMPVA, M : Medical, P : Pharmacy, T: Tricare
; Return 1 - payer matches type, else 0.
ISSEL(FILE,IEN,RCJOB) ; EP
; Check if payer was selected by the user give the file and IEN
; Input: FILE - file from which to get Payer name and TIN
; allowed values 344.4 - ERA, 344.31 - EFT, 361.1 - EOB
; IEN - Internal entry number of entry in FILE
; Return 1 - payer was selected, else 0.
GETNAME(FILE,IEN) ; Get Payer Name give file and IEN
GETTIN(FILE,IEN) ; Get Payer TIN give file and IEN
PAYRNG(MIXED,BLANKLN,NMORTIN,PROMPT) ; How does the user want to select payers?
; Input: MIXED - 1 to display prompts in mixed case
; Optional, defaults to 0
; BLANKLN - 0 skip initial blank line
; Optional, defaults to 1
; NMORTIN - 1 to look-up Payer by Payer Name, 2 to look-up by TIN
; 0 or undefined - pre-326 behavior, look-up by payer name and don't include TIN in output array.
; Optional, defaults to 0
; PROMPT - Alternative prompt
EOBERA(IEN3611) ; Get ERA that corresponds to an EOB so we can find payers.
; Input IEN3611 - Internal entry from file 361.1 EOB
; Returns - Internal entry number from file 344.4 ERA
; use reverse $Order to get the latest ERA in case there is more than one.
EOBTYP(IEN3611,TYPE) ; If EOB has no ERA, use TIN from EOB to determine M/P/T type
; Input IEN3611 - Internal entry from file 361.1 EOB
; TYPE - M : Medical, P : Pharmacy, T: Tricare
; Returns - 1 at least one payer with TIN is of type TYPE
RMESS ; Output message that entry is required.
WARN(TYPE) ; Warn user that no payers of TYPE have been flagged
; Input: TYPE - C=CHAMPVA, P=Pharmacy, T=Tricare
; Output: warning message to screen.
ASKAUTO(DEF) ; EP from RCDPENR2 - added for PRCA*4.5*349
; Input: DEF - Value to use a default, optional, defaults to "BOTH"
; Returns: -1 - User ^ or timed out
; A - Include autoposted only
; N - Include manually posted only
; B - Include both types
CHKEFT(EFTDA) ; EP from RCDPENR3 - Check to see if a EFT is posted - added for PRCA*4.5*349
; Input EFTDA - Internal entru number from 344.31
; Returns 1 if EFT is posted, otherwise 0

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !,"No matching TIN found",!
  • Line Location: SRCHTIN+10
Function Call: WRITE
  • Prompt: !,$J(COUNT_".",4)_" "
  • Line Location: SRCHTIN+20
Function Call: WRITE
  • Prompt: !," "
  • Line Location: SRCHTIN+23
Function Call: WRITE
  • Prompt: $E(K1_$J("",31),1,30)
  • Line Location: SRCHTIN+24
Function Call: WRITE
  • Prompt: $E(K2,1,42)
  • Line Location: SRCHTIN+25
Function Call: WRITE
  • Prompt: !,$E(TIN_$J("",30),1,30)_" "_$E($$GET1^DIQ(344.6,PAYIEN_",",.01,"E"),1,39)
  • Line Location: TLIST+10
Function Call: WRITE
  • Prompt: !!,"You must select "
  • Line Location: RMESS+1
Function Call: WRITE
  • Prompt: $S(PARAM("SELC")="R":"a",1:"at least one")_" "
  • Line Location: RMESS+2
Function Call: WRITE
  • Prompt: $S(PARAM("SRCH")="N":"payer",1:"TIN"),*7,!
  • Line Location: RMESS+3
Function Call: WRITE
  • Prompt: !!,"WARNING - There are no "_TYPE_" payers flagged in the system."
  • Line Location: WARN+3
Function Call: WRITE
  • Prompt: !," Please use the Identify Payers option to flag payers.",*7
  • Line Location: WARN+4

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^RCY(344 - [#344] GET1^DIQ
^RCY(344.31 - [#344.31] GET1^DIQ
^RCY(344.4 - [#344.4] GET1^DIQ
^RCY(344.6 - [#344.6] GET1^DIQ
^IBM(361.1 - [#361.1] GET1^DIQ
Info |  Source |  Entry Points |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call