ChargeItemDefinition $apply
The $apply operation applies a ChargeItemDefinition resource to a specific ChargeItem, calculating the appropriate pricing based on the definition's property groups and applicability rules.
Use Cases
- Automated Pricing Calculations: Automatically calculate prices for lab tests, procedures, or services based on predefined rules
- Insurance-Specific Rates: Apply different pricing based on payer contracts or insurance types
- Dynamic Discount Management: Calculate surcharges or discounts based on patient eligibility or service context
- Revenue Cycle Automation: Streamline billing workflows by programmatically determining charge amounts
Invocation
POST [base]/ChargeItemDefinition/[id]/$apply
Input Parameters
| Parameter | Cardinality | Type | Description |
|---|---|---|---|
chargeItem | 1..1 | Reference<ChargeItem> | Reference to the ChargeItem to which pricing should be applied |
Output
The operation returns the updated ChargeItem resource with the priceOverride field set based on the ChargeItemDefinition's pricing rules.
Behavior
The operation processes the ChargeItemDefinition's propertyGroup elements to determine pricing:
- Base Price: Finds the first applicable property group with a
priceComponentof typebaseand uses its amount - Applicability: Evaluates FHIRPath expressions in
applicabilityconditions against theChargeItemto determine if a property group applies - Price Modifiers: Applies
surchargeanddiscountprice components:- Surcharge: Adds the amount or calculates
basePrice * factor - Discount: Subtracts the amount or calculates
basePrice * factor
- Surcharge: Adds the amount or calculates
Example
Request
POST /fhir/R4/ChargeItemDefinition/lab-panel-pricing/$apply
Content-Type: application/fhir+json
{
"resourceType": "Parameters",
"parameter": [
{
"name": "chargeItem",
"valueReference": {
"reference": "ChargeItem/abc123"
}
}
]
}
Response
{
"resourceType": "ChargeItem",
"id": "abc123",
"status": "billable",
"code": {
"coding": [
{
"system": "http://example.org/lab-codes",
"code": "PANEL001"
}
]
},
"subject": {
"reference": "Patient/patient123"
},
"priceOverride": {
"value": 150.00,
"currency": "USD"
}
}
Error Responses
| Status Code | Description |
|---|---|
400 Bad Request | Missing required chargeItem parameter |
404 Not Found | ChargeItemDefinition or ChargeItem not found |
403 Forbidden | Insufficient permissions |