---
title: SAIF.Business.Claim.Bill operations and processes
summary: Operation catalog and cross-operation hub for medical bill, audit, MCO billing, payment request, and reference-data workflows.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.Claim.Bill
reference_type: package
---

# SAIF.Business.Claim.Bill operations and processes

This page is the operation catalog and cross-operation hub for `SAIF.Business.Claim.Bill`. The library exposes seven operations: the core bill lifecycle and its cascaded child collections, the audit aggregate generated for every saved bill, managed-care-organization (MCO) billing built on the same bill hierarchy, the centralized bill payment request queue, national drug code validation, read-only service reference lookups used to describe and price bill lines, and image retrieval from the external imaging service. 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 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [Bill CRUD](operations/bill-crud.md) | Create, retrieve, update, and delete a medical bill header and cascade the save into its diagnosis, procedure, service, and status collections | `clsBill.NewBill`/`GetBill` followed by property/collection edits and `Save()` | `BillID`, header fields, child-collection edits, `IDataPortalInfo` | Persisted `CBP_BILL` header and child rows; generated audit; broken rules and contention errors | [BR-002](business-rules.md#br-002-bill-id-must-be-non-zero), [BR-004](business-rules.md#br-004-optimistic-concurrency-updates-fail-if-rowsaffected-does-not-equal-1), [BR-005](business-rules.md#br-005-duplicate-audited-service-line-for-the-same-service-id-is-rejected) | [CBP_BILL](database-tables.md#cbp_bill), [CBP_BILL_DIAGNOSIS](database-tables.md#cbp_bill_diagnosis), [CBP_BILL_PROCEDURE](database-tables.md#cbp_bill_procedure), [CBP_BILL_SERVICE](database-tables.md#cbp_bill_service), [CBP_BILL_STATUS](database-tables.md#cbp_bill_status) | [SQL-001](sql/SQL-001-saif-business-claim-bill.md), [SQL-007](sql/SQL-007-saif-business-claim-bill.md), [SQL-008](sql/SQL-008-saif-business-claim-bill.md), [SQL-009](sql/SQL-009-saif-business-claim-bill.md), [SQL-010](sql/SQL-010-saif-business-claim-bill.md), [SQL-012](sql/SQL-012-saif-business-claim-bill.md), [SQL-030](sql/SQL-030-saif-business-claim-bill.md), [SQL-036](sql/SQL-036-saif-business-claim-bill.md), [SQL-037](sql/SQL-037-saif-business-claim-bill.md), [SQL-038](sql/SQL-038-saif-business-claim-bill.md), [SQL-039](sql/SQL-039-saif-business-claim-bill.md), [SQL-040](sql/SQL-040-saif-business-claim-bill.md), [SQL-046](sql/SQL-046-saif-business-claim-bill.md), [SQL-047](sql/SQL-047-saif-business-claim-bill.md), [SQL-048](sql/SQL-048-saif-business-claim-bill.md), [SQL-049](sql/SQL-049-saif-business-claim-bill.md) |
| [Audit and audited services](operations/audit-and-audited-services.md) | Persist the audit header for a bill together with its audited-service lines, service-level adjustments, and audit messages | `clsBill.GenerateAudit()` on save, or direct `clsAudit.NewAudit`/`GetAudit` followed by `Save()` | `BillID`, audit header fields, per-service audited fields, adjustment code/amount, message category/text | Persisted `CBP_AUDIT`, `CBP_AUDITED_SERVICE`, `CBP_AUDITED_SERVICE_ADJUSTMENT`, `CBP_AUDIT_MESSAGE` rows; broken rules and contention errors | [BR-004](business-rules.md#br-004-optimistic-concurrency-updates-fail-if-rowsaffected-does-not-equal-1), [BR-005](business-rules.md#br-005-duplicate-audited-service-line-for-the-same-service-id-is-rejected) | [CBP_AUDIT](database-tables.md#cbp_audit), [CBP_AUDITED_SERVICE](database-tables.md#cbp_audited_service), [CBP_AUDITED_SERVICE_ADJUSTMENT](database-tables.md#cbp_audited_service_adjustment), [CBP_AUDIT_MESSAGE](database-tables.md#cbp_audit_message) | [SQL-003](sql/SQL-003-saif-business-claim-bill.md), [SQL-004](sql/SQL-004-saif-business-claim-bill.md), [SQL-005](sql/SQL-005-saif-business-claim-bill.md), [SQL-006](sql/SQL-006-saif-business-claim-bill.md), [SQL-011](sql/SQL-011-saif-business-claim-bill.md), [SQL-013](sql/SQL-013-saif-business-claim-bill.md), [SQL-032](sql/SQL-032-saif-business-claim-bill.md), [SQL-033](sql/SQL-033-saif-business-claim-bill.md), [SQL-034](sql/SQL-034-saif-business-claim-bill.md), [SQL-035](sql/SQL-035-saif-business-claim-bill.md), [SQL-042](sql/SQL-042-saif-business-claim-bill.md), [SQL-043](sql/SQL-043-saif-business-claim-bill.md), [SQL-044](sql/SQL-044-saif-business-claim-bill.md), [SQL-045](sql/SQL-045-saif-business-claim-bill.md) |
| [MCO billing](operations/mco-billing.md) | Create and maintain a managed-care-organization bill, resolving claim context, MCO eligibility history, and provider-type admin fee applicability | `clsMCOBill.NewMCOBill(dpi, claimID)` or the `clsClaimData` overload | `ClaimID` or `clsClaimData`, MCO plan ID, effective date, provider location | New `clsMCOBill` seeded from claim data; filtered/grouped bill collections; resolved MCO eligibility; validated admin fee | [BR-001](business-rules.md#br-001-bill-id-must-be-valid-non-zero), [BR-004](business-rules.md#br-004-optimistic-concurrency-updates-fail-if-rowsaffected-does-not-equal-1), [BR-006](business-rules.md#br-006-mco-location-submitted-must-match-the-location-assigned-to-the-provider-type-admin-fee) | [CBP_BILL](database-tables.md#cbp_bill), [CL_CLAIM_MCO_ELIGIBILITY](database-tables.md#cl_claim_mco_eligibility), [MCO_TYPE_ADMIN_FEE](database-tables.md#mco_type_admin_fee) | [SQL-001](sql/SQL-001-saif-business-claim-bill.md), [SQL-014](sql/SQL-014-saif-business-claim-bill.md), [SQL-015](sql/SQL-015-saif-business-claim-bill.md) |
| [Payment request](operations/payment-request.md) | Create, retrieve, update, and delete centralized bill payment requests and manage the process-code driven queue | `clsCBPBillPaymentRequest.NewCbpBillPaymentRequest`/`GetCbpBillPaymentRequest`, or collection retrieval by process code | `BillPaymentSeqNum`, process code, claim ID, payee/payment fields | Persisted `CBP_BILL_PAYMENT_REQUEST` row; filtered payment-request collection | [BR-004](business-rules.md#br-004-optimistic-concurrency-updates-fail-if-rowsaffected-does-not-equal-1) | [CBP_BILL_PAYMENT_REQUEST](database-tables.md#cbp_bill_payment_request) | [SQL-002](sql/SQL-002-saif-business-claim-bill.md), [SQL-021](sql/SQL-021-saif-business-claim-bill.md), [SQL-022](sql/SQL-022-saif-business-claim-bill.md), [SQL-031](sql/SQL-031-saif-business-claim-bill.md), [SQL-041](sql/SQL-041-saif-business-claim-bill.md) |
| [National drug validation](operations/national-drug-validation.md) | Retrieve a national drug code's master record and price history and validate that the code resolves to a known drug | `clsNationalDrug.GetNationalDrug(dpi, nationalDrugCode)` | `NationalDrugCode` | Populated drug record and price list; broken rule if the code does not resolve | [BR-003](business-rules.md#br-003-national-drug-code-must-resolve-to-valid-information) | [CBP_NATIONAL_DRUG_PRICE](database-tables.md#cbp_national_drug_price) | [SQL-016](sql/SQL-016-saif-business-claim-bill.md) |
| [Service reference lookups](operations/service-reference-lookups.md) | Resolve and cache billable-service reference data — descriptions, fee schedules, CPT bundling, MCO fee exemptions, and code lists — used to validate and describe bill lines | Any read of a service's description, fee schedule, CPT bundling, or MCO fee exemption through `clsServiceInfo`/`clsServiceManager` | Service code, service type code, effective date | Cached service reference profile and process-wide code-table lists | None registered* | [CBP_SERVICE_CATEGORY_CODE](database-tables.md#cbp_service_category_code), [CBP_SERVICE_LOCATION_CODE](database-tables.md#cbp_service_location_code), [CBP_SERVICE_MODIFIER_CODE](database-tables.md#cbp_service_modifier_code), [CBP_SERVICE_SUBCAT_CODE](database-tables.md#cbp_service_subcat_code) | [SQL-017](sql/SQL-017-saif-business-claim-bill.md), [SQL-018](sql/SQL-018-saif-business-claim-bill.md), [SQL-019](sql/SQL-019-saif-business-claim-bill.md), [SQL-020](sql/SQL-020-saif-business-claim-bill.md) |
| [Image retrieval](operations/image-retrieval.md) | Retrieve bill-image URLs and identifiers from the external ImagingAPI service | `clsCallImageApi.GetImageUrlByTowId`/`GetImageTowId`/`GetImageUrl` | `towId` or `imageId` | Image URL string or TOW identifier; fallback empty/error value if not found | None registered* | N/A | N/A |

## Process flow diagram

The following diagram shows how the seven operations relate: a bill is created or retrieved (directly or as an MCO bill), edited and saved, which cascades into child collections and generates an audit; the audit's own child records are then persisted; payment requests, drug validation, service reference lookups, and image retrieval operate independently in support of billing and auditing.

```mermaid
flowchart TD
	Start([Caller requests bill work]) --> BillOrMco{Standard bill<br>or MCO bill?}
	BillOrMco -->|Standard| Bill[Bill CRUD]
	BillOrMco -->|MCO| Mco[MCO billing]
	Mco --> Bill
	Bill --> Save[Save cascades diagnosis,<br>procedure, service, status]
	Save --> Audit[Audit and audited services]
	Audit --> Adjust[Audited service adjustments]
	Audit --> Messages[Audit messages]
	Bill --> Refs[Service reference lookups<br>for procedure/service description and pricing]
	Bill --> Drug[National drug validation<br>for drug-related service lines]
	Bill --> Images[Image retrieval<br>for imaged source documents]
	Bill --> Payment[Payment request<br>queues the bill for payment]
```

## Inherited operations and processes

Operations in this section originate from base classes or services provided by dependency framework libraries. They are inherited or delegated, not implemented in this library.

### From `clsBusinessBase` (`SAIF.BOF.Framework`)

| Operation | Intent | Provided by | Origin | Embedded in |
| --- | --- | --- | --- | --- |
| Edit lifecycle | Supports `BeginEdit`/`CancelEdit`/`ApplyEdit` lifecycle for business objects.* | `clsBusinessBase` | `SAIF.BOF.Framework` | [Bill CRUD](operations/bill-crud.md), [Audit and audited services](operations/audit-and-audited-services.md), [MCO billing](operations/mco-billing.md), [Payment request](operations/payment-request.md) |
| Collection traversal | Supports cursor-style traversal and deleted-item tracking for BOF collections.* | `clsBusinessCollectionBase` | `SAIF.BOF.Framework` | [Bill CRUD](operations/bill-crud.md), [Audit and audited services](operations/audit-and-audited-services.md), [Payment request](operations/payment-request.md) |

> **Origin**: These operations are defined in `SAIF.BOF.Framework` and inherited by every mutable business object and collection in this library. They are not re-documented per operation; see [Dependencies](dependencies.md) for the package reference.

### From `clsClaimData` (`SAIF.Business.View.Claim`)

| Operation | Intent | Provided by | Origin | Embedded in |
| --- | --- | --- | --- | --- |
| Claim data retrieval | Retrieves the claim identified by a claim ID and returns populated claim data used to seed a new MCO bill.* | `clsClaimData.GetData` | `SAIF.Business.View.Claim` | [MCO billing](operations/mco-billing.md) |

> **Origin**: `SAIF.Business.View.Claim` is a same-repo package dependency still documented in the previous format; see [Operations and processes](../saif-business-view-claim/operations-processes.md) in the `SAIF.Business.View.Claim` documentation set.

### From provider-view lookups (`SAIF.BOF.Business.View.Provider`)

| Operation | Intent | Provided by | Origin | Embedded in |
| --- | --- | --- | --- | --- |
| MCO location resolution | Resolves an MCO ID to its provider location details used to build MCO eligibility detail and provider-type admin fee records.* | `GetMCOInfo(DPI).MCO(mcoID)` | `SAIF.BOF.Business.View.Provider` | [MCO billing](operations/mco-billing.md) |

> **Origin**: `SAIF.BOF.Business.View.Provider` is a same-repo package dependency still documented in the previous format; see [Operations and processes](../saif-business-view-provider/operations-processes.md) in the `SAIF.BOF.Business.View.Provider` documentation set.

## 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 |
| --- | --- | --- | --- |
| [Bill CRUD](operations/bill-crud.md) | [SQL-001](sql/SQL-001-saif-business-claim-bill.md), [SQL-030](sql/SQL-030-saif-business-claim-bill.md), [SQL-040](sql/SQL-040-saif-business-claim-bill.md), [SQL-007](sql/SQL-007-saif-business-claim-bill.md), [SQL-008](sql/SQL-008-saif-business-claim-bill.md), [SQL-009](sql/SQL-009-saif-business-claim-bill.md), [SQL-010](sql/SQL-010-saif-business-claim-bill.md), [SQL-012](sql/SQL-012-saif-business-claim-bill.md) | [CBP_BILL](database-tables.md#cbp_bill), [CBP_BILL_DIAGNOSIS](database-tables.md#cbp_bill_diagnosis), [CBP_BILL_PROCEDURE](database-tables.md#cbp_bill_procedure), [CBP_BILL_SERVICE](database-tables.md#cbp_bill_service), [CBP_BILL_STATUS](database-tables.md#cbp_bill_status) | Read/Write |
| [Audit and audited services](operations/audit-and-audited-services.md) | [SQL-003](sql/SQL-003-saif-business-claim-bill.md), [SQL-004](sql/SQL-004-saif-business-claim-bill.md), [SQL-005](sql/SQL-005-saif-business-claim-bill.md), [SQL-006](sql/SQL-006-saif-business-claim-bill.md), [SQL-011](sql/SQL-011-saif-business-claim-bill.md), [SQL-013](sql/SQL-013-saif-business-claim-bill.md) | [CBP_AUDIT](database-tables.md#cbp_audit), [CBP_AUDITED_SERVICE](database-tables.md#cbp_audited_service), [CBP_AUDITED_SERVICE_ADJUSTMENT](database-tables.md#cbp_audited_service_adjustment), [CBP_AUDIT_MESSAGE](database-tables.md#cbp_audit_message) | Read/Write |
| [MCO billing](operations/mco-billing.md) | [SQL-001](sql/SQL-001-saif-business-claim-bill.md), [SQL-014](sql/SQL-014-saif-business-claim-bill.md), [SQL-015](sql/SQL-015-saif-business-claim-bill.md) | [CBP_BILL](database-tables.md#cbp_bill), [CL_CLAIM_MCO_ELIGIBILITY](database-tables.md#cl_claim_mco_eligibility), [MCO_TYPE_ADMIN_FEE](database-tables.md#mco_type_admin_fee) | Read/Write |
| [Payment request](operations/payment-request.md) | [SQL-002](sql/SQL-002-saif-business-claim-bill.md), [SQL-021](sql/SQL-021-saif-business-claim-bill.md), [SQL-022](sql/SQL-022-saif-business-claim-bill.md), [SQL-031](sql/SQL-031-saif-business-claim-bill.md), [SQL-041](sql/SQL-041-saif-business-claim-bill.md) | [CBP_BILL_PAYMENT_REQUEST](database-tables.md#cbp_bill_payment_request) | Read/Write |
| [National drug validation](operations/national-drug-validation.md) | [SQL-016](sql/SQL-016-saif-business-claim-bill.md) | [CBP_NATIONAL_DRUG_PRICE](database-tables.md#cbp_national_drug_price) | Read |
| [Service reference lookups](operations/service-reference-lookups.md) | [SQL-017](sql/SQL-017-saif-business-claim-bill.md), [SQL-018](sql/SQL-018-saif-business-claim-bill.md), [SQL-019](sql/SQL-019-saif-business-claim-bill.md), [SQL-020](sql/SQL-020-saif-business-claim-bill.md) | [CBP_SERVICE_CATEGORY_CODE](database-tables.md#cbp_service_category_code), [CBP_SERVICE_LOCATION_CODE](database-tables.md#cbp_service_location_code), [CBP_SERVICE_MODIFIER_CODE](database-tables.md#cbp_service_modifier_code), [CBP_SERVICE_SUBCAT_CODE](database-tables.md#cbp_service_subcat_code) | Read |

Image retrieval performs no direct database access; it calls the external ImagingAPI service (see [Dependencies](dependencies.md)).

## Stored procedure operations

Operations implemented by referenced Oracle procedures.

| Operation | Description | Source | Link |
| --- | --- | --- | --- |
| Generate CBP sequence number | Allocates a new identifier for CBP bill-side records (bills, bill status, audit messages, EOB notes, notes) | `sp82385_get_next_bill_seqnum` | [Details](procedures/sp82385_get_next_bill_seqnum.md#operations) |

## Failure and edge-case behavior

- The rows-affected concurrency contract ([BR-004](business-rules.md#br-004-optimistic-concurrency-updates-fail-if-rowsaffected-does-not-equal-1)) is shared identically across Bill CRUD, Audit and audited services, MCO billing, and Payment request; a caller cannot distinguish which table failed from the error text alone.
- Validation failures in Bill CRUD, MCO billing, and National drug validation surface as broken rules rather than exceptions, so callers must check `IsValid()`/`ErrorCount` before saving; the duplicate-audited-service guard ([BR-005](business-rules.md#br-005-duplicate-audited-service-line-for-the-same-service-id-is-rejected)) and the MCO-location mismatch guard ([BR-006](business-rules.md#br-006-mco-location-submitted-must-match-the-location-assigned-to-the-provider-type-admin-fee)) instead throw exceptions immediately.
- Oracle schema, sequence, or procedure changes can alter behavior without local code changes.
- Several reference tables used by Service reference lookups are not yet represented in this library's SQL catalog or database-tables document; see that operation's page for details.

## Related documentation

- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [Database tables](database-tables.md)
- [SQL catalog](sql/index.md)
- [Procedures](procedures/index.md)
- [Configuration](configuration.md)
- [API reference](api/index.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `Business\SAIF.Business.Claim.Bill\SAIF.BOF.Business.Claim.Bill.vbproj`
- `Business\SAIF.Business.Claim.Bill\SAIF.BOF.Business.Claim.Bill.nuspec`
- `Business\SAIF.Business.Claim.Bill\packages.config`
- `Business\SAIF.Business.Claim.Bill\clsCBPBillPaymentRequest.vb`
- `Business\SAIF.Business.Claim.Bill\clsCBPBillPaymentRequestCollection.vb`
- `Business\SAIF.Business.Claim.Bill\clsCallImageApi.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBill.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBillCollection.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsAudit.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsAuditCollection.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsAuditedService.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsAuditedServiceCollection.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsAuditedServiceAdjustment.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsAuditedServiceAdjustmentCollection.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsAuditMessage.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsAuditMessageCollection.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBillDiagnosis.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBillDiagnosisCollection.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBillProcedure.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBillProcedureCollection.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBillService.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBillServiceCollection.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBillStatus.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsBillStatusCollection.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsLegacyIDBase.vb`
- `Business\SAIF.Business.Claim.Bill\Core\clsServiceBase.vb`
- `Business\SAIF.Business.Claim.Bill\MCOSupport\clsMCOBill.vb`
- `Business\SAIF.Business.Claim.Bill\MCOSupport\clsMCOBillCollection.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\MCO\clsClaimMCO.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\MCO\clsMCOEligibility.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\MCO\clsMCOEligibilityDetail.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\MCO\clsMCOProviderTypeAdminFee.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\clsNationalDrug.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\clsNationalDrugPrice.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\ServiceManager.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\mdlServices.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\clsServiceInfo.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\clsCPTService.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\clsCPTBundle.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\clsMCOFeeExemption.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\clsServiceDescription.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\clsServiceFee.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\Services\AbastractServiceClasses.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\mdlCBPSupportingData.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\BillStatus.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\BillType.vb`
- `Business\SAIF.Business.Claim.Bill\AuditSupport\OriginalBills.vb`
