Skip to content

E-bill processing queries

Support e-bill lifecycle queries: status/assignment classification, clearinghouse response-file selection, compound-drug flagging, batch classification, zero-pay EOB candidates, DRG lookup, and active clearinghouse resolution.

Field Value
Operation ID OP-SD-17
Trigger E-bill processing workflow steps.
Inputs Bill/EOB/batch identifiers
Outputs Bill/EOB/batch data, flags set
Primary components EbillQueryProvider, EbillBatchQueryProvider, EbillEobQueryProvider, EbillHealthInformationQueryProvider, EbillingQueryProvider
Entry point Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs

Steps

  1. E-bill status codes (ACCPT, ASSGN, COMPL, DLOAD, EOBDS, EOBRJ, IMAGE, INDEX, NEW, PEND, REJCT, SETUP, EXTR) and assignment rules (CONF, PROV, CLAIM, CLEAN) are applied as constants (SD-BR-050). Data: Ebill (EBILL), EbillAssignmentRule (EBILL_ASSIGNMENT_RULE).
  2. GetBillsForResponseFileForClearinghouse selects bills where there is no FirstResponseBatch, or no LastResponseBatch and the bill status is not "PEN" (SD-BR-051, SQL-074, SQL-075, SQL-076, SQL-077, SQL-078, SQL-079).
  3. SetCompoundDrugForAllServiceLinesForTheBill: if there is more than one distinct prescription number among the NDC lines, set IsCompoundDrug on all of them (SD-BR-052). Data: EbillService (EBILL_SERVICE). This writes entity flags; persistence happens via the caller's unit of work.
  4. EbillBatchQueryProvider: batch type 837 is e-bill and 835 is payment advice (SD-BR-053). Data: EBILL_BATCH.
  5. EbillEobQueryProvider.GetCompletedZeroPaymentBillsForEob: bill status COM, audits exist, the allowed-amount sum is 0, and no EOB exists (SD-BR-054). Data: EBILL_EOB, CBP_BILL, CBP_AUDIT.
  6. EbillHealthInformationQueryProvider.GetDrgCode: health information type "DR" (SD-BR-055).
  7. EbillingQueryProvider.GetClearinghouse: the active clearinghouse is the one where EndDate == null (SD-BR-056). Data: EBILL_CLEARINGHOUSE.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([E-bill processing workflow steps.]) --> S1["`EbillQueryProvider`"]
    S1 --> S2{"Rules satisfied?"}
    S2 -->|Yes| EndOk([Result returned])
    S2 -->|No| EndErr([Exception / empty result])

Failure and edge-case behavior

  • No matching prescription numbers: IsCompoundDrug left unset.

Sources

  • Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.cs
  • Data/SAIF.Data/Queries/Claims/Ebilling/EbillAddressQueryProvider.cs:24
  • Data/SAIF.Data/Queries/Claims/Ebilling/EbillAddressQueryProvider.cs:29
  • Data/SAIF.Data/Queries/Claims/Ebilling/EbillAddressQueryProvider.cs:34