Skip to content

SAIF.Business.Claim.MedicalBill operations and processes

This page is the operation catalog and cross-operation hub for SAIF.Business.Claim.MedicalBill. The library exposes six operations covering API-based medical bill retrieval (with confidentiality masking and pending-bill suppression), search-criteria validation, stored-procedure-based audit service/adjustment retrieval, EOB note retrieval, direct-SQL adjustment-code reference lookup, and full CRUD for national drug pricing data. Each operation's detailed, step-by-step logic lives in its own page under operations/.

Operation catalog

Operation Intent Trigger Inputs Outputs Rules Tables SQL
Medical bill retrieval Load a single bill or a security-aware collection of bills through the medical billing API clsMedicalBill.GetMedicalBill(billID); clsMedicalBillCollection.GetMedicalBills(searchCriteria[, security]) billID, or MedicalBillSearchRequest and clsSecurityPrincipal Populated bill(s); print link; masked/unmasked worker name; suppressed/computed pending-bill total BR-MB-001, BR-MB-002, BR-MB-003, BR-MB-019, BR-MB-020, BR-MB-021 None (API-based) None (API-based)
Bill search criteria validation Validate a medical bill search request before it is submitted for retrieval Caller reads clsBillSearchCriteria.IsValid (or a bound IDataErrorInfo property) Claim/provider/worker/date/identifier search fields Boolean validity; broken-rule error messages; resolved ProviderID BR-MB-005, BR-MB-006, BR-MB-007, BR-MB-008, BR-MB-009, BR-MB-010, BR-MB-011, BR-MB-012, BR-MB-013, BR-MB-014, BR-MB-015, BR-MB-016, BR-MB-017 None (in-memory validation) None (in-memory validation)
Audit service and adjustment retrieval Load audited service lines for a bill and the adjustments applied to each service clsMedicalBill.AuditServices (lazy); clsAuditService.ServiceAdjustments (lazy) BillID; AuditSeqNum and BillID Populated audit-service and service-adjustment collections; IsIMEService flag; resolved adjustment descriptions BR-PROC-001, BR-PROC-002, BR-MB-020 CBP_AUDITED_SERVICE, CBP_SERVICE_DESCRIPTION, CBP_NATIONAL_DRUG, CBP_AUDITED_SERVICE_ADJUSTMENT SQL-006, SQL-013
EOB note retrieval Load explanation-of-benefits notes recorded against a bill clsMedicalBill.EOBNotes (lazy) BillID Populated EOB note collection scoped to the bill BR-PROC-003, BR-MB-020 CBP_EOB_NOTE SQL-007
Adjustment code lookup Resolve audit adjustment type reference data by code or in full clsAdjustmentCode.GetAdjustmentCode(code); clsAdjustmentCodeCollection.GetCodes() code, or none Populated single code or full reference collection None catalogued* CBP_AUDIT_ADJUSTMENT_TYPE SQL-004, SQL-005
Drug pricing data management CRUD for national drug reference records, effective-dated prices, and price-history archival clsNationalDrug.NewCbpNationalDrug/GetNationalDrug/Save(); clsNdcPriceHistory.NewNdcPriceHistory/GetNdcPriceHistory National drug code and fields; price effective/expiration dates and amounts Persisted drug and price rows; inserted history rows; resolved ActivePrice BR-MB-004, BR-MB-018 CBP_NATIONAL_DRUG, CBP_NATIONAL_DRUG_PRICE, CBP_NDC_PRICE_HISTORY SQL-001, SQL-002, SQL-003, SQL-008, SQL-009, SQL-010, SQL-011, SQL-012, SQL-014, SQL-015, SQL-016

Process flow diagram

The following diagram shows how the six operations relate: a bill search is validated, submitted, and retrieved through the API; each returned bill lazily loads audit services (with their own child adjustments), EOB notes, and adjustment-code descriptions from Oracle; drug pricing data is managed independently as reference/CRUD data.

