{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/halaxy/json-schema/halaxy-charge-item-definition-schema.json",
  "title": "ChargeItemDefinition",
  "description": "A ChargeItemDefinition (Fee).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/halaxy-chargeitemdefinition-api-openapi.yml#/components/schemas/ChargeItemDefinition",
  "type": "object",
  "deprecated": false,
  "properties": {
    "title": {
      "description": "The name of the fee (e.g. Short Consultation)",
      "type": [
        "string",
        "null"
      ]
    },
    "code": {
      "description": "The item number or code of the fee",
      "anyOf": [
        {
          "$ref": "#/$defs/FhirCodeableConcept"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "description": "The status of the fee - active if propertyGroup is current, retired if propertyGroup is archived, unknown if fee has multiple records of propertyGroup",
      "default": "unknown",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "draft",
        "active",
        "retired",
        "unknown",
        null
      ]
    },
    "useContext": {
      "description": "The fee type and fee category of this fee",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FhirUsageContext"
      }
    },
    "publisher": {
      "description": "The name of the funder of this fee",
      "type": [
        "string",
        "null"
      ]
    },
    "date": {
      "description": "The date when the fee was last modified",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "propertyGroup": {
      "description": "An individual pricing block for this fee",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FhirPropertyGroup"
      }
    },
    "text": {
      "readOnly": true,
      "description": "Text summary of the resource, for human interpretation",
      "anyOf": [
        {
          "$ref": "#/$defs/FhirNarrative"
        },
        {
          "type": "null"
        }
      ]
    },
    "contained": {
      "readOnly": true,
      "description": "Contained, inline Resources",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FhirResourceInterface"
      }
    },
    "id": {
      "readOnly": true,
      "description": "Logical id of this artifact",
      "type": [
        "string",
        "null"
      ]
    },
    "meta": {
      "description": "Metadata about the resource",
      "anyOf": [
        {
          "$ref": "#/$defs/FhirResourceMeta"
        },
        {
          "type": "null"
        }
      ]
    },
    "resourceType": {
      "description": "Resource Type",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "FhirApplicability": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "description": {
          "description": "Natural language description of the condition (e.g: Practitioner is the performer)",
          "type": [
            "string",
            "null"
          ]
        },
        "language": {
          "description": "Media type of the language for the expression (e.g: text/fhirpath)",
          "type": [
            "string",
            "null"
          ]
        },
        "expression": {
          "description": "An expression that returns true or false, indicating whether the condition is satisfied (e.g: %context.performer.actor.reference = 'Practitioner/1')",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirCodeableConcept": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "coding": {
          "description": "defined by a terminology system",
          "type": "array",
          "items": {
            "$ref": "#/$defs/FhirCoding"
          }
        },
        "text": {
          "description": "Plain text representation of the concept",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirCoding": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "system": {
          "format": "uri",
          "description": "Identity of the terminology system",
          "type": [
            "string",
            "null"
          ]
        },
        "code": {
          "description": "Symbol in syntax defined by the system",
          "type": [
            "string",
            "null"
          ]
        },
        "display": {
          "description": "Representation defined by the system",
          "type": [
            "string",
            "null"
          ]
        },
        "userSelected": {
          "readOnly": true,
          "description": "If this coding was chosen directly by the user",
          "type": [
            "boolean",
            "null"
          ]
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirMonetaryComponent": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "type": {
          "description": "Codes indicating the kind of the price component",
          "type": "string",
          "enum": [
            "base",
            "surcharge",
            "deduction",
            "discount",
            "tax",
            "informational"
          ]
        },
        "code": {
          "description": "Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirCodeableConcept"
            },
            {
              "type": "null"
            }
          ]
        },
        "factor": {
          "description": "Factor used for calculating this component",
          "type": [
            "number",
            "null"
          ]
        },
        "amount": {
          "description": "Explicit value amount to be used",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirMoney"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirMoney": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "value": {
          "description": "The numerical value of the amount",
          "type": [
            "number",
            "null"
          ]
        },
        "currency": {
          "description": "The currency used in ISO 4217 currency code",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "AED",
            "AFN",
            "ALL",
            "AMD",
            "ANG",
            "AOA",
            "ARS",
            "AUD",
            "AWG",
            "AZN",
            "BAM",
            "BBD",
            "BDT",
            "BGN",
            "BHD",
            "BIF",
            "BMD",
            "BND",
            "BOB",
            "BRL",
            "BSD",
            "BTN",
            "BWP",
            "BYN",
            "BZD",
            "CAD",
            "CDF",
            "CHF",
            "CLP",
            "CNY",
            "COP",
            "CRC",
            "CUC",
            "CUP",
            "CVE",
            "CZK",
            "DJF",
            "DKK",
            "DOP",
            "DZD",
            "EGP",
            "ERN",
            "ETB",
            "EUR",
            "FJD",
            "FKP",
            "FOK",
            "GBP",
            "GEL",
            "GGP",
            "GHS",
            "GIP",
            "GMD",
            "GNF",
            "GTQ",
            "GYD",
            "HKD",
            "HNL",
            "HRK",
            "HTG",
            "HUF",
            "IDR",
            "ILS",
            "IMP",
            "INR",
            "IQD",
            "IRR",
            "ISK",
            "JEP",
            "JMD",
            "JOD",
            "JPY",
            "KES",
            "KGS",
            "KHR",
            "KID",
            "KMF",
            "KRW",
            "KWD",
            "KYD",
            "KZT",
            "LAK",
            "LBP",
            "LKR",
            "LRD",
            "LSL",
            "LYD",
            "MAD",
            "MDL",
            "MGA",
            "MKD",
            "MMK",
            "MNT",
            "MOP",
            "MRU",
            "MUR",
            "MVR",
            "MWK",
            "MXN",
            "MYR",
            "MZN",
            "NAD",
            "NGN",
            "NIO",
            "NOK",
            "NPR",
            "NZD",
            "OMR",
            "PAB",
            "PEN",
            "PGK",
            "PHP",
            "PKR",
            "PLN",
            "PYG",
            "QAR",
            "RON",
            "RSD",
            "RUB",
            "RWF",
            "SAR",
            "SBD",
            "SCR",
            "SDG",
            "SEK",
            "SGD",
            "SHP",
            "SLL",
            "SOS",
            "SRD",
            "SSP",
            "STN",
            "SVC",
            "SYP",
            "SZL",
            "THB",
            "TJS",
            "TMT",
            "TND",
            "TOP",
            "TRY",
            "TTD",
            "TVD",
            "TWD",
            "TZS",
            "UAH",
            "UGX",
            "USD",
            "USN",
            "UYI",
            "UYU",
            "UZS",
            "VEF",
            "VND",
            "VUV",
            "WST",
            "XAF",
            "XAG",
            "XAU",
            "XBA",
            "XBB",
            "XBC",
            "XBD",
            "XCD",
            "XDR",
            "XOF",
            "XPD",
            "XPF",
            "XPT",
            "XSU",
            "XTS",
            "XUA",
            "XXX",
            "YER",
            "ZAR",
            "ZMW",
            "ZWL",
            null
          ]
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirNarrative": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "status": {
          "readOnly": true,
          "description": "Describes how the narrative was generated",
          "type": "string",
          "enum": [
            "generated",
            "extensions",
            "additional",
            "empty"
          ]
        },
        "div": {
          "readOnly": true,
          "description": "Limited xhtml content",
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirPropertyGroup": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "applicability": {
          "description": "Filters that determine when to apply the pricing block to a fee (e.g. level or date range)",
          "type": "array",
          "items": {
            "$ref": "#/$defs/FhirApplicability"
          }
        },
        "priceComponent": {
          "description": "The price, tax and rebate breakdown for this pricing block",
          "type": "array",
          "items": {
            "$ref": "#/$defs/FhirMonetaryComponent"
          }
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirQuantity": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "value": {
          "oneOf": [
            {
              "type": [
                "number",
                "null"
              ]
            },
            {
              "type": "integer"
            }
          ]
        },
        "comparator": {
          "type": [
            "string",
            "null"
          ]
        },
        "unit": {
          "type": [
            "string",
            "null"
          ]
        },
        "system": {
          "default": "http://unitsofmeasure.org",
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirRange": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "low": {
          "description": "The low limit. The boundary is inclusive. (e.g: 0)",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirQuantity"
            },
            {
              "type": "null"
            }
          ]
        },
        "high": {
          "description": "The high limit. The boundary is inclusive. (e.g: 1)",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirQuantity"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirReference": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "required": [
        "reference"
      ],
      "properties": {
        "reference": {
          "description": "The URL (relative or absolute) to the resource being referenced",
          "type": "string"
        },
        "type": {
          "description": "The type of resource being referenced",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "Organization",
            "Patient",
            "Practitioner",
            "PractitionerRole",
            "Appointment",
            "Coverage",
            "Invoice",
            "Communication",
            "Group",
            "DocumentReference",
            "InvoiceLine",
            "PaymentTransaction",
            "Referral",
            "ReferralDefinition",
            "Schedule",
            "Slot",
            "HealthcareService",
            "AllergyIntolerance",
            "Condition",
            "Immunization",
            "Subscription",
            "SubscriptionTopic",
            "ChargeItemDefinition",
            "ServiceRequest",
            "Medication",
            "MedicationRequest",
            "Questionnaire",
            "QuestionnaireResponse",
            "ValueSet",
            "ValueSetConcept",
            "Observation",
            "Binary",
            "Bundle",
            "OperationOutcome",
            "Parameters",
            "List",
            null
          ]
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirResourceInterface": {
      "type": "object",
      "description": "",
      "deprecated": false
    },
    "FhirResourceMeta": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "lastUpdated": {
          "readOnly": true,
          "description": "When the resource version last changed",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "profile": {
          "description": "Profiles this resource claims to conform to",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "FhirUsageContext": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "code": {
          "description": "Metadata that can be used to retrieve an artifact",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirCoding"
            },
            {
              "type": "null"
            }
          ]
        },
        "valueCodeableConcept": {
          "description": "The context is represented by a CodeableConcept referencing one or more terminologies or text",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirCodeableConcept"
            },
            {
              "type": "null"
            }
          ]
        },
        "valueQuantity": {
          "description": "The context is represented by a measured amount",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirQuantity"
            },
            {
              "type": "null"
            }
          ]
        },
        "valueRange": {
          "description": "The context is represented by a set of ordered Quantity values with a low and high limit",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirRange"
            },
            {
              "type": "null"
            }
          ]
        },
        "valueReference": {
          "description": "The context is represented by the reference of another resource",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirReference"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}