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¶
- 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). GetBillsForResponseFileForClearinghouseselects bills where there is noFirstResponseBatch, or noLastResponseBatchand the bill status is not "PEN" (SD-BR-051, SQL-074, SQL-075, SQL-076, SQL-077, SQL-078, SQL-079).SetCompoundDrugForAllServiceLinesForTheBill: if there is more than one distinct prescription number among the NDC lines, setIsCompoundDrugon all of them (SD-BR-052). Data:EbillService(EBILL_SERVICE). This writes entity flags; persistence happens via the caller's unit of work.EbillBatchQueryProvider: batch type 837 is e-bill and 835 is payment advice (SD-BR-053). Data:EBILL_BATCH.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.EbillHealthInformationQueryProvider.GetDrgCode: health information type "DR" (SD-BR-055).EbillingQueryProvider.GetClearinghouse: the active clearinghouse is the one whereEndDate == 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:
IsCompoundDrugleft unset.
Related documentation¶
Sources¶
Data/SAIF.Data/Queries/Claims/Ebilling/EbillQueryProvider.csData/SAIF.Data/Queries/Claims/Ebilling/EbillAddressQueryProvider.cs:24Data/SAIF.Data/Queries/Claims/Ebilling/EbillAddressQueryProvider.cs:29Data/SAIF.Data/Queries/Claims/Ebilling/EbillAddressQueryProvider.cs:34