flowchart TD
    Start([Caller wants medical bill data]) --> Validate{Search or direct ID?}
    Validate -->|Search| Criteria[Bill search criteria validation]
    Criteria --> Valid{IsValid?}
    Valid -->|No| Errors([Broken rules returned;<br>search not submitted])
    Valid -->|Yes| Retrieve[Medical bill retrieval:<br>API search]
    Validate -->|Direct ID| RetrieveSingle[Medical bill retrieval:<br>API single-bill route]
    Retrieve --> Bills[Populated bill collection]
    RetrieveSingle --> Bills
    Bills --> Mask[WorkerName masking,<br>TotalPaidAmt suppression on read]
    Mask --> Detail{SuppressAuditDetail?}
    Detail -->|Yes| Suppressed([Audit/EOB detail skipped])
    Detail -->|No| Audit[Audit service and<br>adjustment retrieval]
    Detail -->|No| EOB[EOB note retrieval]
    Audit --> CodeLookup[Adjustment code lookup]
    EOB --> Done([Bill data fully populated])
    CodeLookup --> Done
    Drug([Drug pricing data management<br>maintained independently])

Database interactions

The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under operations/.

Operation SQL Tables Type
Medical bill retrieval None (API-based) None (API-based) Read (external API)
Bill search criteria validation None (in-memory validation) None (in-memory validation) N/A
Audit service and adjustment retrieval SQL-006, SQL-013 CBP_AUDITED_SERVICE, CBP_SERVICE_DESCRIPTION, CBP_NATIONAL_DRUG, CBP_AUDITED_SERVICE_ADJUSTMENT Read (stored procedure)
EOB note retrieval SQL-007 CBP_EOB_NOTE Read (stored procedure)
Adjustment code lookup SQL-004, SQL-005 CBP_AUDIT_ADJUSTMENT_TYPE Read
Drug pricing data management SQL-001, SQL-002, SQL-003, SQL-008, SQL-009, SQL-010, SQL-011, SQL-012, SQL-014, SQL-015, SQL-016 CBP_NATIONAL_DRUG, CBP_NATIONAL_DRUG_PRICE, CBP_NDC_PRICE_HISTORY Read / Write

Stored procedure operations

Operations implemented in Oracle stored procedures referenced by this library.

Operation Description Source Link
Retrieve audit services Returns audited bill service lines with effective-dated description enrichment. PK82396_MEDICAL_BILLS.GetAuditServices Details
Retrieve service adjustments Returns audited service adjustment rows for one bill/audit sequence pair. PK82396_MEDICAL_BILLS.GetServiceAdjustments Details
Retrieve EOB notes Returns explanation-of-benefits note rows for one bill. PK82396_MEDICAL_BILLS.GetEOBNotes Details

Failure and edge-case behavior

  • Medical bill retrieval depends on an external medical billing API rather than direct SQL; a missing bill row is returned as an unfilled object rather than an explicit not-found error, and the IsMedicalBillSearch-only collection overload silently returns Nothing for non-medical-bill-search criteria.
  • Bill search criteria validation makes live claim-security and provider-location lookups as part of rule evaluation, so repeated validation during interactive data entry issues repeated dependency calls rather than caching results.*
  • SuppressAuditDetail, set at the bill or collection level, uniformly skips audit-service, service-adjustment, EOB-note, and adjustment-description retrieval for affected bills, which is used to avoid per-bill round trips during bulk print report generation.
  • All drug-pricing CRUD paths (clsNationalDrug, clsNationalDrugPrice, clsNdcPriceHistory) rely on optimistic-concurrency rows-affected checks; a value other than 1 adds an error message rather than throwing.
  • Price-history archival (clsNdcPriceHistory.NewNdcPriceHistory) is not automatically triggered by deleting or overwriting a clsNationalDrugPrice row; it must be invoked explicitly by the caller.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • Business\SAIF.Business.Claim.MedicalBill\clsMedicalBill.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsMedicalBillCollection.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsBillSearchCriteria.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsAuditServiceCollection.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsAuditService.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsServiceAdjustmentCollection.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsServiceAdjustment.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsEOBNoteCollection.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsEOBNote.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsAdjustmentCode.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsAdjustmentCodeCollection.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsNationalDrug.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsNationalDrugPrice.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsNationalDrugPriceCollection.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsNdcPriceHistory.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsNdcPriceHistoryCollection.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsNationalDrugCollection.vb
  • Business\SAIF.Business.Claim.MedicalBill\MedicalBillSearchRequest.vb
  • Business\SAIF.Business.Claim.MedicalBill\MedicalBillResult.vb