{
  "openapi": "3.0.3",
  "x-capabilitystatement-url": "https://fhir-ig.digital.health.nz/special-authority/CapabilityStatement/SpecialAuthorityFHIRAPICapabilityStatement",
  "x-capabilitystatement-id": "SpecialAuthorityFHIRAPICapabilityStatement",
  "info": {
    "version": "0.1.1",
    "title": "Health NZ | Te Whatu Ora Special Authority FHIR API",
    "description": "Health NZ | Te Whatu Ora Special Authority FHIR API",
    "license": {
      "name": "Health New Zealand Digital Services Hub API Access and Use Agreement",
      "url": "https://www.tewhatuora.govt.nz/assets/Our-health-system/Digital-health/Digital-Service-Hub/API-Access-and-Use-Agreement.docx"
    },
    "contact": {
      "name": "Health New Zealand | Te Whatu Ora",
      "url": "https://www.tewhatuora.govt.nz"
    }
  },
  "externalDocs": {
    "url": "https://fhir-ig.digital.health.nz/special-authority",
    "description": "FHIR Implementation Guide"
  },
  "servers": [
    {
      "url": "https://api.sa.digital.health.nz/s2s/fhir/R4",
      "description": "Production Special Authority FHIR API"
    }
  ],
  "paths": {
    "/Claim": {
      "get": {
        "summary": "Search for Claim",
        "description": "Search Applications, or retrieve a submitted Application by Application Number with _include. Search results are summary representations: referenced resources are only resolved via _include.",
        "tags": [
          "Claim"
        ],
        "operationId": "searchClaim",
        "parameters": [
          {
            "name": "Request-Context",
            "in": "header",
            "required": true,
            "description": "Signed Request-Context header asserting the authenticated user, organisation and facility. Validated on every request.",
            "schema": {
              "type": "string",
              "format": "base64",
              "description": "A base64 encoded JSON object that represents the request context for the current request. See the schema https://github.com/tewhatuora/schemas/Request-Context-v2.json for context properties"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "required": false,
            "description": "Optional client-supplied correlation id, returned in the response and recorded in audit events.",
            "schema": {
              "type": "string",
              "description": "A string representing the Correlation ID for the current request. This ID is used to correlate logs and other data across services."
            }
          },
          {
            "name": "identifier",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "patient",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "application-status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created",
            "in": "query",
            "style": "form",
            "explode": true,
            "required": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "date": {
                "value": "2024-12-02"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful search operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "Bundle"
                      ],
                      "description": "Resource type must be a Bundle."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "searchset"
                      ],
                      "description": "The type of response (e.g., transaction-response or batch-response)."
                    },
                    "entry": {
                      "type": "array",
                      "description": "Entries in the bundle representing resources involved in the interaction.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resource": {
                            "type": "object",
                            "description": "A resource in the bundle.",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "resourceType": {
                                    "type": "string",
                                    "enum": [
                                      "Claim"
                                    ]
                                  },
                                  "id": {
                                    "type": "string",
                                    "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                    "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                                  },
                                  "meta": {
                                    "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                    "type": "object",
                                    "properties": {
                                      "versionId": {
                                        "type": "string",
                                        "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                        "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                                      },
                                      "lastUpdated": {
                                        "type": "string",
                                        "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                        "description": "When the resource last changed &ndash; e.g. when the version changed."
                                      },
                                      "source": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                      },
                                      "profile": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                        }
                                      },
                                      "security": {
                                        "type": "array",
                                        "items": {
                                          "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      },
                                      "tag": {
                                        "type": "array",
                                        "items": {
                                          "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "implicitRules": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                                  },
                                  "language": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "The base language in which the resource is written."
                                  },
                                  "text": {
                                    "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                                    "type": "object",
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "generated",
                                          "extensions",
                                          "additional",
                                          "empty"
                                        ],
                                        "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                                      },
                                      "div": {
                                        "type": "string",
                                        "description": "The actual narrative content, a stripped down version of XHTML."
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "div"
                                    ]
                                  },
                                  "contained": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "resourceType": {
                                          "type": "string",
                                          "enum": [
                                            "Account",
                                            "ActivityDefinition",
                                            "AdverseEvent",
                                            "AllergyIntolerance",
                                            "Appointment",
                                            "AppointmentResponse",
                                            "AuditEvent",
                                            "Basic",
                                            "Binary",
                                            "BiologicallyDerivedProduct",
                                            "BodyStructure",
                                            "Bundle",
                                            "CapabilityStatement",
                                            "CarePlan",
                                            "CareTeam",
                                            "CatalogEntry",
                                            "ChargeItem",
                                            "ChargeItemDefinition",
                                            "Claim",
                                            "ClaimResponse",
                                            "ClinicalImpression",
                                            "CodeSystem",
                                            "Communication",
                                            "CommunicationRequest",
                                            "CompartmentDefinition",
                                            "Composition",
                                            "ConceptMap",
                                            "Condition",
                                            "Consent",
                                            "Contract",
                                            "Coverage",
                                            "CoverageEligibilityRequest",
                                            "CoverageEligibilityResponse",
                                            "DetectedIssue",
                                            "Device",
                                            "DeviceDefinition",
                                            "DeviceMetric",
                                            "DeviceRequest",
                                            "DeviceUseStatement",
                                            "DiagnosticReport",
                                            "DocumentManifest",
                                            "DocumentReference",
                                            "DomainResource",
                                            "EffectEvidenceSynthesis",
                                            "Encounter",
                                            "Endpoint",
                                            "EnrollmentRequest",
                                            "EnrollmentResponse",
                                            "EpisodeOfCare",
                                            "EventDefinition",
                                            "Evidence",
                                            "EvidenceVariable",
                                            "ExampleScenario",
                                            "ExplanationOfBenefit",
                                            "FamilyMemberHistory",
                                            "Flag",
                                            "Goal",
                                            "GraphDefinition",
                                            "Group",
                                            "GuidanceResponse",
                                            "HealthcareService",
                                            "ImagingStudy",
                                            "Immunization",
                                            "ImmunizationEvaluation",
                                            "ImmunizationRecommendation",
                                            "ImplementationGuide",
                                            "InsurancePlan",
                                            "Invoice",
                                            "Library",
                                            "Linkage",
                                            "List",
                                            "Location",
                                            "Measure",
                                            "MeasureReport",
                                            "Media",
                                            "Medication",
                                            "MedicationAdministration",
                                            "MedicationDispense",
                                            "MedicationKnowledge",
                                            "MedicationRequest",
                                            "MedicationStatement",
                                            "MedicinalProduct",
                                            "MedicinalProductAuthorization",
                                            "MedicinalProductContraindication",
                                            "MedicinalProductIndication",
                                            "MedicinalProductIngredient",
                                            "MedicinalProductInteraction",
                                            "MedicinalProductManufactured",
                                            "MedicinalProductPackaged",
                                            "MedicinalProductPharmaceutical",
                                            "MedicinalProductUndesirableEffect",
                                            "MessageDefinition",
                                            "MessageHeader",
                                            "MolecularSequence",
                                            "NamingSystem",
                                            "NutritionOrder",
                                            "Observation",
                                            "ObservationDefinition",
                                            "OperationDefinition",
                                            "OperationOutcome",
                                            "Organization",
                                            "OrganizationAffiliation",
                                            "Parameters",
                                            "Patient",
                                            "PaymentNotice",
                                            "PaymentReconciliation",
                                            "Person",
                                            "PlanDefinition",
                                            "Practitioner",
                                            "PractitionerRole",
                                            "Procedure",
                                            "Provenance",
                                            "Questionnaire",
                                            "QuestionnaireResponse",
                                            "RelatedPerson",
                                            "RequestGroup",
                                            "ResearchDefinition",
                                            "ResearchElementDefinition",
                                            "ResearchStudy",
                                            "ResearchSubject",
                                            "Resource",
                                            "RiskAssessment",
                                            "RiskEvidenceSynthesis",
                                            "Schedule",
                                            "SearchParameter",
                                            "ServiceRequest",
                                            "Slot",
                                            "Specimen",
                                            "SpecimenDefinition",
                                            "StructureDefinition",
                                            "StructureMap",
                                            "Subscription",
                                            "Substance",
                                            "SubstanceNucleicAcid",
                                            "SubstancePolymer",
                                            "SubstanceProtein",
                                            "SubstanceReferenceInformation",
                                            "SubstanceSourceMaterial",
                                            "SubstanceSpecification",
                                            "SupplyDelivery",
                                            "SupplyRequest",
                                            "Task",
                                            "TerminologyCapabilities",
                                            "TestReport",
                                            "TestScript",
                                            "ValueSet",
                                            "VerificationResult",
                                            "VisionPrescription"
                                          ]
                                        },
                                        "id": {
                                          "type": "string",
                                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                          "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                                        },
                                        "meta": {
                                          "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                          "type": "object",
                                          "properties": {
                                            "versionId": {
                                              "type": "string",
                                              "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                              "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                                            },
                                            "lastUpdated": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                              "description": "When the resource last changed &ndash; e.g. when the version changed."
                                            },
                                            "source": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                            },
                                            "profile": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "pattern": "\\S*",
                                                "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                              }
                                            },
                                            "security": {
                                              "type": "array",
                                              "items": {
                                                "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "tag": {
                                              "type": "array",
                                              "items": {
                                                "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "implicitRules": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                                        },
                                        "language": {
                                          "type": "string",
                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                          "description": "The base language in which the resource is written."
                                        }
                                      },
                                      "required": [
                                        "resourceType"
                                      ],
                                      "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                                    }
                                  },
                                  "extension": {
                                    "type": "array",
                                    "items": {
                                      "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  },
                                  "modifierExtension": {
                                    "type": "array",
                                    "items": {
                                      "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  },
                                  "identifier": {
                                    "type": "array",
                                    "items": {
                                      "description": "A unique identifier assigned to this claim.",
                                      "type": "object",
                                      "properties": {
                                        "use": {
                                          "type": "string",
                                          "enum": [
                                            "usual",
                                            "official",
                                            "temp",
                                            "secondary",
                                            "old"
                                          ],
                                          "description": "The purpose of this identifier."
                                        },
                                        "type": {
                                          "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "system": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                                        },
                                        "value": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                                        },
                                        "period": {
                                          "description": "Time period during which identifier is/was valid for use.",
                                          "type": "object",
                                          "properties": {
                                            "start": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The start of the period. The boundary is inclusive."
                                            },
                                            "end": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                            }
                                          }
                                        },
                                        "assigner": {
                                          "description": "Organization that issued/manages the identifier.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "maxItems": 1,
                                    "required": [
                                      "system",
                                      "value"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "active"
                                    ]
                                  },
                                  "type": {
                                    "type": "object",
                                    "properties": {
                                      "coding": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "enum": [
                                                "http://terminology.hl7.org/CodeSystem/claim-type"
                                              ]
                                            },
                                            "code": {
                                              "type": "string",
                                              "enum": [
                                                "pharmacy"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "system",
                                            "code"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "coding"
                                    ]
                                  },
                                  "use": {
                                    "type": "string",
                                    "enum": [
                                      "preauthorization"
                                    ]
                                  },
                                  "patient": {
                                    "description": "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    }
                                  },
                                  "created": {
                                    "type": "string",
                                    "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                    "description": "The date this resource was created."
                                  },
                                  "provider": {
                                    "description": "The provider which is responsible for the claim, predetermination or preauthorization.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    }
                                  },
                                  "priority": {
                                    "type": "object",
                                    "properties": {
                                      "coding": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "enum": [
                                                "http://terminology.hl7.org/CodeSystem/processpriority"
                                              ]
                                            },
                                            "code": {
                                              "type": "string",
                                              "enum": [
                                                "normal"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "system",
                                            "code"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "coding"
                                    ]
                                  },
                                  "supportingInfo": {
                                    "type": "array",
                                    "items": {
                                      "description": "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.",
                                      "type": "object",
                                      "properties": {
                                        "modifierExtension": {
                                          "type": "array",
                                          "items": {
                                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                            "type": "object",
                                            "additionalProperties": true
                                          }
                                        },
                                        "sequence": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "A number to uniquely identify supporting information entries."
                                        },
                                        "category": {
                                          "description": "The general class of the information supplied: information; exception; accident, employment; onset, etc.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "code": {
                                          "description": "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "timingDate": {
                                          "type": "string",
                                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?",
                                          "description": "The date when or period to which this information refers."
                                        },
                                        "timingPeriod": {
                                          "description": "The date when or period to which this information refers.",
                                          "type": "object",
                                          "properties": {
                                            "start": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The start of the period. The boundary is inclusive."
                                            },
                                            "end": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                            }
                                          }
                                        },
                                        "valueBoolean": {
                                          "type": "boolean",
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data."
                                        },
                                        "valueString": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data."
                                        },
                                        "valueQuantity": {
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.",
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "type": "number",
                                              "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                            },
                                            "comparator": {
                                              "type": "string",
                                              "enum": [
                                                "<",
                                                "<=",
                                                ">=",
                                                ">"
                                              ],
                                              "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                            },
                                            "unit": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human&ndash;readable form of the unit."
                                            },
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the system that provides the coded form of the unit."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A computer processable form of the unit in some unit representation system."
                                            }
                                          }
                                        },
                                        "valueAttachment": {
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.",
                                          "type": "object",
                                          "properties": {
                                            "contentType": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate."
                                            },
                                            "language": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "The human language of the content. The value can be any valid value according to BCP 47."
                                            },
                                            "data": {
                                              "type": "string",
                                              "pattern": "(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+",
                                              "description": "The actual data of the attachment &ndash; a sequence of bytes, base64 encoded."
                                            },
                                            "url": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "A location where the data can be accessed."
                                            },
                                            "size": {
                                              "type": "integer",
                                              "format": "int32",
                                              "description": "The number of bytes of data that make up this attachment (before base64 encoding, if that is done)."
                                            },
                                            "hash": {
                                              "type": "string",
                                              "pattern": "(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+",
                                              "description": "The calculated hash of the data using SHA&ndash;1. Represented using base64."
                                            },
                                            "title": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A label or set of text to display in place of the data."
                                            },
                                            "creation": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The date that the attachment was first created."
                                            }
                                          }
                                        },
                                        "valueReference": {
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        },
                                        "reason": {
                                          "description": "Provides the reason in the situation where a reason code is required in addition to the content.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        }
                                      },
                                      "required": [
                                        "sequence",
                                        "category"
                                      ]
                                    },
                                    "minItems": 1
                                  },
                                  "insurance": {
                                    "type": "array",
                                    "items": {
                                      "description": "Financial instruments for reimbursement for the health care products and services specified on the claim.",
                                      "type": "object",
                                      "properties": {
                                        "modifierExtension": {
                                          "type": "array",
                                          "items": {
                                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                            "type": "object",
                                            "additionalProperties": true
                                          }
                                        },
                                        "sequence": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order."
                                        },
                                        "focal": {
                                          "type": "boolean",
                                          "description": "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true."
                                        },
                                        "identifier": {
                                          "description": "The business identifier to be used when the claim is sent for adjudication against this insurance policy.",
                                          "type": "object",
                                          "properties": {
                                            "use": {
                                              "type": "string",
                                              "enum": [
                                                "usual",
                                                "official",
                                                "temp",
                                                "secondary",
                                                "old"
                                              ],
                                              "description": "The purpose of this identifier."
                                            },
                                            "type": {
                                              "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                                              "type": "object",
                                              "properties": {
                                                "coding": {
                                                  "type": "array",
                                                  "items": {
                                                    "description": "A reference to a code defined by a terminology system.",
                                                    "type": "object",
                                                    "properties": {
                                                      "system": {
                                                        "type": "string",
                                                        "pattern": "\\S*",
                                                        "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                      },
                                                      "version": {
                                                        "type": "string",
                                                        "pattern": "[ \\r\\n\\t\\S]+",
                                                        "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                      },
                                                      "code": {
                                                        "type": "string",
                                                        "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                        "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                      },
                                                      "display": {
                                                        "type": "string",
                                                        "pattern": "[ \\r\\n\\t\\S]+",
                                                        "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                      },
                                                      "userSelected": {
                                                        "type": "boolean",
                                                        "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                      }
                                                    }
                                                  }
                                                },
                                                "text": {
                                                  "type": "string",
                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                  "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                }
                                              }
                                            },
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                                            },
                                            "value": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                                            },
                                            "period": {
                                              "description": "Time period during which identifier is/was valid for use.",
                                              "type": "object",
                                              "properties": {
                                                "start": {
                                                  "type": "string",
                                                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                                  "description": "The start of the period. The boundary is inclusive."
                                                },
                                                "end": {
                                                  "type": "string",
                                                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                                  "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                                }
                                              }
                                            },
                                            "assigner": {
                                              "description": "Organization that issued/manages the identifier.",
                                              "type": "object",
                                              "properties": {
                                                "reference": {
                                                  "type": "string",
                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                  "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "pattern": "\\S*",
                                                  "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                                },
                                                "identifier": {
                                                  "type": "object",
                                                  "additionalProperties": true,
                                                  "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                                },
                                                "display": {
                                                  "type": "string",
                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                  "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "coverage": {
                                          "description": "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        },
                                        "businessArrangement": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "A business agreement number established between the provider and the insurer for special business processing purposes."
                                        },
                                        "preAuthRef": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "[ \\r\\n\\t\\S]+",
                                            "description": "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization."
                                          }
                                        },
                                        "claimResponse": {
                                          "description": "The result of the adjudication of the line items for the Coverage specified in this insurance.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        }
                                      },
                                      "required": [
                                        "sequence",
                                        "focal",
                                        "coverage"
                                      ]
                                    },
                                    "minItems": 1,
                                    "maxItems": 1,
                                    "properties": {
                                      "coverage": {
                                        "type": "object",
                                        "properties": {},
                                        "required": [
                                          "display"
                                        ]
                                      }
                                    }
                                  },
                                  "item": {
                                    "type": "array",
                                    "items": {
                                      "description": "A claim line. Either a simple  product or service or a 'group' of details which can each be a simple items or groups of sub&ndash;details.",
                                      "type": "object",
                                      "properties": {
                                        "modifierExtension": {
                                          "type": "array",
                                          "items": {
                                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                            "type": "object",
                                            "additionalProperties": true
                                          }
                                        },
                                        "sequence": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "A number to uniquely identify item entries."
                                        },
                                        "careTeamSequence": {
                                          "type": "array",
                                          "items": {
                                            "type": "integer",
                                            "format": "int32",
                                            "description": "CareTeam members related to this service or product."
                                          }
                                        },
                                        "diagnosisSequence": {
                                          "type": "array",
                                          "items": {
                                            "type": "integer",
                                            "format": "int32",
                                            "description": "Diagnosis applicable for this service or product."
                                          }
                                        },
                                        "procedureSequence": {
                                          "type": "array",
                                          "items": {
                                            "type": "integer",
                                            "format": "int32",
                                            "description": "Procedures applicable for this service or product."
                                          }
                                        },
                                        "informationSequence": {
                                          "type": "array",
                                          "items": {
                                            "type": "integer",
                                            "format": "int32",
                                            "description": "Exceptions, special conditions and supporting information applicable for this service or product."
                                          }
                                        },
                                        "revenue": {
                                          "description": "The type of revenue or cost center providing the product and/or service.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "category": {
                                          "description": "Code to identify the general type of benefits under which products and services are provided.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "productOrService": {
                                          "description": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "modifier": {
                                          "type": "array",
                                          "items": {
                                            "description": "Item typification or modifiers codes to convey additional context for the product or service.",
                                            "type": "object",
                                            "properties": {
                                              "coding": {
                                                "type": "array",
                                                "items": {
                                                  "description": "A reference to a code defined by a terminology system.",
                                                  "type": "object",
                                                  "properties": {
                                                    "system": {
                                                      "type": "string",
                                                      "pattern": "\\S*",
                                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                    },
                                                    "version": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                    },
                                                    "code": {
                                                      "type": "string",
                                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                    },
                                                    "display": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                    },
                                                    "userSelected": {
                                                      "type": "boolean",
                                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                    }
                                                  }
                                                }
                                              },
                                              "text": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                              }
                                            }
                                          }
                                        },
                                        "programCode": {
                                          "type": "array",
                                          "items": {
                                            "description": "Identifies the program under which this may be recovered.",
                                            "type": "object",
                                            "properties": {
                                              "coding": {
                                                "type": "array",
                                                "items": {
                                                  "description": "A reference to a code defined by a terminology system.",
                                                  "type": "object",
                                                  "properties": {
                                                    "system": {
                                                      "type": "string",
                                                      "pattern": "\\S*",
                                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                    },
                                                    "version": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                    },
                                                    "code": {
                                                      "type": "string",
                                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                    },
                                                    "display": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                    },
                                                    "userSelected": {
                                                      "type": "boolean",
                                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                    }
                                                  }
                                                }
                                              },
                                              "text": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                              }
                                            }
                                          }
                                        },
                                        "servicedDate": {
                                          "type": "string",
                                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?",
                                          "description": "The date or dates when the service or product was supplied, performed or completed."
                                        },
                                        "servicedPeriod": {
                                          "description": "The date or dates when the service or product was supplied, performed or completed.",
                                          "type": "object",
                                          "properties": {
                                            "start": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The start of the period. The boundary is inclusive."
                                            },
                                            "end": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                            }
                                          }
                                        },
                                        "locationCodeableConcept": {
                                          "description": "Where the product or service was provided.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "locationAddress": {
                                          "description": "Where the product or service was provided.",
                                          "type": "object",
                                          "properties": {
                                            "use": {
                                              "type": "string",
                                              "enum": [
                                                "home",
                                                "work",
                                                "temp",
                                                "old",
                                                "billing"
                                              ],
                                              "description": "The purpose of this address."
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "postal",
                                                "physical",
                                                "both"
                                              ],
                                              "description": "Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care&ndash;of addresses). Most addresses are both."
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts."
                                            },
                                            "line": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "This component contains the house number, apartment number, street name, street direction,  P.O. Box number, delivery hints, and similar address information."
                                              }
                                            },
                                            "city": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The name of the city, town, suburb, village or other community or delivery center."
                                            },
                                            "district": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The name of the administrative area (county)."
                                            },
                                            "state": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Sub&ndash;unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes)."
                                            },
                                            "postalCode": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A postal code designating a region defined by the postal service."
                                            },
                                            "country": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Country &ndash; a nation as commonly understood or generally accepted."
                                            },
                                            "period": {
                                              "description": "Time period when address was/is in use.",
                                              "type": "object",
                                              "properties": {
                                                "start": {
                                                  "type": "string",
                                                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                                  "description": "The start of the period. The boundary is inclusive."
                                                },
                                                "end": {
                                                  "type": "string",
                                                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                                  "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "locationReference": {
                                          "description": "Where the product or service was provided.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        },
                                        "quantity": {
                                          "description": "The number of repetitions of a service or product.",
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "type": "number",
                                              "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                            },
                                            "comparator": {
                                              "type": "string",
                                              "enum": [
                                                "<",
                                                "<=",
                                                ">=",
                                                ">"
                                              ],
                                              "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                            },
                                            "unit": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human&ndash;readable form of the unit."
                                            },
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the system that provides the coded form of the unit."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A computer processable form of the unit in some unit representation system."
                                            }
                                          }
                                        },
                                        "unitPrice": {
                                          "description": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.",
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "type": "number",
                                              "description": "Numerical value (with implicit precision)."
                                            },
                                            "currency": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "ISO 4217 Currency Code."
                                            }
                                          }
                                        },
                                        "factor": {
                                          "type": "number",
                                          "description": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                        },
                                        "net": {
                                          "description": "The quantity times the unit price for an additional service or product or charge.",
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "type": "number",
                                              "description": "Numerical value (with implicit precision)."
                                            },
                                            "currency": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "ISO 4217 Currency Code."
                                            }
                                          }
                                        },
                                        "udi": {
                                          "type": "array",
                                          "items": {
                                            "description": "Unique Device Identifiers associated with this line item.",
                                            "type": "object",
                                            "properties": {
                                              "reference": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                              },
                                              "type": {
                                                "type": "string",
                                                "pattern": "\\S*",
                                                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                              },
                                              "identifier": {
                                                "type": "object",
                                                "additionalProperties": true,
                                                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                              },
                                              "display": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                              }
                                            }
                                          }
                                        },
                                        "bodySite": {
                                          "description": "Physical service site on the patient (limb, tooth, etc.).",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "subSite": {
                                          "type": "array",
                                          "items": {
                                            "description": "A region or surface of the bodySite, e.g. limb region or tooth surface(s).",
                                            "type": "object",
                                            "properties": {
                                              "coding": {
                                                "type": "array",
                                                "items": {
                                                  "description": "A reference to a code defined by a terminology system.",
                                                  "type": "object",
                                                  "properties": {
                                                    "system": {
                                                      "type": "string",
                                                      "pattern": "\\S*",
                                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                    },
                                                    "version": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                    },
                                                    "code": {
                                                      "type": "string",
                                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                    },
                                                    "display": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                    },
                                                    "userSelected": {
                                                      "type": "boolean",
                                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                    }
                                                  }
                                                }
                                              },
                                              "text": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                              }
                                            }
                                          }
                                        },
                                        "encounter": {
                                          "type": "array",
                                          "items": {
                                            "description": "The Encounters during which this Claim was created or to which the creation of this record is tightly associated.",
                                            "type": "object",
                                            "properties": {
                                              "reference": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                              },
                                              "type": {
                                                "type": "string",
                                                "pattern": "\\S*",
                                                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                              },
                                              "identifier": {
                                                "type": "object",
                                                "additionalProperties": true,
                                                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                              },
                                              "display": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                              }
                                            }
                                          }
                                        },
                                        "detail": {
                                          "type": "array",
                                          "items": {
                                            "description": "A claim detail line. Either a simple (a product or service) or a 'group' of sub&ndash;details which are simple items.",
                                            "type": "object",
                                            "properties": {
                                              "modifierExtension": {
                                                "type": "array",
                                                "items": {
                                                  "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                                  "type": "object",
                                                  "additionalProperties": true
                                                }
                                              },
                                              "sequence": {
                                                "type": "integer",
                                                "format": "int32",
                                                "description": "A number to uniquely identify item entries."
                                              },
                                              "revenue": {
                                                "description": "The type of revenue or cost center providing the product and/or service.",
                                                "type": "object",
                                                "properties": {
                                                  "coding": {
                                                    "type": "array",
                                                    "items": {
                                                      "description": "A reference to a code defined by a terminology system.",
                                                      "type": "object",
                                                      "properties": {
                                                        "system": {
                                                          "type": "string",
                                                          "pattern": "\\S*",
                                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                        },
                                                        "version": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                        },
                                                        "display": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                        },
                                                        "userSelected": {
                                                          "type": "boolean",
                                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                        }
                                                      }
                                                    }
                                                  },
                                                  "text": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                  }
                                                }
                                              },
                                              "category": {
                                                "description": "Code to identify the general type of benefits under which products and services are provided.",
                                                "type": "object",
                                                "properties": {
                                                  "coding": {
                                                    "type": "array",
                                                    "items": {
                                                      "description": "A reference to a code defined by a terminology system.",
                                                      "type": "object",
                                                      "properties": {
                                                        "system": {
                                                          "type": "string",
                                                          "pattern": "\\S*",
                                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                        },
                                                        "version": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                        },
                                                        "display": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                        },
                                                        "userSelected": {
                                                          "type": "boolean",
                                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                        }
                                                      }
                                                    }
                                                  },
                                                  "text": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                  }
                                                }
                                              },
                                              "productOrService": {
                                                "description": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.",
                                                "type": "object",
                                                "properties": {
                                                  "coding": {
                                                    "type": "array",
                                                    "items": {
                                                      "description": "A reference to a code defined by a terminology system.",
                                                      "type": "object",
                                                      "properties": {
                                                        "system": {
                                                          "type": "string",
                                                          "pattern": "\\S*",
                                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                        },
                                                        "version": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                        },
                                                        "display": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                        },
                                                        "userSelected": {
                                                          "type": "boolean",
                                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                        }
                                                      }
                                                    }
                                                  },
                                                  "text": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                  }
                                                }
                                              },
                                              "modifier": {
                                                "type": "array",
                                                "items": {
                                                  "description": "Item typification or modifiers codes to convey additional context for the product or service.",
                                                  "type": "object",
                                                  "properties": {
                                                    "coding": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "A reference to a code defined by a terminology system.",
                                                        "type": "object",
                                                        "properties": {
                                                          "system": {
                                                            "type": "string",
                                                            "pattern": "\\S*",
                                                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                          },
                                                          "version": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                          },
                                                          "code": {
                                                            "type": "string",
                                                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                          },
                                                          "display": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                          },
                                                          "userSelected": {
                                                            "type": "boolean",
                                                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "text": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                    }
                                                  }
                                                }
                                              },
                                              "programCode": {
                                                "type": "array",
                                                "items": {
                                                  "description": "Identifies the program under which this may be recovered.",
                                                  "type": "object",
                                                  "properties": {
                                                    "coding": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "A reference to a code defined by a terminology system.",
                                                        "type": "object",
                                                        "properties": {
                                                          "system": {
                                                            "type": "string",
                                                            "pattern": "\\S*",
                                                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                          },
                                                          "version": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                          },
                                                          "code": {
                                                            "type": "string",
                                                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                          },
                                                          "display": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                          },
                                                          "userSelected": {
                                                            "type": "boolean",
                                                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "text": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                    }
                                                  }
                                                }
                                              },
                                              "quantity": {
                                                "description": "The number of repetitions of a service or product.",
                                                "type": "object",
                                                "properties": {
                                                  "value": {
                                                    "type": "number",
                                                    "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                                  },
                                                  "comparator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "<",
                                                      "<=",
                                                      ">=",
                                                      ">"
                                                    ],
                                                    "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                                  },
                                                  "unit": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A human&ndash;readable form of the unit."
                                                  },
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the system that provides the coded form of the unit."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A computer processable form of the unit in some unit representation system."
                                                  }
                                                }
                                              },
                                              "unitPrice": {
                                                "description": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.",
                                                "type": "object",
                                                "properties": {
                                                  "value": {
                                                    "type": "number",
                                                    "description": "Numerical value (with implicit precision)."
                                                  },
                                                  "currency": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "ISO 4217 Currency Code."
                                                  }
                                                }
                                              },
                                              "factor": {
                                                "type": "number",
                                                "description": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                              },
                                              "net": {
                                                "description": "The quantity times the unit price for an additional service or product or charge.",
                                                "type": "object",
                                                "properties": {
                                                  "value": {
                                                    "type": "number",
                                                    "description": "Numerical value (with implicit precision)."
                                                  },
                                                  "currency": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "ISO 4217 Currency Code."
                                                  }
                                                }
                                              },
                                              "udi": {
                                                "type": "array",
                                                "items": {
                                                  "description": "Unique Device Identifiers associated with this line item.",
                                                  "type": "object",
                                                  "properties": {
                                                    "reference": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "pattern": "\\S*",
                                                      "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                                    },
                                                    "identifier": {
                                                      "type": "object",
                                                      "additionalProperties": true,
                                                      "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                                    },
                                                    "display": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                                    }
                                                  }
                                                }
                                              },
                                              "subDetail": {
                                                "type": "array",
                                                "items": {
                                                  "description": "A claim detail line. Either a simple (a product or service) or a 'group' of sub&ndash;details which are simple items.",
                                                  "type": "object",
                                                  "properties": {
                                                    "modifierExtension": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                                        "type": "object",
                                                        "additionalProperties": true
                                                      }
                                                    },
                                                    "sequence": {
                                                      "type": "integer",
                                                      "format": "int32",
                                                      "description": "A number to uniquely identify item entries."
                                                    },
                                                    "revenue": {
                                                      "description": "The type of revenue or cost center providing the product and/or service.",
                                                      "type": "object",
                                                      "properties": {
                                                        "coding": {
                                                          "type": "array",
                                                          "items": {
                                                            "description": "A reference to a code defined by a terminology system.",
                                                            "type": "object",
                                                            "properties": {
                                                              "system": {
                                                                "type": "string",
                                                                "pattern": "\\S*",
                                                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                              },
                                                              "version": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                              },
                                                              "code": {
                                                                "type": "string",
                                                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                              },
                                                              "display": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                              },
                                                              "userSelected": {
                                                                "type": "boolean",
                                                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                              }
                                                            }
                                                          }
                                                        },
                                                        "text": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                        }
                                                      }
                                                    },
                                                    "category": {
                                                      "description": "Code to identify the general type of benefits under which products and services are provided.",
                                                      "type": "object",
                                                      "properties": {
                                                        "coding": {
                                                          "type": "array",
                                                          "items": {
                                                            "description": "A reference to a code defined by a terminology system.",
                                                            "type": "object",
                                                            "properties": {
                                                              "system": {
                                                                "type": "string",
                                                                "pattern": "\\S*",
                                                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                              },
                                                              "version": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                              },
                                                              "code": {
                                                                "type": "string",
                                                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                              },
                                                              "display": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                              },
                                                              "userSelected": {
                                                                "type": "boolean",
                                                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                              }
                                                            }
                                                          }
                                                        },
                                                        "text": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                        }
                                                      }
                                                    },
                                                    "productOrService": {
                                                      "description": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.",
                                                      "type": "object",
                                                      "properties": {
                                                        "coding": {
                                                          "type": "array",
                                                          "items": {
                                                            "description": "A reference to a code defined by a terminology system.",
                                                            "type": "object",
                                                            "properties": {
                                                              "system": {
                                                                "type": "string",
                                                                "pattern": "\\S*",
                                                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                              },
                                                              "version": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                              },
                                                              "code": {
                                                                "type": "string",
                                                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                              },
                                                              "display": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                              },
                                                              "userSelected": {
                                                                "type": "boolean",
                                                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                              }
                                                            }
                                                          }
                                                        },
                                                        "text": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                        }
                                                      }
                                                    },
                                                    "modifier": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "Item typification or modifiers codes to convey additional context for the product or service.",
                                                        "type": "object",
                                                        "properties": {
                                                          "coding": {
                                                            "type": "array",
                                                            "items": {
                                                              "description": "A reference to a code defined by a terminology system.",
                                                              "type": "object",
                                                              "properties": {
                                                                "system": {
                                                                  "type": "string",
                                                                  "pattern": "\\S*",
                                                                  "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                                },
                                                                "version": {
                                                                  "type": "string",
                                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                                  "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                                },
                                                                "code": {
                                                                  "type": "string",
                                                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                  "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                                },
                                                                "display": {
                                                                  "type": "string",
                                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                                  "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                                },
                                                                "userSelected": {
                                                                  "type": "boolean",
                                                                  "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                                }
                                                              }
                                                            }
                                                          },
                                                          "text": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "programCode": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "Identifies the program under which this may be recovered.",
                                                        "type": "object",
                                                        "properties": {
                                                          "coding": {
                                                            "type": "array",
                                                            "items": {
                                                              "description": "A reference to a code defined by a terminology system.",
                                                              "type": "object",
                                                              "properties": {
                                                                "system": {
                                                                  "type": "string",
                                                                  "pattern": "\\S*",
                                                                  "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                                },
                                                                "version": {
                                                                  "type": "string",
                                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                                  "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                                },
                                                                "code": {
                                                                  "type": "string",
                                                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                  "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                                },
                                                                "display": {
                                                                  "type": "string",
                                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                                  "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                                },
                                                                "userSelected": {
                                                                  "type": "boolean",
                                                                  "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                                }
                                                              }
                                                            }
                                                          },
                                                          "text": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "quantity": {
                                                      "description": "The number of repetitions of a service or product.",
                                                      "type": "object",
                                                      "properties": {
                                                        "value": {
                                                          "type": "number",
                                                          "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                                        },
                                                        "comparator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "<",
                                                            "<=",
                                                            ">=",
                                                            ">"
                                                          ],
                                                          "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                                        },
                                                        "unit": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A human&ndash;readable form of the unit."
                                                        },
                                                        "system": {
                                                          "type": "string",
                                                          "pattern": "\\S*",
                                                          "description": "The identification of the system that provides the coded form of the unit."
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "A computer processable form of the unit in some unit representation system."
                                                        }
                                                      }
                                                    },
                                                    "unitPrice": {
                                                      "description": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.",
                                                      "type": "object",
                                                      "properties": {
                                                        "value": {
                                                          "type": "number",
                                                          "description": "Numerical value (with implicit precision)."
                                                        },
                                                        "currency": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "ISO 4217 Currency Code."
                                                        }
                                                      }
                                                    },
                                                    "factor": {
                                                      "type": "number",
                                                      "description": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                                    },
                                                    "net": {
                                                      "description": "The quantity times the unit price for an additional service or product or charge.",
                                                      "type": "object",
                                                      "properties": {
                                                        "value": {
                                                          "type": "number",
                                                          "description": "Numerical value (with implicit precision)."
                                                        },
                                                        "currency": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "ISO 4217 Currency Code."
                                                        }
                                                      }
                                                    },
                                                    "udi": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "Unique Device Identifiers associated with this line item.",
                                                        "type": "object",
                                                        "properties": {
                                                          "reference": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "pattern": "\\S*",
                                                            "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                                          },
                                                          "identifier": {
                                                            "type": "object",
                                                            "additionalProperties": true,
                                                            "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                                          },
                                                          "display": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                                          }
                                                        }
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "sequence",
                                                    "productOrService"
                                                  ]
                                                }
                                              }
                                            },
                                            "required": [
                                              "sequence",
                                              "productOrService"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "sequence",
                                        "productOrService"
                                      ]
                                    },
                                    "properties": {
                                      "productOrService": {
                                        "type": "object",
                                        "properties": {},
                                        "required": [
                                          "coding"
                                        ]
                                      }
                                    }
                                  }
                                },
                                "required": [
                                  "resourceType",
                                  "status",
                                  "type",
                                  "use",
                                  "patient",
                                  "created",
                                  "provider",
                                  "priority",
                                  "insurance",
                                  "supportingInfo"
                                ],
                                "description": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "resourceType": {
                                    "type": "string",
                                    "enum": [
                                      "Claim"
                                    ]
                                  },
                                  "id": {
                                    "type": "string",
                                    "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                    "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                                  },
                                  "meta": {
                                    "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                    "type": "object",
                                    "properties": {
                                      "versionId": {
                                        "type": "string",
                                        "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                        "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                                      },
                                      "lastUpdated": {
                                        "type": "string",
                                        "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                        "description": "When the resource last changed &ndash; e.g. when the version changed."
                                      },
                                      "source": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                      },
                                      "profile": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                        }
                                      },
                                      "security": {
                                        "type": "array",
                                        "items": {
                                          "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      },
                                      "tag": {
                                        "type": "array",
                                        "items": {
                                          "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "implicitRules": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                                  },
                                  "language": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "The base language in which the resource is written."
                                  },
                                  "text": {
                                    "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                                    "type": "object",
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "generated",
                                          "extensions",
                                          "additional",
                                          "empty"
                                        ],
                                        "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                                      },
                                      "div": {
                                        "type": "string",
                                        "description": "The actual narrative content, a stripped down version of XHTML."
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "div"
                                    ]
                                  },
                                  "contained": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "resourceType": {
                                          "type": "string",
                                          "enum": [
                                            "Account",
                                            "ActivityDefinition",
                                            "AdverseEvent",
                                            "AllergyIntolerance",
                                            "Appointment",
                                            "AppointmentResponse",
                                            "AuditEvent",
                                            "Basic",
                                            "Binary",
                                            "BiologicallyDerivedProduct",
                                            "BodyStructure",
                                            "Bundle",
                                            "CapabilityStatement",
                                            "CarePlan",
                                            "CareTeam",
                                            "CatalogEntry",
                                            "ChargeItem",
                                            "ChargeItemDefinition",
                                            "Claim",
                                            "ClaimResponse",
                                            "ClinicalImpression",
                                            "CodeSystem",
                                            "Communication",
                                            "CommunicationRequest",
                                            "CompartmentDefinition",
                                            "Composition",
                                            "ConceptMap",
                                            "Condition",
                                            "Consent",
                                            "Contract",
                                            "Coverage",
                                            "CoverageEligibilityRequest",
                                            "CoverageEligibilityResponse",
                                            "DetectedIssue",
                                            "Device",
                                            "DeviceDefinition",
                                            "DeviceMetric",
                                            "DeviceRequest",
                                            "DeviceUseStatement",
                                            "DiagnosticReport",
                                            "DocumentManifest",
                                            "DocumentReference",
                                            "DomainResource",
                                            "EffectEvidenceSynthesis",
                                            "Encounter",
                                            "Endpoint",
                                            "EnrollmentRequest",
                                            "EnrollmentResponse",
                                            "EpisodeOfCare",
                                            "EventDefinition",
                                            "Evidence",
                                            "EvidenceVariable",
                                            "ExampleScenario",
                                            "ExplanationOfBenefit",
                                            "FamilyMemberHistory",
                                            "Flag",
                                            "Goal",
                                            "GraphDefinition",
                                            "Group",
                                            "GuidanceResponse",
                                            "HealthcareService",
                                            "ImagingStudy",
                                            "Immunization",
                                            "ImmunizationEvaluation",
                                            "ImmunizationRecommendation",
                                            "ImplementationGuide",
                                            "InsurancePlan",
                                            "Invoice",
                                            "Library",
                                            "Linkage",
                                            "List",
                                            "Location",
                                            "Measure",
                                            "MeasureReport",
                                            "Media",
                                            "Medication",
                                            "MedicationAdministration",
                                            "MedicationDispense",
                                            "MedicationKnowledge",
                                            "MedicationRequest",
                                            "MedicationStatement",
                                            "MedicinalProduct",
                                            "MedicinalProductAuthorization",
                                            "MedicinalProductContraindication",
                                            "MedicinalProductIndication",
                                            "MedicinalProductIngredient",
                                            "MedicinalProductInteraction",
                                            "MedicinalProductManufactured",
                                            "MedicinalProductPackaged",
                                            "MedicinalProductPharmaceutical",
                                            "MedicinalProductUndesirableEffect",
                                            "MessageDefinition",
                                            "MessageHeader",
                                            "MolecularSequence",
                                            "NamingSystem",
                                            "NutritionOrder",
                                            "Observation",
                                            "ObservationDefinition",
                                            "OperationDefinition",
                                            "OperationOutcome",
                                            "Organization",
                                            "OrganizationAffiliation",
                                            "Parameters",
                                            "Patient",
                                            "PaymentNotice",
                                            "PaymentReconciliation",
                                            "Person",
                                            "PlanDefinition",
                                            "Practitioner",
                                            "PractitionerRole",
                                            "Procedure",
                                            "Provenance",
                                            "Questionnaire",
                                            "QuestionnaireResponse",
                                            "RelatedPerson",
                                            "RequestGroup",
                                            "ResearchDefinition",
                                            "ResearchElementDefinition",
                                            "ResearchStudy",
                                            "ResearchSubject",
                                            "Resource",
                                            "RiskAssessment",
                                            "RiskEvidenceSynthesis",
                                            "Schedule",
                                            "SearchParameter",
                                            "ServiceRequest",
                                            "Slot",
                                            "Specimen",
                                            "SpecimenDefinition",
                                            "StructureDefinition",
                                            "StructureMap",
                                            "Subscription",
                                            "Substance",
                                            "SubstanceNucleicAcid",
                                            "SubstancePolymer",
                                            "SubstanceProtein",
                                            "SubstanceReferenceInformation",
                                            "SubstanceSourceMaterial",
                                            "SubstanceSpecification",
                                            "SupplyDelivery",
                                            "SupplyRequest",
                                            "Task",
                                            "TerminologyCapabilities",
                                            "TestReport",
                                            "TestScript",
                                            "ValueSet",
                                            "VerificationResult",
                                            "VisionPrescription"
                                          ]
                                        },
                                        "id": {
                                          "type": "string",
                                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                          "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                                        },
                                        "meta": {
                                          "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                          "type": "object",
                                          "properties": {
                                            "versionId": {
                                              "type": "string",
                                              "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                              "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                                            },
                                            "lastUpdated": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                              "description": "When the resource last changed &ndash; e.g. when the version changed."
                                            },
                                            "source": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                            },
                                            "profile": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "pattern": "\\S*",
                                                "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                              }
                                            },
                                            "security": {
                                              "type": "array",
                                              "items": {
                                                "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "tag": {
                                              "type": "array",
                                              "items": {
                                                "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "implicitRules": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                                        },
                                        "language": {
                                          "type": "string",
                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                          "description": "The base language in which the resource is written."
                                        }
                                      },
                                      "required": [
                                        "resourceType"
                                      ],
                                      "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                                    }
                                  },
                                  "extension": {
                                    "type": "array",
                                    "items": {
                                      "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  },
                                  "modifierExtension": {
                                    "type": "array",
                                    "items": {
                                      "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  },
                                  "identifier": {
                                    "type": "array",
                                    "items": {
                                      "description": "A unique identifier assigned to this claim.",
                                      "type": "object",
                                      "properties": {
                                        "use": {
                                          "type": "string",
                                          "enum": [
                                            "usual",
                                            "official",
                                            "temp",
                                            "secondary",
                                            "old"
                                          ],
                                          "description": "The purpose of this identifier."
                                        },
                                        "type": {
                                          "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "system": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                                        },
                                        "value": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                                        },
                                        "period": {
                                          "description": "Time period during which identifier is/was valid for use.",
                                          "type": "object",
                                          "properties": {
                                            "start": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The start of the period. The boundary is inclusive."
                                            },
                                            "end": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                            }
                                          }
                                        },
                                        "assigner": {
                                          "description": "Organization that issued/manages the identifier.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "maxItems": 1,
                                    "required": [
                                      "system",
                                      "value"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "active"
                                    ]
                                  },
                                  "type": {
                                    "type": "object",
                                    "properties": {
                                      "coding": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "enum": [
                                                "http://terminology.hl7.org/CodeSystem/claim-type"
                                              ]
                                            },
                                            "code": {
                                              "type": "string",
                                              "enum": [
                                                "pharmacy"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "system",
                                            "code"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "coding"
                                    ]
                                  },
                                  "use": {
                                    "type": "string",
                                    "enum": [
                                      "preauthorization"
                                    ]
                                  },
                                  "patient": {
                                    "description": "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    }
                                  },
                                  "created": {
                                    "type": "string",
                                    "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                    "description": "The date this resource was created."
                                  },
                                  "provider": {
                                    "description": "The provider which is responsible for the claim, predetermination or preauthorization.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    }
                                  },
                                  "priority": {
                                    "type": "object",
                                    "properties": {
                                      "coding": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "enum": [
                                                "http://terminology.hl7.org/CodeSystem/processpriority"
                                              ]
                                            },
                                            "code": {
                                              "type": "string",
                                              "enum": [
                                                "normal"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "system",
                                            "code"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "coding"
                                    ]
                                  },
                                  "supportingInfo": {
                                    "type": "array",
                                    "items": {
                                      "description": "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.",
                                      "type": "object",
                                      "properties": {
                                        "modifierExtension": {
                                          "type": "array",
                                          "items": {
                                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                            "type": "object",
                                            "additionalProperties": true
                                          }
                                        },
                                        "sequence": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "A number to uniquely identify supporting information entries."
                                        },
                                        "category": {
                                          "description": "The general class of the information supplied: information; exception; accident, employment; onset, etc.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "code": {
                                          "description": "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "timingDate": {
                                          "type": "string",
                                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?",
                                          "description": "The date when or period to which this information refers."
                                        },
                                        "timingPeriod": {
                                          "description": "The date when or period to which this information refers.",
                                          "type": "object",
                                          "properties": {
                                            "start": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The start of the period. The boundary is inclusive."
                                            },
                                            "end": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                            }
                                          }
                                        },
                                        "valueBoolean": {
                                          "type": "boolean",
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data."
                                        },
                                        "valueString": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data."
                                        },
                                        "valueQuantity": {
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.",
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "type": "number",
                                              "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                            },
                                            "comparator": {
                                              "type": "string",
                                              "enum": [
                                                "<",
                                                "<=",
                                                ">=",
                                                ">"
                                              ],
                                              "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                            },
                                            "unit": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human&ndash;readable form of the unit."
                                            },
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the system that provides the coded form of the unit."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A computer processable form of the unit in some unit representation system."
                                            }
                                          }
                                        },
                                        "valueAttachment": {
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.",
                                          "type": "object",
                                          "properties": {
                                            "contentType": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate."
                                            },
                                            "language": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "The human language of the content. The value can be any valid value according to BCP 47."
                                            },
                                            "data": {
                                              "type": "string",
                                              "pattern": "(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+",
                                              "description": "The actual data of the attachment &ndash; a sequence of bytes, base64 encoded."
                                            },
                                            "url": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "A location where the data can be accessed."
                                            },
                                            "size": {
                                              "type": "integer",
                                              "format": "int32",
                                              "description": "The number of bytes of data that make up this attachment (before base64 encoding, if that is done)."
                                            },
                                            "hash": {
                                              "type": "string",
                                              "pattern": "(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+",
                                              "description": "The calculated hash of the data using SHA&ndash;1. Represented using base64."
                                            },
                                            "title": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A label or set of text to display in place of the data."
                                            },
                                            "creation": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The date that the attachment was first created."
                                            }
                                          }
                                        },
                                        "valueReference": {
                                          "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        },
                                        "reason": {
                                          "description": "Provides the reason in the situation where a reason code is required in addition to the content.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        }
                                      },
                                      "required": [
                                        "sequence",
                                        "category"
                                      ]
                                    },
                                    "minItems": 1
                                  },
                                  "insurance": {
                                    "type": "array",
                                    "items": {
                                      "description": "Financial instruments for reimbursement for the health care products and services specified on the claim.",
                                      "type": "object",
                                      "properties": {
                                        "modifierExtension": {
                                          "type": "array",
                                          "items": {
                                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                            "type": "object",
                                            "additionalProperties": true
                                          }
                                        },
                                        "sequence": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order."
                                        },
                                        "focal": {
                                          "type": "boolean",
                                          "description": "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true."
                                        },
                                        "identifier": {
                                          "description": "The business identifier to be used when the claim is sent for adjudication against this insurance policy.",
                                          "type": "object",
                                          "properties": {
                                            "use": {
                                              "type": "string",
                                              "enum": [
                                                "usual",
                                                "official",
                                                "temp",
                                                "secondary",
                                                "old"
                                              ],
                                              "description": "The purpose of this identifier."
                                            },
                                            "type": {
                                              "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                                              "type": "object",
                                              "properties": {
                                                "coding": {
                                                  "type": "array",
                                                  "items": {
                                                    "description": "A reference to a code defined by a terminology system.",
                                                    "type": "object",
                                                    "properties": {
                                                      "system": {
                                                        "type": "string",
                                                        "pattern": "\\S*",
                                                        "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                      },
                                                      "version": {
                                                        "type": "string",
                                                        "pattern": "[ \\r\\n\\t\\S]+",
                                                        "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                      },
                                                      "code": {
                                                        "type": "string",
                                                        "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                        "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                      },
                                                      "display": {
                                                        "type": "string",
                                                        "pattern": "[ \\r\\n\\t\\S]+",
                                                        "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                      },
                                                      "userSelected": {
                                                        "type": "boolean",
                                                        "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                      }
                                                    }
                                                  }
                                                },
                                                "text": {
                                                  "type": "string",
                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                  "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                }
                                              }
                                            },
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                                            },
                                            "value": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                                            },
                                            "period": {
                                              "description": "Time period during which identifier is/was valid for use.",
                                              "type": "object",
                                              "properties": {
                                                "start": {
                                                  "type": "string",
                                                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                                  "description": "The start of the period. The boundary is inclusive."
                                                },
                                                "end": {
                                                  "type": "string",
                                                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                                  "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                                }
                                              }
                                            },
                                            "assigner": {
                                              "description": "Organization that issued/manages the identifier.",
                                              "type": "object",
                                              "properties": {
                                                "reference": {
                                                  "type": "string",
                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                  "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "pattern": "\\S*",
                                                  "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                                },
                                                "identifier": {
                                                  "type": "object",
                                                  "additionalProperties": true,
                                                  "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                                },
                                                "display": {
                                                  "type": "string",
                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                  "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "coverage": {
                                          "description": "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        },
                                        "businessArrangement": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "A business agreement number established between the provider and the insurer for special business processing purposes."
                                        },
                                        "preAuthRef": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "[ \\r\\n\\t\\S]+",
                                            "description": "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization."
                                          }
                                        },
                                        "claimResponse": {
                                          "description": "The result of the adjudication of the line items for the Coverage specified in this insurance.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        }
                                      },
                                      "required": [
                                        "sequence",
                                        "focal",
                                        "coverage"
                                      ]
                                    },
                                    "minItems": 1,
                                    "maxItems": 1,
                                    "properties": {
                                      "coverage": {
                                        "type": "object",
                                        "properties": {},
                                        "required": [
                                          "display"
                                        ]
                                      }
                                    }
                                  },
                                  "item": {
                                    "type": "array",
                                    "items": {
                                      "description": "A claim line. Either a simple  product or service or a 'group' of details which can each be a simple items or groups of sub&ndash;details.",
                                      "type": "object",
                                      "properties": {
                                        "modifierExtension": {
                                          "type": "array",
                                          "items": {
                                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                            "type": "object",
                                            "additionalProperties": true
                                          }
                                        },
                                        "sequence": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "A number to uniquely identify item entries."
                                        },
                                        "careTeamSequence": {
                                          "type": "array",
                                          "items": {
                                            "type": "integer",
                                            "format": "int32",
                                            "description": "CareTeam members related to this service or product."
                                          }
                                        },
                                        "diagnosisSequence": {
                                          "type": "array",
                                          "items": {
                                            "type": "integer",
                                            "format": "int32",
                                            "description": "Diagnosis applicable for this service or product."
                                          }
                                        },
                                        "procedureSequence": {
                                          "type": "array",
                                          "items": {
                                            "type": "integer",
                                            "format": "int32",
                                            "description": "Procedures applicable for this service or product."
                                          }
                                        },
                                        "informationSequence": {
                                          "type": "array",
                                          "items": {
                                            "type": "integer",
                                            "format": "int32",
                                            "description": "Exceptions, special conditions and supporting information applicable for this service or product."
                                          }
                                        },
                                        "revenue": {
                                          "description": "The type of revenue or cost center providing the product and/or service.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "category": {
                                          "description": "Code to identify the general type of benefits under which products and services are provided.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "productOrService": {
                                          "description": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "modifier": {
                                          "type": "array",
                                          "items": {
                                            "description": "Item typification or modifiers codes to convey additional context for the product or service.",
                                            "type": "object",
                                            "properties": {
                                              "coding": {
                                                "type": "array",
                                                "items": {
                                                  "description": "A reference to a code defined by a terminology system.",
                                                  "type": "object",
                                                  "properties": {
                                                    "system": {
                                                      "type": "string",
                                                      "pattern": "\\S*",
                                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                    },
                                                    "version": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                    },
                                                    "code": {
                                                      "type": "string",
                                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                    },
                                                    "display": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                    },
                                                    "userSelected": {
                                                      "type": "boolean",
                                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                    }
                                                  }
                                                }
                                              },
                                              "text": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                              }
                                            }
                                          }
                                        },
                                        "programCode": {
                                          "type": "array",
                                          "items": {
                                            "description": "Identifies the program under which this may be recovered.",
                                            "type": "object",
                                            "properties": {
                                              "coding": {
                                                "type": "array",
                                                "items": {
                                                  "description": "A reference to a code defined by a terminology system.",
                                                  "type": "object",
                                                  "properties": {
                                                    "system": {
                                                      "type": "string",
                                                      "pattern": "\\S*",
                                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                    },
                                                    "version": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                    },
                                                    "code": {
                                                      "type": "string",
                                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                    },
                                                    "display": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                    },
                                                    "userSelected": {
                                                      "type": "boolean",
                                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                    }
                                                  }
                                                }
                                              },
                                              "text": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                              }
                                            }
                                          }
                                        },
                                        "servicedDate": {
                                          "type": "string",
                                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?",
                                          "description": "The date or dates when the service or product was supplied, performed or completed."
                                        },
                                        "servicedPeriod": {
                                          "description": "The date or dates when the service or product was supplied, performed or completed.",
                                          "type": "object",
                                          "properties": {
                                            "start": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The start of the period. The boundary is inclusive."
                                            },
                                            "end": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                            }
                                          }
                                        },
                                        "locationCodeableConcept": {
                                          "description": "Where the product or service was provided.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "locationAddress": {
                                          "description": "Where the product or service was provided.",
                                          "type": "object",
                                          "properties": {
                                            "use": {
                                              "type": "string",
                                              "enum": [
                                                "home",
                                                "work",
                                                "temp",
                                                "old",
                                                "billing"
                                              ],
                                              "description": "The purpose of this address."
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "postal",
                                                "physical",
                                                "both"
                                              ],
                                              "description": "Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care&ndash;of addresses). Most addresses are both."
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts."
                                            },
                                            "line": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "This component contains the house number, apartment number, street name, street direction,  P.O. Box number, delivery hints, and similar address information."
                                              }
                                            },
                                            "city": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The name of the city, town, suburb, village or other community or delivery center."
                                            },
                                            "district": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The name of the administrative area (county)."
                                            },
                                            "state": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Sub&ndash;unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes)."
                                            },
                                            "postalCode": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A postal code designating a region defined by the postal service."
                                            },
                                            "country": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Country &ndash; a nation as commonly understood or generally accepted."
                                            },
                                            "period": {
                                              "description": "Time period when address was/is in use.",
                                              "type": "object",
                                              "properties": {
                                                "start": {
                                                  "type": "string",
                                                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                                  "description": "The start of the period. The boundary is inclusive."
                                                },
                                                "end": {
                                                  "type": "string",
                                                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                                  "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "locationReference": {
                                          "description": "Where the product or service was provided.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        },
                                        "quantity": {
                                          "description": "The number of repetitions of a service or product.",
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "type": "number",
                                              "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                            },
                                            "comparator": {
                                              "type": "string",
                                              "enum": [
                                                "<",
                                                "<=",
                                                ">=",
                                                ">"
                                              ],
                                              "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                            },
                                            "unit": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human&ndash;readable form of the unit."
                                            },
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the system that provides the coded form of the unit."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A computer processable form of the unit in some unit representation system."
                                            }
                                          }
                                        },
                                        "unitPrice": {
                                          "description": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.",
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "type": "number",
                                              "description": "Numerical value (with implicit precision)."
                                            },
                                            "currency": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "ISO 4217 Currency Code."
                                            }
                                          }
                                        },
                                        "factor": {
                                          "type": "number",
                                          "description": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                        },
                                        "net": {
                                          "description": "The quantity times the unit price for an additional service or product or charge.",
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "type": "number",
                                              "description": "Numerical value (with implicit precision)."
                                            },
                                            "currency": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "ISO 4217 Currency Code."
                                            }
                                          }
                                        },
                                        "udi": {
                                          "type": "array",
                                          "items": {
                                            "description": "Unique Device Identifiers associated with this line item.",
                                            "type": "object",
                                            "properties": {
                                              "reference": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                              },
                                              "type": {
                                                "type": "string",
                                                "pattern": "\\S*",
                                                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                              },
                                              "identifier": {
                                                "type": "object",
                                                "additionalProperties": true,
                                                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                              },
                                              "display": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                              }
                                            }
                                          }
                                        },
                                        "bodySite": {
                                          "description": "Physical service site on the patient (limb, tooth, etc.).",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "subSite": {
                                          "type": "array",
                                          "items": {
                                            "description": "A region or surface of the bodySite, e.g. limb region or tooth surface(s).",
                                            "type": "object",
                                            "properties": {
                                              "coding": {
                                                "type": "array",
                                                "items": {
                                                  "description": "A reference to a code defined by a terminology system.",
                                                  "type": "object",
                                                  "properties": {
                                                    "system": {
                                                      "type": "string",
                                                      "pattern": "\\S*",
                                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                    },
                                                    "version": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                    },
                                                    "code": {
                                                      "type": "string",
                                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                    },
                                                    "display": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                    },
                                                    "userSelected": {
                                                      "type": "boolean",
                                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                    }
                                                  }
                                                }
                                              },
                                              "text": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                              }
                                            }
                                          }
                                        },
                                        "encounter": {
                                          "type": "array",
                                          "items": {
                                            "description": "The Encounters during which this Claim was created or to which the creation of this record is tightly associated.",
                                            "type": "object",
                                            "properties": {
                                              "reference": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                              },
                                              "type": {
                                                "type": "string",
                                                "pattern": "\\S*",
                                                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                              },
                                              "identifier": {
                                                "type": "object",
                                                "additionalProperties": true,
                                                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                              },
                                              "display": {
                                                "type": "string",
                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                              }
                                            }
                                          }
                                        },
                                        "detail": {
                                          "type": "array",
                                          "items": {
                                            "description": "A claim detail line. Either a simple (a product or service) or a 'group' of sub&ndash;details which are simple items.",
                                            "type": "object",
                                            "properties": {
                                              "modifierExtension": {
                                                "type": "array",
                                                "items": {
                                                  "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                                  "type": "object",
                                                  "additionalProperties": true
                                                }
                                              },
                                              "sequence": {
                                                "type": "integer",
                                                "format": "int32",
                                                "description": "A number to uniquely identify item entries."
                                              },
                                              "revenue": {
                                                "description": "The type of revenue or cost center providing the product and/or service.",
                                                "type": "object",
                                                "properties": {
                                                  "coding": {
                                                    "type": "array",
                                                    "items": {
                                                      "description": "A reference to a code defined by a terminology system.",
                                                      "type": "object",
                                                      "properties": {
                                                        "system": {
                                                          "type": "string",
                                                          "pattern": "\\S*",
                                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                        },
                                                        "version": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                        },
                                                        "display": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                        },
                                                        "userSelected": {
                                                          "type": "boolean",
                                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                        }
                                                      }
                                                    }
                                                  },
                                                  "text": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                  }
                                                }
                                              },
                                              "category": {
                                                "description": "Code to identify the general type of benefits under which products and services are provided.",
                                                "type": "object",
                                                "properties": {
                                                  "coding": {
                                                    "type": "array",
                                                    "items": {
                                                      "description": "A reference to a code defined by a terminology system.",
                                                      "type": "object",
                                                      "properties": {
                                                        "system": {
                                                          "type": "string",
                                                          "pattern": "\\S*",
                                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                        },
                                                        "version": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                        },
                                                        "display": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                        },
                                                        "userSelected": {
                                                          "type": "boolean",
                                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                        }
                                                      }
                                                    }
                                                  },
                                                  "text": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                  }
                                                }
                                              },
                                              "productOrService": {
                                                "description": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.",
                                                "type": "object",
                                                "properties": {
                                                  "coding": {
                                                    "type": "array",
                                                    "items": {
                                                      "description": "A reference to a code defined by a terminology system.",
                                                      "type": "object",
                                                      "properties": {
                                                        "system": {
                                                          "type": "string",
                                                          "pattern": "\\S*",
                                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                        },
                                                        "version": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                        },
                                                        "display": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                        },
                                                        "userSelected": {
                                                          "type": "boolean",
                                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                        }
                                                      }
                                                    }
                                                  },
                                                  "text": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                  }
                                                }
                                              },
                                              "modifier": {
                                                "type": "array",
                                                "items": {
                                                  "description": "Item typification or modifiers codes to convey additional context for the product or service.",
                                                  "type": "object",
                                                  "properties": {
                                                    "coding": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "A reference to a code defined by a terminology system.",
                                                        "type": "object",
                                                        "properties": {
                                                          "system": {
                                                            "type": "string",
                                                            "pattern": "\\S*",
                                                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                          },
                                                          "version": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                          },
                                                          "code": {
                                                            "type": "string",
                                                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                          },
                                                          "display": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                          },
                                                          "userSelected": {
                                                            "type": "boolean",
                                                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "text": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                    }
                                                  }
                                                }
                                              },
                                              "programCode": {
                                                "type": "array",
                                                "items": {
                                                  "description": "Identifies the program under which this may be recovered.",
                                                  "type": "object",
                                                  "properties": {
                                                    "coding": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "A reference to a code defined by a terminology system.",
                                                        "type": "object",
                                                        "properties": {
                                                          "system": {
                                                            "type": "string",
                                                            "pattern": "\\S*",
                                                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                          },
                                                          "version": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                          },
                                                          "code": {
                                                            "type": "string",
                                                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                          },
                                                          "display": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                          },
                                                          "userSelected": {
                                                            "type": "boolean",
                                                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "text": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                    }
                                                  }
                                                }
                                              },
                                              "quantity": {
                                                "description": "The number of repetitions of a service or product.",
                                                "type": "object",
                                                "properties": {
                                                  "value": {
                                                    "type": "number",
                                                    "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                                  },
                                                  "comparator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "<",
                                                      "<=",
                                                      ">=",
                                                      ">"
                                                    ],
                                                    "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                                  },
                                                  "unit": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A human&ndash;readable form of the unit."
                                                  },
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the system that provides the coded form of the unit."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A computer processable form of the unit in some unit representation system."
                                                  }
                                                }
                                              },
                                              "unitPrice": {
                                                "description": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.",
                                                "type": "object",
                                                "properties": {
                                                  "value": {
                                                    "type": "number",
                                                    "description": "Numerical value (with implicit precision)."
                                                  },
                                                  "currency": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "ISO 4217 Currency Code."
                                                  }
                                                }
                                              },
                                              "factor": {
                                                "type": "number",
                                                "description": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                              },
                                              "net": {
                                                "description": "The quantity times the unit price for an additional service or product or charge.",
                                                "type": "object",
                                                "properties": {
                                                  "value": {
                                                    "type": "number",
                                                    "description": "Numerical value (with implicit precision)."
                                                  },
                                                  "currency": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "ISO 4217 Currency Code."
                                                  }
                                                }
                                              },
                                              "udi": {
                                                "type": "array",
                                                "items": {
                                                  "description": "Unique Device Identifiers associated with this line item.",
                                                  "type": "object",
                                                  "properties": {
                                                    "reference": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "pattern": "\\S*",
                                                      "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                                    },
                                                    "identifier": {
                                                      "type": "object",
                                                      "additionalProperties": true,
                                                      "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                                    },
                                                    "display": {
                                                      "type": "string",
                                                      "pattern": "[ \\r\\n\\t\\S]+",
                                                      "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                                    }
                                                  }
                                                }
                                              },
                                              "subDetail": {
                                                "type": "array",
                                                "items": {
                                                  "description": "A claim detail line. Either a simple (a product or service) or a 'group' of sub&ndash;details which are simple items.",
                                                  "type": "object",
                                                  "properties": {
                                                    "modifierExtension": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                                        "type": "object",
                                                        "additionalProperties": true
                                                      }
                                                    },
                                                    "sequence": {
                                                      "type": "integer",
                                                      "format": "int32",
                                                      "description": "A number to uniquely identify item entries."
                                                    },
                                                    "revenue": {
                                                      "description": "The type of revenue or cost center providing the product and/or service.",
                                                      "type": "object",
                                                      "properties": {
                                                        "coding": {
                                                          "type": "array",
                                                          "items": {
                                                            "description": "A reference to a code defined by a terminology system.",
                                                            "type": "object",
                                                            "properties": {
                                                              "system": {
                                                                "type": "string",
                                                                "pattern": "\\S*",
                                                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                              },
                                                              "version": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                              },
                                                              "code": {
                                                                "type": "string",
                                                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                              },
                                                              "display": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                              },
                                                              "userSelected": {
                                                                "type": "boolean",
                                                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                              }
                                                            }
                                                          }
                                                        },
                                                        "text": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                        }
                                                      }
                                                    },
                                                    "category": {
                                                      "description": "Code to identify the general type of benefits under which products and services are provided.",
                                                      "type": "object",
                                                      "properties": {
                                                        "coding": {
                                                          "type": "array",
                                                          "items": {
                                                            "description": "A reference to a code defined by a terminology system.",
                                                            "type": "object",
                                                            "properties": {
                                                              "system": {
                                                                "type": "string",
                                                                "pattern": "\\S*",
                                                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                              },
                                                              "version": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                              },
                                                              "code": {
                                                                "type": "string",
                                                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                              },
                                                              "display": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                              },
                                                              "userSelected": {
                                                                "type": "boolean",
                                                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                              }
                                                            }
                                                          }
                                                        },
                                                        "text": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                        }
                                                      }
                                                    },
                                                    "productOrService": {
                                                      "description": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.",
                                                      "type": "object",
                                                      "properties": {
                                                        "coding": {
                                                          "type": "array",
                                                          "items": {
                                                            "description": "A reference to a code defined by a terminology system.",
                                                            "type": "object",
                                                            "properties": {
                                                              "system": {
                                                                "type": "string",
                                                                "pattern": "\\S*",
                                                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                              },
                                                              "version": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                              },
                                                              "code": {
                                                                "type": "string",
                                                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                              },
                                                              "display": {
                                                                "type": "string",
                                                                "pattern": "[ \\r\\n\\t\\S]+",
                                                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                              },
                                                              "userSelected": {
                                                                "type": "boolean",
                                                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                              }
                                                            }
                                                          }
                                                        },
                                                        "text": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                        }
                                                      }
                                                    },
                                                    "modifier": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "Item typification or modifiers codes to convey additional context for the product or service.",
                                                        "type": "object",
                                                        "properties": {
                                                          "coding": {
                                                            "type": "array",
                                                            "items": {
                                                              "description": "A reference to a code defined by a terminology system.",
                                                              "type": "object",
                                                              "properties": {
                                                                "system": {
                                                                  "type": "string",
                                                                  "pattern": "\\S*",
                                                                  "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                                },
                                                                "version": {
                                                                  "type": "string",
                                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                                  "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                                },
                                                                "code": {
                                                                  "type": "string",
                                                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                  "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                                },
                                                                "display": {
                                                                  "type": "string",
                                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                                  "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                                },
                                                                "userSelected": {
                                                                  "type": "boolean",
                                                                  "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                                }
                                                              }
                                                            }
                                                          },
                                                          "text": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "programCode": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "Identifies the program under which this may be recovered.",
                                                        "type": "object",
                                                        "properties": {
                                                          "coding": {
                                                            "type": "array",
                                                            "items": {
                                                              "description": "A reference to a code defined by a terminology system.",
                                                              "type": "object",
                                                              "properties": {
                                                                "system": {
                                                                  "type": "string",
                                                                  "pattern": "\\S*",
                                                                  "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                                },
                                                                "version": {
                                                                  "type": "string",
                                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                                  "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                                },
                                                                "code": {
                                                                  "type": "string",
                                                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                                  "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                                },
                                                                "display": {
                                                                  "type": "string",
                                                                  "pattern": "[ \\r\\n\\t\\S]+",
                                                                  "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                                },
                                                                "userSelected": {
                                                                  "type": "boolean",
                                                                  "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                                }
                                                              }
                                                            }
                                                          },
                                                          "text": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "quantity": {
                                                      "description": "The number of repetitions of a service or product.",
                                                      "type": "object",
                                                      "properties": {
                                                        "value": {
                                                          "type": "number",
                                                          "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                                        },
                                                        "comparator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "<",
                                                            "<=",
                                                            ">=",
                                                            ">"
                                                          ],
                                                          "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                                        },
                                                        "unit": {
                                                          "type": "string",
                                                          "pattern": "[ \\r\\n\\t\\S]+",
                                                          "description": "A human&ndash;readable form of the unit."
                                                        },
                                                        "system": {
                                                          "type": "string",
                                                          "pattern": "\\S*",
                                                          "description": "The identification of the system that provides the coded form of the unit."
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "A computer processable form of the unit in some unit representation system."
                                                        }
                                                      }
                                                    },
                                                    "unitPrice": {
                                                      "description": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.",
                                                      "type": "object",
                                                      "properties": {
                                                        "value": {
                                                          "type": "number",
                                                          "description": "Numerical value (with implicit precision)."
                                                        },
                                                        "currency": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "ISO 4217 Currency Code."
                                                        }
                                                      }
                                                    },
                                                    "factor": {
                                                      "type": "number",
                                                      "description": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                                    },
                                                    "net": {
                                                      "description": "The quantity times the unit price for an additional service or product or charge.",
                                                      "type": "object",
                                                      "properties": {
                                                        "value": {
                                                          "type": "number",
                                                          "description": "Numerical value (with implicit precision)."
                                                        },
                                                        "currency": {
                                                          "type": "string",
                                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                          "description": "ISO 4217 Currency Code."
                                                        }
                                                      }
                                                    },
                                                    "udi": {
                                                      "type": "array",
                                                      "items": {
                                                        "description": "Unique Device Identifiers associated with this line item.",
                                                        "type": "object",
                                                        "properties": {
                                                          "reference": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "pattern": "\\S*",
                                                            "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                                          },
                                                          "identifier": {
                                                            "type": "object",
                                                            "additionalProperties": true,
                                                            "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                                          },
                                                          "display": {
                                                            "type": "string",
                                                            "pattern": "[ \\r\\n\\t\\S]+",
                                                            "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                                          }
                                                        }
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "sequence",
                                                    "productOrService"
                                                  ]
                                                }
                                              }
                                            },
                                            "required": [
                                              "sequence",
                                              "productOrService"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "sequence",
                                        "productOrService"
                                      ]
                                    },
                                    "properties": {
                                      "productOrService": {
                                        "type": "object",
                                        "properties": {},
                                        "required": [
                                          "coding"
                                        ]
                                      }
                                    }
                                  }
                                },
                                "required": [
                                  "resourceType",
                                  "status",
                                  "type",
                                  "use",
                                  "patient",
                                  "created",
                                  "provider",
                                  "priority",
                                  "insurance",
                                  "supportingInfo"
                                ],
                                "description": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
                              }
                            ]
                          },
                          "fullUrl": {
                            "type": "string",
                            "description": "The full url of the resource"
                          },
                          "search": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ],
                                "description": "The search mode."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "searchset-example": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "entry": [
                        {
                          "fullUrl": "https://api.sa.digital.health.nz/s2s/fhir/R4/Claim/sa-example-claim-nppa",
                          "resource": {
                            "resourceType": "Claim",
                            "id": "sa-example-claim-nppa",
                            "meta": {
                              "profile": [
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
                              ]
                            },
                            "status": "active",
                            "type": {
                              "coding": [
                                {
                                  "code": "pharmacy",
                                  "system": "http://terminology.hl7.org/CodeSystem/claim-type"
                                }
                              ]
                            },
                            "use": "preauthorization",
                            "priority": {
                              "coding": [
                                {
                                  "code": "normal",
                                  "system": "http://terminology.hl7.org/CodeSystem/processpriority"
                                }
                              ]
                            },
                            "supportingInfo": [
                              {
                                "category": {
                                  "coding": [
                                    {
                                      "code": "questionnaire-response",
                                      "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-supporting-info-category"
                                    }
                                  ]
                                },
                                "sequence": 1,
                                "valueReference": {
                                  "reference": "QuestionnaireResponse/sa-example-qr"
                                }
                              }
                            ],
                            "insurance": [
                              {
                                "sequence": 1,
                                "focal": true,
                                "coverage": {
                                  "display": "Pharmaceutical Schedule"
                                }
                              }
                            ],
                            "item": [
                              {
                                "productOrService": {
                                  "coding": [
                                    {
                                      "system": "http://nzmt.org.nz",
                                      "code": "50002411000117100",
                                      "display": "Myleran 2 mg tablet: film-coated, 100 tablets, bottle"
                                    },
                                    {
                                      "system": "https://fhir-ig.digital.health.nz/special-authority/ns/pharmacode",
                                      "code": "2000001",
                                      "display": "Example medicine 10 mg tablet, 30"
                                    }
                                  ]
                                },
                                "sequence": 1
                              }
                            ],
                            "patient": {
                              "reference": "Patient/sa-example-patient"
                            },
                            "created": "2026-10-14T12:00:00+13:00",
                            "provider": {
                              "reference": "Practitioner/sa-example-applicant"
                            }
                          },
                          "search": {
                            "mode": "match"
                          }
                        },
                        {
                          "fullUrl": "https://api.sa.digital.health.nz/s2s/fhir/R4/Claim/sa-example-claim",
                          "resource": {
                            "resourceType": "Claim",
                            "id": "sa-example-claim",
                            "meta": {
                              "profile": [
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
                              ]
                            },
                            "status": "active",
                            "type": {
                              "coding": [
                                {
                                  "code": "pharmacy",
                                  "system": "http://terminology.hl7.org/CodeSystem/claim-type"
                                }
                              ]
                            },
                            "use": "preauthorization",
                            "priority": {
                              "coding": [
                                {
                                  "code": "normal",
                                  "system": "http://terminology.hl7.org/CodeSystem/processpriority"
                                }
                              ]
                            },
                            "supportingInfo": [
                              {
                                "category": {
                                  "coding": [
                                    {
                                      "code": "questionnaire-response",
                                      "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-supporting-info-category"
                                    }
                                  ]
                                },
                                "sequence": 1,
                                "valueReference": {
                                  "reference": "QuestionnaireResponse/sa-example-qr"
                                }
                              }
                            ],
                            "insurance": [
                              {
                                "sequence": 1,
                                "focal": true,
                                "coverage": {
                                  "display": "Pharmaceutical Schedule"
                                }
                              }
                            ],
                            "patient": {
                              "reference": "Patient/sa-example-patient"
                            },
                            "created": "2026-10-14T10:35:00+13:00",
                            "provider": {
                              "reference": "Practitioner/sa-example-applicant"
                            }
                          },
                          "search": {
                            "mode": "match"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unsuccessful search operation - 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unsuccessful search operation - 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Unsuccessful search operation - 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Unsuccessful search operation - 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "smartOnFhir": [
              "system/Claim.s"
            ]
          }
        ]
      }
    },
    "/metadata": {
      "get": {
        "summary": "Get CapabilityStatement",
        "description": "Returns the FHIR CapabilityStatement for this server",
        "tags": [
          "metadata"
        ],
        "operationId": "getCapabilityStatement",
        "parameters": [
          {
            "name": "Request-Context",
            "in": "header",
            "required": true,
            "description": "Signed Request-Context header asserting the authenticated user, organisation and facility. Validated on every request.",
            "schema": {
              "type": "string",
              "format": "base64",
              "description": "A base64 encoded JSON object that represents the request context for the current request. See the schema https://github.com/tewhatuora/schemas/Request-Context-v2.json for context properties"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "required": false,
            "description": "Optional client-supplied correlation id, returned in the response and recorded in audit events.",
            "schema": {
              "type": "string",
              "description": "A string representing the Correlation ID for the current request. This ID is used to correlate logs and other data across services."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful retrieval of the CapabilityStatement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "CapabilityStatement"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "url": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers."
                    },
                    "version": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                    },
                    "name": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                    },
                    "title": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A short, descriptive, user&ndash;friendly title for the capability statement."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "active",
                        "retired",
                        "unknown"
                      ],
                      "description": "The status of this capability statement. Enables tracking the life&ndash;cycle of the content."
                    },
                    "experimental": {
                      "type": "boolean",
                      "description": "A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."
                    },
                    "date": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The date  (and optionally time) when the capability statement was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes."
                    },
                    "publisher": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The name of the organization or individual that published the capability statement."
                    },
                    "contact": {
                      "type": "array",
                      "items": {
                        "description": "Contact details to assist a user in finding and communicating with the publisher.",
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The name of an individual to contact."
                          },
                          "telecom": {
                            "type": "array",
                            "items": {
                              "description": "The contact details for the individual (if a name was provided) or the organization.",
                              "type": "object",
                              "properties": {
                                "system": {
                                  "type": "string",
                                  "enum": [
                                    "phone",
                                    "fax",
                                    "email",
                                    "pager",
                                    "url",
                                    "sms",
                                    "other"
                                  ],
                                  "description": "Telecommunications form for contact point &ndash; what communications system is required to make use of the contact."
                                },
                                "value": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)."
                                },
                                "use": {
                                  "type": "string",
                                  "enum": [
                                    "home",
                                    "work",
                                    "temp",
                                    "old",
                                    "mobile"
                                  ],
                                  "description": "Identifies the purpose for the contact point."
                                },
                                "rank": {
                                  "type": "integer",
                                  "format": "int32",
                                  "description": "Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values."
                                },
                                "period": {
                                  "description": "Time period when the contact point was/is in use.",
                                  "type": "object",
                                  "properties": {
                                    "start": {
                                      "type": "string",
                                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                      "description": "The start of the period. The boundary is inclusive."
                                    },
                                    "end": {
                                      "type": "string",
                                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                      "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "description": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP."
                    },
                    "useContext": {
                      "type": "array",
                      "items": {
                        "description": "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate capability statement instances.",
                        "type": "object",
                        "properties": {
                          "code": {
                            "description": "A code that identifies the type of context being specified by this usage context.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          },
                          "valueCodeableConcept": {
                            "description": "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "valueQuantity": {
                            "description": "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.",
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "number",
                                "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                              },
                              "comparator": {
                                "type": "string",
                                "enum": [
                                  "<",
                                  "<=",
                                  ">=",
                                  ">"
                                ],
                                "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                              },
                              "unit": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human&ndash;readable form of the unit."
                              },
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the system that provides the coded form of the unit."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A computer processable form of the unit in some unit representation system."
                              }
                            }
                          },
                          "valueRange": {
                            "description": "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.",
                            "type": "object",
                            "properties": {
                              "low": {
                                "description": "The low limit. The boundary is inclusive.",
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "number",
                                    "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                  },
                                  "comparator": {
                                    "type": "string",
                                    "enum": [
                                      "<",
                                      "<=",
                                      ">=",
                                      ">"
                                    ],
                                    "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                  },
                                  "unit": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A human&ndash;readable form of the unit."
                                  },
                                  "system": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "The identification of the system that provides the coded form of the unit."
                                  },
                                  "code": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "A computer processable form of the unit in some unit representation system."
                                  }
                                }
                              },
                              "high": {
                                "description": "The high limit. The boundary is inclusive.",
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "number",
                                    "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                  },
                                  "comparator": {
                                    "type": "string",
                                    "enum": [
                                      "<",
                                      "<=",
                                      ">=",
                                      ">"
                                    ],
                                    "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                  },
                                  "unit": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A human&ndash;readable form of the unit."
                                  },
                                  "system": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "The identification of the system that provides the coded form of the unit."
                                  },
                                  "code": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "A computer processable form of the unit in some unit representation system."
                                  }
                                }
                              }
                            }
                          },
                          "valueReference": {
                            "description": "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.",
                            "type": "object",
                            "properties": {
                              "reference": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                              },
                              "type": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                              },
                              "identifier": {
                                "type": "object",
                                "additionalProperties": true,
                                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                              }
                            }
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    },
                    "jurisdiction": {
                      "type": "array",
                      "items": {
                        "description": "A legal or geographic region in which the capability statement is intended to be used.",
                        "type": "object",
                        "properties": {
                          "coding": {
                            "type": "array",
                            "items": {
                              "description": "A reference to a code defined by a terminology system.",
                              "type": "object",
                              "properties": {
                                "system": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                },
                                "version": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                },
                                "code": {
                                  "type": "string",
                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                  "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                },
                                "display": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                },
                                "userSelected": {
                                  "type": "boolean",
                                  "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                }
                              }
                            }
                          },
                          "text": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                          }
                        }
                      }
                    },
                    "purpose": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Explanation of why this capability statement is needed and why it has been designed as it has."
                    },
                    "copyright": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement."
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "instance",
                        "capability",
                        "requirements"
                      ],
                      "description": "The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase)."
                    },
                    "instantiates": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "\\S*",
                        "description": "Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details."
                      }
                    },
                    "imports": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "\\S*",
                        "description": "Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them."
                      }
                    },
                    "software": {
                      "description": "Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.",
                      "type": "object",
                      "properties": {
                        "modifierExtension": {
                          "type": "array",
                          "items": {
                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                            "type": "object",
                            "additionalProperties": true
                          }
                        },
                        "name": {
                          "type": "string",
                          "pattern": "[ \\r\\n\\t\\S]+",
                          "description": "Name the software is known by."
                        },
                        "version": {
                          "type": "string",
                          "pattern": "[ \\r\\n\\t\\S]+",
                          "description": "The version identifier for the software covered by this statement."
                        },
                        "releaseDate": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                          "description": "Date this version of the software was released."
                        }
                      },
                      "required": [
                        "name"
                      ]
                    },
                    "implementation": {
                      "description": "Identifies a specific implementation instance that is described by the capability statement &ndash; i.e. a particular installation, rather than the capabilities of a software program.",
                      "type": "object",
                      "properties": {
                        "modifierExtension": {
                          "type": "array",
                          "items": {
                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                            "type": "object",
                            "additionalProperties": true
                          }
                        },
                        "description": {
                          "type": "string",
                          "pattern": "[ \\r\\n\\t\\S]+",
                          "description": "Information about the specific installation that this capability statement relates to."
                        },
                        "url": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces."
                        },
                        "custodian": {
                          "description": "The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.",
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                            },
                            "type": {
                              "type": "string",
                              "pattern": "\\S*",
                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                            },
                            "identifier": {
                              "type": "object",
                              "additionalProperties": true,
                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                            },
                            "display": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                            }
                          }
                        }
                      },
                      "required": [
                        "description"
                      ]
                    },
                    "fhirVersion": {
                      "type": "string",
                      "enum": [
                        "0.01",
                        "0.05",
                        "0.06",
                        "0.11",
                        "0.0.80",
                        "0.0.81",
                        "0.0.82",
                        "0.4.0",
                        "0.5.0",
                        "1.0.0",
                        "1.0.1",
                        "1.0.2",
                        "1.1.0",
                        "1.4.0",
                        "1.6.0",
                        "1.8.0",
                        "3.0.0",
                        "3.0.1",
                        "3.3.0",
                        "3.5.0",
                        "4.0.0",
                        "4.0.1"
                      ],
                      "description": "The version of the FHIR specification that this CapabilityStatement describes (which SHALL be the same as the FHIR version of the CapabilityStatement itself). There is no default value."
                    },
                    "format": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "[^\\s]+(\\s[^\\s]+)*",
                        "description": "A list of the formats supported by this implementation using their content types."
                      },
                      "minItems": 1
                    },
                    "patchFormat": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "[^\\s]+(\\s[^\\s]+)*",
                        "description": "A list of the patch formats supported by this implementation using their content types."
                      }
                    },
                    "implementationGuide": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "\\S*",
                        "description": "A list of implementation guides that the server does (or should) support in their entirety."
                      }
                    },
                    "rest": {
                      "type": "array",
                      "items": {
                        "description": "A definition of the restful capabilities of the solution, if any.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "client",
                              "server"
                            ],
                            "description": "Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations."
                          },
                          "documentation": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Information about the system's restful capabilities that apply across all applications, such as security."
                          },
                          "security": {
                            "description": "Information about security implementation from an interface perspective &ndash; what a client needs to know.",
                            "type": "object",
                            "properties": {
                              "modifierExtension": {
                                "type": "array",
                                "items": {
                                  "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              },
                              "cors": {
                                "type": "boolean",
                                "description": "Server adds CORS headers when responding to requests &ndash; this enables Javascript applications to use the server."
                              },
                              "service": {
                                "type": "array",
                                "items": {
                                  "description": "Types of security services that are supported/required by the system.",
                                  "type": "object",
                                  "properties": {
                                    "coding": {
                                      "type": "array",
                                      "items": {
                                        "description": "A reference to a code defined by a terminology system.",
                                        "type": "object",
                                        "properties": {
                                          "system": {
                                            "type": "string",
                                            "pattern": "\\S*",
                                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                          },
                                          "version": {
                                            "type": "string",
                                            "pattern": "[ \\r\\n\\t\\S]+",
                                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                          },
                                          "code": {
                                            "type": "string",
                                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                          },
                                          "display": {
                                            "type": "string",
                                            "pattern": "[ \\r\\n\\t\\S]+",
                                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                          },
                                          "userSelected": {
                                            "type": "boolean",
                                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                          }
                                        }
                                      }
                                    },
                                    "text": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                    }
                                  }
                                }
                              },
                              "description": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "General description of how security works."
                              }
                            }
                          },
                          "resource": {
                            "type": "array",
                            "items": {
                              "description": "A specification of the restful capabilities of the solution for a specific resource type.",
                              "type": "object",
                              "properties": {
                                "modifierExtension": {
                                  "type": "array",
                                  "items": {
                                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                    "type": "object",
                                    "additionalProperties": true
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "Account",
                                    "ActivityDefinition",
                                    "AdverseEvent",
                                    "AllergyIntolerance",
                                    "Appointment",
                                    "AppointmentResponse",
                                    "AuditEvent",
                                    "Basic",
                                    "Binary",
                                    "BiologicallyDerivedProduct",
                                    "BodyStructure",
                                    "Bundle",
                                    "CapabilityStatement",
                                    "CarePlan",
                                    "CareTeam",
                                    "CatalogEntry",
                                    "ChargeItem",
                                    "ChargeItemDefinition",
                                    "Claim",
                                    "ClaimResponse",
                                    "ClinicalImpression",
                                    "CodeSystem",
                                    "Communication",
                                    "CommunicationRequest",
                                    "CompartmentDefinition",
                                    "Composition",
                                    "ConceptMap",
                                    "Condition",
                                    "Consent",
                                    "Contract",
                                    "Coverage",
                                    "CoverageEligibilityRequest",
                                    "CoverageEligibilityResponse",
                                    "DetectedIssue",
                                    "Device",
                                    "DeviceDefinition",
                                    "DeviceMetric",
                                    "DeviceRequest",
                                    "DeviceUseStatement",
                                    "DiagnosticReport",
                                    "DocumentManifest",
                                    "DocumentReference",
                                    "DomainResource",
                                    "EffectEvidenceSynthesis",
                                    "Encounter",
                                    "Endpoint",
                                    "EnrollmentRequest",
                                    "EnrollmentResponse",
                                    "EpisodeOfCare",
                                    "EventDefinition",
                                    "Evidence",
                                    "EvidenceVariable",
                                    "ExampleScenario",
                                    "ExplanationOfBenefit",
                                    "FamilyMemberHistory",
                                    "Flag",
                                    "Goal",
                                    "GraphDefinition",
                                    "Group",
                                    "GuidanceResponse",
                                    "HealthcareService",
                                    "ImagingStudy",
                                    "Immunization",
                                    "ImmunizationEvaluation",
                                    "ImmunizationRecommendation",
                                    "ImplementationGuide",
                                    "InsurancePlan",
                                    "Invoice",
                                    "Library",
                                    "Linkage",
                                    "List",
                                    "Location",
                                    "Measure",
                                    "MeasureReport",
                                    "Media",
                                    "Medication",
                                    "MedicationAdministration",
                                    "MedicationDispense",
                                    "MedicationKnowledge",
                                    "MedicationRequest",
                                    "MedicationStatement",
                                    "MedicinalProduct",
                                    "MedicinalProductAuthorization",
                                    "MedicinalProductContraindication",
                                    "MedicinalProductIndication",
                                    "MedicinalProductIngredient",
                                    "MedicinalProductInteraction",
                                    "MedicinalProductManufactured",
                                    "MedicinalProductPackaged",
                                    "MedicinalProductPharmaceutical",
                                    "MedicinalProductUndesirableEffect",
                                    "MessageDefinition",
                                    "MessageHeader",
                                    "MolecularSequence",
                                    "NamingSystem",
                                    "NutritionOrder",
                                    "Observation",
                                    "ObservationDefinition",
                                    "OperationDefinition",
                                    "OperationOutcome",
                                    "Organization",
                                    "OrganizationAffiliation",
                                    "Parameters",
                                    "Patient",
                                    "PaymentNotice",
                                    "PaymentReconciliation",
                                    "Person",
                                    "PlanDefinition",
                                    "Practitioner",
                                    "PractitionerRole",
                                    "Procedure",
                                    "Provenance",
                                    "Questionnaire",
                                    "QuestionnaireResponse",
                                    "RelatedPerson",
                                    "RequestGroup",
                                    "ResearchDefinition",
                                    "ResearchElementDefinition",
                                    "ResearchStudy",
                                    "ResearchSubject",
                                    "Resource",
                                    "RiskAssessment",
                                    "RiskEvidenceSynthesis",
                                    "Schedule",
                                    "SearchParameter",
                                    "ServiceRequest",
                                    "Slot",
                                    "Specimen",
                                    "SpecimenDefinition",
                                    "StructureDefinition",
                                    "StructureMap",
                                    "Subscription",
                                    "Substance",
                                    "SubstanceNucleicAcid",
                                    "SubstancePolymer",
                                    "SubstanceProtein",
                                    "SubstanceReferenceInformation",
                                    "SubstanceSourceMaterial",
                                    "SubstanceSpecification",
                                    "SupplyDelivery",
                                    "SupplyRequest",
                                    "Task",
                                    "TerminologyCapabilities",
                                    "TestReport",
                                    "TestScript",
                                    "ValueSet",
                                    "VerificationResult",
                                    "VisionPrescription"
                                  ],
                                  "description": "A type of resource exposed via the restful interface."
                                },
                                "profile": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile&ndash;uses)."
                                },
                                "supportedProfile": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "A list of profiles that represent different use cases supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile&ndash;uses)."
                                  }
                                },
                                "documentation": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "Additional information about the resource type used by the system."
                                },
                                "interaction": {
                                  "type": "array",
                                  "items": {
                                    "description": "Identifies a restful operation supported by the solution.",
                                    "type": "object",
                                    "properties": {
                                      "modifierExtension": {
                                        "type": "array",
                                        "items": {
                                          "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                          "type": "object",
                                          "additionalProperties": true
                                        }
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "read",
                                          "vread",
                                          "update",
                                          "patch",
                                          "delete",
                                          "history-instance",
                                          "history-type",
                                          "create",
                                          "search-type"
                                        ],
                                        "description": "Coded identifier of the operation, supported by the system resource."
                                      },
                                      "documentation": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre&ndash;authorized certificates only'."
                                      }
                                    },
                                    "required": [
                                      "code"
                                    ]
                                  }
                                },
                                "versioning": {
                                  "type": "string",
                                  "enum": [
                                    "no-version",
                                    "versioned",
                                    "versioned-update"
                                  ],
                                  "description": "This field is set to no&ndash;version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta&ndash;property on resources. If the value is 'versioned&ndash;update', then the server supports all the versioning features, including using e&ndash;tags for version integrity in the API."
                                },
                                "readHistory": {
                                  "type": "boolean",
                                  "description": "A flag for whether the server is able to return past versions as part of the vRead operation."
                                },
                                "updateCreate": {
                                  "type": "boolean",
                                  "description": "A flag to indicate that the server allows or needs to allow the client to create new identities on the server (that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server."
                                },
                                "conditionalCreate": {
                                  "type": "boolean",
                                  "description": "A flag that indicates that the server supports conditional create."
                                },
                                "conditionalRead": {
                                  "type": "string",
                                  "enum": [
                                    "not-supported",
                                    "modified-since",
                                    "not-match",
                                    "full-support"
                                  ],
                                  "description": "A code that indicates how the server supports conditional read."
                                },
                                "conditionalUpdate": {
                                  "type": "boolean",
                                  "description": "A flag that indicates that the server supports conditional update."
                                },
                                "conditionalDelete": {
                                  "type": "string",
                                  "enum": [
                                    "not-supported",
                                    "single",
                                    "multiple"
                                  ],
                                  "description": "A code that indicates how the server supports conditional delete."
                                },
                                "referencePolicy": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "literal",
                                      "logical",
                                      "resolves",
                                      "enforced",
                                      "local"
                                    ],
                                    "description": "A set of flags that defines how references are supported."
                                  }
                                },
                                "searchInclude": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A list of _include values supported by the server."
                                  }
                                },
                                "searchRevInclude": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A list of _revinclude (reverse include) values supported by the server."
                                  }
                                },
                                "searchParam": {
                                  "type": "array",
                                  "items": {
                                    "description": "Search parameters for implementations to support and/or make use of &ndash; either references to ones defined in the specification, or additional ones defined for/by the implementation.",
                                    "type": "object",
                                    "properties": {
                                      "modifierExtension": {
                                        "type": "array",
                                        "items": {
                                          "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                          "type": "object",
                                          "additionalProperties": true
                                        }
                                      },
                                      "name": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "The name of the search parameter used in the interface."
                                      },
                                      "definition": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter&ndash;definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs."
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "number",
                                          "date",
                                          "string",
                                          "token",
                                          "reference",
                                          "composite",
                                          "quantity",
                                          "uri",
                                          "special"
                                        ],
                                        "description": "The type of value a search parameter refers to, and how the content is interpreted."
                                      },
                                      "documentation": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms."
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "type"
                                    ]
                                  }
                                },
                                "operation": {
                                  "type": "array",
                                  "items": {
                                    "description": "Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.",
                                    "type": "object",
                                    "properties": {
                                      "modifierExtension": {
                                        "type": "array",
                                        "items": {
                                          "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                          "type": "object",
                                          "additionalProperties": true
                                        }
                                      },
                                      "name": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called."
                                      },
                                      "definition": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet&ndash;expand```), that means it supports the full capabilities of the operation &ndash; e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported."
                                      },
                                      "documentation": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance&ndash;level invocation of the operation."
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "definition"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          },
                          "interaction": {
                            "type": "array",
                            "items": {
                              "description": "A specification of restful operations supported by the system.",
                              "type": "object",
                              "properties": {
                                "modifierExtension": {
                                  "type": "array",
                                  "items": {
                                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                    "type": "object",
                                    "additionalProperties": true
                                  }
                                },
                                "code": {
                                  "type": "string",
                                  "enum": [
                                    "transaction",
                                    "batch",
                                    "search-system",
                                    "history-system"
                                  ],
                                  "description": "Coded identifier of the operation, supported by the system resource."
                                },
                                "documentation": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre&ndash;authorized certificates only'."
                                }
                              },
                              "required": [
                                "code"
                              ]
                            }
                          },
                          "searchParam": {
                            "type": "array",
                            "items": {
                              "description": "Search parameters that are supported for searching all resources for implementations to support and/or make use of &ndash; either references to ones defined in the specification, or additional ones defined for/by the implementation.",
                              "type": "object",
                              "properties": {
                                "modifierExtension": {
                                  "type": "array",
                                  "items": {
                                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                    "type": "object",
                                    "additionalProperties": true
                                  }
                                },
                                "name": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "The name of the search parameter used in the interface."
                                },
                                "definition": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter&ndash;definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs."
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "number",
                                    "date",
                                    "string",
                                    "token",
                                    "reference",
                                    "composite",
                                    "quantity",
                                    "uri",
                                    "special"
                                  ],
                                  "description": "The type of value a search parameter refers to, and how the content is interpreted."
                                },
                                "documentation": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms."
                                }
                              },
                              "required": [
                                "name",
                                "type"
                              ]
                            }
                          },
                          "operation": {
                            "type": "array",
                            "items": {
                              "description": "Definition of an operation or a named query together with its parameters and their meaning and type.",
                              "type": "object",
                              "properties": {
                                "modifierExtension": {
                                  "type": "array",
                                  "items": {
                                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                    "type": "object",
                                    "additionalProperties": true
                                  }
                                },
                                "name": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called."
                                },
                                "definition": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet&ndash;expand```), that means it supports the full capabilities of the operation &ndash; e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported."
                                },
                                "documentation": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance&ndash;level invocation of the operation."
                                }
                              },
                              "required": [
                                "name",
                                "definition"
                              ]
                            }
                          },
                          "compartment": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "\\S*",
                              "description": "An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL ."
                            }
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      }
                    },
                    "messaging": {
                      "type": "array",
                      "items": {
                        "description": "A description of the messaging capabilities of the solution.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "endpoint": {
                            "type": "array",
                            "items": {
                              "description": "An endpoint (network accessible address) to which messages and/or replies are to be sent.",
                              "type": "object",
                              "properties": {
                                "modifierExtension": {
                                  "type": "array",
                                  "items": {
                                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                    "type": "object",
                                    "additionalProperties": true
                                  }
                                },
                                "protocol": {
                                  "description": "A list of the messaging transport protocol(s) identifiers, supported by this endpoint.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                },
                                "address": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier."
                                }
                              },
                              "required": [
                                "protocol",
                                "address"
                              ]
                            }
                          },
                          "reliableCache": {
                            "type": "integer",
                            "format": "int32",
                            "description": "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender)."
                          },
                          "documentation": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner."
                          },
                          "supportedMessage": {
                            "type": "array",
                            "items": {
                              "description": "References to message definitions for messages this system can send or receive.",
                              "type": "object",
                              "properties": {
                                "modifierExtension": {
                                  "type": "array",
                                  "items": {
                                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                    "type": "object",
                                    "additionalProperties": true
                                  }
                                },
                                "mode": {
                                  "type": "string",
                                  "enum": [
                                    "sender",
                                    "receiver"
                                  ],
                                  "description": "The mode of this event declaration &ndash; whether application is sender or receiver."
                                },
                                "definition": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "Points to a message definition that identifies the messaging event, message structure, allowed responses, etc."
                                }
                              },
                              "required": [
                                "mode",
                                "definition"
                              ]
                            }
                          }
                        }
                      }
                    },
                    "document": {
                      "type": "array",
                      "items": {
                        "description": "A document definition.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "producer",
                              "consumer"
                            ],
                            "description": "Mode of this document declaration &ndash; whether an application is a producer or consumer."
                          },
                          "documentation": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc."
                          },
                          "profile": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A profile on the document Bundle that constrains which resources are present, and their contents."
                          }
                        },
                        "required": [
                          "mode",
                          "profile"
                        ]
                      }
                    }
                  },
                  "required": [
                    "resourceType",
                    "status",
                    "date",
                    "kind",
                    "fhirVersion",
                    "format"
                  ]
                },
                "examples": {
                  "CapabilityStatement": {
                    "value": {
                      "resourceType": "CapabilityStatement",
                      "id": "SpecialAuthorityFHIRAPICapabilityStatement",
                      "meta": {
                        "profile": [
                          "https://fhir-ig.digital.health.nz/hnz-digital-tooling/StructureDefinition/hnz-capability-statement"
                        ]
                      },
                      "url": "https://fhir-ig.digital.health.nz/special-authority/CapabilityStatement/SpecialAuthorityFHIRAPICapabilityStatement",
                      "title": "Special Authority FHIR Server Capability Statement",
                      "extension": [
                        {
                          "url": "https://fhir-ig.digital.health.nz/hnz-digital-tooling/StructureDefinition/resource-metadata-extension",
                          "extension": [
                            {
                              "url": "licenseURL",
                              "valueUri": "https://www.tewhatuora.govt.nz/assets/Our-health-system/Digital-health/Digital-Service-Hub/API-Access-and-Use-Agreement.docx"
                            },
                            {
                              "url": "externalDocs",
                              "valueUri": "https://fhir-ig.digital.health.nz/special-authority"
                            },
                            {
                              "url": "licenseName",
                              "valueString": "Health New Zealand Digital Services Hub API Access and Use Agreement"
                            },
                            {
                              "url": "globalHeaders",
                              "extension": [
                                {
                                  "url": "https://fhir-ig.digital.health.nz/hnz-digital-tooling/StructureDefinition/custom-headers-extension",
                                  "extension": [
                                    {
                                      "url": "key",
                                      "valueString": "Request-Context"
                                    },
                                    {
                                      "url": "value",
                                      "valueUri": "https://raw.githubusercontent.com/tewhatuora/schemas/main/openapi-definitions/Request-Context.json"
                                    },
                                    {
                                      "url": "required",
                                      "valueBoolean": true
                                    },
                                    {
                                      "url": "documentation",
                                      "valueString": "Signed Request-Context header asserting the authenticated user, organisation and facility. Validated on every request."
                                    }
                                  ]
                                },
                                {
                                  "url": "https://fhir-ig.digital.health.nz/hnz-digital-tooling/StructureDefinition/custom-headers-extension",
                                  "extension": [
                                    {
                                      "url": "key",
                                      "valueString": "X-Correlation-Id"
                                    },
                                    {
                                      "url": "value",
                                      "valueUri": "https://raw.githubusercontent.com/tewhatuora/schemas/main/shared-care/Correlation-Id.json"
                                    },
                                    {
                                      "url": "required",
                                      "valueBoolean": false
                                    },
                                    {
                                      "url": "documentation",
                                      "valueString": "Optional client-supplied correlation id, returned in the response and recorded in audit events."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "version": "0.1.1",
                      "name": "SpecialAuthorityFHIRAPICapabilityStatement",
                      "description": "Health NZ | Te Whatu Ora Special Authority FHIR API",
                      "status": "draft",
                      "experimental": false,
                      "kind": "instance",
                      "date": "2026-10-15",
                      "publisher": "Health New Zealand | Te Whatu Ora",
                      "contact": [
                        {
                          "name": "Health New Zealand | Te Whatu Ora",
                          "telecom": [
                            {
                              "system": "url",
                              "value": "https://www.tewhatuora.govt.nz"
                            },
                            {
                              "system": "email",
                              "value": "integration@tewhatuora.govt.nz"
                            }
                          ]
                        }
                      ],
                      "implementation": {
                        "description": "Production Special Authority FHIR API",
                        "url": "https://api.sa.digital.health.nz/s2s/fhir/R4"
                      },
                      "fhirVersion": "4.0.1",
                      "format": [
                        "application/fhir+json"
                      ],
                      "rest": [
                        {
                          "mode": "server",
                          "documentation": "All token searches on identifiers SHALL be system-qualified (system|value). All requests require a validated access token and a validated signed Request-Context header.",
                          "security": {
                            "cors": false,
                            "service": [
                              {
                                "coding": [
                                  {
                                    "code": "SMART-on-FHIR",
                                    "system": "http://terminology.hl7.org/CodeSystem/restful-security-service"
                                  }
                                ]
                              }
                            ],
                            "description": "OAuth 2.0 client credentials flow and signed Request-Context header, per the Health NZ Digital Services Hub onboarding process. The authenticated requester identity is never taken from the FHIR payload.",
                            "extension": [
                              {
                                "url": "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris",
                                "extension": [
                                  {
                                    "url": "token",
                                    "valueUri": "https://auth.services.health.nz/realms/hnz-integration/protocol/openid-connect/token"
                                  },
                                  {
                                    "url": "authorize",
                                    "valueUri": "https://auth.services.health.nz/realms/hnz-integration/protocol/openid-connect/auth"
                                  }
                                ]
                              },
                              {
                                "url": "http://fhir-registry.smarthealthit.org/StructureDefinition/capabilities",
                                "valueCode": "client-confidential-symmetric"
                              }
                            ]
                          },
                          "resource": [
                            {
                              "type": "Claim",
                              "profile": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim",
                              "supportedProfile": [
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
                              ],
                              "documentation": "Special Authority Applications. Submitted with $submit; enquired with search.",
                              "interaction": [
                                {
                                  "code": "search-type",
                                  "documentation": "Search Applications, or retrieve a submitted Application by Application Number with _include. Search results are summary representations: referenced resources are only resolved via _include."
                                }
                              ],
                              "searchInclude": [
                                "Claim:patient",
                                "Claim:requestor",
                                "Claim:supportinginfo"
                              ],
                              "searchParam": [
                                {
                                  "name": "identifier",
                                  "definition": "http://hl7.org/fhir/SearchParameter/Claim-identifier",
                                  "type": "token",
                                  "documentation": "Application Number. SHALL be system-qualified."
                                },
                                {
                                  "name": "patient",
                                  "definition": "http://hl7.org/fhir/SearchParameter/Claim-patient",
                                  "type": "reference",
                                  "documentation": "Supports the chained form patient.identifier=nhi-system|NHI only."
                                },
                                {
                                  "name": "requestor",
                                  "definition": "https://fhir-ig.digital.health.nz/special-authority/SearchParameter/claim-requestor",
                                  "type": "reference",
                                  "documentation": "Supports requestor:Practitioner.identifier with the HPI CPN system or an NZ registration authority system."
                                },
                                {
                                  "name": "application-status",
                                  "definition": "https://fhir-ig.digital.health.nz/special-authority/SearchParameter/application-status",
                                  "type": "token",
                                  "documentation": "SUBMITTED | PENDING_REVIEW | CANCELLED | DONE"
                                },
                                {
                                  "name": "created",
                                  "definition": "http://hl7.org/fhir/SearchParameter/Claim-created",
                                  "type": "date",
                                  "documentation": "Submission date range: ge and le map to submittedFrom and submittedTo."
                                }
                              ],
                              "operation": [
                                {
                                  "name": "submit",
                                  "definition": "https://fhir-ig.digital.health.nz/special-authority/OperationDefinition/sa-claim-submit"
                                }
                              ]
                            },
                            {
                              "type": "ClaimResponse",
                              "supportedProfile": [
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse",
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-approval-claimresponse"
                              ],
                              "documentation": "Application outcomes (searched by request.identifier) and Approvals (searched by Approval Number, NHI or practitioner). An Approval search SHALL supply at least one of identifier, patient.identifier or requestor:Practitioner.identifier. approval-valid-on and approval-expiring are mutually exclusive.",
                              "interaction": [
                                {
                                  "code": "search-type"
                                }
                              ],
                              "searchInclude": [
                                "ClaimResponse:request"
                              ],
                              "searchParam": [
                                {
                                  "name": "identifier",
                                  "definition": "http://hl7.org/fhir/SearchParameter/ClaimResponse-identifier",
                                  "type": "token",
                                  "documentation": "Approval Number. SHALL be system-qualified."
                                },
                                {
                                  "name": "request",
                                  "definition": "http://hl7.org/fhir/SearchParameter/ClaimResponse-request",
                                  "type": "reference",
                                  "documentation": "Supports the chained form request.identifier=application-number-system|applicationNumber."
                                },
                                {
                                  "name": "patient",
                                  "definition": "http://hl7.org/fhir/SearchParameter/ClaimResponse-patient",
                                  "type": "reference",
                                  "documentation": "Supports the chained form patient.identifier=nhi-system|NHI only."
                                },
                                {
                                  "name": "requestor",
                                  "definition": "http://hl7.org/fhir/SearchParameter/ClaimResponse-requestor",
                                  "type": "reference",
                                  "documentation": "Supports requestor:Practitioner.identifier with the HPI CPN system or an NZ registration authority system."
                                },
                                {
                                  "name": "approval-status",
                                  "definition": "https://fhir-ig.digital.health.nz/special-authority/SearchParameter/approval-status",
                                  "type": "token",
                                  "documentation": "ACTIVE | CANCELLED | REVOKED"
                                },
                                {
                                  "name": "approval-valid-on",
                                  "definition": "https://fhir-ig.digital.health.nz/special-authority/SearchParameter/approval-valid-on",
                                  "type": "date",
                                  "documentation": "Approvals valid on the supplied date."
                                },
                                {
                                  "name": "approval-expiring",
                                  "definition": "https://fhir-ig.digital.health.nz/special-authority/SearchParameter/approval-expiring",
                                  "type": "date",
                                  "documentation": "Approvals expiring within a date range."
                                },
                                {
                                  "name": "approval-provider-id",
                                  "definition": "https://fhir-ig.digital.health.nz/special-authority/SearchParameter/approval-provider-id",
                                  "type": "token",
                                  "documentation": "Provider - pharmacy - on the Approval. SHALL be system-qualified."
                                },
                                {
                                  "name": "approval-version-state",
                                  "definition": "https://fhir-ig.digital.health.nz/special-authority/SearchParameter/approval-version-state",
                                  "type": "token",
                                  "documentation": "LATEST - default - or PREVIOUS or ALL."
                                },
                                {
                                  "name": "_elements",
                                  "type": "special",
                                  "documentation": "Supported for Retrieve Application Outcome: _elements=extension,preAuthRef."
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/Claim/$submit": {
      "post": {
        "summary": "SASubmitApplication",
        "description": "Submits a Special Authority Application as a single, atomically accepted or rejected SA Submission Bundle. The Bundle is POSTed directly as the request body (Content-Type application/fhir+json). The response is an SA Response Bundle containing an SA Application ClaimResponse.",
        "tags": [
          "Claim"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "Bundle"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "identifier": {
                      "description": "A persistent identifier for the bundle that won't change as a bundle is copied from server to server.",
                      "type": "object",
                      "properties": {
                        "use": {
                          "type": "string",
                          "enum": [
                            "usual",
                            "official",
                            "temp",
                            "secondary",
                            "old"
                          ],
                          "description": "The purpose of this identifier."
                        },
                        "type": {
                          "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                          "type": "object",
                          "properties": {
                            "coding": {
                              "type": "array",
                              "items": {
                                "description": "A reference to a code defined by a terminology system.",
                                "type": "object",
                                "properties": {
                                  "system": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                  },
                                  "version": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                  },
                                  "code": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                  },
                                  "display": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                  },
                                  "userSelected": {
                                    "type": "boolean",
                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                  }
                                }
                              }
                            },
                            "text": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                            }
                          }
                        },
                        "system": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                        },
                        "value": {
                          "type": "string",
                          "pattern": "[ \\r\\n\\t\\S]+",
                          "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                        },
                        "period": {
                          "description": "Time period during which identifier is/was valid for use.",
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": "string",
                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                              "description": "The start of the period. The boundary is inclusive."
                            },
                            "end": {
                              "type": "string",
                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                              "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                            }
                          }
                        },
                        "assigner": {
                          "description": "Organization that issued/manages the identifier.",
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                            },
                            "type": {
                              "type": "string",
                              "pattern": "\\S*",
                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                            },
                            "identifier": {
                              "type": "object",
                              "additionalProperties": true,
                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                            },
                            "display": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                            }
                          }
                        }
                      }
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "document",
                        "message",
                        "transaction",
                        "transaction-response",
                        "batch",
                        "batch-response",
                        "history",
                        "searchset",
                        "collection"
                      ],
                      "description": "Indicates the purpose of this bundle &ndash; how it is intended to be used."
                    },
                    "timestamp": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                      "description": "The date/time that the bundle was assembled &ndash; i.e. when the resources were placed in the bundle."
                    },
                    "total": {
                      "type": "integer",
                      "format": "int32",
                      "description": "If a set of search matches, this is the total number of entries of type 'match' across all pages in the search.  It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle."
                    },
                    "link": {
                      "type": "array",
                      "items": {
                        "description": "A series of links that provide context to this bundle.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "relation": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A name which details the functional use for this link &ndash; see [http://www.iana.org/assignments/link&ndash;relations/link&ndash;relations.xhtml#link&ndash;relations&ndash;1](http://www.iana.org/assignments/link&ndash;relations/link&ndash;relations.xhtml#link&ndash;relations&ndash;1)."
                          },
                          "url": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The reference details for the link."
                          }
                        },
                        "required": [
                          "relation",
                          "url"
                        ]
                      }
                    },
                    "entry": {
                      "type": "array",
                      "items": {
                        "description": "An entry in a bundle resource &ndash; will either contain a resource or information about a resource (transactions and history only).",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "link": {
                            "type": "array",
                            "items": {
                              "description": "A series of links that provide context to this entry.",
                              "type": "object",
                              "properties": {
                                "modifierExtension": {
                                  "type": "array",
                                  "items": {
                                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                    "type": "object",
                                    "additionalProperties": true
                                  }
                                },
                                "relation": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "A name which details the functional use for this link &ndash; see [http://www.iana.org/assignments/link&ndash;relations/link&ndash;relations.xhtml#link&ndash;relations&ndash;1](http://www.iana.org/assignments/link&ndash;relations/link&ndash;relations.xhtml#link&ndash;relations&ndash;1)."
                                },
                                "url": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "The reference details for the link."
                                }
                              },
                              "required": [
                                "relation",
                                "url"
                              ]
                            }
                          },
                          "fullUrl": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The Absolute URL for the resource.  The fullUrl SHALL NOT disagree with the id in the resource &ndash; i.e. if the fullUrl is not a urn:uuid, the URL shall be version&ndash;independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: \n* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle)\n* Results from operations might involve resources that are not identified."
                          },
                          "resource": {
                            "type": "object",
                            "properties": {
                              "resourceType": {
                                "type": "string",
                                "enum": [
                                  "Account",
                                  "ActivityDefinition",
                                  "AdverseEvent",
                                  "AllergyIntolerance",
                                  "Appointment",
                                  "AppointmentResponse",
                                  "AuditEvent",
                                  "Basic",
                                  "Binary",
                                  "BiologicallyDerivedProduct",
                                  "BodyStructure",
                                  "Bundle",
                                  "CapabilityStatement",
                                  "CarePlan",
                                  "CareTeam",
                                  "CatalogEntry",
                                  "ChargeItem",
                                  "ChargeItemDefinition",
                                  "Claim",
                                  "ClaimResponse",
                                  "ClinicalImpression",
                                  "CodeSystem",
                                  "Communication",
                                  "CommunicationRequest",
                                  "CompartmentDefinition",
                                  "Composition",
                                  "ConceptMap",
                                  "Condition",
                                  "Consent",
                                  "Contract",
                                  "Coverage",
                                  "CoverageEligibilityRequest",
                                  "CoverageEligibilityResponse",
                                  "DetectedIssue",
                                  "Device",
                                  "DeviceDefinition",
                                  "DeviceMetric",
                                  "DeviceRequest",
                                  "DeviceUseStatement",
                                  "DiagnosticReport",
                                  "DocumentManifest",
                                  "DocumentReference",
                                  "DomainResource",
                                  "EffectEvidenceSynthesis",
                                  "Encounter",
                                  "Endpoint",
                                  "EnrollmentRequest",
                                  "EnrollmentResponse",
                                  "EpisodeOfCare",
                                  "EventDefinition",
                                  "Evidence",
                                  "EvidenceVariable",
                                  "ExampleScenario",
                                  "ExplanationOfBenefit",
                                  "FamilyMemberHistory",
                                  "Flag",
                                  "Goal",
                                  "GraphDefinition",
                                  "Group",
                                  "GuidanceResponse",
                                  "HealthcareService",
                                  "ImagingStudy",
                                  "Immunization",
                                  "ImmunizationEvaluation",
                                  "ImmunizationRecommendation",
                                  "ImplementationGuide",
                                  "InsurancePlan",
                                  "Invoice",
                                  "Library",
                                  "Linkage",
                                  "List",
                                  "Location",
                                  "Measure",
                                  "MeasureReport",
                                  "Media",
                                  "Medication",
                                  "MedicationAdministration",
                                  "MedicationDispense",
                                  "MedicationKnowledge",
                                  "MedicationRequest",
                                  "MedicationStatement",
                                  "MedicinalProduct",
                                  "MedicinalProductAuthorization",
                                  "MedicinalProductContraindication",
                                  "MedicinalProductIndication",
                                  "MedicinalProductIngredient",
                                  "MedicinalProductInteraction",
                                  "MedicinalProductManufactured",
                                  "MedicinalProductPackaged",
                                  "MedicinalProductPharmaceutical",
                                  "MedicinalProductUndesirableEffect",
                                  "MessageDefinition",
                                  "MessageHeader",
                                  "MolecularSequence",
                                  "NamingSystem",
                                  "NutritionOrder",
                                  "Observation",
                                  "ObservationDefinition",
                                  "OperationDefinition",
                                  "OperationOutcome",
                                  "Organization",
                                  "OrganizationAffiliation",
                                  "Parameters",
                                  "Patient",
                                  "PaymentNotice",
                                  "PaymentReconciliation",
                                  "Person",
                                  "PlanDefinition",
                                  "Practitioner",
                                  "PractitionerRole",
                                  "Procedure",
                                  "Provenance",
                                  "Questionnaire",
                                  "QuestionnaireResponse",
                                  "RelatedPerson",
                                  "RequestGroup",
                                  "ResearchDefinition",
                                  "ResearchElementDefinition",
                                  "ResearchStudy",
                                  "ResearchSubject",
                                  "Resource",
                                  "RiskAssessment",
                                  "RiskEvidenceSynthesis",
                                  "Schedule",
                                  "SearchParameter",
                                  "ServiceRequest",
                                  "Slot",
                                  "Specimen",
                                  "SpecimenDefinition",
                                  "StructureDefinition",
                                  "StructureMap",
                                  "Subscription",
                                  "Substance",
                                  "SubstanceNucleicAcid",
                                  "SubstancePolymer",
                                  "SubstanceProtein",
                                  "SubstanceReferenceInformation",
                                  "SubstanceSourceMaterial",
                                  "SubstanceSpecification",
                                  "SupplyDelivery",
                                  "SupplyRequest",
                                  "Task",
                                  "TerminologyCapabilities",
                                  "TestReport",
                                  "TestScript",
                                  "ValueSet",
                                  "VerificationResult",
                                  "VisionPrescription"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                              },
                              "meta": {
                                "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                "type": "object",
                                "properties": {
                                  "versionId": {
                                    "type": "string",
                                    "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                    "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                                  },
                                  "lastUpdated": {
                                    "type": "string",
                                    "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                    "description": "When the resource last changed &ndash; e.g. when the version changed."
                                  },
                                  "source": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                  },
                                  "profile": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                    }
                                  },
                                  "security": {
                                    "type": "array",
                                    "items": {
                                      "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                      "type": "object",
                                      "properties": {
                                        "system": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                        },
                                        "version": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                        },
                                        "code": {
                                          "type": "string",
                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                        },
                                        "display": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                        },
                                        "userSelected": {
                                          "type": "boolean",
                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                        }
                                      }
                                    }
                                  },
                                  "tag": {
                                    "type": "array",
                                    "items": {
                                      "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                      "type": "object",
                                      "properties": {
                                        "system": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                        },
                                        "version": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                        },
                                        "code": {
                                          "type": "string",
                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                        },
                                        "display": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                        },
                                        "userSelected": {
                                          "type": "boolean",
                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "implicitRules": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                              },
                              "language": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "The base language in which the resource is written."
                              }
                            },
                            "required": [
                              "resourceType"
                            ],
                            "description": "The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type."
                          },
                          "search": {
                            "description": "Information about the search process that lead to the creation of this entry.",
                            "type": "object",
                            "properties": {
                              "modifierExtension": {
                                "type": "array",
                                "items": {
                                  "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "match",
                                  "include",
                                  "outcome"
                                ],
                                "description": "Why this entry is in the result set &ndash; whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process."
                              },
                              "score": {
                                "type": "number",
                                "description": "When searching, the server's search ranking score for the entry."
                              }
                            }
                          },
                          "request": {
                            "description": "Additional information about how this entry should be processed as part of a transaction or batch.  For history, it shows how the entry was processed to create the version contained in the entry.",
                            "type": "object",
                            "properties": {
                              "modifierExtension": {
                                "type": "array",
                                "items": {
                                  "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              },
                              "method": {
                                "type": "string",
                                "enum": [
                                  "GET",
                                  "HEAD",
                                  "POST",
                                  "PUT",
                                  "DELETE",
                                  "PATCH"
                                ],
                                "description": "In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred."
                              },
                              "url": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The URL for this entry, relative to the root (the address to which the request is posted)."
                              },
                              "ifNoneMatch": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "If the ETag values match, return a 304 Not Modified status. See the API documentation for [\"Conditional Read\"](http.html#cread)."
                              },
                              "ifModifiedSince": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "Only perform the operation if the last updated date matches. See the API documentation for [\"Conditional Read\"](http.html#cread)."
                              },
                              "ifMatch": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "Only perform the operation if the Etag value matches. For more information, see the API section [\"Managing Resource Contention\"](http.html#concurrency)."
                              },
                              "ifNoneExist": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL &ndash; what follows the \"?\" (not including the \"?\")."
                              }
                            },
                            "required": [
                              "method",
                              "url"
                            ]
                          },
                          "response": {
                            "description": "Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.",
                            "type": "object",
                            "properties": {
                              "modifierExtension": {
                                "type": "array",
                                "items": {
                                  "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              },
                              "status": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code."
                              },
                              "location": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The location header created by processing this operation, populated if the operation returns a location."
                              },
                              "etag": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency))."
                              },
                              "lastModified": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "The date/time that the resource was modified on the server."
                              },
                              "outcome": {
                                "type": "object",
                                "properties": {
                                  "resourceType": {
                                    "type": "string",
                                    "enum": [
                                      "Account",
                                      "ActivityDefinition",
                                      "AdverseEvent",
                                      "AllergyIntolerance",
                                      "Appointment",
                                      "AppointmentResponse",
                                      "AuditEvent",
                                      "Basic",
                                      "Binary",
                                      "BiologicallyDerivedProduct",
                                      "BodyStructure",
                                      "Bundle",
                                      "CapabilityStatement",
                                      "CarePlan",
                                      "CareTeam",
                                      "CatalogEntry",
                                      "ChargeItem",
                                      "ChargeItemDefinition",
                                      "Claim",
                                      "ClaimResponse",
                                      "ClinicalImpression",
                                      "CodeSystem",
                                      "Communication",
                                      "CommunicationRequest",
                                      "CompartmentDefinition",
                                      "Composition",
                                      "ConceptMap",
                                      "Condition",
                                      "Consent",
                                      "Contract",
                                      "Coverage",
                                      "CoverageEligibilityRequest",
                                      "CoverageEligibilityResponse",
                                      "DetectedIssue",
                                      "Device",
                                      "DeviceDefinition",
                                      "DeviceMetric",
                                      "DeviceRequest",
                                      "DeviceUseStatement",
                                      "DiagnosticReport",
                                      "DocumentManifest",
                                      "DocumentReference",
                                      "DomainResource",
                                      "EffectEvidenceSynthesis",
                                      "Encounter",
                                      "Endpoint",
                                      "EnrollmentRequest",
                                      "EnrollmentResponse",
                                      "EpisodeOfCare",
                                      "EventDefinition",
                                      "Evidence",
                                      "EvidenceVariable",
                                      "ExampleScenario",
                                      "ExplanationOfBenefit",
                                      "FamilyMemberHistory",
                                      "Flag",
                                      "Goal",
                                      "GraphDefinition",
                                      "Group",
                                      "GuidanceResponse",
                                      "HealthcareService",
                                      "ImagingStudy",
                                      "Immunization",
                                      "ImmunizationEvaluation",
                                      "ImmunizationRecommendation",
                                      "ImplementationGuide",
                                      "InsurancePlan",
                                      "Invoice",
                                      "Library",
                                      "Linkage",
                                      "List",
                                      "Location",
                                      "Measure",
                                      "MeasureReport",
                                      "Media",
                                      "Medication",
                                      "MedicationAdministration",
                                      "MedicationDispense",
                                      "MedicationKnowledge",
                                      "MedicationRequest",
                                      "MedicationStatement",
                                      "MedicinalProduct",
                                      "MedicinalProductAuthorization",
                                      "MedicinalProductContraindication",
                                      "MedicinalProductIndication",
                                      "MedicinalProductIngredient",
                                      "MedicinalProductInteraction",
                                      "MedicinalProductManufactured",
                                      "MedicinalProductPackaged",
                                      "MedicinalProductPharmaceutical",
                                      "MedicinalProductUndesirableEffect",
                                      "MessageDefinition",
                                      "MessageHeader",
                                      "MolecularSequence",
                                      "NamingSystem",
                                      "NutritionOrder",
                                      "Observation",
                                      "ObservationDefinition",
                                      "OperationDefinition",
                                      "OperationOutcome",
                                      "Organization",
                                      "OrganizationAffiliation",
                                      "Parameters",
                                      "Patient",
                                      "PaymentNotice",
                                      "PaymentReconciliation",
                                      "Person",
                                      "PlanDefinition",
                                      "Practitioner",
                                      "PractitionerRole",
                                      "Procedure",
                                      "Provenance",
                                      "Questionnaire",
                                      "QuestionnaireResponse",
                                      "RelatedPerson",
                                      "RequestGroup",
                                      "ResearchDefinition",
                                      "ResearchElementDefinition",
                                      "ResearchStudy",
                                      "ResearchSubject",
                                      "Resource",
                                      "RiskAssessment",
                                      "RiskEvidenceSynthesis",
                                      "Schedule",
                                      "SearchParameter",
                                      "ServiceRequest",
                                      "Slot",
                                      "Specimen",
                                      "SpecimenDefinition",
                                      "StructureDefinition",
                                      "StructureMap",
                                      "Subscription",
                                      "Substance",
                                      "SubstanceNucleicAcid",
                                      "SubstancePolymer",
                                      "SubstanceProtein",
                                      "SubstanceReferenceInformation",
                                      "SubstanceSourceMaterial",
                                      "SubstanceSpecification",
                                      "SupplyDelivery",
                                      "SupplyRequest",
                                      "Task",
                                      "TerminologyCapabilities",
                                      "TestReport",
                                      "TestScript",
                                      "ValueSet",
                                      "VerificationResult",
                                      "VisionPrescription"
                                    ]
                                  },
                                  "id": {
                                    "type": "string",
                                    "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                    "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                                  },
                                  "meta": {
                                    "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                    "type": "object",
                                    "properties": {
                                      "versionId": {
                                        "type": "string",
                                        "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                        "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                                      },
                                      "lastUpdated": {
                                        "type": "string",
                                        "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                        "description": "When the resource last changed &ndash; e.g. when the version changed."
                                      },
                                      "source": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                      },
                                      "profile": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                        }
                                      },
                                      "security": {
                                        "type": "array",
                                        "items": {
                                          "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      },
                                      "tag": {
                                        "type": "array",
                                        "items": {
                                          "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "implicitRules": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                                  },
                                  "language": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "The base language in which the resource is written."
                                  }
                                },
                                "required": [
                                  "resourceType"
                                ],
                                "description": "An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction."
                              }
                            },
                            "required": [
                              "status"
                            ]
                          }
                        }
                      }
                    },
                    "signature": {
                      "description": "Digital Signature &ndash; base64 encoded. XML&ndash;DSig or a JWT.",
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "array",
                          "items": {
                            "description": "An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          },
                          "minItems": 1
                        },
                        "when": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the digital signature was signed."
                        },
                        "who": {
                          "description": "A reference to an application&ndash;usable description of the identity that signed  (e.g. the signature used their private key).",
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                            },
                            "type": {
                              "type": "string",
                              "pattern": "\\S*",
                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                            },
                            "identifier": {
                              "type": "object",
                              "additionalProperties": true,
                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                            },
                            "display": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                            }
                          }
                        },
                        "onBehalfOf": {
                          "description": "A reference to an application&ndash;usable description of the identity that is represented by the signature.",
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                            },
                            "type": {
                              "type": "string",
                              "pattern": "\\S*",
                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                            },
                            "identifier": {
                              "type": "object",
                              "additionalProperties": true,
                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                            },
                            "display": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                            }
                          }
                        },
                        "targetFormat": {
                          "type": "string",
                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                          "description": "A mime type that indicates the technical format of the target resources signed by the signature."
                        },
                        "sigFormat": {
                          "type": "string",
                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                          "description": "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc."
                        },
                        "data": {
                          "type": "string",
                          "pattern": "(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+",
                          "description": "The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty."
                        }
                      },
                      "required": [
                        "type",
                        "when",
                        "who"
                      ]
                    }
                  },
                  "required": [
                    "resourceType",
                    "type"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Unsuccessful SASubmitApplication operation - 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unsuccessful SASubmitApplication operation - 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Unsuccessful SASubmitApplication operation - 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Unsuccessful SASubmitApplication operation - 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Request-Context",
            "in": "header",
            "required": true,
            "description": "Signed Request-Context header asserting the authenticated user, organisation and facility. Validated on every request.",
            "schema": {
              "type": "string",
              "format": "base64",
              "description": "A base64 encoded JSON object that represents the request context for the current request. See the schema https://github.com/tewhatuora/schemas/Request-Context-v2.json for context properties"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "required": false,
            "description": "Optional client-supplied correlation id, returned in the response and recorded in audit events.",
            "schema": {
              "type": "string",
              "description": "A string representing the Correlation ID for the current request. This ID is used to correlate logs and other data across services."
            }
          }
        ],
        "security": [
          {
            "smartOnFhir": [
              "https://fhir-ig.digital.health.nz/special-authority/OperationDefinition/sa-claim-submit"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resourceType": {
                    "type": "string",
                    "enum": [
                      "Parameters"
                    ]
                  },
                  "parameter": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "valueString": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true,
                      "required": [
                        "name"
                      ]
                    }
                  }
                },
                "required": [
                  "resourceType",
                  "parameter"
                ]
              }
            }
          }
        },
        "operationId": "custom-submit-Claim-type"
      }
    },
    "/ClaimResponse": {
      "get": {
        "summary": "Search for ClaimResponse",
        "description": "Search for ClaimResponse",
        "tags": [
          "ClaimResponse"
        ],
        "operationId": "searchClaimResponse",
        "parameters": [
          {
            "name": "Request-Context",
            "in": "header",
            "required": true,
            "description": "Signed Request-Context header asserting the authenticated user, organisation and facility. Validated on every request.",
            "schema": {
              "type": "string",
              "format": "base64",
              "description": "A base64 encoded JSON object that represents the request context for the current request. See the schema https://github.com/tewhatuora/schemas/Request-Context-v2.json for context properties"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "required": false,
            "description": "Optional client-supplied correlation id, returned in the response and recorded in audit events.",
            "schema": {
              "type": "string",
              "description": "A string representing the Correlation ID for the current request. This ID is used to correlate logs and other data across services."
            }
          },
          {
            "name": "identifier",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "request",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "patient",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "approval-status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "approval-valid-on",
            "in": "query",
            "style": "form",
            "explode": true,
            "required": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "date": {
                "value": "2024-12-02"
              }
            }
          },
          {
            "name": "approval-expiring",
            "in": "query",
            "style": "form",
            "explode": true,
            "required": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "date": {
                "value": "2024-12-02"
              }
            }
          },
          {
            "name": "approval-provider-id",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "approval-version-state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_elements",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful search operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "Bundle"
                      ],
                      "description": "Resource type must be a Bundle."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "searchset"
                      ],
                      "description": "The type of response (e.g., transaction-response or batch-response)."
                    },
                    "entry": {
                      "type": "array",
                      "description": "Entries in the bundle representing resources involved in the interaction.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resource": {
                            "type": "object",
                            "description": "A resource in the bundle.",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "resourceType": {
                                    "type": "string",
                                    "enum": [
                                      "ClaimResponse"
                                    ]
                                  },
                                  "id": {
                                    "type": "string",
                                    "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                    "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                                  },
                                  "meta": {
                                    "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                    "type": "object",
                                    "properties": {
                                      "versionId": {
                                        "type": "string",
                                        "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                        "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                                      },
                                      "lastUpdated": {
                                        "type": "string",
                                        "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                        "description": "When the resource last changed &ndash; e.g. when the version changed."
                                      },
                                      "source": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                      },
                                      "profile": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                        }
                                      },
                                      "security": {
                                        "type": "array",
                                        "items": {
                                          "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      },
                                      "tag": {
                                        "type": "array",
                                        "items": {
                                          "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "implicitRules": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                                  },
                                  "language": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "The base language in which the resource is written."
                                  },
                                  "text": {
                                    "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                                    "type": "object",
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "generated",
                                          "extensions",
                                          "additional",
                                          "empty"
                                        ],
                                        "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                                      },
                                      "div": {
                                        "type": "string",
                                        "description": "The actual narrative content, a stripped down version of XHTML."
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "div"
                                    ]
                                  },
                                  "contained": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "resourceType": {
                                          "type": "string",
                                          "enum": [
                                            "Account",
                                            "ActivityDefinition",
                                            "AdverseEvent",
                                            "AllergyIntolerance",
                                            "Appointment",
                                            "AppointmentResponse",
                                            "AuditEvent",
                                            "Basic",
                                            "Binary",
                                            "BiologicallyDerivedProduct",
                                            "BodyStructure",
                                            "Bundle",
                                            "CapabilityStatement",
                                            "CarePlan",
                                            "CareTeam",
                                            "CatalogEntry",
                                            "ChargeItem",
                                            "ChargeItemDefinition",
                                            "Claim",
                                            "ClaimResponse",
                                            "ClinicalImpression",
                                            "CodeSystem",
                                            "Communication",
                                            "CommunicationRequest",
                                            "CompartmentDefinition",
                                            "Composition",
                                            "ConceptMap",
                                            "Condition",
                                            "Consent",
                                            "Contract",
                                            "Coverage",
                                            "CoverageEligibilityRequest",
                                            "CoverageEligibilityResponse",
                                            "DetectedIssue",
                                            "Device",
                                            "DeviceDefinition",
                                            "DeviceMetric",
                                            "DeviceRequest",
                                            "DeviceUseStatement",
                                            "DiagnosticReport",
                                            "DocumentManifest",
                                            "DocumentReference",
                                            "DomainResource",
                                            "EffectEvidenceSynthesis",
                                            "Encounter",
                                            "Endpoint",
                                            "EnrollmentRequest",
                                            "EnrollmentResponse",
                                            "EpisodeOfCare",
                                            "EventDefinition",
                                            "Evidence",
                                            "EvidenceVariable",
                                            "ExampleScenario",
                                            "ExplanationOfBenefit",
                                            "FamilyMemberHistory",
                                            "Flag",
                                            "Goal",
                                            "GraphDefinition",
                                            "Group",
                                            "GuidanceResponse",
                                            "HealthcareService",
                                            "ImagingStudy",
                                            "Immunization",
                                            "ImmunizationEvaluation",
                                            "ImmunizationRecommendation",
                                            "ImplementationGuide",
                                            "InsurancePlan",
                                            "Invoice",
                                            "Library",
                                            "Linkage",
                                            "List",
                                            "Location",
                                            "Measure",
                                            "MeasureReport",
                                            "Media",
                                            "Medication",
                                            "MedicationAdministration",
                                            "MedicationDispense",
                                            "MedicationKnowledge",
                                            "MedicationRequest",
                                            "MedicationStatement",
                                            "MedicinalProduct",
                                            "MedicinalProductAuthorization",
                                            "MedicinalProductContraindication",
                                            "MedicinalProductIndication",
                                            "MedicinalProductIngredient",
                                            "MedicinalProductInteraction",
                                            "MedicinalProductManufactured",
                                            "MedicinalProductPackaged",
                                            "MedicinalProductPharmaceutical",
                                            "MedicinalProductUndesirableEffect",
                                            "MessageDefinition",
                                            "MessageHeader",
                                            "MolecularSequence",
                                            "NamingSystem",
                                            "NutritionOrder",
                                            "Observation",
                                            "ObservationDefinition",
                                            "OperationDefinition",
                                            "OperationOutcome",
                                            "Organization",
                                            "OrganizationAffiliation",
                                            "Parameters",
                                            "Patient",
                                            "PaymentNotice",
                                            "PaymentReconciliation",
                                            "Person",
                                            "PlanDefinition",
                                            "Practitioner",
                                            "PractitionerRole",
                                            "Procedure",
                                            "Provenance",
                                            "Questionnaire",
                                            "QuestionnaireResponse",
                                            "RelatedPerson",
                                            "RequestGroup",
                                            "ResearchDefinition",
                                            "ResearchElementDefinition",
                                            "ResearchStudy",
                                            "ResearchSubject",
                                            "Resource",
                                            "RiskAssessment",
                                            "RiskEvidenceSynthesis",
                                            "Schedule",
                                            "SearchParameter",
                                            "ServiceRequest",
                                            "Slot",
                                            "Specimen",
                                            "SpecimenDefinition",
                                            "StructureDefinition",
                                            "StructureMap",
                                            "Subscription",
                                            "Substance",
                                            "SubstanceNucleicAcid",
                                            "SubstancePolymer",
                                            "SubstanceProtein",
                                            "SubstanceReferenceInformation",
                                            "SubstanceSourceMaterial",
                                            "SubstanceSpecification",
                                            "SupplyDelivery",
                                            "SupplyRequest",
                                            "Task",
                                            "TerminologyCapabilities",
                                            "TestReport",
                                            "TestScript",
                                            "ValueSet",
                                            "VerificationResult",
                                            "VisionPrescription"
                                          ]
                                        },
                                        "id": {
                                          "type": "string",
                                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                          "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                                        },
                                        "meta": {
                                          "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                          "type": "object",
                                          "properties": {
                                            "versionId": {
                                              "type": "string",
                                              "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                              "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                                            },
                                            "lastUpdated": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                              "description": "When the resource last changed &ndash; e.g. when the version changed."
                                            },
                                            "source": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                            },
                                            "profile": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "pattern": "\\S*",
                                                "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                              }
                                            },
                                            "security": {
                                              "type": "array",
                                              "items": {
                                                "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "tag": {
                                              "type": "array",
                                              "items": {
                                                "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "implicitRules": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                                        },
                                        "language": {
                                          "type": "string",
                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                          "description": "The base language in which the resource is written."
                                        }
                                      },
                                      "required": [
                                        "resourceType"
                                      ],
                                      "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                                    }
                                  },
                                  "extension": {
                                    "type": "array",
                                    "items": {
                                      "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                                      "type": "object",
                                      "additionalProperties": true
                                    },
                                    "minItems": 1
                                  },
                                  "modifierExtension": {
                                    "type": "array",
                                    "items": {
                                      "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  },
                                  "identifier": {
                                    "type": "array",
                                    "items": {
                                      "description": "A unique identifier assigned to this claim response.",
                                      "type": "object",
                                      "properties": {
                                        "use": {
                                          "type": "string",
                                          "enum": [
                                            "usual",
                                            "official",
                                            "temp",
                                            "secondary",
                                            "old"
                                          ],
                                          "description": "The purpose of this identifier."
                                        },
                                        "type": {
                                          "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "system": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                                        },
                                        "value": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                                        },
                                        "period": {
                                          "description": "Time period during which identifier is/was valid for use.",
                                          "type": "object",
                                          "properties": {
                                            "start": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The start of the period. The boundary is inclusive."
                                            },
                                            "end": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                            }
                                          }
                                        },
                                        "assigner": {
                                          "description": "Organization that issued/manages the identifier.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "maxItems": 1,
                                    "required": [
                                      "system",
                                      "value"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "active"
                                    ]
                                  },
                                  "type": {
                                    "type": "object",
                                    "properties": {
                                      "coding": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "enum": [
                                                "http://terminology.hl7.org/CodeSystem/claim-type"
                                              ]
                                            },
                                            "code": {
                                              "type": "string",
                                              "enum": [
                                                "pharmacy"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "system",
                                            "code"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "coding"
                                    ]
                                  },
                                  "use": {
                                    "type": "string",
                                    "enum": [
                                      "preauthorization"
                                    ]
                                  },
                                  "patient": {
                                    "description": "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    }
                                  },
                                  "created": {
                                    "type": "string",
                                    "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                    "description": "The date this resource was created."
                                  },
                                  "insurer": {
                                    "description": "The party responsible for authorization, adjudication and reimbursement.",
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    },
                                    "required": [
                                      "display"
                                    ]
                                  },
                                  "requestor": {
                                    "description": "The provider which is responsible for the claim, predetermination or preauthorization.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    }
                                  },
                                  "request": {
                                    "description": "Original request resource reference.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.",
                                        "required": [
                                          "value"
                                        ]
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    },
                                    "required": [
                                      "identifier"
                                    ]
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "queued",
                                      "complete",
                                      "error",
                                      "partial"
                                    ],
                                    "description": "The outcome of the claim, predetermination, or preauthorization processing."
                                  },
                                  "disposition": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A human readable description of the status of the adjudication."
                                  },
                                  "preAuthRef": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "Reference from the Insurer which is used in later communications which refers to this adjudication."
                                  },
                                  "preAuthPeriod": {
                                    "description": "The time frame during which this authorization is effective.",
                                    "type": "object",
                                    "properties": {
                                      "start": {
                                        "type": "string",
                                        "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                        "description": "The start of the period. The boundary is inclusive."
                                      },
                                      "end": {
                                        "type": "string",
                                        "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                        "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                      }
                                    }
                                  },
                                  "processNote": {
                                    "type": "array",
                                    "items": {
                                      "description": "A note that describes or explains adjudication results in a human readable form.",
                                      "type": "object",
                                      "properties": {
                                        "modifierExtension": {
                                          "type": "array",
                                          "items": {
                                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                            "type": "object",
                                            "additionalProperties": true
                                          }
                                        },
                                        "number": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "A number to uniquely identify a note entry."
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "display",
                                            "print",
                                            "printoper"
                                          ],
                                          "description": "The business purpose of the note text."
                                        },
                                        "text": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The explanation or description associated with the processing."
                                        },
                                        "language": {
                                          "description": "A code to define the language used in the text of the note.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        }
                                      },
                                      "required": [
                                        "text"
                                      ]
                                    }
                                  },
                                  "communicationRequest": {
                                    "type": "array",
                                    "items": {
                                      "description": "Request for additional supporting or authorizing information.",
                                      "type": "object",
                                      "properties": {
                                        "reference": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                        },
                                        "type": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                        },
                                        "identifier": {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                        },
                                        "display": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                        }
                                      }
                                    }
                                  },
                                  "error": {
                                    "type": "array",
                                    "items": {
                                      "description": "Errors encountered during the processing of the adjudication.",
                                      "type": "object",
                                      "properties": {
                                        "modifierExtension": {
                                          "type": "array",
                                          "items": {
                                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                            "type": "object",
                                            "additionalProperties": true
                                          }
                                        },
                                        "itemSequence": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure."
                                        },
                                        "detailSequence": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure."
                                        },
                                        "subDetailSequence": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "The sequence number of the sub&ndash;detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure."
                                        },
                                        "code": {
                                          "description": "An error code, from a specified code system, which details why the claim could not be adjudicated.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        }
                                      },
                                      "required": [
                                        "code"
                                      ]
                                    },
                                    "maxItems": 1
                                  }
                                },
                                "required": [
                                  "resourceType",
                                  "status",
                                  "type",
                                  "use",
                                  "patient",
                                  "created",
                                  "insurer",
                                  "outcome",
                                  "extension",
                                  "request"
                                ],
                                "description": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "resourceType": {
                                    "type": "string",
                                    "enum": [
                                      "ClaimResponse"
                                    ]
                                  },
                                  "id": {
                                    "type": "string",
                                    "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                    "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                                  },
                                  "meta": {
                                    "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                    "type": "object",
                                    "properties": {
                                      "lastUpdated": {
                                        "type": "string",
                                        "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                        "description": "When the resource last changed &ndash; e.g. when the version changed."
                                      },
                                      "source": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                      },
                                      "profile": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                        }
                                      },
                                      "security": {
                                        "type": "array",
                                        "items": {
                                          "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      },
                                      "tag": {
                                        "type": "array",
                                        "items": {
                                          "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                            },
                                            "version": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                            },
                                            "code": {
                                              "type": "string",
                                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                            },
                                            "userSelected": {
                                              "type": "boolean",
                                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "lastUpdated"
                                    ]
                                  },
                                  "implicitRules": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                                  },
                                  "language": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "The base language in which the resource is written."
                                  },
                                  "text": {
                                    "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                                    "type": "object",
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "generated",
                                          "extensions",
                                          "additional",
                                          "empty"
                                        ],
                                        "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                                      },
                                      "div": {
                                        "type": "string",
                                        "description": "The actual narrative content, a stripped down version of XHTML."
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "div"
                                    ]
                                  },
                                  "contained": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "resourceType": {
                                          "type": "string",
                                          "enum": [
                                            "Account",
                                            "ActivityDefinition",
                                            "AdverseEvent",
                                            "AllergyIntolerance",
                                            "Appointment",
                                            "AppointmentResponse",
                                            "AuditEvent",
                                            "Basic",
                                            "Binary",
                                            "BiologicallyDerivedProduct",
                                            "BodyStructure",
                                            "Bundle",
                                            "CapabilityStatement",
                                            "CarePlan",
                                            "CareTeam",
                                            "CatalogEntry",
                                            "ChargeItem",
                                            "ChargeItemDefinition",
                                            "Claim",
                                            "ClaimResponse",
                                            "ClinicalImpression",
                                            "CodeSystem",
                                            "Communication",
                                            "CommunicationRequest",
                                            "CompartmentDefinition",
                                            "Composition",
                                            "ConceptMap",
                                            "Condition",
                                            "Consent",
                                            "Contract",
                                            "Coverage",
                                            "CoverageEligibilityRequest",
                                            "CoverageEligibilityResponse",
                                            "DetectedIssue",
                                            "Device",
                                            "DeviceDefinition",
                                            "DeviceMetric",
                                            "DeviceRequest",
                                            "DeviceUseStatement",
                                            "DiagnosticReport",
                                            "DocumentManifest",
                                            "DocumentReference",
                                            "DomainResource",
                                            "EffectEvidenceSynthesis",
                                            "Encounter",
                                            "Endpoint",
                                            "EnrollmentRequest",
                                            "EnrollmentResponse",
                                            "EpisodeOfCare",
                                            "EventDefinition",
                                            "Evidence",
                                            "EvidenceVariable",
                                            "ExampleScenario",
                                            "ExplanationOfBenefit",
                                            "FamilyMemberHistory",
                                            "Flag",
                                            "Goal",
                                            "GraphDefinition",
                                            "Group",
                                            "GuidanceResponse",
                                            "HealthcareService",
                                            "ImagingStudy",
                                            "Immunization",
                                            "ImmunizationEvaluation",
                                            "ImmunizationRecommendation",
                                            "ImplementationGuide",
                                            "InsurancePlan",
                                            "Invoice",
                                            "Library",
                                            "Linkage",
                                            "List",
                                            "Location",
                                            "Measure",
                                            "MeasureReport",
                                            "Media",
                                            "Medication",
                                            "MedicationAdministration",
                                            "MedicationDispense",
                                            "MedicationKnowledge",
                                            "MedicationRequest",
                                            "MedicationStatement",
                                            "MedicinalProduct",
                                            "MedicinalProductAuthorization",
                                            "MedicinalProductContraindication",
                                            "MedicinalProductIndication",
                                            "MedicinalProductIngredient",
                                            "MedicinalProductInteraction",
                                            "MedicinalProductManufactured",
                                            "MedicinalProductPackaged",
                                            "MedicinalProductPharmaceutical",
                                            "MedicinalProductUndesirableEffect",
                                            "MessageDefinition",
                                            "MessageHeader",
                                            "MolecularSequence",
                                            "NamingSystem",
                                            "NutritionOrder",
                                            "Observation",
                                            "ObservationDefinition",
                                            "OperationDefinition",
                                            "OperationOutcome",
                                            "Organization",
                                            "OrganizationAffiliation",
                                            "Parameters",
                                            "Patient",
                                            "PaymentNotice",
                                            "PaymentReconciliation",
                                            "Person",
                                            "PlanDefinition",
                                            "Practitioner",
                                            "PractitionerRole",
                                            "Procedure",
                                            "Provenance",
                                            "Questionnaire",
                                            "QuestionnaireResponse",
                                            "RelatedPerson",
                                            "RequestGroup",
                                            "ResearchDefinition",
                                            "ResearchElementDefinition",
                                            "ResearchStudy",
                                            "ResearchSubject",
                                            "Resource",
                                            "RiskAssessment",
                                            "RiskEvidenceSynthesis",
                                            "Schedule",
                                            "SearchParameter",
                                            "ServiceRequest",
                                            "Slot",
                                            "Specimen",
                                            "SpecimenDefinition",
                                            "StructureDefinition",
                                            "StructureMap",
                                            "Subscription",
                                            "Substance",
                                            "SubstanceNucleicAcid",
                                            "SubstancePolymer",
                                            "SubstanceProtein",
                                            "SubstanceReferenceInformation",
                                            "SubstanceSourceMaterial",
                                            "SubstanceSpecification",
                                            "SupplyDelivery",
                                            "SupplyRequest",
                                            "Task",
                                            "TerminologyCapabilities",
                                            "TestReport",
                                            "TestScript",
                                            "ValueSet",
                                            "VerificationResult",
                                            "VisionPrescription"
                                          ]
                                        },
                                        "id": {
                                          "type": "string",
                                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                          "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                                        },
                                        "meta": {
                                          "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                                          "type": "object",
                                          "properties": {
                                            "versionId": {
                                              "type": "string",
                                              "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                              "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                                            },
                                            "lastUpdated": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                              "description": "When the resource last changed &ndash; e.g. when the version changed."
                                            },
                                            "source": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                                            },
                                            "profile": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "pattern": "\\S*",
                                                "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                              }
                                            },
                                            "security": {
                                              "type": "array",
                                              "items": {
                                                "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "tag": {
                                              "type": "array",
                                              "items": {
                                                "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "implicitRules": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                                        },
                                        "language": {
                                          "type": "string",
                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                          "description": "The base language in which the resource is written."
                                        }
                                      },
                                      "required": [
                                        "resourceType"
                                      ],
                                      "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                                    }
                                  },
                                  "extension": {
                                    "type": "array",
                                    "items": {
                                      "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                                      "type": "object",
                                      "additionalProperties": true
                                    },
                                    "minItems": 1
                                  },
                                  "modifierExtension": {
                                    "type": "array",
                                    "items": {
                                      "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  },
                                  "identifier": {
                                    "type": "array",
                                    "items": {
                                      "description": "A unique identifier assigned to this claim response.",
                                      "type": "object",
                                      "properties": {
                                        "use": {
                                          "type": "string",
                                          "enum": [
                                            "usual",
                                            "official",
                                            "temp",
                                            "secondary",
                                            "old"
                                          ],
                                          "description": "The purpose of this identifier."
                                        },
                                        "type": {
                                          "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        },
                                        "system": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                                        },
                                        "value": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                                        },
                                        "period": {
                                          "description": "Time period during which identifier is/was valid for use.",
                                          "type": "object",
                                          "properties": {
                                            "start": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The start of the period. The boundary is inclusive."
                                            },
                                            "end": {
                                              "type": "string",
                                              "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                              "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                            }
                                          }
                                        },
                                        "assigner": {
                                          "description": "Organization that issued/manages the identifier.",
                                          "type": "object",
                                          "properties": {
                                            "reference": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                            },
                                            "type": {
                                              "type": "string",
                                              "pattern": "\\S*",
                                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                            },
                                            "identifier": {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                            },
                                            "display": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "minItems": 1,
                                    "maxItems": 1,
                                    "required": [
                                      "system",
                                      "value"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "active"
                                    ]
                                  },
                                  "type": {
                                    "type": "object",
                                    "properties": {
                                      "coding": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "system": {
                                              "type": "string",
                                              "enum": [
                                                "http://terminology.hl7.org/CodeSystem/claim-type"
                                              ]
                                            },
                                            "code": {
                                              "type": "string",
                                              "enum": [
                                                "pharmacy"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "system",
                                            "code"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "coding"
                                    ]
                                  },
                                  "use": {
                                    "type": "string",
                                    "enum": [
                                      "preauthorization"
                                    ]
                                  },
                                  "patient": {
                                    "description": "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    }
                                  },
                                  "created": {
                                    "type": "string",
                                    "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                    "description": "The date this resource was created."
                                  },
                                  "insurer": {
                                    "description": "The party responsible for authorization, adjudication and reimbursement.",
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    },
                                    "required": [
                                      "display"
                                    ]
                                  },
                                  "requestor": {
                                    "description": "The provider which is responsible for the claim, predetermination or preauthorization.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    }
                                  },
                                  "request": {
                                    "description": "Original request resource reference.",
                                    "type": "object",
                                    "properties": {
                                      "reference": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                      },
                                      "type": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                      },
                                      "identifier": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                      }
                                    }
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "complete"
                                    ]
                                  },
                                  "disposition": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A human readable description of the status of the adjudication."
                                  },
                                  "preAuthRef": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "Reference from the Insurer which is used in later communications which refers to this adjudication."
                                  },
                                  "preAuthPeriod": {
                                    "description": "The time frame during which this authorization is effective.",
                                    "type": "object",
                                    "properties": {
                                      "start": {
                                        "type": "string",
                                        "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                        "description": "The start of the period. The boundary is inclusive."
                                      },
                                      "end": {
                                        "type": "string",
                                        "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                                        "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                                      }
                                    },
                                    "required": [
                                      "start",
                                      "end"
                                    ]
                                  },
                                  "processNote": {
                                    "type": "array",
                                    "items": {
                                      "description": "A note that describes or explains adjudication results in a human readable form.",
                                      "type": "object",
                                      "properties": {
                                        "modifierExtension": {
                                          "type": "array",
                                          "items": {
                                            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                            "type": "object",
                                            "additionalProperties": true
                                          }
                                        },
                                        "number": {
                                          "type": "integer",
                                          "format": "int32",
                                          "description": "A number to uniquely identify a note entry."
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "display",
                                            "print",
                                            "printoper"
                                          ],
                                          "description": "The business purpose of the note text."
                                        },
                                        "text": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The explanation or description associated with the processing."
                                        },
                                        "language": {
                                          "description": "A code to define the language used in the text of the note.",
                                          "type": "object",
                                          "properties": {
                                            "coding": {
                                              "type": "array",
                                              "items": {
                                                "description": "A reference to a code defined by a terminology system.",
                                                "type": "object",
                                                "properties": {
                                                  "system": {
                                                    "type": "string",
                                                    "pattern": "\\S*",
                                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                                  },
                                                  "code": {
                                                    "type": "string",
                                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                                  },
                                                  "display": {
                                                    "type": "string",
                                                    "pattern": "[ \\r\\n\\t\\S]+",
                                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                                  },
                                                  "userSelected": {
                                                    "type": "boolean",
                                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                                  }
                                                }
                                              }
                                            },
                                            "text": {
                                              "type": "string",
                                              "pattern": "[ \\r\\n\\t\\S]+",
                                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                            }
                                          }
                                        }
                                      },
                                      "required": [
                                        "text"
                                      ]
                                    }
                                  },
                                  "communicationRequest": {
                                    "type": "array",
                                    "items": {
                                      "description": "Request for additional supporting or authorizing information.",
                                      "type": "object",
                                      "properties": {
                                        "reference": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                        },
                                        "type": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                        },
                                        "identifier": {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                        },
                                        "display": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                        }
                                      }
                                    }
                                  }
                                },
                                "required": [
                                  "resourceType",
                                  "status",
                                  "type",
                                  "use",
                                  "patient",
                                  "created",
                                  "insurer",
                                  "outcome",
                                  "meta",
                                  "extension",
                                  "identifier",
                                  "requestor",
                                  "preAuthRef",
                                  "preAuthPeriod"
                                ],
                                "description": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-approval-claimresponse"
                              }
                            ]
                          },
                          "fullUrl": {
                            "type": "string",
                            "description": "The full url of the resource"
                          },
                          "search": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ],
                                "description": "The search mode."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "searchset-example": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "entry": [
                        {
                          "fullUrl": "https://api.sa.digital.health.nz/s2s/fhir/R4/ClaimResponse/sa-example-approval-chem",
                          "resource": {
                            "resourceType": "ClaimResponse",
                            "id": "sa-example-approval-chem",
                            "meta": {
                              "lastUpdated": "2026-10-14T10:35:07+13:00",
                              "profile": [
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-approval-claimresponse"
                              ]
                            },
                            "status": "active",
                            "type": {
                              "coding": [
                                {
                                  "code": "pharmacy",
                                  "system": "http://terminology.hl7.org/CodeSystem/claim-type"
                                }
                              ]
                            },
                            "use": "preauthorization",
                            "outcome": "complete",
                            "extension": [
                              {
                                "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/approval-detail",
                                "extension": [
                                  {
                                    "url": "approvalType",
                                    "valueCode": "CHEM"
                                  },
                                  {
                                    "url": "status",
                                    "valueCode": "ACTIVE"
                                  },
                                  {
                                    "url": "formNumber",
                                    "valueString": "SA9999"
                                  },
                                  {
                                    "url": "formVersion",
                                    "valueString": "a3f2b8c91d4e7062"
                                  }
                                ]
                              }
                            ],
                            "identifier": [
                              {
                                "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
                                "value": "26SA0004567"
                              }
                            ],
                            "patient": {
                              "reference": "Patient/sa-example-patient"
                            },
                            "created": "2026-10-14T10:35:07+13:00",
                            "insurer": {
                              "display": "Health New Zealand | Te Whatu Ora"
                            },
                            "requestor": {
                              "reference": "Practitioner/sa-example-applicant"
                            },
                            "request": {
                              "identifier": {
                                "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
                                "value": "000123456"
                              }
                            },
                            "preAuthRef": "26SA0004567",
                            "preAuthPeriod": {
                              "start": "2026-10-14",
                              "end": "2027-10-14"
                            }
                          },
                          "search": {
                            "mode": "match"
                          }
                        },
                        {
                          "fullUrl": "https://api.sa.digital.health.nz/s2s/fhir/R4/ClaimResponse/sa-example-approval-nppa",
                          "resource": {
                            "resourceType": "ClaimResponse",
                            "id": "sa-example-approval-nppa",
                            "meta": {
                              "lastUpdated": "2026-09-01T09:00:00+12:00",
                              "profile": [
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-approval-claimresponse"
                              ]
                            },
                            "status": "active",
                            "type": {
                              "coding": [
                                {
                                  "code": "pharmacy",
                                  "system": "http://terminology.hl7.org/CodeSystem/claim-type"
                                }
                              ]
                            },
                            "use": "preauthorization",
                            "outcome": "complete",
                            "extension": [
                              {
                                "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/approval-detail",
                                "extension": [
                                  {
                                    "url": "approvalType",
                                    "valueCode": "EXCP"
                                  },
                                  {
                                    "url": "status",
                                    "valueCode": "ACTIVE"
                                  },
                                  {
                                    "url": "providerIdType",
                                    "valueCode": "CLAIMANT_NUMBER"
                                  },
                                  {
                                    "url": "providerId",
                                    "valueIdentifier": {
                                      "system": "https://fhir-ig.digital.health.nz/special-authority/ns/pharmacy-claimant-number",
                                      "value": "1234"
                                    }
                                  }
                                ]
                              },
                              {
                                "extension": [
                                  {
                                    "url": "type",
                                    "valueCode": "EXPLICIT_PHARMACEUTICALS"
                                  },
                                  {
                                    "extension": [
                                      {
                                        "url": "ctppId",
                                        "valueString": "10000000000000"
                                      },
                                      {
                                        "url": "pharmacode",
                                        "valueString": "2000001"
                                      },
                                      {
                                        "url": "description",
                                        "valueString": "Example medicine 10 mg tablet, 30"
                                      }
                                    ],
                                    "url": "pharmaceutical"
                                  }
                                ],
                                "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/approval-coverage"
                              }
                            ],
                            "identifier": [
                              {
                                "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
                                "value": "26NP0000088"
                              }
                            ],
                            "patient": {
                              "reference": "Patient/sa-example-patient"
                            },
                            "created": "2026-09-01T09:00:00+12:00",
                            "insurer": {
                              "display": "Health New Zealand | Te Whatu Ora"
                            },
                            "requestor": {
                              "reference": "Practitioner/sa-example-applicant"
                            },
                            "preAuthRef": "26NP0000088",
                            "preAuthPeriod": {
                              "start": "2026-09-01",
                              "end": "2027-03-01"
                            }
                          },
                          "search": {
                            "mode": "match"
                          }
                        },
                        {
                          "fullUrl": "https://api.sa.digital.health.nz/s2s/fhir/R4/ClaimResponse/sa-example-cr-approved",
                          "resource": {
                            "resourceType": "ClaimResponse",
                            "id": "sa-example-cr-approved",
                            "meta": {
                              "profile": [
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
                              ]
                            },
                            "status": "active",
                            "type": {
                              "coding": [
                                {
                                  "code": "pharmacy",
                                  "system": "http://terminology.hl7.org/CodeSystem/claim-type"
                                }
                              ]
                            },
                            "use": "preauthorization",
                            "extension": [
                              {
                                "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/application-status",
                                "extension": [
                                  {
                                    "url": "status",
                                    "valueCode": "DONE"
                                  },
                                  {
                                    "url": "outcome",
                                    "valueCode": "APPROVED"
                                  }
                                ]
                              }
                            ],
                            "request": {
                              "identifier": {
                                "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
                                "value": "000123456"
                              }
                            },
                            "identifier": [
                              {
                                "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
                                "value": "26SA0004567"
                              }
                            ],
                            "patient": {
                              "reference": "Patient/sa-example-patient"
                            },
                            "created": "2026-10-14T10:35:07+13:00",
                            "insurer": {
                              "display": "Health New Zealand | Te Whatu Ora"
                            },
                            "requestor": {
                              "reference": "Practitioner/sa-example-applicant"
                            },
                            "outcome": "complete",
                            "disposition": "Application approved",
                            "preAuthRef": "26SA0004567",
                            "preAuthPeriod": {
                              "start": "2026-10-14",
                              "end": "2027-10-14"
                            }
                          },
                          "search": {
                            "mode": "match"
                          }
                        },
                        {
                          "fullUrl": "https://api.sa.digital.health.nz/s2s/fhir/R4/ClaimResponse/sa-example-cr-declined",
                          "resource": {
                            "resourceType": "ClaimResponse",
                            "id": "sa-example-cr-declined",
                            "meta": {
                              "profile": [
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
                              ]
                            },
                            "status": "active",
                            "type": {
                              "coding": [
                                {
                                  "code": "pharmacy",
                                  "system": "http://terminology.hl7.org/CodeSystem/claim-type"
                                }
                              ]
                            },
                            "use": "preauthorization",
                            "extension": [
                              {
                                "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/application-status",
                                "extension": [
                                  {
                                    "url": "status",
                                    "valueCode": "DONE"
                                  },
                                  {
                                    "url": "outcome",
                                    "valueCode": "DECLINED"
                                  },
                                  {
                                    "url": "outcomeCode",
                                    "valueCoding": {
                                      "code": "URNSA011",
                                      "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-outcome-code"
                                    }
                                  },
                                  {
                                    "url": "outcomeReason",
                                    "valueString": "An approval already exists for this patient and form."
                                  }
                                ]
                              },
                              {
                                "extension": [
                                  {
                                    "url": "approvalType",
                                    "valueCode": "CHEM"
                                  },
                                  {
                                    "url": "approvalNumber",
                                    "valueIdentifier": {
                                      "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
                                      "value": "25SA0001234"
                                    }
                                  },
                                  {
                                    "url": "effectiveDate",
                                    "valueDate": "2026-02-01"
                                  },
                                  {
                                    "url": "expiryDate",
                                    "valueDate": "2027-02-01"
                                  }
                                ],
                                "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/existing-approval"
                              }
                            ],
                            "request": {
                              "identifier": {
                                "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
                                "value": "000123457"
                              }
                            },
                            "patient": {
                              "reference": "Patient/sa-example-patient"
                            },
                            "created": "2026-10-14T10:35:07+13:00",
                            "insurer": {
                              "display": "Health New Zealand | Te Whatu Ora"
                            },
                            "requestor": {
                              "reference": "Practitioner/sa-example-applicant"
                            },
                            "outcome": "complete",
                            "disposition": "An approval already exists for this patient and form.",
                            "error": [
                              {
                                "code": {
                                  "coding": [
                                    {
                                      "code": "URNSA011",
                                      "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-outcome-code"
                                    }
                                  ]
                                }
                              }
                            ]
                          },
                          "search": {
                            "mode": "match"
                          }
                        },
                        {
                          "fullUrl": "https://api.sa.digital.health.nz/s2s/fhir/R4/ClaimResponse/sa-example-cr-pending",
                          "resource": {
                            "resourceType": "ClaimResponse",
                            "id": "sa-example-cr-pending",
                            "meta": {
                              "profile": [
                                "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
                              ]
                            },
                            "status": "active",
                            "type": {
                              "coding": [
                                {
                                  "code": "pharmacy",
                                  "system": "http://terminology.hl7.org/CodeSystem/claim-type"
                                }
                              ]
                            },
                            "use": "preauthorization",
                            "extension": [
                              {
                                "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/application-status",
                                "extension": [
                                  {
                                    "url": "status",
                                    "valueCode": "PENDING_REVIEW"
                                  }
                                ]
                              }
                            ],
                            "request": {
                              "identifier": {
                                "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
                                "value": "000123458"
                              }
                            },
                            "patient": {
                              "reference": "Patient/sa-example-patient"
                            },
                            "created": "2026-10-14T11:03:15+13:00",
                            "insurer": {
                              "display": "Health New Zealand | Te Whatu Ora"
                            },
                            "requestor": {
                              "reference": "Practitioner/sa-example-applicant"
                            },
                            "outcome": "queued"
                          },
                          "search": {
                            "mode": "match"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unsuccessful search operation - 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unsuccessful search operation - 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Unsuccessful search operation - 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Unsuccessful search operation - 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resourceType": {
                      "type": "string",
                      "enum": [
                        "OperationOutcome"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                    },
                    "meta": {
                      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                      "type": "object",
                      "properties": {
                        "versionId": {
                          "type": "string",
                          "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                          "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                        },
                        "lastUpdated": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                          "description": "When the resource last changed &ndash; e.g. when the version changed."
                        },
                        "source": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                          }
                        },
                        "security": {
                          "type": "array",
                          "items": {
                            "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "tag": {
                          "type": "array",
                          "items": {
                            "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        }
                      }
                    },
                    "implicitRules": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The base language in which the resource is written."
                    },
                    "text": {
                      "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
                        },
                        "div": {
                          "type": "string",
                          "description": "The actual narrative content, a stripped down version of XHTML."
                        }
                      },
                      "required": [
                        "status",
                        "div"
                      ]
                    },
                    "contained": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "Account",
                              "ActivityDefinition",
                              "AdverseEvent",
                              "AllergyIntolerance",
                              "Appointment",
                              "AppointmentResponse",
                              "AuditEvent",
                              "Basic",
                              "Binary",
                              "BiologicallyDerivedProduct",
                              "BodyStructure",
                              "Bundle",
                              "CapabilityStatement",
                              "CarePlan",
                              "CareTeam",
                              "CatalogEntry",
                              "ChargeItem",
                              "ChargeItemDefinition",
                              "Claim",
                              "ClaimResponse",
                              "ClinicalImpression",
                              "CodeSystem",
                              "Communication",
                              "CommunicationRequest",
                              "CompartmentDefinition",
                              "Composition",
                              "ConceptMap",
                              "Condition",
                              "Consent",
                              "Contract",
                              "Coverage",
                              "CoverageEligibilityRequest",
                              "CoverageEligibilityResponse",
                              "DetectedIssue",
                              "Device",
                              "DeviceDefinition",
                              "DeviceMetric",
                              "DeviceRequest",
                              "DeviceUseStatement",
                              "DiagnosticReport",
                              "DocumentManifest",
                              "DocumentReference",
                              "DomainResource",
                              "EffectEvidenceSynthesis",
                              "Encounter",
                              "Endpoint",
                              "EnrollmentRequest",
                              "EnrollmentResponse",
                              "EpisodeOfCare",
                              "EventDefinition",
                              "Evidence",
                              "EvidenceVariable",
                              "ExampleScenario",
                              "ExplanationOfBenefit",
                              "FamilyMemberHistory",
                              "Flag",
                              "Goal",
                              "GraphDefinition",
                              "Group",
                              "GuidanceResponse",
                              "HealthcareService",
                              "ImagingStudy",
                              "Immunization",
                              "ImmunizationEvaluation",
                              "ImmunizationRecommendation",
                              "ImplementationGuide",
                              "InsurancePlan",
                              "Invoice",
                              "Library",
                              "Linkage",
                              "List",
                              "Location",
                              "Measure",
                              "MeasureReport",
                              "Media",
                              "Medication",
                              "MedicationAdministration",
                              "MedicationDispense",
                              "MedicationKnowledge",
                              "MedicationRequest",
                              "MedicationStatement",
                              "MedicinalProduct",
                              "MedicinalProductAuthorization",
                              "MedicinalProductContraindication",
                              "MedicinalProductIndication",
                              "MedicinalProductIngredient",
                              "MedicinalProductInteraction",
                              "MedicinalProductManufactured",
                              "MedicinalProductPackaged",
                              "MedicinalProductPharmaceutical",
                              "MedicinalProductUndesirableEffect",
                              "MessageDefinition",
                              "MessageHeader",
                              "MolecularSequence",
                              "NamingSystem",
                              "NutritionOrder",
                              "Observation",
                              "ObservationDefinition",
                              "OperationDefinition",
                              "OperationOutcome",
                              "Organization",
                              "OrganizationAffiliation",
                              "Parameters",
                              "Patient",
                              "PaymentNotice",
                              "PaymentReconciliation",
                              "Person",
                              "PlanDefinition",
                              "Practitioner",
                              "PractitionerRole",
                              "Procedure",
                              "Provenance",
                              "Questionnaire",
                              "QuestionnaireResponse",
                              "RelatedPerson",
                              "RequestGroup",
                              "ResearchDefinition",
                              "ResearchElementDefinition",
                              "ResearchStudy",
                              "ResearchSubject",
                              "Resource",
                              "RiskAssessment",
                              "RiskEvidenceSynthesis",
                              "Schedule",
                              "SearchParameter",
                              "ServiceRequest",
                              "Slot",
                              "Specimen",
                              "SpecimenDefinition",
                              "StructureDefinition",
                              "StructureMap",
                              "Subscription",
                              "Substance",
                              "SubstanceNucleicAcid",
                              "SubstancePolymer",
                              "SubstanceProtein",
                              "SubstanceReferenceInformation",
                              "SubstanceSourceMaterial",
                              "SubstanceSpecification",
                              "SupplyDelivery",
                              "SupplyRequest",
                              "Task",
                              "TerminologyCapabilities",
                              "TestReport",
                              "TestScript",
                              "ValueSet",
                              "VerificationResult",
                              "VisionPrescription"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                          },
                          "meta": {
                            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                            "type": "object",
                            "properties": {
                              "versionId": {
                                "type": "string",
                                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                              },
                              "lastUpdated": {
                                "type": "string",
                                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                                "description": "When the resource last changed &ndash; e.g. when the version changed."
                              },
                              "source": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                              },
                              "profile": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                                }
                              },
                              "security": {
                                "type": "array",
                                "items": {
                                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "tag": {
                                "type": "array",
                                "items": {
                                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "implicitRules": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                          },
                          "language": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "The base language in which the resource is written."
                          }
                        },
                        "required": [
                          "resourceType"
                        ],
                        "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
                      }
                    },
                    "extension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "modifierExtension": {
                      "type": "array",
                      "items": {
                        "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "issue": {
                      "type": "array",
                      "items": {
                        "description": "An error, warning, or information message that results from a system action.",
                        "type": "object",
                        "properties": {
                          "modifierExtension": {
                            "type": "array",
                            "items": {
                              "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                              "type": "object",
                              "additionalProperties": true
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "fatal",
                              "error",
                              "warning",
                              "information"
                            ],
                            "description": "Indicates whether the issue indicates a variation from successful processing."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "invalid",
                              "structure",
                              "required",
                              "value",
                              "invariant",
                              "security",
                              "login",
                              "unknown",
                              "expired",
                              "forbidden",
                              "suppressed",
                              "processing",
                              "not-supported",
                              "duplicate",
                              "multiple-matches",
                              "not-found",
                              "deleted",
                              "too-long",
                              "code-invalid",
                              "extension",
                              "too-costly",
                              "business-rule",
                              "conflict",
                              "transient",
                              "lock-error",
                              "no-store",
                              "exception",
                              "timeout",
                              "incomplete",
                              "throttled",
                              "informational"
                            ],
                            "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                          },
                          "details": {
                            "description": "Additional details about the error. This may be a text description of the error or a system code that identifies the error.",
                            "type": "object",
                            "properties": {
                              "coding": {
                                "type": "array",
                                "items": {
                                  "description": "A reference to a code defined by a terminology system.",
                                  "type": "object",
                                  "properties": {
                                    "system": {
                                      "type": "string",
                                      "pattern": "\\S*",
                                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                    },
                                    "version": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                    },
                                    "code": {
                                      "type": "string",
                                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                    },
                                    "display": {
                                      "type": "string",
                                      "pattern": "[ \\r\\n\\t\\S]+",
                                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                    },
                                    "userSelected": {
                                      "type": "boolean",
                                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                              }
                            }
                          },
                          "diagnostics": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "Additional diagnostic information about the issue."
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name."
                            }
                          },
                          "expression": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            }
                          }
                        },
                        "required": [
                          "severity",
                          "code"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "resourceType",
                    "issue"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "smartOnFhir": [
              "system/ClaimResponse.s"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "StructureDefinition-sa-claim": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "enum": [
              "Claim"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
          },
          "meta": {
            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
            "type": "object",
            "properties": {
              "versionId": {
                "type": "string",
                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
              },
              "lastUpdated": {
                "type": "string",
                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                "description": "When the resource last changed &ndash; e.g. when the version changed."
              },
              "source": {
                "type": "string",
                "pattern": "\\S*",
                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
              },
              "profile": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                }
              },
              "security": {
                "type": "array",
                "items": {
                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                    },
                    "version": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                    },
                    "code": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                    },
                    "userSelected": {
                      "type": "boolean",
                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                    }
                  }
                }
              },
              "tag": {
                "type": "array",
                "items": {
                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                    },
                    "version": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                    },
                    "code": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                    },
                    "userSelected": {
                      "type": "boolean",
                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                    }
                  }
                }
              }
            }
          },
          "implicitRules": {
            "type": "string",
            "pattern": "\\S*",
            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
          },
          "language": {
            "type": "string",
            "pattern": "[^\\s]+(\\s[^\\s]+)*",
            "description": "The base language in which the resource is written."
          },
          "text": {
            "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "generated",
                  "extensions",
                  "additional",
                  "empty"
                ],
                "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
              },
              "div": {
                "type": "string",
                "description": "The actual narrative content, a stripped down version of XHTML."
              }
            },
            "required": [
              "status",
              "div"
            ]
          },
          "contained": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "resourceType": {
                  "type": "string",
                  "enum": [
                    "Account",
                    "ActivityDefinition",
                    "AdverseEvent",
                    "AllergyIntolerance",
                    "Appointment",
                    "AppointmentResponse",
                    "AuditEvent",
                    "Basic",
                    "Binary",
                    "BiologicallyDerivedProduct",
                    "BodyStructure",
                    "Bundle",
                    "CapabilityStatement",
                    "CarePlan",
                    "CareTeam",
                    "CatalogEntry",
                    "ChargeItem",
                    "ChargeItemDefinition",
                    "Claim",
                    "ClaimResponse",
                    "ClinicalImpression",
                    "CodeSystem",
                    "Communication",
                    "CommunicationRequest",
                    "CompartmentDefinition",
                    "Composition",
                    "ConceptMap",
                    "Condition",
                    "Consent",
                    "Contract",
                    "Coverage",
                    "CoverageEligibilityRequest",
                    "CoverageEligibilityResponse",
                    "DetectedIssue",
                    "Device",
                    "DeviceDefinition",
                    "DeviceMetric",
                    "DeviceRequest",
                    "DeviceUseStatement",
                    "DiagnosticReport",
                    "DocumentManifest",
                    "DocumentReference",
                    "DomainResource",
                    "EffectEvidenceSynthesis",
                    "Encounter",
                    "Endpoint",
                    "EnrollmentRequest",
                    "EnrollmentResponse",
                    "EpisodeOfCare",
                    "EventDefinition",
                    "Evidence",
                    "EvidenceVariable",
                    "ExampleScenario",
                    "ExplanationOfBenefit",
                    "FamilyMemberHistory",
                    "Flag",
                    "Goal",
                    "GraphDefinition",
                    "Group",
                    "GuidanceResponse",
                    "HealthcareService",
                    "ImagingStudy",
                    "Immunization",
                    "ImmunizationEvaluation",
                    "ImmunizationRecommendation",
                    "ImplementationGuide",
                    "InsurancePlan",
                    "Invoice",
                    "Library",
                    "Linkage",
                    "List",
                    "Location",
                    "Measure",
                    "MeasureReport",
                    "Media",
                    "Medication",
                    "MedicationAdministration",
                    "MedicationDispense",
                    "MedicationKnowledge",
                    "MedicationRequest",
                    "MedicationStatement",
                    "MedicinalProduct",
                    "MedicinalProductAuthorization",
                    "MedicinalProductContraindication",
                    "MedicinalProductIndication",
                    "MedicinalProductIngredient",
                    "MedicinalProductInteraction",
                    "MedicinalProductManufactured",
                    "MedicinalProductPackaged",
                    "MedicinalProductPharmaceutical",
                    "MedicinalProductUndesirableEffect",
                    "MessageDefinition",
                    "MessageHeader",
                    "MolecularSequence",
                    "NamingSystem",
                    "NutritionOrder",
                    "Observation",
                    "ObservationDefinition",
                    "OperationDefinition",
                    "OperationOutcome",
                    "Organization",
                    "OrganizationAffiliation",
                    "Parameters",
                    "Patient",
                    "PaymentNotice",
                    "PaymentReconciliation",
                    "Person",
                    "PlanDefinition",
                    "Practitioner",
                    "PractitionerRole",
                    "Procedure",
                    "Provenance",
                    "Questionnaire",
                    "QuestionnaireResponse",
                    "RelatedPerson",
                    "RequestGroup",
                    "ResearchDefinition",
                    "ResearchElementDefinition",
                    "ResearchStudy",
                    "ResearchSubject",
                    "Resource",
                    "RiskAssessment",
                    "RiskEvidenceSynthesis",
                    "Schedule",
                    "SearchParameter",
                    "ServiceRequest",
                    "Slot",
                    "Specimen",
                    "SpecimenDefinition",
                    "StructureDefinition",
                    "StructureMap",
                    "Subscription",
                    "Substance",
                    "SubstanceNucleicAcid",
                    "SubstancePolymer",
                    "SubstanceProtein",
                    "SubstanceReferenceInformation",
                    "SubstanceSourceMaterial",
                    "SubstanceSpecification",
                    "SupplyDelivery",
                    "SupplyRequest",
                    "Task",
                    "TerminologyCapabilities",
                    "TestReport",
                    "TestScript",
                    "ValueSet",
                    "VerificationResult",
                    "VisionPrescription"
                  ]
                },
                "id": {
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                },
                "meta": {
                  "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                  "type": "object",
                  "properties": {
                    "versionId": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                    },
                    "lastUpdated": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                      "description": "When the resource last changed &ndash; e.g. when the version changed."
                    },
                    "source": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                    },
                    "profile": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "\\S*",
                        "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                      }
                    },
                    "security": {
                      "type": "array",
                      "items": {
                        "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "tag": {
                      "type": "array",
                      "items": {
                        "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    }
                  }
                },
                "implicitRules": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                },
                "language": {
                  "type": "string",
                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                  "description": "The base language in which the resource is written."
                }
              },
              "required": [
                "resourceType"
              ],
              "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
            }
          },
          "extension": {
            "type": "array",
            "items": {
              "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
              "type": "object",
              "additionalProperties": true
            }
          },
          "modifierExtension": {
            "type": "array",
            "items": {
              "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
              "type": "object",
              "additionalProperties": true
            }
          },
          "identifier": {
            "type": "array",
            "items": {
              "description": "A unique identifier assigned to this claim.",
              "type": "object",
              "properties": {
                "use": {
                  "type": "string",
                  "enum": [
                    "usual",
                    "official",
                    "temp",
                    "secondary",
                    "old"
                  ],
                  "description": "The purpose of this identifier."
                },
                "type": {
                  "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "system": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                },
                "value": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                },
                "period": {
                  "description": "Time period during which identifier is/was valid for use.",
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The start of the period. The boundary is inclusive."
                    },
                    "end": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                    }
                  }
                },
                "assigner": {
                  "description": "Organization that issued/manages the identifier.",
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                    },
                    "type": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                    },
                    "identifier": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                    }
                  }
                }
              }
            },
            "maxItems": 1,
            "required": [
              "system",
              "value"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active"
            ]
          },
          "type": {
            "type": "object",
            "properties": {
              "coding": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "enum": [
                        "http://terminology.hl7.org/CodeSystem/claim-type"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "pharmacy"
                      ]
                    }
                  },
                  "required": [
                    "system",
                    "code"
                  ]
                }
              }
            },
            "required": [
              "coding"
            ]
          },
          "use": {
            "type": "string",
            "enum": [
              "preauthorization"
            ]
          },
          "patient": {
            "description": "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought.",
            "type": "object",
            "properties": {
              "reference": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
              },
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            }
          },
          "created": {
            "type": "string",
            "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
            "description": "The date this resource was created."
          },
          "provider": {
            "description": "The provider which is responsible for the claim, predetermination or preauthorization.",
            "type": "object",
            "properties": {
              "reference": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
              },
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            }
          },
          "priority": {
            "type": "object",
            "properties": {
              "coding": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "enum": [
                        "http://terminology.hl7.org/CodeSystem/processpriority"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "normal"
                      ]
                    }
                  },
                  "required": [
                    "system",
                    "code"
                  ]
                }
              }
            },
            "required": [
              "coding"
            ]
          },
          "supportingInfo": {
            "type": "array",
            "items": {
              "description": "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.",
              "type": "object",
              "properties": {
                "modifierExtension": {
                  "type": "array",
                  "items": {
                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "sequence": {
                  "type": "integer",
                  "format": "int32",
                  "description": "A number to uniquely identify supporting information entries."
                },
                "category": {
                  "description": "The general class of the information supplied: information; exception; accident, employment; onset, etc.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "code": {
                  "description": "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "timingDate": {
                  "type": "string",
                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?",
                  "description": "The date when or period to which this information refers."
                },
                "timingPeriod": {
                  "description": "The date when or period to which this information refers.",
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The start of the period. The boundary is inclusive."
                    },
                    "end": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                    }
                  }
                },
                "valueBoolean": {
                  "type": "boolean",
                  "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data."
                },
                "valueString": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data."
                },
                "valueQuantity": {
                  "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                    },
                    "comparator": {
                      "type": "string",
                      "enum": [
                        "<",
                        "<=",
                        ">=",
                        ">"
                      ],
                      "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                    },
                    "unit": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human&ndash;readable form of the unit."
                    },
                    "system": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The identification of the system that provides the coded form of the unit."
                    },
                    "code": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "A computer processable form of the unit in some unit representation system."
                    }
                  }
                },
                "valueAttachment": {
                  "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.",
                  "type": "object",
                  "properties": {
                    "contentType": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "The human language of the content. The value can be any valid value according to BCP 47."
                    },
                    "data": {
                      "type": "string",
                      "pattern": "(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+",
                      "description": "The actual data of the attachment &ndash; a sequence of bytes, base64 encoded."
                    },
                    "url": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A location where the data can be accessed."
                    },
                    "size": {
                      "type": "integer",
                      "format": "int32",
                      "description": "The number of bytes of data that make up this attachment (before base64 encoding, if that is done)."
                    },
                    "hash": {
                      "type": "string",
                      "pattern": "(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+",
                      "description": "The calculated hash of the data using SHA&ndash;1. Represented using base64."
                    },
                    "title": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A label or set of text to display in place of the data."
                    },
                    "creation": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The date that the attachment was first created."
                    }
                  }
                },
                "valueReference": {
                  "description": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.",
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                    },
                    "type": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                    },
                    "identifier": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                    }
                  }
                },
                "reason": {
                  "description": "Provides the reason in the situation where a reason code is required in addition to the content.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                }
              },
              "required": [
                "sequence",
                "category"
              ]
            },
            "minItems": 1
          },
          "insurance": {
            "type": "array",
            "items": {
              "description": "Financial instruments for reimbursement for the health care products and services specified on the claim.",
              "type": "object",
              "properties": {
                "modifierExtension": {
                  "type": "array",
                  "items": {
                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "sequence": {
                  "type": "integer",
                  "format": "int32",
                  "description": "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order."
                },
                "focal": {
                  "type": "boolean",
                  "description": "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true."
                },
                "identifier": {
                  "description": "The business identifier to be used when the claim is sent for adjudication against this insurance policy.",
                  "type": "object",
                  "properties": {
                    "use": {
                      "type": "string",
                      "enum": [
                        "usual",
                        "official",
                        "temp",
                        "secondary",
                        "old"
                      ],
                      "description": "The purpose of this identifier."
                    },
                    "type": {
                      "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                      "type": "object",
                      "properties": {
                        "coding": {
                          "type": "array",
                          "items": {
                            "description": "A reference to a code defined by a terminology system.",
                            "type": "object",
                            "properties": {
                              "system": {
                                "type": "string",
                                "pattern": "\\S*",
                                "description": "The identification of the code system that defines the meaning of the symbol in the code."
                              },
                              "version": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                              },
                              "code": {
                                "type": "string",
                                "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                              },
                              "display": {
                                "type": "string",
                                "pattern": "[ \\r\\n\\t\\S]+",
                                "description": "A representation of the meaning of the code in the system, following the rules of the system."
                              },
                              "userSelected": {
                                "type": "boolean",
                                "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                              }
                            }
                          }
                        },
                        "text": {
                          "type": "string",
                          "pattern": "[ \\r\\n\\t\\S]+",
                          "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                        }
                      }
                    },
                    "system": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                    },
                    "value": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                    },
                    "period": {
                      "description": "Time period during which identifier is/was valid for use.",
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                          "description": "The start of the period. The boundary is inclusive."
                        },
                        "end": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                          "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                        }
                      }
                    },
                    "assigner": {
                      "description": "Organization that issued/manages the identifier.",
                      "type": "object",
                      "properties": {
                        "reference": {
                          "type": "string",
                          "pattern": "[ \\r\\n\\t\\S]+",
                          "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                        },
                        "type": {
                          "type": "string",
                          "pattern": "\\S*",
                          "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                        },
                        "identifier": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                        },
                        "display": {
                          "type": "string",
                          "pattern": "[ \\r\\n\\t\\S]+",
                          "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                        }
                      }
                    }
                  }
                },
                "coverage": {
                  "description": "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.",
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                    },
                    "type": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                    },
                    "identifier": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                    }
                  }
                },
                "businessArrangement": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "A business agreement number established between the provider and the insurer for special business processing purposes."
                },
                "preAuthRef": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "[ \\r\\n\\t\\S]+",
                    "description": "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization."
                  }
                },
                "claimResponse": {
                  "description": "The result of the adjudication of the line items for the Coverage specified in this insurance.",
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                    },
                    "type": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                    },
                    "identifier": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                    }
                  }
                }
              },
              "required": [
                "sequence",
                "focal",
                "coverage"
              ]
            },
            "minItems": 1,
            "maxItems": 1,
            "properties": {
              "coverage": {
                "type": "object",
                "properties": {},
                "required": [
                  "display"
                ]
              }
            }
          },
          "item": {
            "type": "array",
            "items": {
              "description": "A claim line. Either a simple  product or service or a 'group' of details which can each be a simple items or groups of sub&ndash;details.",
              "type": "object",
              "properties": {
                "modifierExtension": {
                  "type": "array",
                  "items": {
                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "sequence": {
                  "type": "integer",
                  "format": "int32",
                  "description": "A number to uniquely identify item entries."
                },
                "careTeamSequence": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "format": "int32",
                    "description": "CareTeam members related to this service or product."
                  }
                },
                "diagnosisSequence": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "format": "int32",
                    "description": "Diagnosis applicable for this service or product."
                  }
                },
                "procedureSequence": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "format": "int32",
                    "description": "Procedures applicable for this service or product."
                  }
                },
                "informationSequence": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "format": "int32",
                    "description": "Exceptions, special conditions and supporting information applicable for this service or product."
                  }
                },
                "revenue": {
                  "description": "The type of revenue or cost center providing the product and/or service.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "category": {
                  "description": "Code to identify the general type of benefits under which products and services are provided.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "productOrService": {
                  "description": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "modifier": {
                  "type": "array",
                  "items": {
                    "description": "Item typification or modifiers codes to convey additional context for the product or service.",
                    "type": "object",
                    "properties": {
                      "coding": {
                        "type": "array",
                        "items": {
                          "description": "A reference to a code defined by a terminology system.",
                          "type": "object",
                          "properties": {
                            "system": {
                              "type": "string",
                              "pattern": "\\S*",
                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                            },
                            "version": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                            },
                            "code": {
                              "type": "string",
                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                            },
                            "display": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                            },
                            "userSelected": {
                              "type": "boolean",
                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                            }
                          }
                        }
                      },
                      "text": {
                        "type": "string",
                        "pattern": "[ \\r\\n\\t\\S]+",
                        "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                      }
                    }
                  }
                },
                "programCode": {
                  "type": "array",
                  "items": {
                    "description": "Identifies the program under which this may be recovered.",
                    "type": "object",
                    "properties": {
                      "coding": {
                        "type": "array",
                        "items": {
                          "description": "A reference to a code defined by a terminology system.",
                          "type": "object",
                          "properties": {
                            "system": {
                              "type": "string",
                              "pattern": "\\S*",
                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                            },
                            "version": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                            },
                            "code": {
                              "type": "string",
                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                            },
                            "display": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                            },
                            "userSelected": {
                              "type": "boolean",
                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                            }
                          }
                        }
                      },
                      "text": {
                        "type": "string",
                        "pattern": "[ \\r\\n\\t\\S]+",
                        "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                      }
                    }
                  }
                },
                "servicedDate": {
                  "type": "string",
                  "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?",
                  "description": "The date or dates when the service or product was supplied, performed or completed."
                },
                "servicedPeriod": {
                  "description": "The date or dates when the service or product was supplied, performed or completed.",
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The start of the period. The boundary is inclusive."
                    },
                    "end": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                    }
                  }
                },
                "locationCodeableConcept": {
                  "description": "Where the product or service was provided.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "locationAddress": {
                  "description": "Where the product or service was provided.",
                  "type": "object",
                  "properties": {
                    "use": {
                      "type": "string",
                      "enum": [
                        "home",
                        "work",
                        "temp",
                        "old",
                        "billing"
                      ],
                      "description": "The purpose of this address."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "postal",
                        "physical",
                        "both"
                      ],
                      "description": "Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care&ndash;of addresses). Most addresses are both."
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts."
                    },
                    "line": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "[ \\r\\n\\t\\S]+",
                        "description": "This component contains the house number, apartment number, street name, street direction,  P.O. Box number, delivery hints, and similar address information."
                      }
                    },
                    "city": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The name of the city, town, suburb, village or other community or delivery center."
                    },
                    "district": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The name of the administrative area (county)."
                    },
                    "state": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Sub&ndash;unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes)."
                    },
                    "postalCode": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A postal code designating a region defined by the postal service."
                    },
                    "country": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Country &ndash; a nation as commonly understood or generally accepted."
                    },
                    "period": {
                      "description": "Time period when address was/is in use.",
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                          "description": "The start of the period. The boundary is inclusive."
                        },
                        "end": {
                          "type": "string",
                          "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                          "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                        }
                      }
                    }
                  }
                },
                "locationReference": {
                  "description": "Where the product or service was provided.",
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                    },
                    "type": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                    },
                    "identifier": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                    }
                  }
                },
                "quantity": {
                  "description": "The number of repetitions of a service or product.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                    },
                    "comparator": {
                      "type": "string",
                      "enum": [
                        "<",
                        "<=",
                        ">=",
                        ">"
                      ],
                      "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                    },
                    "unit": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human&ndash;readable form of the unit."
                    },
                    "system": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The identification of the system that provides the coded form of the unit."
                    },
                    "code": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "A computer processable form of the unit in some unit representation system."
                    }
                  }
                },
                "unitPrice": {
                  "description": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "description": "Numerical value (with implicit precision)."
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "ISO 4217 Currency Code."
                    }
                  }
                },
                "factor": {
                  "type": "number",
                  "description": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                },
                "net": {
                  "description": "The quantity times the unit price for an additional service or product or charge.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "description": "Numerical value (with implicit precision)."
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "ISO 4217 Currency Code."
                    }
                  }
                },
                "udi": {
                  "type": "array",
                  "items": {
                    "description": "Unique Device Identifiers associated with this line item.",
                    "type": "object",
                    "properties": {
                      "reference": {
                        "type": "string",
                        "pattern": "[ \\r\\n\\t\\S]+",
                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                      },
                      "type": {
                        "type": "string",
                        "pattern": "\\S*",
                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                      },
                      "identifier": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                      },
                      "display": {
                        "type": "string",
                        "pattern": "[ \\r\\n\\t\\S]+",
                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                      }
                    }
                  }
                },
                "bodySite": {
                  "description": "Physical service site on the patient (limb, tooth, etc.).",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "subSite": {
                  "type": "array",
                  "items": {
                    "description": "A region or surface of the bodySite, e.g. limb region or tooth surface(s).",
                    "type": "object",
                    "properties": {
                      "coding": {
                        "type": "array",
                        "items": {
                          "description": "A reference to a code defined by a terminology system.",
                          "type": "object",
                          "properties": {
                            "system": {
                              "type": "string",
                              "pattern": "\\S*",
                              "description": "The identification of the code system that defines the meaning of the symbol in the code."
                            },
                            "version": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                            },
                            "code": {
                              "type": "string",
                              "pattern": "[^\\s]+(\\s[^\\s]+)*",
                              "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                            },
                            "display": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A representation of the meaning of the code in the system, following the rules of the system."
                            },
                            "userSelected": {
                              "type": "boolean",
                              "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                            }
                          }
                        }
                      },
                      "text": {
                        "type": "string",
                        "pattern": "[ \\r\\n\\t\\S]+",
                        "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                      }
                    }
                  }
                },
                "encounter": {
                  "type": "array",
                  "items": {
                    "description": "The Encounters during which this Claim was created or to which the creation of this record is tightly associated.",
                    "type": "object",
                    "properties": {
                      "reference": {
                        "type": "string",
                        "pattern": "[ \\r\\n\\t\\S]+",
                        "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                      },
                      "type": {
                        "type": "string",
                        "pattern": "\\S*",
                        "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                      },
                      "identifier": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                      },
                      "display": {
                        "type": "string",
                        "pattern": "[ \\r\\n\\t\\S]+",
                        "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                      }
                    }
                  }
                },
                "detail": {
                  "type": "array",
                  "items": {
                    "description": "A claim detail line. Either a simple (a product or service) or a 'group' of sub&ndash;details which are simple items.",
                    "type": "object",
                    "properties": {
                      "modifierExtension": {
                        "type": "array",
                        "items": {
                          "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                          "type": "object",
                          "additionalProperties": true
                        }
                      },
                      "sequence": {
                        "type": "integer",
                        "format": "int32",
                        "description": "A number to uniquely identify item entries."
                      },
                      "revenue": {
                        "description": "The type of revenue or cost center providing the product and/or service.",
                        "type": "object",
                        "properties": {
                          "coding": {
                            "type": "array",
                            "items": {
                              "description": "A reference to a code defined by a terminology system.",
                              "type": "object",
                              "properties": {
                                "system": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                },
                                "version": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                },
                                "code": {
                                  "type": "string",
                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                  "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                },
                                "display": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                },
                                "userSelected": {
                                  "type": "boolean",
                                  "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                }
                              }
                            }
                          },
                          "text": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                          }
                        }
                      },
                      "category": {
                        "description": "Code to identify the general type of benefits under which products and services are provided.",
                        "type": "object",
                        "properties": {
                          "coding": {
                            "type": "array",
                            "items": {
                              "description": "A reference to a code defined by a terminology system.",
                              "type": "object",
                              "properties": {
                                "system": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                },
                                "version": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                },
                                "code": {
                                  "type": "string",
                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                  "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                },
                                "display": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                },
                                "userSelected": {
                                  "type": "boolean",
                                  "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                }
                              }
                            }
                          },
                          "text": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                          }
                        }
                      },
                      "productOrService": {
                        "description": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.",
                        "type": "object",
                        "properties": {
                          "coding": {
                            "type": "array",
                            "items": {
                              "description": "A reference to a code defined by a terminology system.",
                              "type": "object",
                              "properties": {
                                "system": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                },
                                "version": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                },
                                "code": {
                                  "type": "string",
                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                  "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                },
                                "display": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                },
                                "userSelected": {
                                  "type": "boolean",
                                  "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                }
                              }
                            }
                          },
                          "text": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                          }
                        }
                      },
                      "modifier": {
                        "type": "array",
                        "items": {
                          "description": "Item typification or modifiers codes to convey additional context for the product or service.",
                          "type": "object",
                          "properties": {
                            "coding": {
                              "type": "array",
                              "items": {
                                "description": "A reference to a code defined by a terminology system.",
                                "type": "object",
                                "properties": {
                                  "system": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                  },
                                  "version": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                  },
                                  "code": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                  },
                                  "display": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                  },
                                  "userSelected": {
                                    "type": "boolean",
                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                  }
                                }
                              }
                            },
                            "text": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                            }
                          }
                        }
                      },
                      "programCode": {
                        "type": "array",
                        "items": {
                          "description": "Identifies the program under which this may be recovered.",
                          "type": "object",
                          "properties": {
                            "coding": {
                              "type": "array",
                              "items": {
                                "description": "A reference to a code defined by a terminology system.",
                                "type": "object",
                                "properties": {
                                  "system": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                  },
                                  "version": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                  },
                                  "code": {
                                    "type": "string",
                                    "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                    "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                  },
                                  "display": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                  },
                                  "userSelected": {
                                    "type": "boolean",
                                    "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                  }
                                }
                              }
                            },
                            "text": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                            }
                          }
                        }
                      },
                      "quantity": {
                        "description": "The number of repetitions of a service or product.",
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "number",
                            "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                          },
                          "comparator": {
                            "type": "string",
                            "enum": [
                              "<",
                              "<=",
                              ">=",
                              ">"
                            ],
                            "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                          },
                          "unit": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A human&ndash;readable form of the unit."
                          },
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the system that provides the coded form of the unit."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A computer processable form of the unit in some unit representation system."
                          }
                        }
                      },
                      "unitPrice": {
                        "description": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.",
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "number",
                            "description": "Numerical value (with implicit precision)."
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "ISO 4217 Currency Code."
                          }
                        }
                      },
                      "factor": {
                        "type": "number",
                        "description": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                      },
                      "net": {
                        "description": "The quantity times the unit price for an additional service or product or charge.",
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "number",
                            "description": "Numerical value (with implicit precision)."
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "ISO 4217 Currency Code."
                          }
                        }
                      },
                      "udi": {
                        "type": "array",
                        "items": {
                          "description": "Unique Device Identifiers associated with this line item.",
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                            },
                            "type": {
                              "type": "string",
                              "pattern": "\\S*",
                              "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                            },
                            "identifier": {
                              "type": "object",
                              "additionalProperties": true,
                              "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                            },
                            "display": {
                              "type": "string",
                              "pattern": "[ \\r\\n\\t\\S]+",
                              "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                            }
                          }
                        }
                      },
                      "subDetail": {
                        "type": "array",
                        "items": {
                          "description": "A claim detail line. Either a simple (a product or service) or a 'group' of sub&ndash;details which are simple items.",
                          "type": "object",
                          "properties": {
                            "modifierExtension": {
                              "type": "array",
                              "items": {
                                "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                                "type": "object",
                                "additionalProperties": true
                              }
                            },
                            "sequence": {
                              "type": "integer",
                              "format": "int32",
                              "description": "A number to uniquely identify item entries."
                            },
                            "revenue": {
                              "description": "The type of revenue or cost center providing the product and/or service.",
                              "type": "object",
                              "properties": {
                                "coding": {
                                  "type": "array",
                                  "items": {
                                    "description": "A reference to a code defined by a terminology system.",
                                    "type": "object",
                                    "properties": {
                                      "system": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                      },
                                      "version": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                      },
                                      "code": {
                                        "type": "string",
                                        "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                        "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                      },
                                      "userSelected": {
                                        "type": "boolean",
                                        "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                      }
                                    }
                                  }
                                },
                                "text": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                }
                              }
                            },
                            "category": {
                              "description": "Code to identify the general type of benefits under which products and services are provided.",
                              "type": "object",
                              "properties": {
                                "coding": {
                                  "type": "array",
                                  "items": {
                                    "description": "A reference to a code defined by a terminology system.",
                                    "type": "object",
                                    "properties": {
                                      "system": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                      },
                                      "version": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                      },
                                      "code": {
                                        "type": "string",
                                        "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                        "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                      },
                                      "userSelected": {
                                        "type": "boolean",
                                        "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                      }
                                    }
                                  }
                                },
                                "text": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                }
                              }
                            },
                            "productOrService": {
                              "description": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.",
                              "type": "object",
                              "properties": {
                                "coding": {
                                  "type": "array",
                                  "items": {
                                    "description": "A reference to a code defined by a terminology system.",
                                    "type": "object",
                                    "properties": {
                                      "system": {
                                        "type": "string",
                                        "pattern": "\\S*",
                                        "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                      },
                                      "version": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                      },
                                      "code": {
                                        "type": "string",
                                        "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                        "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                      },
                                      "display": {
                                        "type": "string",
                                        "pattern": "[ \\r\\n\\t\\S]+",
                                        "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                      },
                                      "userSelected": {
                                        "type": "boolean",
                                        "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                      }
                                    }
                                  }
                                },
                                "text": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                }
                              }
                            },
                            "modifier": {
                              "type": "array",
                              "items": {
                                "description": "Item typification or modifiers codes to convey additional context for the product or service.",
                                "type": "object",
                                "properties": {
                                  "coding": {
                                    "type": "array",
                                    "items": {
                                      "description": "A reference to a code defined by a terminology system.",
                                      "type": "object",
                                      "properties": {
                                        "system": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                        },
                                        "version": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                        },
                                        "code": {
                                          "type": "string",
                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                        },
                                        "display": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                        },
                                        "userSelected": {
                                          "type": "boolean",
                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                        }
                                      }
                                    }
                                  },
                                  "text": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                  }
                                }
                              }
                            },
                            "programCode": {
                              "type": "array",
                              "items": {
                                "description": "Identifies the program under which this may be recovered.",
                                "type": "object",
                                "properties": {
                                  "coding": {
                                    "type": "array",
                                    "items": {
                                      "description": "A reference to a code defined by a terminology system.",
                                      "type": "object",
                                      "properties": {
                                        "system": {
                                          "type": "string",
                                          "pattern": "\\S*",
                                          "description": "The identification of the code system that defines the meaning of the symbol in the code."
                                        },
                                        "version": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                        },
                                        "code": {
                                          "type": "string",
                                          "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                          "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                                        },
                                        "display": {
                                          "type": "string",
                                          "pattern": "[ \\r\\n\\t\\S]+",
                                          "description": "A representation of the meaning of the code in the system, following the rules of the system."
                                        },
                                        "userSelected": {
                                          "type": "boolean",
                                          "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                                        }
                                      }
                                    }
                                  },
                                  "text": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                                  }
                                }
                              }
                            },
                            "quantity": {
                              "description": "The number of repetitions of a service or product.",
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number",
                                  "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value."
                                },
                                "comparator": {
                                  "type": "string",
                                  "enum": [
                                    "<",
                                    "<=",
                                    ">=",
                                    ">"
                                  ],
                                  "description": "How the value should be understood and represented &ndash; whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."
                                },
                                "unit": {
                                  "type": "string",
                                  "pattern": "[ \\r\\n\\t\\S]+",
                                  "description": "A human&ndash;readable form of the unit."
                                },
                                "system": {
                                  "type": "string",
                                  "pattern": "\\S*",
                                  "description": "The identification of the system that provides the coded form of the unit."
                                },
                                "code": {
                                  "type": "string",
                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                  "description": "A computer processable form of the unit in some unit representation system."
                                }
                              }
                            },
                            "unitPrice": {
                              "description": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.",
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number",
                                  "description": "Numerical value (with implicit precision)."
                                },
                                "currency": {
                                  "type": "string",
                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                  "description": "ISO 4217 Currency Code."
                                }
                              }
                            },
                            "factor": {
                              "type": "number",
                              "description": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                            },
                            "net": {
                              "description": "The quantity times the unit price for an additional service or product or charge.",
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number",
                                  "description": "Numerical value (with implicit precision)."
                                },
                                "currency": {
                                  "type": "string",
                                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                                  "description": "ISO 4217 Currency Code."
                                }
                              }
                            },
                            "udi": {
                              "type": "array",
                              "items": {
                                "description": "Unique Device Identifiers associated with this line item.",
                                "type": "object",
                                "properties": {
                                  "reference": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                                  },
                                  "type": {
                                    "type": "string",
                                    "pattern": "\\S*",
                                    "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                                  },
                                  "identifier": {
                                    "type": "object",
                                    "additionalProperties": true,
                                    "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                  },
                                  "display": {
                                    "type": "string",
                                    "pattern": "[ \\r\\n\\t\\S]+",
                                    "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "sequence",
                            "productOrService"
                          ]
                        }
                      }
                    },
                    "required": [
                      "sequence",
                      "productOrService"
                    ]
                  }
                }
              },
              "required": [
                "sequence",
                "productOrService"
              ]
            },
            "properties": {
              "productOrService": {
                "type": "object",
                "properties": {},
                "required": [
                  "coding"
                ]
              }
            }
          }
        },
        "required": [
          "resourceType",
          "status",
          "type",
          "use",
          "patient",
          "created",
          "provider",
          "priority",
          "insurance",
          "supportingInfo"
        ],
        "description": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
      },
      "StructureDefinition-sa-application-claimresponse": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "enum": [
              "ClaimResponse"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
          },
          "meta": {
            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
            "type": "object",
            "properties": {
              "versionId": {
                "type": "string",
                "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
              },
              "lastUpdated": {
                "type": "string",
                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                "description": "When the resource last changed &ndash; e.g. when the version changed."
              },
              "source": {
                "type": "string",
                "pattern": "\\S*",
                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
              },
              "profile": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                }
              },
              "security": {
                "type": "array",
                "items": {
                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                    },
                    "version": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                    },
                    "code": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                    },
                    "userSelected": {
                      "type": "boolean",
                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                    }
                  }
                }
              },
              "tag": {
                "type": "array",
                "items": {
                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                    },
                    "version": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                    },
                    "code": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                    },
                    "userSelected": {
                      "type": "boolean",
                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                    }
                  }
                }
              }
            }
          },
          "implicitRules": {
            "type": "string",
            "pattern": "\\S*",
            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
          },
          "language": {
            "type": "string",
            "pattern": "[^\\s]+(\\s[^\\s]+)*",
            "description": "The base language in which the resource is written."
          },
          "text": {
            "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "generated",
                  "extensions",
                  "additional",
                  "empty"
                ],
                "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
              },
              "div": {
                "type": "string",
                "description": "The actual narrative content, a stripped down version of XHTML."
              }
            },
            "required": [
              "status",
              "div"
            ]
          },
          "contained": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "resourceType": {
                  "type": "string",
                  "enum": [
                    "Account",
                    "ActivityDefinition",
                    "AdverseEvent",
                    "AllergyIntolerance",
                    "Appointment",
                    "AppointmentResponse",
                    "AuditEvent",
                    "Basic",
                    "Binary",
                    "BiologicallyDerivedProduct",
                    "BodyStructure",
                    "Bundle",
                    "CapabilityStatement",
                    "CarePlan",
                    "CareTeam",
                    "CatalogEntry",
                    "ChargeItem",
                    "ChargeItemDefinition",
                    "Claim",
                    "ClaimResponse",
                    "ClinicalImpression",
                    "CodeSystem",
                    "Communication",
                    "CommunicationRequest",
                    "CompartmentDefinition",
                    "Composition",
                    "ConceptMap",
                    "Condition",
                    "Consent",
                    "Contract",
                    "Coverage",
                    "CoverageEligibilityRequest",
                    "CoverageEligibilityResponse",
                    "DetectedIssue",
                    "Device",
                    "DeviceDefinition",
                    "DeviceMetric",
                    "DeviceRequest",
                    "DeviceUseStatement",
                    "DiagnosticReport",
                    "DocumentManifest",
                    "DocumentReference",
                    "DomainResource",
                    "EffectEvidenceSynthesis",
                    "Encounter",
                    "Endpoint",
                    "EnrollmentRequest",
                    "EnrollmentResponse",
                    "EpisodeOfCare",
                    "EventDefinition",
                    "Evidence",
                    "EvidenceVariable",
                    "ExampleScenario",
                    "ExplanationOfBenefit",
                    "FamilyMemberHistory",
                    "Flag",
                    "Goal",
                    "GraphDefinition",
                    "Group",
                    "GuidanceResponse",
                    "HealthcareService",
                    "ImagingStudy",
                    "Immunization",
                    "ImmunizationEvaluation",
                    "ImmunizationRecommendation",
                    "ImplementationGuide",
                    "InsurancePlan",
                    "Invoice",
                    "Library",
                    "Linkage",
                    "List",
                    "Location",
                    "Measure",
                    "MeasureReport",
                    "Media",
                    "Medication",
                    "MedicationAdministration",
                    "MedicationDispense",
                    "MedicationKnowledge",
                    "MedicationRequest",
                    "MedicationStatement",
                    "MedicinalProduct",
                    "MedicinalProductAuthorization",
                    "MedicinalProductContraindication",
                    "MedicinalProductIndication",
                    "MedicinalProductIngredient",
                    "MedicinalProductInteraction",
                    "MedicinalProductManufactured",
                    "MedicinalProductPackaged",
                    "MedicinalProductPharmaceutical",
                    "MedicinalProductUndesirableEffect",
                    "MessageDefinition",
                    "MessageHeader",
                    "MolecularSequence",
                    "NamingSystem",
                    "NutritionOrder",
                    "Observation",
                    "ObservationDefinition",
                    "OperationDefinition",
                    "OperationOutcome",
                    "Organization",
                    "OrganizationAffiliation",
                    "Parameters",
                    "Patient",
                    "PaymentNotice",
                    "PaymentReconciliation",
                    "Person",
                    "PlanDefinition",
                    "Practitioner",
                    "PractitionerRole",
                    "Procedure",
                    "Provenance",
                    "Questionnaire",
                    "QuestionnaireResponse",
                    "RelatedPerson",
                    "RequestGroup",
                    "ResearchDefinition",
                    "ResearchElementDefinition",
                    "ResearchStudy",
                    "ResearchSubject",
                    "Resource",
                    "RiskAssessment",
                    "RiskEvidenceSynthesis",
                    "Schedule",
                    "SearchParameter",
                    "ServiceRequest",
                    "Slot",
                    "Specimen",
                    "SpecimenDefinition",
                    "StructureDefinition",
                    "StructureMap",
                    "Subscription",
                    "Substance",
                    "SubstanceNucleicAcid",
                    "SubstancePolymer",
                    "SubstanceProtein",
                    "SubstanceReferenceInformation",
                    "SubstanceSourceMaterial",
                    "SubstanceSpecification",
                    "SupplyDelivery",
                    "SupplyRequest",
                    "Task",
                    "TerminologyCapabilities",
                    "TestReport",
                    "TestScript",
                    "ValueSet",
                    "VerificationResult",
                    "VisionPrescription"
                  ]
                },
                "id": {
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                },
                "meta": {
                  "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                  "type": "object",
                  "properties": {
                    "versionId": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                    },
                    "lastUpdated": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                      "description": "When the resource last changed &ndash; e.g. when the version changed."
                    },
                    "source": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                    },
                    "profile": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "\\S*",
                        "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                      }
                    },
                    "security": {
                      "type": "array",
                      "items": {
                        "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "tag": {
                      "type": "array",
                      "items": {
                        "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    }
                  }
                },
                "implicitRules": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                },
                "language": {
                  "type": "string",
                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                  "description": "The base language in which the resource is written."
                }
              },
              "required": [
                "resourceType"
              ],
              "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
            }
          },
          "extension": {
            "type": "array",
            "items": {
              "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
              "type": "object",
              "additionalProperties": true
            },
            "minItems": 1
          },
          "modifierExtension": {
            "type": "array",
            "items": {
              "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
              "type": "object",
              "additionalProperties": true
            }
          },
          "identifier": {
            "type": "array",
            "items": {
              "description": "A unique identifier assigned to this claim response.",
              "type": "object",
              "properties": {
                "use": {
                  "type": "string",
                  "enum": [
                    "usual",
                    "official",
                    "temp",
                    "secondary",
                    "old"
                  ],
                  "description": "The purpose of this identifier."
                },
                "type": {
                  "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "system": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                },
                "value": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                },
                "period": {
                  "description": "Time period during which identifier is/was valid for use.",
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The start of the period. The boundary is inclusive."
                    },
                    "end": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                    }
                  }
                },
                "assigner": {
                  "description": "Organization that issued/manages the identifier.",
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                    },
                    "type": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                    },
                    "identifier": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                    }
                  }
                }
              }
            },
            "maxItems": 1,
            "required": [
              "system",
              "value"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active"
            ]
          },
          "type": {
            "type": "object",
            "properties": {
              "coding": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "enum": [
                        "http://terminology.hl7.org/CodeSystem/claim-type"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "pharmacy"
                      ]
                    }
                  },
                  "required": [
                    "system",
                    "code"
                  ]
                }
              }
            },
            "required": [
              "coding"
            ]
          },
          "use": {
            "type": "string",
            "enum": [
              "preauthorization"
            ]
          },
          "patient": {
            "description": "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.",
            "type": "object",
            "properties": {
              "reference": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
              },
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            }
          },
          "created": {
            "type": "string",
            "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
            "description": "The date this resource was created."
          },
          "insurer": {
            "description": "The party responsible for authorization, adjudication and reimbursement.",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            },
            "required": [
              "display"
            ]
          },
          "requestor": {
            "description": "The provider which is responsible for the claim, predetermination or preauthorization.",
            "type": "object",
            "properties": {
              "reference": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
              },
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            }
          },
          "request": {
            "description": "Original request resource reference.",
            "type": "object",
            "properties": {
              "reference": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
              },
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.",
                "required": [
                  "value"
                ]
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            },
            "required": [
              "identifier"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "queued",
              "complete",
              "error",
              "partial"
            ],
            "description": "The outcome of the claim, predetermination, or preauthorization processing."
          },
          "disposition": {
            "type": "string",
            "pattern": "[ \\r\\n\\t\\S]+",
            "description": "A human readable description of the status of the adjudication."
          },
          "preAuthRef": {
            "type": "string",
            "pattern": "[ \\r\\n\\t\\S]+",
            "description": "Reference from the Insurer which is used in later communications which refers to this adjudication."
          },
          "preAuthPeriod": {
            "description": "The time frame during which this authorization is effective.",
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                "description": "The start of the period. The boundary is inclusive."
              },
              "end": {
                "type": "string",
                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
              }
            }
          },
          "processNote": {
            "type": "array",
            "items": {
              "description": "A note that describes or explains adjudication results in a human readable form.",
              "type": "object",
              "properties": {
                "modifierExtension": {
                  "type": "array",
                  "items": {
                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "number": {
                  "type": "integer",
                  "format": "int32",
                  "description": "A number to uniquely identify a note entry."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "display",
                    "print",
                    "printoper"
                  ],
                  "description": "The business purpose of the note text."
                },
                "text": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "The explanation or description associated with the processing."
                },
                "language": {
                  "description": "A code to define the language used in the text of the note.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                }
              },
              "required": [
                "text"
              ]
            }
          },
          "communicationRequest": {
            "type": "array",
            "items": {
              "description": "Request for additional supporting or authorizing information.",
              "type": "object",
              "properties": {
                "reference": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                },
                "type": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                },
                "identifier": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                },
                "display": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                }
              }
            }
          },
          "error": {
            "type": "array",
            "items": {
              "description": "Errors encountered during the processing of the adjudication.",
              "type": "object",
              "properties": {
                "modifierExtension": {
                  "type": "array",
                  "items": {
                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "itemSequence": {
                  "type": "integer",
                  "format": "int32",
                  "description": "The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure."
                },
                "detailSequence": {
                  "type": "integer",
                  "format": "int32",
                  "description": "The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure."
                },
                "subDetailSequence": {
                  "type": "integer",
                  "format": "int32",
                  "description": "The sequence number of the sub&ndash;detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure."
                },
                "code": {
                  "description": "An error code, from a specified code system, which details why the claim could not be adjudicated.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                }
              },
              "required": [
                "code"
              ]
            },
            "maxItems": 1
          }
        },
        "required": [
          "resourceType",
          "status",
          "type",
          "use",
          "patient",
          "created",
          "insurer",
          "outcome",
          "extension",
          "request"
        ],
        "description": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
      },
      "StructureDefinition-sa-approval-claimresponse": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "enum": [
              "ClaimResponse"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
            "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
          },
          "meta": {
            "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
            "type": "object",
            "properties": {
              "lastUpdated": {
                "type": "string",
                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                "description": "When the resource last changed &ndash; e.g. when the version changed."
              },
              "source": {
                "type": "string",
                "pattern": "\\S*",
                "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
              },
              "profile": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                }
              },
              "security": {
                "type": "array",
                "items": {
                  "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                    },
                    "version": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                    },
                    "code": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                    },
                    "userSelected": {
                      "type": "boolean",
                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                    }
                  }
                }
              },
              "tag": {
                "type": "array",
                "items": {
                  "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The identification of the code system that defines the meaning of the symbol in the code."
                    },
                    "version": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                    },
                    "code": {
                      "type": "string",
                      "pattern": "[^\\s]+(\\s[^\\s]+)*",
                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A representation of the meaning of the code in the system, following the rules of the system."
                    },
                    "userSelected": {
                      "type": "boolean",
                      "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                    }
                  }
                }
              }
            },
            "required": [
              "lastUpdated"
            ]
          },
          "implicitRules": {
            "type": "string",
            "pattern": "\\S*",
            "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
          },
          "language": {
            "type": "string",
            "pattern": "[^\\s]+(\\s[^\\s]+)*",
            "description": "The base language in which the resource is written."
          },
          "text": {
            "description": "A human&ndash;readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "generated",
                  "extensions",
                  "additional",
                  "empty"
                ],
                "description": "The status of the narrative &ndash; whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
              },
              "div": {
                "type": "string",
                "description": "The actual narrative content, a stripped down version of XHTML."
              }
            },
            "required": [
              "status",
              "div"
            ]
          },
          "contained": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "resourceType": {
                  "type": "string",
                  "enum": [
                    "Account",
                    "ActivityDefinition",
                    "AdverseEvent",
                    "AllergyIntolerance",
                    "Appointment",
                    "AppointmentResponse",
                    "AuditEvent",
                    "Basic",
                    "Binary",
                    "BiologicallyDerivedProduct",
                    "BodyStructure",
                    "Bundle",
                    "CapabilityStatement",
                    "CarePlan",
                    "CareTeam",
                    "CatalogEntry",
                    "ChargeItem",
                    "ChargeItemDefinition",
                    "Claim",
                    "ClaimResponse",
                    "ClinicalImpression",
                    "CodeSystem",
                    "Communication",
                    "CommunicationRequest",
                    "CompartmentDefinition",
                    "Composition",
                    "ConceptMap",
                    "Condition",
                    "Consent",
                    "Contract",
                    "Coverage",
                    "CoverageEligibilityRequest",
                    "CoverageEligibilityResponse",
                    "DetectedIssue",
                    "Device",
                    "DeviceDefinition",
                    "DeviceMetric",
                    "DeviceRequest",
                    "DeviceUseStatement",
                    "DiagnosticReport",
                    "DocumentManifest",
                    "DocumentReference",
                    "DomainResource",
                    "EffectEvidenceSynthesis",
                    "Encounter",
                    "Endpoint",
                    "EnrollmentRequest",
                    "EnrollmentResponse",
                    "EpisodeOfCare",
                    "EventDefinition",
                    "Evidence",
                    "EvidenceVariable",
                    "ExampleScenario",
                    "ExplanationOfBenefit",
                    "FamilyMemberHistory",
                    "Flag",
                    "Goal",
                    "GraphDefinition",
                    "Group",
                    "GuidanceResponse",
                    "HealthcareService",
                    "ImagingStudy",
                    "Immunization",
                    "ImmunizationEvaluation",
                    "ImmunizationRecommendation",
                    "ImplementationGuide",
                    "InsurancePlan",
                    "Invoice",
                    "Library",
                    "Linkage",
                    "List",
                    "Location",
                    "Measure",
                    "MeasureReport",
                    "Media",
                    "Medication",
                    "MedicationAdministration",
                    "MedicationDispense",
                    "MedicationKnowledge",
                    "MedicationRequest",
                    "MedicationStatement",
                    "MedicinalProduct",
                    "MedicinalProductAuthorization",
                    "MedicinalProductContraindication",
                    "MedicinalProductIndication",
                    "MedicinalProductIngredient",
                    "MedicinalProductInteraction",
                    "MedicinalProductManufactured",
                    "MedicinalProductPackaged",
                    "MedicinalProductPharmaceutical",
                    "MedicinalProductUndesirableEffect",
                    "MessageDefinition",
                    "MessageHeader",
                    "MolecularSequence",
                    "NamingSystem",
                    "NutritionOrder",
                    "Observation",
                    "ObservationDefinition",
                    "OperationDefinition",
                    "OperationOutcome",
                    "Organization",
                    "OrganizationAffiliation",
                    "Parameters",
                    "Patient",
                    "PaymentNotice",
                    "PaymentReconciliation",
                    "Person",
                    "PlanDefinition",
                    "Practitioner",
                    "PractitionerRole",
                    "Procedure",
                    "Provenance",
                    "Questionnaire",
                    "QuestionnaireResponse",
                    "RelatedPerson",
                    "RequestGroup",
                    "ResearchDefinition",
                    "ResearchElementDefinition",
                    "ResearchStudy",
                    "ResearchSubject",
                    "Resource",
                    "RiskAssessment",
                    "RiskEvidenceSynthesis",
                    "Schedule",
                    "SearchParameter",
                    "ServiceRequest",
                    "Slot",
                    "Specimen",
                    "SpecimenDefinition",
                    "StructureDefinition",
                    "StructureMap",
                    "Subscription",
                    "Substance",
                    "SubstanceNucleicAcid",
                    "SubstancePolymer",
                    "SubstanceProtein",
                    "SubstanceReferenceInformation",
                    "SubstanceSourceMaterial",
                    "SubstanceSpecification",
                    "SupplyDelivery",
                    "SupplyRequest",
                    "Task",
                    "TerminologyCapabilities",
                    "TestReport",
                    "TestScript",
                    "ValueSet",
                    "VerificationResult",
                    "VisionPrescription"
                  ]
                },
                "id": {
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
                },
                "meta": {
                  "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                  "type": "object",
                  "properties": {
                    "versionId": {
                      "type": "string",
                      "pattern": "[A-Za-z0-9\\-\\.]{1,64}",
                      "description": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."
                    },
                    "lastUpdated": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))",
                      "description": "When the resource last changed &ndash; e.g. when the version changed."
                    },
                    "source": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."
                    },
                    "profile": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "\\S*",
                        "description": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition&ndash;definitions.html#StructureDefinition.url)."
                      }
                    },
                    "security": {
                      "type": "array",
                      "items": {
                        "description": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "tag": {
                      "type": "array",
                      "items": {
                        "description": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    }
                  }
                },
                "implicitRules": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                },
                "language": {
                  "type": "string",
                  "pattern": "[^\\s]+(\\s[^\\s]+)*",
                  "description": "The base language in which the resource is written."
                }
              },
              "required": [
                "resourceType"
              ],
              "description": "These resources do not have an independent existence apart from the resource that contains them &ndash; they cannot be identified independently, and nor can they have their own independent transaction scope."
            }
          },
          "extension": {
            "type": "array",
            "items": {
              "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
              "type": "object",
              "additionalProperties": true
            },
            "minItems": 1
          },
          "modifierExtension": {
            "type": "array",
            "items": {
              "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
              "type": "object",
              "additionalProperties": true
            }
          },
          "identifier": {
            "type": "array",
            "items": {
              "description": "A unique identifier assigned to this claim response.",
              "type": "object",
              "properties": {
                "use": {
                  "type": "string",
                  "enum": [
                    "usual",
                    "official",
                    "temp",
                    "secondary",
                    "old"
                  ],
                  "description": "The purpose of this identifier."
                },
                "type": {
                  "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                },
                "system": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."
                },
                "value": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system."
                },
                "period": {
                  "description": "Time period during which identifier is/was valid for use.",
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The start of the period. The boundary is inclusive."
                    },
                    "end": {
                      "type": "string",
                      "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                      "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
                    }
                  }
                },
                "assigner": {
                  "description": "Organization that issued/manages the identifier.",
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                    },
                    "type": {
                      "type": "string",
                      "pattern": "\\S*",
                      "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                    },
                    "identifier": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                    },
                    "display": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                    }
                  }
                }
              }
            },
            "minItems": 1,
            "maxItems": 1,
            "required": [
              "system",
              "value"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active"
            ]
          },
          "type": {
            "type": "object",
            "properties": {
              "coding": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "system": {
                      "type": "string",
                      "enum": [
                        "http://terminology.hl7.org/CodeSystem/claim-type"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "pharmacy"
                      ]
                    }
                  },
                  "required": [
                    "system",
                    "code"
                  ]
                }
              }
            },
            "required": [
              "coding"
            ]
          },
          "use": {
            "type": "string",
            "enum": [
              "preauthorization"
            ]
          },
          "patient": {
            "description": "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.",
            "type": "object",
            "properties": {
              "reference": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
              },
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            }
          },
          "created": {
            "type": "string",
            "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
            "description": "The date this resource was created."
          },
          "insurer": {
            "description": "The party responsible for authorization, adjudication and reimbursement.",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            },
            "required": [
              "display"
            ]
          },
          "requestor": {
            "description": "The provider which is responsible for the claim, predetermination or preauthorization.",
            "type": "object",
            "properties": {
              "reference": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
              },
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            }
          },
          "request": {
            "description": "Original request resource reference.",
            "type": "object",
            "properties": {
              "reference": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
              },
              "type": {
                "type": "string",
                "pattern": "\\S*",
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
              },
              "identifier": {
                "type": "object",
                "additionalProperties": true,
                "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
              },
              "display": {
                "type": "string",
                "pattern": "[ \\r\\n\\t\\S]+",
                "description": "Plain text narrative that identifies the resource in addition to the resource reference."
              }
            }
          },
          "outcome": {
            "type": "string",
            "enum": [
              "complete"
            ]
          },
          "disposition": {
            "type": "string",
            "pattern": "[ \\r\\n\\t\\S]+",
            "description": "A human readable description of the status of the adjudication."
          },
          "preAuthRef": {
            "type": "string",
            "pattern": "[ \\r\\n\\t\\S]+",
            "description": "Reference from the Insurer which is used in later communications which refers to this adjudication."
          },
          "preAuthPeriod": {
            "description": "The time frame during which this authorization is effective.",
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                "description": "The start of the period. The boundary is inclusive."
              },
              "end": {
                "type": "string",
                "pattern": "([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?",
                "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."
              }
            },
            "required": [
              "start",
              "end"
            ]
          },
          "processNote": {
            "type": "array",
            "items": {
              "description": "A note that describes or explains adjudication results in a human readable form.",
              "type": "object",
              "properties": {
                "modifierExtension": {
                  "type": "array",
                  "items": {
                    "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "number": {
                  "type": "integer",
                  "format": "int32",
                  "description": "A number to uniquely identify a note entry."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "display",
                    "print",
                    "printoper"
                  ],
                  "description": "The business purpose of the note text."
                },
                "text": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "The explanation or description associated with the processing."
                },
                "language": {
                  "description": "A code to define the language used in the text of the note.",
                  "type": "object",
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "description": "A reference to a code defined by a terminology system.",
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "pattern": "\\S*",
                            "description": "The identification of the code system that defines the meaning of the symbol in the code."
                          },
                          "version": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "The version of the code system which was used when choosing this code. Note that a well&ndash;maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                          },
                          "code": {
                            "type": "string",
                            "pattern": "[^\\s]+(\\s[^\\s]+)*",
                            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post&ndash;coordination)."
                          },
                          "display": {
                            "type": "string",
                            "pattern": "[ \\r\\n\\t\\S]+",
                            "description": "A representation of the meaning of the code in the system, following the rules of the system."
                          },
                          "userSelected": {
                            "type": "boolean",
                            "description": "Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string",
                      "pattern": "[ \\r\\n\\t\\S]+",
                      "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."
                    }
                  }
                }
              },
              "required": [
                "text"
              ]
            }
          },
          "communicationRequest": {
            "type": "array",
            "items": {
              "description": "Request for additional supporting or authorizing information.",
              "type": "object",
              "properties": {
                "reference": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
                },
                "type": {
                  "type": "string",
                  "pattern": "\\S*",
                  "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."
                },
                "identifier": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                },
                "display": {
                  "type": "string",
                  "pattern": "[ \\r\\n\\t\\S]+",
                  "description": "Plain text narrative that identifies the resource in addition to the resource reference."
                }
              }
            }
          }
        },
        "required": [
          "resourceType",
          "status",
          "type",
          "use",
          "patient",
          "created",
          "insurer",
          "outcome",
          "meta",
          "extension",
          "identifier",
          "requestor",
          "preAuthRef",
          "preAuthPeriod"
        ],
        "description": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-approval-claimresponse"
      }
    },
    "securitySchemes": {
      "smartOnFhir": {
        "type": "oauth2",
        "description": "SMART-on-FHIR security scheme",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://auth.services.health.nz/realms/hnz-integration/protocol/openid-connect/auth",
            "tokenUrl": "https://auth.services.health.nz/realms/hnz-integration/protocol/openid-connect/token",
            "scopes": {
              "https://fhir-ig.digital.health.nz/special-authority/OperationDefinition/sa-claim-submit": "Sa-claim-submit access"
            }
          },
          "clientCredentials": {
            "tokenUrl": "https://auth.services.health.nz/realms/hnz-integration/protocol/openid-connect/token",
            "scopes": {
              "system/Claim.s": "Claim.s access",
              "https://fhir-ig.digital.health.nz/special-authority/OperationDefinition/sa-claim-submit": "Sa-claim-submit access",
              "system/ClaimResponse.s": "ClaimResponse.s access"
            }
          }
        }
      }
    },
    "examples": {
      "Claim-sa-example-claim-nppa": {
        "value": {
          "resourceType": "Claim",
          "id": "sa-example-claim-nppa",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "priority": {
            "coding": [
              {
                "code": "normal",
                "system": "http://terminology.hl7.org/CodeSystem/processpriority"
              }
            ]
          },
          "supportingInfo": [
            {
              "category": {
                "coding": [
                  {
                    "code": "questionnaire-response",
                    "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-supporting-info-category"
                  }
                ]
              },
              "sequence": 1,
              "valueReference": {
                "reference": "QuestionnaireResponse/sa-example-qr"
              }
            }
          ],
          "insurance": [
            {
              "sequence": 1,
              "focal": true,
              "coverage": {
                "display": "Pharmaceutical Schedule"
              }
            }
          ],
          "item": [
            {
              "productOrService": {
                "coding": [
                  {
                    "system": "http://nzmt.org.nz",
                    "code": "50002411000117100",
                    "display": "Myleran 2 mg tablet: film-coated, 100 tablets, bottle"
                  },
                  {
                    "system": "https://fhir-ig.digital.health.nz/special-authority/ns/pharmacode",
                    "code": "2000001",
                    "display": "Example medicine 10 mg tablet, 30"
                  }
                ]
              },
              "sequence": 1
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T12:00:00+13:00",
          "provider": {
            "reference": "Practitioner/sa-example-applicant"
          }
        }
      },
      "Claim-sa-example-claim-nppa-create": {
        "value": {
          "resourceType": "Claim",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "priority": {
            "coding": [
              {
                "code": "normal",
                "system": "http://terminology.hl7.org/CodeSystem/processpriority"
              }
            ]
          },
          "supportingInfo": [
            {
              "category": {
                "coding": [
                  {
                    "code": "questionnaire-response",
                    "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-supporting-info-category"
                  }
                ]
              },
              "sequence": 1,
              "valueReference": {
                "reference": "QuestionnaireResponse/sa-example-qr"
              }
            }
          ],
          "insurance": [
            {
              "sequence": 1,
              "focal": true,
              "coverage": {
                "display": "Pharmaceutical Schedule"
              }
            }
          ],
          "item": [
            {
              "productOrService": {
                "coding": [
                  {
                    "system": "http://nzmt.org.nz",
                    "code": "50002411000117100",
                    "display": "Myleran 2 mg tablet: film-coated, 100 tablets, bottle"
                  },
                  {
                    "system": "https://fhir-ig.digital.health.nz/special-authority/ns/pharmacode",
                    "code": "2000001",
                    "display": "Example medicine 10 mg tablet, 30"
                  }
                ]
              },
              "sequence": 1
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T12:00:00+13:00",
          "provider": {
            "reference": "Practitioner/sa-example-applicant"
          }
        }
      },
      "Claim-sa-example-claim": {
        "value": {
          "resourceType": "Claim",
          "id": "sa-example-claim",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "priority": {
            "coding": [
              {
                "code": "normal",
                "system": "http://terminology.hl7.org/CodeSystem/processpriority"
              }
            ]
          },
          "supportingInfo": [
            {
              "category": {
                "coding": [
                  {
                    "code": "questionnaire-response",
                    "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-supporting-info-category"
                  }
                ]
              },
              "sequence": 1,
              "valueReference": {
                "reference": "QuestionnaireResponse/sa-example-qr"
              }
            }
          ],
          "insurance": [
            {
              "sequence": 1,
              "focal": true,
              "coverage": {
                "display": "Pharmaceutical Schedule"
              }
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T10:35:00+13:00",
          "provider": {
            "reference": "Practitioner/sa-example-applicant"
          }
        }
      },
      "Claim-sa-example-claim-create": {
        "value": {
          "resourceType": "Claim",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-claim"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "priority": {
            "coding": [
              {
                "code": "normal",
                "system": "http://terminology.hl7.org/CodeSystem/processpriority"
              }
            ]
          },
          "supportingInfo": [
            {
              "category": {
                "coding": [
                  {
                    "code": "questionnaire-response",
                    "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-supporting-info-category"
                  }
                ]
              },
              "sequence": 1,
              "valueReference": {
                "reference": "QuestionnaireResponse/sa-example-qr"
              }
            }
          ],
          "insurance": [
            {
              "sequence": 1,
              "focal": true,
              "coverage": {
                "display": "Pharmaceutical Schedule"
              }
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T10:35:00+13:00",
          "provider": {
            "reference": "Practitioner/sa-example-applicant"
          }
        }
      },
      "ClaimResponse-sa-example-approval-chem": {
        "value": {
          "resourceType": "ClaimResponse",
          "id": "sa-example-approval-chem",
          "meta": {
            "lastUpdated": "2026-10-14T10:35:07+13:00",
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-approval-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "outcome": "complete",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/approval-detail",
              "extension": [
                {
                  "url": "approvalType",
                  "valueCode": "CHEM"
                },
                {
                  "url": "status",
                  "valueCode": "ACTIVE"
                },
                {
                  "url": "formNumber",
                  "valueString": "SA9999"
                },
                {
                  "url": "formVersion",
                  "valueString": "a3f2b8c91d4e7062"
                }
              ]
            }
          ],
          "identifier": [
            {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
              "value": "26SA0004567"
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T10:35:07+13:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "request": {
            "identifier": {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
              "value": "000123456"
            }
          },
          "preAuthRef": "26SA0004567",
          "preAuthPeriod": {
            "start": "2026-10-14",
            "end": "2027-10-14"
          }
        }
      },
      "ClaimResponse-sa-example-approval-chem-create": {
        "value": {
          "resourceType": "ClaimResponse",
          "meta": {
            "lastUpdated": "2026-10-14T10:35:07+13:00",
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-approval-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "outcome": "complete",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/approval-detail",
              "extension": [
                {
                  "url": "approvalType",
                  "valueCode": "CHEM"
                },
                {
                  "url": "status",
                  "valueCode": "ACTIVE"
                },
                {
                  "url": "formNumber",
                  "valueString": "SA9999"
                },
                {
                  "url": "formVersion",
                  "valueString": "a3f2b8c91d4e7062"
                }
              ]
            }
          ],
          "identifier": [
            {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
              "value": "26SA0004567"
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T10:35:07+13:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "request": {
            "identifier": {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
              "value": "000123456"
            }
          },
          "preAuthRef": "26SA0004567",
          "preAuthPeriod": {
            "start": "2026-10-14",
            "end": "2027-10-14"
          }
        }
      },
      "ClaimResponse-sa-example-approval-nppa": {
        "value": {
          "resourceType": "ClaimResponse",
          "id": "sa-example-approval-nppa",
          "meta": {
            "lastUpdated": "2026-09-01T09:00:00+12:00",
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-approval-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "outcome": "complete",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/approval-detail",
              "extension": [
                {
                  "url": "approvalType",
                  "valueCode": "EXCP"
                },
                {
                  "url": "status",
                  "valueCode": "ACTIVE"
                },
                {
                  "url": "providerIdType",
                  "valueCode": "CLAIMANT_NUMBER"
                },
                {
                  "url": "providerId",
                  "valueIdentifier": {
                    "system": "https://fhir-ig.digital.health.nz/special-authority/ns/pharmacy-claimant-number",
                    "value": "1234"
                  }
                }
              ]
            },
            {
              "extension": [
                {
                  "url": "type",
                  "valueCode": "EXPLICIT_PHARMACEUTICALS"
                },
                {
                  "extension": [
                    {
                      "url": "ctppId",
                      "valueString": "10000000000000"
                    },
                    {
                      "url": "pharmacode",
                      "valueString": "2000001"
                    },
                    {
                      "url": "description",
                      "valueString": "Example medicine 10 mg tablet, 30"
                    }
                  ],
                  "url": "pharmaceutical"
                }
              ],
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/approval-coverage"
            }
          ],
          "identifier": [
            {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
              "value": "26NP0000088"
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-09-01T09:00:00+12:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "preAuthRef": "26NP0000088",
          "preAuthPeriod": {
            "start": "2026-09-01",
            "end": "2027-03-01"
          }
        }
      },
      "ClaimResponse-sa-example-approval-nppa-create": {
        "value": {
          "resourceType": "ClaimResponse",
          "meta": {
            "lastUpdated": "2026-09-01T09:00:00+12:00",
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-approval-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "outcome": "complete",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/approval-detail",
              "extension": [
                {
                  "url": "approvalType",
                  "valueCode": "EXCP"
                },
                {
                  "url": "status",
                  "valueCode": "ACTIVE"
                },
                {
                  "url": "providerIdType",
                  "valueCode": "CLAIMANT_NUMBER"
                },
                {
                  "url": "providerId",
                  "valueIdentifier": {
                    "system": "https://fhir-ig.digital.health.nz/special-authority/ns/pharmacy-claimant-number",
                    "value": "1234"
                  }
                }
              ]
            },
            {
              "extension": [
                {
                  "url": "type",
                  "valueCode": "EXPLICIT_PHARMACEUTICALS"
                },
                {
                  "extension": [
                    {
                      "url": "ctppId",
                      "valueString": "10000000000000"
                    },
                    {
                      "url": "pharmacode",
                      "valueString": "2000001"
                    },
                    {
                      "url": "description",
                      "valueString": "Example medicine 10 mg tablet, 30"
                    }
                  ],
                  "url": "pharmaceutical"
                }
              ],
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/approval-coverage"
            }
          ],
          "identifier": [
            {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
              "value": "26NP0000088"
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-09-01T09:00:00+12:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "preAuthRef": "26NP0000088",
          "preAuthPeriod": {
            "start": "2026-09-01",
            "end": "2027-03-01"
          }
        }
      },
      "ClaimResponse-sa-example-cr-approved": {
        "value": {
          "resourceType": "ClaimResponse",
          "id": "sa-example-cr-approved",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/application-status",
              "extension": [
                {
                  "url": "status",
                  "valueCode": "DONE"
                },
                {
                  "url": "outcome",
                  "valueCode": "APPROVED"
                }
              ]
            }
          ],
          "request": {
            "identifier": {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
              "value": "000123456"
            }
          },
          "identifier": [
            {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
              "value": "26SA0004567"
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T10:35:07+13:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "outcome": "complete",
          "disposition": "Application approved",
          "preAuthRef": "26SA0004567",
          "preAuthPeriod": {
            "start": "2026-10-14",
            "end": "2027-10-14"
          }
        }
      },
      "ClaimResponse-sa-example-cr-approved-create": {
        "value": {
          "resourceType": "ClaimResponse",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/application-status",
              "extension": [
                {
                  "url": "status",
                  "valueCode": "DONE"
                },
                {
                  "url": "outcome",
                  "valueCode": "APPROVED"
                }
              ]
            }
          ],
          "request": {
            "identifier": {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
              "value": "000123456"
            }
          },
          "identifier": [
            {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
              "value": "26SA0004567"
            }
          ],
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T10:35:07+13:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "outcome": "complete",
          "disposition": "Application approved",
          "preAuthRef": "26SA0004567",
          "preAuthPeriod": {
            "start": "2026-10-14",
            "end": "2027-10-14"
          }
        }
      },
      "ClaimResponse-sa-example-cr-declined": {
        "value": {
          "resourceType": "ClaimResponse",
          "id": "sa-example-cr-declined",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/application-status",
              "extension": [
                {
                  "url": "status",
                  "valueCode": "DONE"
                },
                {
                  "url": "outcome",
                  "valueCode": "DECLINED"
                },
                {
                  "url": "outcomeCode",
                  "valueCoding": {
                    "code": "URNSA011",
                    "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-outcome-code"
                  }
                },
                {
                  "url": "outcomeReason",
                  "valueString": "An approval already exists for this patient and form."
                }
              ]
            },
            {
              "extension": [
                {
                  "url": "approvalType",
                  "valueCode": "CHEM"
                },
                {
                  "url": "approvalNumber",
                  "valueIdentifier": {
                    "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
                    "value": "25SA0001234"
                  }
                },
                {
                  "url": "effectiveDate",
                  "valueDate": "2026-02-01"
                },
                {
                  "url": "expiryDate",
                  "valueDate": "2027-02-01"
                }
              ],
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/existing-approval"
            }
          ],
          "request": {
            "identifier": {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
              "value": "000123457"
            }
          },
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T10:35:07+13:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "outcome": "complete",
          "disposition": "An approval already exists for this patient and form.",
          "error": [
            {
              "code": {
                "coding": [
                  {
                    "code": "URNSA011",
                    "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-outcome-code"
                  }
                ]
              }
            }
          ]
        }
      },
      "ClaimResponse-sa-example-cr-declined-create": {
        "value": {
          "resourceType": "ClaimResponse",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/application-status",
              "extension": [
                {
                  "url": "status",
                  "valueCode": "DONE"
                },
                {
                  "url": "outcome",
                  "valueCode": "DECLINED"
                },
                {
                  "url": "outcomeCode",
                  "valueCoding": {
                    "code": "URNSA011",
                    "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-outcome-code"
                  }
                },
                {
                  "url": "outcomeReason",
                  "valueString": "An approval already exists for this patient and form."
                }
              ]
            },
            {
              "extension": [
                {
                  "url": "approvalType",
                  "valueCode": "CHEM"
                },
                {
                  "url": "approvalNumber",
                  "valueIdentifier": {
                    "system": "https://fhir-ig.digital.health.nz/special-authority/ns/approval-number",
                    "value": "25SA0001234"
                  }
                },
                {
                  "url": "effectiveDate",
                  "valueDate": "2026-02-01"
                },
                {
                  "url": "expiryDate",
                  "valueDate": "2027-02-01"
                }
              ],
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/existing-approval"
            }
          ],
          "request": {
            "identifier": {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
              "value": "000123457"
            }
          },
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T10:35:07+13:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "outcome": "complete",
          "disposition": "An approval already exists for this patient and form.",
          "error": [
            {
              "code": {
                "coding": [
                  {
                    "code": "URNSA011",
                    "system": "https://fhir-ig.digital.health.nz/special-authority/CodeSystem/sa-outcome-code"
                  }
                ]
              }
            }
          ]
        }
      },
      "ClaimResponse-sa-example-cr-pending": {
        "value": {
          "resourceType": "ClaimResponse",
          "id": "sa-example-cr-pending",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/application-status",
              "extension": [
                {
                  "url": "status",
                  "valueCode": "PENDING_REVIEW"
                }
              ]
            }
          ],
          "request": {
            "identifier": {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
              "value": "000123458"
            }
          },
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T11:03:15+13:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "outcome": "queued"
        }
      },
      "ClaimResponse-sa-example-cr-pending-create": {
        "value": {
          "resourceType": "ClaimResponse",
          "meta": {
            "profile": [
              "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/sa-application-claimresponse"
            ]
          },
          "status": "active",
          "type": {
            "coding": [
              {
                "code": "pharmacy",
                "system": "http://terminology.hl7.org/CodeSystem/claim-type"
              }
            ]
          },
          "use": "preauthorization",
          "extension": [
            {
              "url": "https://fhir-ig.digital.health.nz/special-authority/StructureDefinition/application-status",
              "extension": [
                {
                  "url": "status",
                  "valueCode": "PENDING_REVIEW"
                }
              ]
            }
          ],
          "request": {
            "identifier": {
              "system": "https://fhir-ig.digital.health.nz/special-authority/ns/application-number",
              "value": "000123458"
            }
          },
          "patient": {
            "reference": "Patient/sa-example-patient"
          },
          "created": "2026-10-14T11:03:15+13:00",
          "insurer": {
            "display": "Health New Zealand | Te Whatu Ora"
          },
          "requestor": {
            "reference": "Practitioner/sa-example-applicant"
          },
          "outcome": "queued"
        }
      }
    }
  },
  "tags": [
    {
      "name": "Claim",
      "description": "Operations related to Claim FHIR resource",
      "externalDocs": {
        "url": "https://www.hl7.org/fhir/claim.html"
      }
    },
    {
      "name": "metadata",
      "description": "Operations related to metadata FHIR resource",
      "externalDocs": {
        "url": "https://www.hl7.org/fhir/metadata.html"
      }
    },
    {
      "name": "ClaimResponse",
      "description": "Operations related to ClaimResponse FHIR resource",
      "externalDocs": {
        "url": "https://www.hl7.org/fhir/claimresponse.html"
      }
    }
  ]
}