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 |  Local Variables  | All
Print Page as PDF
Routine: RCDPEU1

Package: Accounts Receivable

Routine: RCDPEU1


Information

RCDPEU1 ;AITC/CJE - ELECTRONIC PAYER UTILITIES ;05-NOV-02

Source Information

Source file <RCDPEU1.m>

Call Graph

Call Graph

Call Graph Total: 4

Package Total Call Graph
VA FileMan 3 ^DIC  $$GET1^DIQ  ^DIR  
List Manager 1 $$GOON^VALM1  

Caller Graph

Legends:

Legend of Colors

Package Component Superscript legend

action A extended action Ea event driver Ed subscriber Su protocol O limited protocol LP run routine RR broker B edit E server Se print P screenman SM inquire I

Caller Graph

Caller Graph Total: 28

Package Total Caller Graph
Accounts Receivable 28 RCDPARC  RCDPE8NZ  RCDPEAA1  RCDPEAC  RCDPEAD1  RCDPEADP  RCDPEAP1  RCDPEAPP  
RCDPEAPQ  RCDPEAPS  RCDPEAR1  RCDPEAR2  RCDPEDAR  RCDPEE  RCDPELAR  RCDPEM0  
RCDPEM3  RCDPEM4  RCDPEM6  RCDPEMAP  RCDPENR2  RCDPENR3  RCDPENR4  RCDPESP3  
RCDPEWLP  RCDPEX1  RCDPEX2  RCDPPLB  

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 (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)
; 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 - 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
; M - User selected MEDICAL
; P - User selected PHARMACY
; B - User selected BOTH
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 - 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 - 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 - P=Pharmacy, T="Tricare"
; Output: warning message to screen.

External References

Name Field # of Occurrence
^DIC PROMPT+17
$$GET1^DIQ ADDPAY+5, ADDPAY+6, CHKPAY+14, CHKPAY+15, CHKRNG+8, CHKTIN+9, TLIST+10, CHKTYPE+5, CHKTYPE+6, ISSEL+15
, GETNAME+3, GETTIN+3, EOBTYP+6
^DIR PROMPT+28, SRCHTIN+28, RTYPE+13, PAYRNG+35
$$GOON^VALM1 TLIST+9

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
Routine Call
  • DIC
  • Line Location:
    • PROMPT+17
