{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/halaxy/json-schema/halaxy-coverage-jsonfhir-schema.json",
  "title": "Coverage.jsonfhir",
  "description": "A Coverage. See https://hl7.org/fhir/R4/coverage.html",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/halaxy-coverage-api-openapi.yml#/components/schemas/Coverage.jsonfhir",
  "type": "object",
  "deprecated": false,
  "properties": {
    "identifier": {
      "description": "Business Identifier for the coverage",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/FhirIdentifier.jsonfhir"
      }
    },
    "status": {
      "description": "The status of the coverage",
      "type": "string",
      "enum": [
        "active",
        "cancelled"
      ]
    },
    "subscriber": {
      "description": "The person receiving the treatment under the coverage",
      "anyOf": [
        {
          "$ref": "#/$defs/FhirReference.jsonfhir"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscriberId": {
      "description": "The patient's claim details (e.g. membership number, card number, reference number)",
      "type": [
        "string",
        "null"
      ]
    },
    "beneficiary": {
      "description": "The person who receives the benefit for the coverage",
      "anyOf": [
        {
          "$ref": "#/$defs/FhirReference.jsonfhir"
        },
        {
          "type": "null"
        }
      ]
    },
    "dependent": {
      "description": "An individual reference number (IRN) on the membership card, typically a single digit number before the cardholder's name",
      "type": [
        "string",
        "null"
      ]
    },
    "period": {
      "description": "The time period when the coverage was valid",
      "anyOf": [
        {
          "$ref": "#/$defs/FhirPeriodYearMonth.jsonfhir"
        },
        {
          "type": "null"
        }
      ]
    },
    "payor": {
      "description": "The issuer of the coverage policy - if Organization, this is the funder (FD) ID.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FhirReference.jsonfhir"
      }
    },
    "attachments": {
      "description": "File attachments to the coverage",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FhirAttachment.jsonfhir"
      }
    },
    "text": {
      "readOnly": true,
      "description": "Text summary of the resource, for human interpretation",
      "anyOf": [
        {
          "$ref": "#/$defs/FhirNarrative.jsonfhir"
        },
        {
          "type": "null"
        }
      ]
    },
    "contained": {
      "readOnly": true,
      "description": "Contained, inline Resources",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FhirResourceInterface.jsonfhir"
      }
    },
    "id": {
      "readOnly": true,
      "description": "Logical id of this artifact",
      "type": [
        "string",
        "null"
      ]
    },
    "meta": {
      "description": "Metadata about the resource",
      "anyOf": [
        {
          "$ref": "#/$defs/FhirResourceMeta.jsonfhir"
        },
        {
          "type": "null"
        }
      ]
    },
    "resourceType": {
      "description": "Resource Type",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "FhirAttachment.jsonfhir": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "data": {
          "description": "The file encoded to base64 (maximum 20MB)",
          "type": "string"
        },
        "contentType": {
          "description": "The file format of the file attachment",
          "type": "string",
          "enum": [
            "application/json",
            "application/xml",
            "application/msword",
            "application/vnd.ms-excel",
            "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
            "application/pdf",
            "text/html",
            "text/xml",
            "text/plain",
            "image/jpeg",
            "image/png",
            "image/gif",
            "video/mp4",
            "application/zip",
            "application/fhir+json"
          ]
        },
        "language": {
          "description": "Human language of the content (BCP-47)",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "ar",
            "bn",
            "cs",
            "da",
            "de",
            "el",
            "en",
            "en-AU",
            "es",
            "fi",
            "fr",
            "fy",
            "hi",
            "hr",
            "it",
            "ja",
            "ko",
            "nl",
            "no",
            "pa",
            "pl",
            "pt",
            "ru",
            "sr",
            "sv",
            "te",
            "zh",
            null
          ]
        },
        "url": {
          "description": "Uri where the data can be found",
          "type": [
            "string",
            "null"
          ]
        },
        "size": {
          "description": "Number of bytes of content (if url provided)",
          "type": [
            "integer",
            "null"
          ]
        },
        "hash": {
          "description": "Hash of the data (sha-1, base64ed)",
          "type": [
            "string",
            "null"
          ]
        },
        "title": {
          "description": "The file name",
          "type": [
            "string",
            "null"
          ]
        },
        "creation": {
          "description": "The date and time that the file attachment was first created",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirCodeableConcept.jsonfhir": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "coding": {
          "description": "defined by a terminology system",
          "type": "array",
          "items": {
            "$ref": "#/$defs/FhirCoding.jsonfhir"
          }
        },
        "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.jsonfhir": {
      "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"
          ]
        }
      }
    },
    "FhirIdentifier.jsonfhir": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "use": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "usual",
            "official",
            "temp",
            "secondary",
            "old",
            null
          ]
        },
        "type": {
          "description": "Description of identifier",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirCodeableConcept.jsonfhir"
            },
            {
              "type": "null"
            }
          ]
        },
        "system": {
          "description": "The namespace for the identifier value",
          "type": [
            "string",
            "null"
          ]
        },
        "value": {
          "description": "The unique identifier",
          "type": [
            "string",
            "null"
          ]
        },
        "period": {
          "description": "The time period when identifier is/was valid for use",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirPeriodDateTime.jsonfhir"
            },
            {
              "type": "null"
            }
          ]
        },
        "assigner": {
          "description": "Organization that issued id (may be just text)",
          "anyOf": [
            {
              "$ref": "#/$defs/FhirReference.jsonfhir"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirNarrative.jsonfhir": {
      "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"
          ]
        }
      }
    },
    "FhirPeriodDateTime.jsonfhir": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "start": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "end": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirPeriodYearMonth.jsonfhir": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "start": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "end": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "id": {
          "readOnly": true,
          "description": "ID of the FHIR element (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FhirReference.jsonfhir": {
      "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.jsonfhir": {
      "type": "object",
      "description": "",
      "deprecated": false
    },
    "FhirResourceMeta.jsonfhir": {
      "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"
          }
        }
      }
    }
  }
}