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 | 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, BR-004, BR-005 | CBP_BILL, CBP_BILL_DIAGNOSIS, CBP_BILL_PROCEDURE, CBP_BILL_SERVICE, CBP_BILL_STATUS | SQL-001, SQL-007, SQL-008, SQL-009, SQL-010, SQL-012, SQL-030, SQL-036, SQL-037, SQL-038, SQL-039, SQL-040, SQL-046, SQL-047, SQL-048, SQL-049 |
| Audit and audited services | 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, BR-005 | CBP_AUDIT, CBP_AUDITED_SERVICE, CBP_AUDITED_SERVICE_ADJUSTMENT, CBP_AUDIT_MESSAGE | SQL-003, SQL-004, SQL-005, SQL-006, SQL-011, SQL-013, SQL-032, SQL-033, SQL-034, SQL-035, SQL-042, SQL-043, SQL-044, SQL-045 |
| MCO billing | 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, BR-004, BR-006 | CBP_BILL, CL_CLAIM_MCO_ELIGIBILITY, MCO_TYPE_ADMIN_FEE | SQL-001, SQL-014, SQL-015 |
| Payment request | 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 | CBP_BILL_PAYMENT_REQUEST | SQL-002, SQL-021, SQL-022, SQL-031, SQL-041 |
| National drug validation | 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 | CBP_NATIONAL_DRUG_PRICE | SQL-016 |
| Service reference lookups | 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, CBP_SERVICE_LOCATION_CODE, CBP_SERVICE_MODIFIER_CODE, CBP_SERVICE_SUBCAT_CODE | SQL-017, SQL-018, SQL-019, SQL-020 |
| Image retrieval | 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.
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, Audit and audited services, MCO billing, Payment request |
| Collection traversal | Supports cursor-style traversal and deleted-item tracking for BOF collections.* | clsBusinessCollectionBase |
SAIF.BOF.Framework |
Bill CRUD, Audit and audited services, Payment request |
Origin: These operations are defined in
SAIF.BOF.Frameworkand inherited by every mutable business object and collection in this library. They are not re-documented per operation; see Dependencies 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 |
Origin:
SAIF.Business.View.Claimis a same-repo package dependency still documented in the previous format; see Operations and processes in theSAIF.Business.View.Claimdocumentation 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 |
Origin:
SAIF.BOF.Business.View.Provideris a same-repo package dependency still documented in the previous format; see Operations and processes in theSAIF.BOF.Business.View.Providerdocumentation 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 | SQL-001, SQL-030, SQL-040, SQL-007, SQL-008, SQL-009, SQL-010, SQL-012 | CBP_BILL, CBP_BILL_DIAGNOSIS, CBP_BILL_PROCEDURE, CBP_BILL_SERVICE, CBP_BILL_STATUS | Read/Write |
| Audit and audited services | SQL-003, SQL-004, SQL-005, SQL-006, SQL-011, SQL-013 | CBP_AUDIT, CBP_AUDITED_SERVICE, CBP_AUDITED_SERVICE_ADJUSTMENT, CBP_AUDIT_MESSAGE | Read/Write |
| MCO billing | SQL-001, SQL-014, SQL-015 | CBP_BILL, CL_CLAIM_MCO_ELIGIBILITY, MCO_TYPE_ADMIN_FEE | Read/Write |
| Payment request | SQL-002, SQL-021, SQL-022, SQL-031, SQL-041 | CBP_BILL_PAYMENT_REQUEST | Read/Write |
| National drug validation | SQL-016 | CBP_NATIONAL_DRUG_PRICE | Read |
| Service reference lookups | SQL-017, SQL-018, SQL-019, SQL-020 | CBP_SERVICE_CATEGORY_CODE, CBP_SERVICE_LOCATION_CODE, CBP_SERVICE_MODIFIER_CODE, CBP_SERVICE_SUBCAT_CODE | Read |
Image retrieval performs no direct database access; it calls the external ImagingAPI service (see Dependencies).
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 |
Failure and edge-case behavior¶
- The rows-affected concurrency contract (BR-004) 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()/ErrorCountbefore saving; the duplicate-audited-service guard (BR-005) and the MCO-location mismatch guard (BR-006) 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
- Overview
- Architecture
- Dependencies
- Business rules
- Database tables
- SQL catalog
- Procedures
- Configuration
- API reference
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.vbprojBusiness\SAIF.Business.Claim.Bill\SAIF.BOF.Business.Claim.Bill.nuspecBusiness\SAIF.Business.Claim.Bill\packages.configBusiness\SAIF.Business.Claim.Bill\clsCBPBillPaymentRequest.vbBusiness\SAIF.Business.Claim.Bill\clsCBPBillPaymentRequestCollection.vbBusiness\SAIF.Business.Claim.Bill\clsCallImageApi.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBill.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBillCollection.vbBusiness\SAIF.Business.Claim.Bill\Core\clsAudit.vbBusiness\SAIF.Business.Claim.Bill\Core\clsAuditCollection.vbBusiness\SAIF.Business.Claim.Bill\Core\clsAuditedService.vbBusiness\SAIF.Business.Claim.Bill\Core\clsAuditedServiceCollection.vbBusiness\SAIF.Business.Claim.Bill\Core\clsAuditedServiceAdjustment.vbBusiness\SAIF.Business.Claim.Bill\Core\clsAuditedServiceAdjustmentCollection.vbBusiness\SAIF.Business.Claim.Bill\Core\clsAuditMessage.vbBusiness\SAIF.Business.Claim.Bill\Core\clsAuditMessageCollection.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBillDiagnosis.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBillDiagnosisCollection.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBillProcedure.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBillProcedureCollection.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBillService.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBillServiceCollection.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBillStatus.vbBusiness\SAIF.Business.Claim.Bill\Core\clsBillStatusCollection.vbBusiness\SAIF.Business.Claim.Bill\Core\clsLegacyIDBase.vbBusiness\SAIF.Business.Claim.Bill\Core\clsServiceBase.vbBusiness\SAIF.Business.Claim.Bill\MCOSupport\clsMCOBill.vbBusiness\SAIF.Business.Claim.Bill\MCOSupport\clsMCOBillCollection.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\MCO\clsClaimMCO.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\MCO\clsMCOEligibility.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\MCO\clsMCOEligibilityDetail.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\MCO\clsMCOProviderTypeAdminFee.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsNationalDrug.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsNationalDrugPrice.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\ServiceManager.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\mdlServices.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsServiceInfo.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsCPTService.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsCPTBundle.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsMCOFeeExemption.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsServiceDescription.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsServiceFee.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\AbastractServiceClasses.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\mdlCBPSupportingData.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\BillStatus.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\BillType.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\OriginalBills.vb