Routine Call
  • DIR
  • Line Location:
    • PROMPT+28
    • SRCHTIN+28
    • RTYPE+13
    • PAYRNG+35

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^RCY(344.6 - [#344.6] GET1^DIQ
^IBM(361.1 - [#361.1] GET1^DIQ

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^RCY( CHKPAY+16
^RCY(344.4 - [#344.4] EOBERA+4
^RCY(344.6 - [#344.6] EXPAND+10, EXPANDX+6, ADDTIN+4, SRCHTIN+4, SRCHTIN+6, CHKTIN+6, TLIST+4, TLIST+6, RTYPE+19, RTYPE+20
, GETPAY+5, EOBTYP+9
^TMP("RCDPEU1" SELPAY+49, SELPAY+53, PROMPT+15, EXPAND+4, EXPAND+5, ADDPAY+4*, ADDPAY+7*, ADDPAY+8*, CHKRNG+7, INIT+9!
CLEAN+1!, ISSEL+16, ISSEL+21

Label References

Name Line Occurrences
$$CHKPAY EXPANDX+7, CHKTIN+7, TLIST+7
$$CHKTYPE CHKPAY+11, PAYTYPE+9, EOBTYP+10
$$EOBERA ISTYPE+11, ISSEL+11
$$EOBTYP ISTYPE+10
$$GETNAME ISTYPE+14, ISSEL+18
$$GETPAY PAYTYPE+7
$$GETTIN ISTYPE+15, ISSEL+19
$$PAYTYPE ISTYPE+17
$$PROMPT SELPAY+36, SELPAY+39, SELPAY+46
$$SRCHTIN PROMPT+31
ADDPAY PROMPT+20, EXPANDX+7, ADDTIN+5
ADDTIN PROMPT+33
CHKTIN SRCHTIN+4, SRCHTIN+7
CLEAN SELPAY+52
EXPAND SELPAY+41
EXPANDX EXPAND+7, EXPAND+10
INIT SELPAY+30
RMESS SELPAY+36, SELPAY+39, SELPAY+50
WARN RTYPE+19, RTYPE+20

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
BLANKLN PAYRNG~, PAYRNG+15*, PAYRNG+34
CNT SRCHTIN+3~, SRCHTIN+17*, SRCHTIN+19*, SRCHTIN+27
COUNT SRCHTIN+3~, SRCHTIN+12*, SRCHTIN+14*, SRCHTIN+15, SRCHTIN+17*, SRCHTIN+18*, SRCHTIN+20, SRCHTIN+21, TLIST+1~, TLIST+2*
TLIST+8*, TLIST+9*
DA RTYPE+7~
DEF RTYPE~, RTYPE+12
DIC PROMPT+7~, PROMPT+11*
DIC("A" PROMPT+13*
DIC("S" PROMPT+14*, PROMPT+16*
DIC(0 PROMPT+12*
DIR PROMPT+7~, SRCHTIN+3~, RTYPE+7~, RTYPE+14!, PAYRNG+13~, PAYRNG+35!
DIR("?" PROMPT+26*, RTYPE+9*, PAYRNG+30*, PAYRNG+32*, PAYRNG+33*
DIR("??" PROMPT+27*
DIR("A" PROMPT+24*, RTYPE+11*, PAYRNG+24*, PAYRNG+25*, PAYRNG+28*, PAYRNG+29*
DIR("B" RTYPE+12*, PAYRNG+31*
DIR(0 PROMPT+25*, SRCHTIN+27*, RTYPE+10*, PAYRNG+23*, PAYRNG+27*
DIROUT PROMPT+7~, RTYPE+7~, PAYRNG+13~
DIRUT PROMPT+7~, RTYPE+7~, PAYRNG+13~
DTOUT PROMPT+7~, PROMPT+18, PROMPT+29, SRCHTIN+3~, SRCHTIN+29, RTYPE+7~, RTYPE+15, PAYRNG+13~, PAYRNG+38
DUOUT PROMPT+7~, PROMPT+18, PROMPT+29, SRCHTIN+3~, SRCHTIN+29, RTYPE+7~, RTYPE+15, PAYRNG+13~, PAYRNG+38
FIELD GETNAME+1~, GETNAME+2*, GETNAME+3, GETTIN+1~, GETTIN+2*, GETTIN+3
FILE CHKPAY~, CHKPAY+7, CHKPAY+13, CHKPAY+16, ISTYPE~, ISTYPE+10, ISTYPE+12*, ISTYPE+14, ISTYPE+15, ISSEL~
, ISSEL+10, ISSEL+13*, ISSEL+18, ISSEL+19, GETNAME~, GETNAME+2, GETNAME+3, GETTIN~, GETTIN+3
FLAG CHKPAY+6~, PAYTYPE+6~
FLAG("P" CHKTYPE+5*, CHKTYPE+9, CHKTYPE+10
FLAG("T" CHKTYPE+6*, CHKTYPE+8, CHKTYPE+10
IEN PAYTYPE+6~, PAYTYPE+7*, PAYTYPE+8, PAYTYPE+9, CHKTYPE~, CHKTYPE+5, CHKTYPE+6, ISTYPE~, ISTYPE+10, ISTYPE+11
, ISTYPE+12*, ISTYPE+14, ISTYPE+15, ISSEL~, ISSEL+11, ISSEL+13*, ISSEL+15, ISSEL+18, ISSEL+19, GETNAME~
, GETNAME+3, GETTIN~, GETTIN+3, EOBTYP+4~, EOBTYP+8*, EOBTYP+9*, EOBTYP+10
IEN3444 ISTYPE+8~, ISTYPE+11*, ISTYPE+12, ISSEL+7~, ISSEL+11*, ISSEL+12, ISSEL+13
IEN3611 EOBERA~, EOBERA+4, EOBTYP~, EOBTYP+6
K1 EXPAND+3~, EXPAND+9*, EXPAND+10*, SRCHTIN+3~, SRCHTIN+5*, SRCHTIN+6*, SRCHTIN+7, SRCHTIN+12*, SRCHTIN+13*, SRCHTIN+15
, SRCHTIN+17*, SRCHTIN+21*, SRCHTIN+22, SRCHTIN+24
K2 SRCHTIN+3~, SRCHTIN+17*, SRCHTIN+22*, SRCHTIN+25
K3 SRCHTIN+3~, SRCHTIN+17*
LIST SRCHTIN+3~, SRCHTIN+4, SRCHTIN+7, SRCHTIN+9
LIST( SRCHTIN+15*, SRCHTIN+18, SRCHTIN+21, SRCHTIN+30
LIST("T" SRCHTIN+13, SRCHTIN+22
MIXED PAYRNG~, PAYRNG+14*, PAYRNG+17, PAYRNG+24, PAYRNG+25, PAYRNG+28, PAYRNG+29
NAME EXPAND+3~, EXPANDX~, EXPANDX+6, ADDPAY+3~, ADDPAY+5*, ADDPAY+7, ADDPAY+8, CHKPAY+6~, CHKPAY+14*, CHKPAY+16
, CHKRNG+5~, PAYTYPE~, PAYTYPE+7, GETPAY~, GETPAY+4, GETPAY+5, ISTYPE+8~, ISTYPE+14*, ISTYPE+16, ISTYPE+17
, ISSEL+7~, ISSEL+18*, ISSEL+20, ISSEL+21
NAME(1 EXPAND+4*, EXPAND+7, EXPAND+9, CHKRNG+7*, CHKRNG+9
NAME(2 EXPAND+5*, EXPAND+10, CHKRNG+8*, CHKRNG+9
NMORTIN PAYRNG~, PAYRNG+16*, PAYRNG+22
OUT CHKTIN~
OUT("T" CHKTIN+11*
PARAM SELPAY~, SELPAY+36, SELPAY+39, SELPAY+46, PROMPT~, PROMPT+31, SRCHTIN~, SRCHTIN+4, SRCHTIN+7, CHKTIN~
PARAM("DICA" SELPAY+46, INIT+7*
PARAM("FILE" PROMPT+14, EXPANDX+7, CHKTIN+7, TLIST+7, INIT+4*
PARAM("SELC" SELPAY+34, SELPAY+43, PROMPT+15, INIT+6*, RMESS+2
PARAM("SRCH" PROMPT+10, PROMPT+22, INIT+5*, INIT+7, RMESS+3
PARAM("TYPE" PROMPT+14, EXPANDX+7, CHKTIN+7, TLIST+7, INIT+3*
PAYIEN EXPANDX+4~, EXPANDX+5*, EXPANDX+6*, EXPANDX+7, ADDPAY~, ADDPAY+4, ADDPAY+5, ADDPAY+6, ADDPAY+7, ADDPAY+8
, ADDTIN+2~, ADDTIN+3*, ADDTIN+4*, ADDTIN+5, CHKPAY~, CHKPAY+11, CHKPAY+14, CHKPAY+15, CHKRNG~, CHKRNG+8
, CHKTIN+4~, CHKTIN+5*, CHKTIN+6*, CHKTIN+7, CHKTIN+9, CHKTIN+11, TLIST+1~, TLIST+5*, TLIST+6*, TLIST+7
TLIST+10
PNAME CHKTIN+8~, CHKTIN+9*, CHKTIN+10, CHKTIN+11
PROMPT PAYRNG~, PAYRNG+17*, PAYRNG+24, PAYRNG+25, PAYRNG+28, PAYRNG+29
QUIT SELPAY+28~, SELPAY+33*, SELPAY+44*, SELPAY+45, SELPAY+47*, SELPAY+49*, SRCHTIN+3~, SRCHTIN+17*, SRCHTIN+18, SRCHTIN+22
TLIST+1~, TLIST+2*, TLIST+4, TLIST+6, TLIST+9*
RCA SELPAY+28~, SELPAY+35*, SELPAY+36, SELPAY+38*, SELPAY+39, PROMPT~, PROMPT+13
RCJOB ISSEL~, ISSEL+9*, ISSEL+16, ISSEL+21
RCTYPE RTYPE+7~, RTYPE+8*
RCX SRCHTIN~, SRCHTIN+4, SRCHTIN+5, SRCHTIN+6
RET SELPAY+28~, SELPAY+36*, SELPAY+37, SELPAY+39*, SELPAY+40, SELPAY+46*, SELPAY+47, SELPAY+48, PROMPT+23~, PROMPT+31*
, PROMPT+32, PROMPT+33
RETURN SELPAY+28~, SELPAY+31*, SELPAY+37*, SELPAY+40*, SELPAY+47*, SELPAY+52, SELPAY+53*, SELPAY+54, PROMPT+7~, PROMPT+8*
, PROMPT+18*, PROMPT+19*, PROMPT+29*, PROMPT+30*, PROMPT+32*, PROMPT+34, SRCHTIN+3~, SRCHTIN+17*, SRCHTIN+30*, SRCHTIN+31
, CHKPAY+6~, CHKPAY+9*, CHKPAY+10, CHKPAY+11*, CHKPAY+13, CHKPAY+16*, CHKRNG+5~, CHKRNG+6*, CHKRNG+9*, CHKRNG+10
, RTYPE+7~, RTYPE+17*, RTYPE+19, RTYPE+20, RTYPE+21, ISSEL+7~, ISSEL+8*, ISSEL+10, ISSEL+21*, ISSEL+22
, EOBTYP+5*, EOBTYP+9, EOBTYP+10*, EOBTYP+11
RTNFLG PAYRNG+13~, PAYRNG+19*, PAYRNG+38*
SPACE SRCHTIN+3~, SRCHTIN+20*, SRCHTIN+23, SRCHTIN+26*
SX SRCHTIN+3~, SRCHTIN+17*
TIN ADDPAY+3~, ADDPAY+6*, ADDPAY+7, ADDPAY+8, ADDTIN~, ADDTIN+4, CHKPAY+6~, CHKPAY+15*, CHKPAY+16, CHKTIN~
, CHKTIN+6, CHKTIN+11, TLIST+1~, TLIST+3*, TLIST+4*, TLIST+6, TLIST+10, PAYTYPE~, PAYTYPE+7, GETPAY~
, GETPAY+4, GETPAY+5, ISTYPE+8~, ISTYPE+15*, ISTYPE+16, ISTYPE+17, ISSEL+7~, ISSEL+15*, ISSEL+16, ISSEL+19*
, ISSEL+20, ISSEL+21, PAYRNG+13~, EOBTYP+4~, EOBTYP+6*, EOBTYP+7, EOBTYP+9
TYPE CHKPAY~, CHKPAY+7, CHKPAY+10, CHKPAY+11, PAYTYPE~, PAYTYPE+9, CHKTYPE~, CHKTYPE+4, CHKTYPE+8, CHKTYPE+9
, CHKTYPE+10, ISTYPE~, ISTYPE+7, ISTYPE+10, ISTYPE+17, EOBTYP~, EOBTYP+10, WARN~, WARN+3
X PROMPT+7~, SRCHTIN+3~, RTYPE+7~, PAYRNG+13~
XX PAYRNG+13~
Y PROMPT+7~, PROMPT+19, PROMPT+20, PROMPT+30, PROMPT+31, SRCHTIN+3~, SRCHTIN+30, RTYPE+7~, RTYPE+16, RTYPE+17
, PAYRNG+13~, PAYRNG+40
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 |  Local Variables  | All