{
  "openapi": "3.0.2",
  "info": {
    "title": "NZ Shared Digital Health Record API",
    "description": "NZ Shared Digital Health Record API Capability Statement",
    "license": {
      "name": "Creative Commons Zero v1.0 Universal",
      "url": "http://spdx.org/licenses/CC0-1.0.html"
    },
    "version": "1.0.1",
    "contact": {
      "name": "Health New Zealand",
      "url": "https://github.com/tewhatuora"
    }
  },
  "servers": [
    {
      "url": "https://api.sdhr.digital.health.nz/s2s",
      "description": "Health NZ | Te Whatu Ora NZ Shared Digital Health Record API"
    }
  ],
  "externalDocs": {
    "url": "https://fhir-ig.digital.health.nz/sdhr/CapabilityStatement/SDHRCapabilityStatement",
    "description": "FHIR CapabilityStatement"
  },
  "paths": {
    "/metadata": {
      "summary": "Access to the Server\u0027s Capability Statement",
      "description": "All FHIR Servers return a CapabilityStatement that describes what services they perform",
      "get": {
        "summary": "Return the server\u0027s capability statement",
        "operationId": "metadata",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the capbility statement",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/CapabilityStatement"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/AllergyIntolerance": {
      "summary": "Manager for resources of type AllergyIntolerance",
      "description": "The Manager for resources of type AllergyIntolerance: provides services to manage the collection of all the AllergyIntolerance instances",
      "get": {
        "summary": "Search all resources of type AllergyIntolerance based on a set of criteria",
        "operationId": "searchAllergyIntolerance",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Bundle"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          },
          {
            "name": "patient",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "food | medication | environment | biologic",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clinical-status",
            "in": "query",
            "description": "active | inactive | resolved",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [Condition](condition.html): Code for the condition\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a  procedure\r\n* [ServiceRequest](servicerequest.html): What is being requested/ordered\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "identifier",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Master Version Specific Identifier\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recorder",
            "in": "query",
            "description": "Who recorded the sensitivity",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "description": "mild | moderate | severe (of event as a whole).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientlastupdated",
            "in": "query",
            "description": "Search by the ClientLastUpdated extension on SDHR AllergyIntolerance resources",
            "schema": {
              "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)))?)?)?"
            }
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "description": "When the resource version last changed",
            "schema": {
              "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)))?)?)?"
            }
          }
        ]
      },
      "post": {
        "summary": "Create a new resource",
        "operationId": "createAllergyIntolerance",
        "requestBody": {
          "description": "The new state of the resource",
          "required": true,
          "content": {
            "application/fhir+json": {
              "schema": {
                "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/AllergyIntolerance"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned after being updated",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/AllergyIntolerance"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/AllergyIntolerance/{rid}": {
      "summary": "Read/Write/etc resource instance of type AllergyIntolerance",
      "description": "Access to services to manage the state of a single resource of type AllergyIntolerance",
      "get": {
        "summary": "Read the current state of the resource",
        "operationId": "readAllergyIntolerance",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/AllergyIntolerance"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      },
      "put": {
        "summary": "Update the current state of the resource",
        "operationId": "updateAllergyIntolerance",
        "requestBody": {
          "description": "The new state of the resource",
          "required": true,
          "content": {
            "application/fhir+json": {
              "schema": {
                "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/AllergyIntolerance"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned after being updated",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/AllergyIntolerance"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      },
      "delete": {
        "summary": "Delete the resource so that it no exists (no read, search etc)",
        "operationId": "deleteAllergyIntolerance",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "204": {
            "description": "If the resource is deleted - no content is returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          }
        ]
      }
    },
    "/Condition": {
      "summary": "Manager for resources of type Condition",
      "description": "The Manager for resources of type Condition: provides services to manage the collection of all the Condition instances",
      "get": {
        "summary": "Search all resources of type Condition based on a set of criteria",
        "operationId": "searchCondition",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Bundle"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          },
          {
            "name": "patient",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "The category of the condition",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [Condition](condition.html): Code for the condition\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a  procedure\r\n* [ServiceRequest](servicerequest.html): What is being requested/ordered\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "encounter",
            "in": "query",
            "description": "Encounter created as part of",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "identifier",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Master Version Specific Identifier\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "onset-date",
            "in": "query",
            "description": "Date related onsets (dateTime and Period)",
            "schema": {
              "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)))?)?)?"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "description": "The severity of the condition",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "description": "Who has the condition?",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "highlighted",
            "in": "query",
            "description": "Search for conditions flagged as highlighted in the SDHRCondition profile",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "long-term-condition",
            "in": "query",
            "description": "Search for conditions marked as long term in the SDHRCondition profile",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientlastupdated",
            "in": "query",
            "description": "Search by the ClientLastUpdated extension on SDHR Condition resources",
            "schema": {
              "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)))?)?)?"
            }
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "description": "When the resource version last changed",
            "schema": {
              "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)))?)?)?"
            }
          }
        ]
      },
      "post": {
        "summary": "Create a new resource",
        "operationId": "createCondition",
        "requestBody": {
          "description": "The new state of the resource",
          "required": true,
          "content": {
            "application/fhir+json": {
              "schema": {
                "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Condition"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned after being updated",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Condition"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/Condition/{rid}": {
      "summary": "Read/Write/etc resource instance of type Condition",
      "description": "Access to services to manage the state of a single resource of type Condition",
      "get": {
        "summary": "Read the current state of the resource",
        "operationId": "readCondition",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Condition"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      },
      "put": {
        "summary": "Update the current state of the resource",
        "operationId": "updateCondition",
        "requestBody": {
          "description": "The new state of the resource",
          "required": true,
          "content": {
            "application/fhir+json": {
              "schema": {
                "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Condition"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned after being updated",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Condition"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      },
      "delete": {
        "summary": "Delete the resource so that it no exists (no read, search etc)",
        "operationId": "deleteCondition",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "204": {
            "description": "If the resource is deleted - no content is returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          }
        ]
      }
    },
    "/Observation": {
      "summary": "Manager for resources of type Observation",
      "description": "The Manager for resources of type Observation: provides services to manage the collection of all the Observation instances",
      "get": {
        "summary": "Search all resources of type Observation based on a set of criteria",
        "operationId": "searchObservation",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Bundle"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          },
          {
            "name": "patient",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "The classification of the type of observation",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [Condition](condition.html): Code for the condition\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a  procedure\r\n* [ServiceRequest](servicerequest.html): What is being requested/ordered\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): Time period team covers\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When this Consent was created or indexed\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the period the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care\u0027s period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure was performed\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n",
            "schema": {
              "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)))?)?)?"
            }
          },
          {
            "name": "encounter",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [Composition](composition.html): Context of the Composition\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [DocumentReference](documentreference.html): Context of the document  content\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [List](list.html): Context in which list created\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): Encounter created as part of\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "identifier",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Master Version Specific Identifier\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "performer",
            "in": "query",
            "description": "Who performed the observation",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "The status of the observation",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "description": "The subject that the observation is about",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value-concept",
            "in": "query",
            "description": "The value of the observation, if the value is a CodeableConcept",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value-date",
            "in": "query",
            "description": "The value of the observation, if the value is a date or period of time",
            "schema": {
              "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)))?)?)?"
            }
          },
          {
            "name": "value-quantity",
            "in": "query",
            "description": "The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value-string",
            "in": "query",
            "description": "The value of the observation, if the value is a string, and also searches in CodeableConcept.text",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientlastupdated",
            "in": "query",
            "description": "Search by the ClientLastUpdated extension on SDHR Observation resources",
            "schema": {
              "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)))?)?)?"
            }
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "description": "When the resource version last changed",
            "schema": {
              "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)))?)?)?"
            }
          }
        ]
      },
      "post": {
        "summary": "Create a new resource",
        "operationId": "createObservation",
        "requestBody": {
          "description": "The new state of the resource",
          "required": true,
          "content": {
            "application/fhir+json": {
              "schema": {
                "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Observation"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned after being updated",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Observation"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/Observation/{rid}": {
      "summary": "Read/Write/etc resource instance of type Observation",
      "description": "Access to services to manage the state of a single resource of type Observation",
      "get": {
        "summary": "Read the current state of the resource",
        "operationId": "readObservation",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Observation"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      },
      "put": {
        "summary": "Update the current state of the resource",
        "operationId": "updateObservation",
        "requestBody": {
          "description": "The new state of the resource",
          "required": true,
          "content": {
            "application/fhir+json": {
              "schema": {
                "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Observation"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned after being updated",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Observation"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      },
      "delete": {
        "summary": "Delete the resource so that it no exists (no read, search etc)",
        "operationId": "deleteObservation",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "204": {
            "description": "If the resource is deleted - no content is returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          }
        ]
      }
    },
    "/Immunization": {
      "summary": "manage the collection of resources of type Immunization",
      "description": "Access to services to manage the collection of all resources of type Immunization",
      "get": {
        "summary": "Search all resources of type Immunization based on a set of criteria",
        "operationId": "searchImmunization",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Bundle"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          },
          {
            "name": "patient",
            "in": "query",
            "description": "Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/Immunization/{rid}": {
      "summary": "Read/Write/etc resource instance of type Immunization",
      "description": "Access to services to manage the state of a single resource of type Immunization",
      "get": {
        "summary": "Read the current state of the resource",
        "operationId": "readImmunization",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Immunization"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/$participate": {
      "summary": "System level operation $participate",
      "description": "Operation $participate invoked at the system level",
      "get": {
        "summary": "$participate (system)",
        "description": "This operation allows a patient to choose to participate in the Shared Digital Health Record service.\nThis operation should be used by data providers in the Shared Digital Health Record ecosystem such as Patient Management Systems (PMS) or Electronic Health Record (EHR) systems.\nIt can be used to indicate whether the patient wishes to participate, whether any resources are withheld, and the reason for participation. The scope of this operation is the API consumer - e.g. an HPI Facility where patient data is held.\n\nScenarios where this operation might be used include:\n- A patient has opted in to the Shared Digital Health Record service and appropriate data will be shared from the data holder to the service.\n- A patient chooses not to participate in the Shared Digital Health Record service and informs their healthcare provider of this choice.\n- A patient has one or more confidential records, held at their healthcare provider, that are withheld from the service.\n- A patient has previously withheld records but has now released them to the Shared Digital Health Record service.\n\nFor example payloads that might be used with this operation see:\n- [Parameters resource for total non-participation](./Parameters-ParametersDoNotParticipate.html) : This example shows how to indicate that a patient does not wish to participate in the Shared Digital Health Record service (has opted out).\n- [Parameters resource for participation](./Parameters-ParametersParticipate.html) : This example shows how to indicate that a patient wishes to participate in the Shared Digital Health Record service, where previously opted out (opt-in).\n- [Parameters resource for partial participation with withheld records](./Parameters-ParametersParticipateRecordWithheld.html) : This example shows how to indicate that a patient has some confidential records that are withheld from the Shared Digital Health Record service.\n- [Parameters resource for releasing withheld records](./Parameters-ParametersParticipateRecordReleased.html) : This example shows how to indicate that a patient has previously withheld records but has now released them to the Shared Digital Health Record service.\n\nTo make a request to this operation the API Consumer must POST a `Parameters` payload to the operation URL (e.g. `POST https://api.sdhr.digital.health.nz/s2s/$participate`).\n\nThe operation is idempotent, meaning that multiple requests with the same parameters will have the same effect as a single request.\nThe operation is expected to be called by a healthcare provider on behalf of the patient, and the patient must be identified by their NHI.\nThe operation will return an OperationOutcome resource indicating the result of the operation.",
        "operationId": "op-participate-system",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "Operation response",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Parameters"
                }
              }
            }
          }
        }
      }
    },
    "/$hnz-participate": {
      "summary": "System level operation $hnz-participate",
      "description": "Operation $hnz-participate invoked at the system level",
      "get": {
        "summary": "$hnz-participate (system)",
        "description": "This operation allows a patient to choose to participate in the Shared Digital Health Record service via HNZ assisted channels.\nThis operation should only be used by HNZ channels.\n\nScenarios where this operation might be used include:\n- A patient has opted in to the Shared Digital Health Record service by contacting Health NZ via appropriate digital or assisted channels.\n- A patient chooses not to participate in the Shared Digital Health Record service and informs Health NZ of this choice via appropriate digital or assisted channels.\n\nFor example payloads that might be used with this operation see:\n- [Parameters resource for total non-participation](./Parameters-ParametersHNZParticipateOptOut.html) : This example shows how to indicate that a patient does not wish to participate in the Shared Digital Health Record service (has opted out).\n- [Parameters resource for participation](./Parameters-ParametersHNZParticipateOptIn.html) : This example shows how to indicate that a patient wishes to participate in the Shared Digital Health Record service.\n\nTo make a request to this operation the API Consumer must POST a `Parameters` payload to the operation URL (e.g. `POST https://api.sdhr.digital.health.nz/s2s/$hnz-participate`).\n\nThe operation is idempotent, meaning that multiple requests with the same parameters will have the same effect as a single request.\nThe operation is expected to be called by a Health NZ channel system on behalf of the patient, and the patient must be identified by their NHI.\nThe operation will return an OperationOutcome resource indicating the result of the operation.",
        "operationId": "op-hnz-participate-system",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "Operation response",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Parameters"
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "summary": "System level operations",
      "description": "System level operations",
      "get": {
        "summary": "Search all resources of all types based on a set of criteria",
        "operationId": "searchAll",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Bundle"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      },
      "put": {
        "summary": "Batch or Transaction",
        "operationId": "transaction",
        "requestBody": {
          "description": "The batch or transaction",
          "required": true,
          "content": {
            "application/fhir+json": {
              "schema": {
                "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Bundle"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/OperationOutcome"
                }
              }
            }
          },
          "200": {
            "description": "Batch or Transaction response",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://hl7.org/fhir/R4/fhir.schema.json#/definitions/Bundle"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "rid": {
        "name": "rid",
        "in": "path",
        "description": "id of the resource (\u003dResource.id)",
        "required": true,
        "allowEmptyValue": false,
        "style": "simple",
        "schema": {
          "type": "string"
        }
      },
      "hid": {
        "name": "hid",
        "in": "path",
        "description": "id of the history entry (\u003dResource.meta.versionId)",
        "required": true,
        "allowEmptyValue": false,
        "style": "simple",
        "schema": {
          "type": "string"
        }
      },
      "summary": {
        "name": "_summary",
        "in": "query",
        "description": "Requests the server to return a designated subset of the resource",
        "allowEmptyValue": true,
        "style": "form",
        "schema": {
          "type": "string",
          "enum": [
            "true",
            "text",
            "data",
            "count",
            "false"
          ]
        }
      },
      "format": {
        "name": "_format",
        "in": "query",
        "description": "Specify alternative response formats by their MIME-types (when a client is unable acccess accept: header)",
        "allowEmptyValue": true,
        "style": "form",
        "schema": {
          "type": "string",
          "format": "mime-type"
        }
      },
      "pretty": {
        "name": "_pretty",
        "in": "query",
        "description": "Ask for a pretty printed response for human convenience",
        "allowEmptyValue": true,
        "style": "form",
        "schema": {
          "type": "boolean"
        }
      },
      "elements": {
        "name": "_elements",
        "in": "query",
        "description": "Requests the server to return a collection of elements from the resource",
        "allowEmptyValue": true,
        "style": "form",
        "explode": false,
        "schema": {
          "type": "array",
          "format": "string",
          "items": {
            "format": "string"
          }
        }
      },
      "count": {
        "name": "_count",
        "in": "query",
        "description": "The maximum number of search results on a page. The server is not bound to return the number requested, but cannot return more",
        "schema": {
          "type": "number"
        }
      }
    }
  }
}