Scope and Gaps
Confirmed implementation decisions, out-of-scope areas for V1, and known backend gaps.
๐ค Sachin Sharma๐
Updated: May 2, 2026๐ท๏ธ feature๐ท๏ธ backend๐ท๏ธ scope๐ท๏ธ decisions
Repository (crelio-app)
| File | Purpose |
|---|---|
finance/views/bill_split.py | View layer โ request validation, mode routing, and response construction |
finance/views/bill_split_manager.py | Manager โ all business logic, DB operations, and post-commit side effects |
finance/urls/__init__.py | URL registration for POST /api-v3/finance/bill/split/{bill_id} |
admin/account/models/lab_settings.py | enable_bill_split field definition |
admin/account/migrations/0110_labsettings_enable_bill_split.py | Migration adding the field |
admin/account/views/account_configuration_constant.py | Admin panel config entry for the flag |
Scope boundaries
Confirmed decisions
Traceability
- No parent-child mapping table is created. The
ActivityLogwithlog_context = BILL_SPLITis the authoritative audit trail. orderNumberon the split bill is derived from the parent by appending~{step}โ providing lineage without a dedicated linking table.
Data handling decisions
- Smart report attachments are soft-deleted on the parent; users can regenerate reports as needed.
- Bill approval, unresolved missing details, and symptoms relations are cloned โ not shared โ to keep each bill independently actionable.
- AOE and patient consent records are migrated in the same atomic transaction as the split.
LabForm(consent type) is handled: a newLabFormrecord is cloned for the split bill. Revoked forms are excluded.LabForm(AOE config type) is not handled: the form config structure stays on the parent. OnlyQuestionValueresponses are migrated.
Source and amount behavior
- Destination source defaults to
Org Pay;Self Payis the other option. Both are non-insurance sources. - For non-insurance destination, insurance-specific payable fields (
co_pay_amount,deductible_amount,patientPayableAmount) are reset to0on both the split bill and movedBillingInforows.
Feature flag
- The
enable_bill_splitfield onLabSettingsmust beTruefor the feature to be accessible. - Added via migration
0110_labsettings_enable_bill_split. - Configurable in the admin panel under Workflow Configurations โ Enable Bill Splitting.
Out of scope (V1)
- Splitting paid or settled bills.
- Splitting into more than two bills.
- Merge or reverse-split flows.
- Claim-linked split variants beyond existing allowed checks.
- Home collection, appointment, and kit-centric split workflows.
- Full advanced batch/rack scenarios beyond current validated coverage.
- AOE Promotion and Store process types (left on parent bill, not migrated).
LabFormAOE config records โ onlyQuestionValueresponses are migrated, not the form config.prescriptions,TestClinicalInfo,BillClassifierTagsโ not migrated; no planned V1 support.