{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "schema:HealthPlanCostSharingSpecification",
  "title": "HealthPlanCostSharingSpecification",
  "description": "A description of costs to the patient under a given network or formulary.",
  "type": "object",
  "allOf": [
    {
      "description": "A utility class that serves as the umbrella for a number of 'intangible' things such as quantities, structured values, etc.",
      "$ref": "schema:Intangible"
    }
  ],
  "properties": {
    "healthPlanCoinsuranceOption": {
      "description": "Whether the coinsurance applies before or after deductible, etc. TODO: Is this a closed set?",
      "oneOf": [
        { "type": "string" },
        { "type": "array", "items": { "type": "string" } }
      ]
    },
    "healthPlanCoinsuranceRate": {
      "description": "The rate of coinsurance expressed as a number between 0.0 and 1.0.",
      "type": "number"
    },
    "healthPlanCopay": {
      "description": "The copay amount.",
      "$ref": "schema:PriceSpecification"
    },
    "healthPlanCopayOption": {
      "description": "Whether the copay is before or after deductible, etc. TODO: Is this a closed set?",
      "oneOf": [
        { "type": "string" },
        { "type": "array", "items": { "type": "string" } }
      ]
    },
    "healthPlanPharmacyCategory": {
      "description": "The category or type of pharmacy associated with this cost sharing.",
      "type": "string"
    }
  }
}
