Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RCDPEAP2

RCDPEAP2.m

Go to the documentation of this file.
  1. RCDPEAP2 ;AITC/CJE - AUTO POST MATCHING EFT ERA PAIR - CONT. ;Jun 06, 2014@19:11:19
  1. ;;4.5;Accounts Receivable;**424**;Mar 20, 1995;Build 11
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. ;Read ^IBM(361.1) via Private IA 4051
  1. ;
  1. Q
  1. ; PRCA*4.5*424 Added whole subroutine POST0 below
  1. POST0(RCERA) ; Auto-post zero balance ERA (EP from AUTOPOST^RCDPEAP)
  1. ; Input - RCERA internal entry number of ERA from file #344.4
  1. ; Output - None
  1. ;
  1. ; Make sure the ERA passes all auto-posting rules
  1. Q:'$$AUTOCHK^RCDPEAP1(RCERA)
  1. ;
  1. ; Update the audit log
  1. D AUDITLOG^RCDPEAP(RCERA,2,"Auto Posting: ERA posted successfully")
  1. ;
  1. ; Update ERA detail post status, set ERA auto-post status to 'complete',update latest auto-post date
  1. ; set match status to MATCH-0 PAYMENT
  1. S DIE="^RCY(344.4,"
  1. S DR=".09///3;.14///1;4.01////"_DT_";4.02///2"
  1. S DA=RCERA
  1. D ^DIE
  1. ;
  1. ; Update auto-post date for each claim line
  1. N RCLINE,RCSCD0
  1. S RCLINE=0
  1. F S RCLINE=$O(^RCY(344.4,RCERA,1,RCLINE)) Q:'RCLINE D
  1. . S RCSCD0=$G(^RCY(344.4,RCERA,1,RCLINE,0))
  1. . Q:+$P(RCSCD0,U,3)
  1. . ;
  1. . ; Update ERA line with auto-post date
  1. . N DA,DIE,DR
  1. . S DA(1)=RCERA,DA=RCLINE,DIE="^RCY(344.4,"_DA(1)_",1,",DR="9///"_DT
  1. . D ^DIE
  1. Q
  1. ;
  1. PAYEREXC(RCERA) ;EP from RCDPEM0
  1. ; Check to see if the payer is excluded from auto-posting
  1. ;PRCA*4.5*424 moved method from RCDPEM0
  1. ; Input: RCERA - IEN of the ERA being evaluated
  1. ; Returns: 1 - Payer is excluded, 0 otherwise
  1. N NAM0,RCERATYP,RCXCLDE,TIN0,XX
  1. S NAM0=$$GET1^DIQ(344.4,RCERA_",",.06,"E") ; PRCA*4.5*345 - Added line - Payer Name
  1. S TIN0=$$GET1^DIQ(344.4,RCERA_",",.03,"E") ; PRCA*4.5*345 - Added line - Payer TIN
  1. S XX=$$GETPAY^RCDPEU1(NAM0,TIN0) ; PRCA*4.5*345 - Get the IEN from 344.6
  1. ;
  1. ; Determine if ERA should be excluded using the site parameters
  1. I $$CHKTYPE^RCDPEU1(XX,"T") S RCERATYP=2 ; PRCA*4.5*349 - Check if this is TRICARE ERA
  1. E S RCERATYP=$$PHARM^RCDPEAP1(RCERA) ; Else it must be a Medical or Rx ERA
  1. S RCXCLDE=0
  1. S:RCERATYP=0 RCXCLDE=$$EXCLUDE^RCDPEAP1(RCERA) ; PRCA*4.5*345 - Changed to =0 from 'RCERATYP
  1. S:RCERATYP=1 RCXCLDE=$$EXCLDRX^RCDPEAP1(RCERA) ; PRCA*4.5*345 - Changed to =1 from RCERATYP
  1. S:RCERATYP=2 RCXCLDE=$$EXCLDTR^RCDPEAP1(RCERA) ; PRCA*4.5*349 - Added Line
  1. Q RCXCLDE ; Quit if the Payer is excluded from Auto-Post
  1. Q
  1. ;