Backend resource · STATIC DECLARATIONS
Charge Item API reference · mansoq-core
Static source contract for Charge Item: 11 declared or inherited operation mappings, schema/field evidence and authorization/refusal references. Deployment and behavioral review remain explicit.
Static API contract — behavior review pending. Source baseline f6e9f05f76d4.
Enable JavaScript to inspect structured operation, parameter, schema and permission evidence. Download this reference and its evidence.
Declared route and availability
This resource is declared in mansoq-core at /api/v1/facility/{facility_external_id}/charge_item/. verified core mount in config/urls.py A registered path and an indexed handler do not prove deployment availability, user permission or production readiness.
Operation map
| Method | Path | Action | Evidence |
|---|---|---|---|
| GET | /api/v1/facility/{facility_external_id}/charge_item/ |
list | declared/inherited method |
| POST | /api/v1/facility/{facility_external_id}/charge_item/ |
create | declared/inherited method |
| GET | /api/v1/facility/{facility_external_id}/charge_item/{external_id}/ |
retrieve | declared/inherited method |
| PUT | /api/v1/facility/{facility_external_id}/charge_item/{external_id}/ |
update | declared/inherited method |
| PATCH | /api/v1/facility/{facility_external_id}/charge_item/{external_id}/ |
partial_update | declared/inherited method |
| POST | /api/v1/facility/{facility_external_id}/charge_item/{external_id}/set_tags/ |
set_tags | @action declaration |
| POST | /api/v1/facility/{facility_external_id}/charge_item/{external_id}/remove_tags/ |
remove_tags | @action declaration |
| POST | /api/v1/facility/{facility_external_id}/charge_item/upsert/ |
upsert | @action declaration |
| POST | /api/v1/facility/{facility_external_id}/charge_item/{external_id}/attest-performance/ |
attest_performance | @action declaration |
| POST | /api/v1/facility/{facility_external_id}/charge_item/apply_charge_item_defs/ |
apply_charge_item_defs | @action declaration |
| POST | /api/v1/facility/{facility_external_id}/charge_item/change_account/ |
change_account | @action declaration |
list · GET
GET /api/v1/facility/{facility_external_id}/charge_item/ — action list. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
response: ChargeItemReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | UUID4 | None | false | No extra constraint extracted |
| title | str | true | No extra constraint extracted |
| description | str | None | false | No extra constraint extracted |
| status | ChargeItemStatusOptions | true | No extra constraint extracted |
| code | Coding | None | false | No extra constraint extracted |
| quantity | Decimal | true | No extra constraint extracted |
| unit_price_components | list[MonetaryComponent] | true | No extra constraint extracted |
| note | str | None | false | No extra constraint extracted |
| override_reason | ChargeItemOverrideReason | None | false | No extra constraint extracted |
| total_price_components | list[dict] | true | No extra constraint extracted |
| total_price | Decimal | true | No extra constraint extracted |
| charge_item_definition | dict | true | No extra constraint extracted |
| paid_invoice | dict | None | false | No extra constraint extracted |
| tags | list[dict] | false | No extra constraint extracted |
| service_resource | ChargeItemResourceOptions | None | false | No extra constraint extracted |
| service_resource_id | str | None | false | No extra constraint extracted |
| created_date | datetime.datetime | true | No extra constraint extracted |
| modified_date | datetime.datetime | true | No extra constraint extracted |
| paid_on | datetime.datetime | None | false | No extra constraint extracted |
| performer_actor | dict | None | false | No extra constraint extracted |
| created_by | dict | None | false | No extra constraint extracted |
| updated_by | dict | None | false | No extra constraint extracted |
| discount_configuration | dict | None | false | No extra constraint extracted |
| rcm_charge_capture | UUID4 | None | false | No extra constraint extracted |
Observed authorization checks: can_read_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item.
create · POST
POST /api/v1/facility/{facility_external_id}/charge_item/ — action create. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
request: ChargeItemWriteSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | UUID4 | None | false | No extra constraint extracted |
| title | str | true | No extra constraint extracted |
| description | str | None | false | No extra constraint extracted |
| status | ChargeItemStatusOptions | true | No extra constraint extracted |
| code | Coding | None | false | No extra constraint extracted |
| quantity | Decimal | true | No extra constraint extracted |
| unit_price_components | list[MonetaryComponent] | true | No extra constraint extracted |
| note | str | None | false | No extra constraint extracted |
| override_reason | ChargeItemOverrideReason | None | false | No extra constraint extracted |
| encounter | UUID4 | None | false | No extra constraint extracted |
| patient | UUID4 | None | false | No extra constraint extracted |
| account | UUID4 | None | false | No extra constraint extracted |
| service_resource | ChargeItemResourceOptions | None | false | No extra constraint extracted |
| service_resource_id | str | None | false | No extra constraint extracted |
| performer_actor | UUID4 | None | false | No extra constraint extracted |
response: ChargeItemReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Observed authorization checks: can_read_charge_item_in_facility, can_create_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item; ValidationError: Encounter is not associated with the facility; ValidationError: Charge patient does not match the encounter patient; ValidationError: Account is not associated with the facility; ValidationError: Charge patient does not match the account patient; ValidationError: Invoice is already balanced or issued, Cancel Invoice before updating charge item; ValidationError: No updates allowed on cancelled charge item; ValidationError: Charge item status cannot be manually changed.; ValidationError: Performer is not associated with the facility; ValidationError: Invalid service resource.
retrieve · GET
GET /api/v1/facility/{facility_external_id}/charge_item/{external_id}/ — action retrieve. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
| path | external_id | router lookup string; semantic ID validation requires handler/schema review | true |
response: ChargeItemReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Observed authorization checks: can_read_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item.
update · PUT
PUT /api/v1/facility/{facility_external_id}/charge_item/{external_id}/ — action update. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
| path | external_id | router lookup string; semantic ID validation requires handler/schema review | true |
request: ChargeItemUpdateSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | UUID4 | None | false | No extra constraint extracted |
| title | str | true | No extra constraint extracted |
| description | str | None | false | No extra constraint extracted |
| status | ChargeItemStatusOptions | true | No extra constraint extracted |
| code | Coding | None | false | No extra constraint extracted |
| quantity | Decimal | true | No extra constraint extracted |
| unit_price_components | list[MonetaryComponent] | true | No extra constraint extracted |
| note | str | None | false | No extra constraint extracted |
| override_reason | ChargeItemOverrideReason | None | false | No extra constraint extracted |
| performer_actor | UUID4 | None | false | No extra constraint extracted |
response: ChargeItemReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Observed authorization checks: can_read_charge_item_in_facility, can_update_charge_item_in_facility, can_cancel_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item; ValidationError: Invoice is already balanced or issued, Cancel Invoice before updating charge item; ValidationError: No updates allowed on cancelled charge item; ValidationError: Charge item status cannot be manually changed.; ValidationError: Charge changed while this request was being prepared; reload it before editing billing facts; ValidationError: An issued or balanced invoice owns this charge; use a legally linked correction instead of editing it in place; ValidationError: An attested charge cannot be repriced, recoded, moved or cancelled in place; use the controlled amendment workflow; PermissionDenied: Access Denied to Cancel Charge Item.
partial_update · PATCH
PATCH /api/v1/facility/{facility_external_id}/charge_item/{external_id}/ — action partial_update. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
| path | external_id | router lookup string; semantic ID validation requires handler/schema review | true |
request: ChargeItemUpdateSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
response: ChargeItemReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Observed authorization checks: can_read_charge_item_in_facility, can_update_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item; ValidationError: Invoice is already balanced or issued, Cancel Invoice before updating charge item; ValidationError: No updates allowed on cancelled charge item; ValidationError: Charge item status cannot be manually changed.; ValidationError: Charge changed while this request was being prepared; reload it before editing billing facts; ValidationError: An issued or balanced invoice owns this charge; use a legally linked correction instead of editing it in place; ValidationError: An attested charge cannot be repriced, recoded, moved or cancelled in place; use the controlled amendment workflow.
set_tags · POST
POST /api/v1/facility/{facility_external_id}/charge_item/{external_id}/set_tags/ — action set_tags. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
| path | external_id | router lookup string; semantic ID validation requires handler/schema review | true |
decorator request: TagRequest. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| tags | list[UUID4] | false | No extra constraint extracted |
Observed authorization checks: can_read_charge_item_in_facility, can_update_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item; RestFrameworkValidationError (dynamic detail; inspect source).
remove_tags · POST
POST /api/v1/facility/{facility_external_id}/charge_item/{external_id}/remove_tags/ — action remove_tags. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
| path | external_id | router lookup string; semantic ID validation requires handler/schema review | true |
body validation: TagRequest. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
decorator request: TagRequest. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Observed authorization checks: can_read_charge_item_in_facility, can_update_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item.
upsert · POST
POST /api/v1/facility/{facility_external_id}/charge_item/upsert/ — action upsert. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):
| Location | Field | Declared/inferred read type | Requiredness evidence |
|---|---|---|---|
| body | datapoints |
not declared at read site | not established |
Observed authorization checks: can_read_charge_item_in_facility, can_update_charge_item_in_facility, can_create_charge_item_in_facility, can_cancel_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: 400. Other branches/framework exception handling may differ.
Declared refusal/error evidence: RestFrameworkValidationError: Invalid request data; RestFrameworkValidationError: No datapoints provided; RestFrameworkValidationError: Too many datapoints provided; PermissionDenied: Access Denied to Charge Item; ValidationError: Invoice is already balanced or issued, Cancel Invoice before updating charge item; ValidationError: No updates allowed on cancelled charge item; ValidationError: Charge item status cannot be manually changed.; ValidationError: Charge changed while this request was being prepared; reload it before editing billing facts; ValidationError: An issued or balanced invoice owns this charge; use a legally linked correction instead of editing it in place; ValidationError: An attested charge cannot be repriced, recoded, moved or cancelled in place; use the controlled amendment workflow; ValidationError: Encounter is not associated with the facility; ValidationError: Charge patient does not match the encounter patient; ValidationError: Account is not associated with the facility; ValidationError: Charge patient does not match the account patient; ValidationError: Performer is not associated with the facility; ValidationError: Invalid service resource; PermissionDenied: Access Denied to Cancel Charge Item.
Conditional gates: conditional/computed expression; inspect pinned declaration comparison settings.MAX_DATAPOINTS_PER_UPSERT.
attest_performance · POST
POST /api/v1/facility/{facility_external_id}/charge_item/{external_id}/attest-performance/ — action attest_performance. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
| path | external_id | router lookup string; semantic ID validation requires handler/schema review | true |
decorator request: AttestChargePerformanceRequest. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| performed_at | datetime | true | No extra constraint extracted |
| unit | str | true | No extra constraint extracted |
Observed authorization checks: can_create_charge_item_in_facility, can_read_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: dynamic status. Other branches/framework exception handling may differ.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item; ValidationError (dynamic detail; inspect source).
apply_charge_item_defs · POST
POST /api/v1/facility/{facility_external_id}/charge_item/apply_charge_item_defs/ — action apply_charge_item_defs. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
decorator request: ApplyMultipleChargeItemDefinitionRequest. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| requests | list[ApplyChargeItemDefinitionRequest] | true | No extra constraint extracted |
Observed authorization checks: can_create_negative_charge_item_in_facility, can_create_charge_item_in_facility, can_read_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item; ValidationError: Charge item definition is not associated with the facility; ValidationError: Invalid service resource; ValidationError: Patient or encounter is required; ValidationError: Performer is not associated with the facility.
change_account · POST
Change accounts related to a charge item.
POST /api/v1/facility/{facility_external_id}/charge_item/change_account/ — action change_account. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | facility_external_id | router lookup string; semantic ID validation requires handler/schema review | true |
decorator request: ChargeItemAccountChangeRequest. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| charge_items | list[UUID4] | true | min_length: 1; max_length: 100 |
| target_account | UUID4 | true | No extra constraint extracted |
Observed authorization checks: can_create_charge_item_in_facility, can_read_charge_item_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: status.HTTP_201_CREATED. Other branches/framework exception handling may differ.
Declared refusal/error evidence: PermissionDenied: Access Denied to Charge Item; ValidationError (dynamic detail; inspect source); ValidationError: An attested charge cannot move accounts without an amendment.
Integration review checklist
Confirm the installed route and full schema; review authentication, organization/facility scoping, all accepted fields, value-state and date/time semantics, idempotency, pagination, response/exception branches and the allowed correction/reversal workflow. Test positive and negative cases with synthetic data. This source reference does not establish external certification or replace an illustrated user procedure.
Pinned source evidence
Links require access to the private source repository.
- repositories/platform/mansoq-core/config/api_router.py:424
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:195
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:168
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:407
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:161
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:221
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:330
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:158
- repositories/platform/mansoq-core/mansoq/emr/resources/charge_item/spec.py:148
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:136
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:367
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:142
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:130
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:252
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:229
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:226
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:325
- repositories/platform/mansoq-core/mansoq/emr/resources/charge_item/spec.py:100
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:83
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:80
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:77
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:214
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:398
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:228
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:201
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:335
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:297
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:222
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:283
- repositories/platform/mansoq-core/mansoq/emr/resources/charge_item/spec.py:137
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:218
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:394
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:386
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:372
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:369
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:360
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:405
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:389
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:271
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:423
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:133
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:457
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:129
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:564
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/charge_item.py:124