openapi: 3.0.3
x-capabilitystatement-url: https://fhir-ig.digital.health.nz/CapabilityStatement/HpiCapabilityStatement
x-capabilitystatement-id: HpiCapabilityStatement
info:
  version: 1.5.0
  title: This is the computable resource that describes the RESTful endpoint
  description: This is the computable resource that describes the RESTful endpoint
  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/hpi
  description: FHIR Implementation Guide
servers:
  - url: https://api.hip.digital.health.nz/fhir/hpi/v1/
    description: The HPI endpoint
paths:
  /Practitioner/{rid}:
    get:
      summary: Read Practitioner
      description: GET,  [base]/Practitioner[cpn],  Retrieves a Practitioner resource
        by Id, system/Practitioner.r
      tags:
        - Practitioner
      operationId: readPractitioner
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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
        - description: Resource id
          name: rid
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful read operation
          content:
            application/json:
              schema:
                anyOf:
                  - &a1
                    type: object
                    properties:
                      resourceType:
                        type: string
                        enum:
                          - Practitioner
                      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.


                            Modifier 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: An identifier that applies to this person in this role.
                          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.


                                    The 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.
                      name:
                        type: array
                        items:
                          description: The name(s) associated with the practitioner.
                          type: object
                          properties:
                            use:
                              type: string
                              enum:
                                - usual
                                - official
                                - temp
                                - nickname
                                - anonymous
                                - old
                                - maiden
                              description: Identifies the purpose for this name.
                            text:
                              type: string
                              pattern: "[ \\r\\n\\t\\S]+"
                              description: Specifies the entire name as it should be displayed e.g. on an
                                application UI. This may be provided instead of
                                or as well as the specific parts.
                            family:
                              type: string
                              pattern: "[ \\r\\n\\t\\S]+"
                              description: The part of a name that links to the genealogy. In some cultures
                                (e.g. Eritrea) the family name of a son is the
                                first name of his father.
                            given:
                              type: array
                              items:
                                type: string
                                pattern: "[ \\r\\n\\t\\S]+"
                                description: Given name.
                            prefix:
                              type: array
                              items:
                                type: string
                                pattern: "[ \\r\\n\\t\\S]+"
                                description: Part of the name that is acquired as a title due to academic,
                                  legal, employment or nobility status, etc. and
                                  that appears at the start of the name.
                            suffix:
                              type: array
                              items:
                                type: string
                                pattern: "[ \\r\\n\\t\\S]+"
                                description: Part of the name that is acquired as a title due to academic,
                                  legal, employment or nobility status, etc. and
                                  that appears at the end of the name.
                            period:
                              description: Indicates the period of time when this name was valid for the named
                                person.
                              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.
                      gender:
                        type: string
                        enum:
                          - male
                          - female
                          - other
                          - unknown
                        description: Administrative Gender &ndash; the gender that the person is
                          considered to have for administration and record
                          keeping purposes.
                      birthDate:
                        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 of birth for the practitioner.
                      qualification:
                        type: array
                        items:
                          description: The official certifications, training, and licenses that authorize
                            or otherwise pertain to the provision of care by the
                            practitioner.  For example, a medical license issued
                            by a medical board authorizing the practitioner to
                            practice medicine within a certian locality.
                          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.


                                  Modifier 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: An identifier that applies to this person's qualification in this
                                  role.
                                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.


                                          The 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.
                            code:
                              description: Coded representation of the qualification.
                              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.
                            period:
                              description: Period during which the qualification is valid.
                              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.
                            issuer:
                              description: Organization that regulates and issues the qualification.
                              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.


                                    The 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
                      communication:
                        type: array
                        items:
                          description: A language the practitioner can use in patient communication.
                          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:
                      - resourceType
                    description: http://hl7.org.nz/fhir/StructureDefinition/HPIPractitioner
                  - *a1
              examples: &a7
                Practitioner-90ZZLP: &a110
                  value: &a3
                    resourceType: Practitioner
                    id: 90ZZLP
                    meta: &a8
                      versionId: "9971"
                      lastUpdated: 2022-04-07T09:12:26.000+12:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPIPractitioner
                      security:
                        - code: REDACTED
                          system: http://terminology.hl7.org/CodeSystem/v3-ObservationValue
                        - code: R
                          system: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
                    identifier: &a9
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-person-id
                        value: 90ZZLP
                        assigner:
                          reference: Organization/G00001-G
                Practitioner-91ZABY: &a112
                  value: &a4
                    resourceType: Practitioner
                    id: 91ZABY
                    meta: &a10
                      versionId: "10952"
                      lastUpdated: 2022-12-20T09:27:27.000+13:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPIPractitioner
                      security:
                        - code: L
                          system: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
                    extension: &a11
                      - url: http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity
                        valueCodeableConcept:
                          coding:
                            - version: "2.0"
                              code: "11111"
                              system: https://standards.digital.health.nz/ns/ethnic-group-level-4-code
                              display: New Zealand European
                          text: New Zealand European
                      - url: http://hl7.org.nz/fhir/StructureDefinition/educational-qualification
                        extension:
                          - url: fullname
                            valueString: Bachelor of Occupational Therapy
                          - url: year
                            valueDate: "2009"
                          - url: institution
                            valueString: Wintec
                          - url: city
                            valueString: HAMILTON
                          - url: country
                            valueString: NZ
                      - url: http://hl7.org.nz/fhir/StructureDefinition/educational-qualification
                        extension:
                          - url: fullname
                            valueString: Master of Occupational Therapy
                          - url: year
                            valueDate: "2019"
                          - url: institution
                            valueString: Otago Polytechnic
                          - url: city
                            valueString: DUNEDIN
                          - url: country
                            valueString: NZ
                    identifier: &a12
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-person-id
                        value: 91ZABY
                        assigner:
                          reference: Organization/G00001-G
                      - use: official
                        system: https://standards.digital.health.nz/ns/occupational-therapy-board-id
                        value: 96-20154
                        assigner:
                          reference: Organization/G00000-E
                    name: &a13
                      - use: official
                        family: Rhode
                        given:
                          - Lyndi
                          - Jane
                        prefix:
                          - ms
                    gender: female
                    birthDate: 1975-01-19
                    qualification: &a14
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/registration-status-code
                            extension:
                              - url: status
                                valueCodeableConcept:
                                  coding:
                                    - version: "2.0"
                                      code: current
                                      system: https://standards.digital.health.nz/ns/practitioner-registration-status-code
                                      display: A provider who holds or is deemed to hold a current practising
                                        certificate.
                                  text: A provider who holds or is deemed to hold a current practising
                                    certificate.
                              - url: period
                                valuePeriod:
                                  start: 2009-02-01
                          - url: http://hl7.org.nz/fhir/StructureDefinition/scope-of-practice
                            extension:
                              - url: code
                                valueCodeableConcept:
                                  coding:
                                    - version: 1.0.0
                                      code: OCCT
                                      system: https://standards.digital.health.nz/ns/practitioner-scope-of-practice-code
                                      display: Occupational Therapist
                                  text: Occupational Therapist
                              - url: period
                                valuePeriod:
                                  start: 2009-02-01
                          - url: http://hl7.org.nz/fhir/StructureDefinition/condition-on-practice
                            extension:
                              - url: description
                                valueString: Must complete annual eye test
                              - url: period
                                valuePeriod:
                                  start: 2019-09-19
                          - url: http://hl7.org.nz/fhir/StructureDefinition/registration-initial-date
                            valueDate: 2009-02-01
                        identifier:
                          - use: official
                            system: https://standards.digital.health.nz/ns/occupational-therapy-board-id
                            value: 96-20154
                            assigner:
                              reference: Organization/G00000-E
                        code:
                          coding:
                            - version: "2.0"
                              code: OT
                              system: https://standards.digital.health.nz/ns/practitioner-registration-authority-code
                              display: Occupational Therapy Board Register
                          text: Occupational Therapy Board Register
                        period:
                          start: 2021-04-01
                          end: 2022-03-31
                        issuer:
                          reference: Organization/G00000-E
                    communication: &a15
                      - coding:
                          - version: "2007"
                            code: eng
                            system: urn:iso:std:iso:639:-3
                            display: English
                        text: English
                Practitioner-92ZZRE: &a114
                  value: &a5
                    resourceType: Practitioner
                    id: 92ZZRE
                    meta: &a16
                      versionId: "10673"
                      lastUpdated: 2022-10-14T08:04:23.000+13:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPIPractitioner
                      security:
                        - code: M
                          system: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
                    identifier: &a17
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-person-id
                        value: 92ZZRE
                        assigner:
                          reference: Organization/G00001-G
                    name: &a18
                      - use: official
                        family: O'Reilly
                        given:
                          - Walter
                          - Eugene
                        prefix:
                          - cpl
                      - use: old
                        given:
                          - Radar
                    communication: &a19
                      - coding:
                          - version: "2007"
                            code: eng
                            system: urn:iso:std:iso:639:-3
                            display: English
                        text: English
                Practitioner-98ZZQJ: &a116
                  value: &a6
                    resourceType: Practitioner
                    id: 98ZZQJ
                    meta: &a20
                      versionId: "10594"
                      lastUpdated: 2022-08-30T14:34:08.000+12:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPIPractitioner
                      security:
                        - code: L
                          system: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
                    extension: &a21
                      - url: http://hl7.org.nz/fhir/StructureDefinition/educational-qualification
                        extension:
                          - url: fullname
                            valueString: Bachelor of Midwifery
                          - url: year
                            valueDate: "2019"
                          - url: institution
                            valueString: Auckland University of Technology
                          - url: city
                            valueString: AUCKLAND
                          - url: country
                            valueString: NZ
                      - url: http://hl7.org.nz/fhir/StructureDefinition/educational-qualification
                        extension:
                          - url: fullname
                            valueString: Bachelor of Nursing (Maori)
                          - url: year
                            valueDate: "2009"
                          - url: institution
                            valueString: Whitireia Polytechnic
                          - url: city
                            valueString: PALMERSTON NORTH
                          - url: country
                            valueString: NZ
                    identifier: &a22
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-person-id
                        value: 98ZZQJ
                        assigner:
                          reference: Organization/G00001-G
                      - use: old
                        system: https://standards.digital.health.nz/ns/hpi-person-id
                        value: 90ZZGJ
                        assigner:
                          reference: Organization/G00001-G
                      - use: official
                        system: https://standards.digital.health.nz/ns/nursing-council-id
                        value: "962054"
                        assigner:
                          reference: Organization/G00008-K
                      - use: official
                        system: https://standards.digital.health.nz/ns/midwifery-council-id
                        value: "95579"
                        assigner:
                          reference: Organization/G00009-A
                    name: &a23
                      - use: official
                        family: Nurse-Midwife
                        given:
                          - TestTwo
                          - Tworegistrations
                        prefix:
                          - mrs
                    qualification: &a24
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/registration-status-code
                            extension:
                              - url: status
                                valueCodeableConcept:
                                  coding:
                                    - version: "2.0"
                                      code: current
                                      system: https://standards.digital.health.nz/ns/practitioner-registration-status-code
                                      display: A provider who holds or is deemed to hold a current practising
                                        certificate.
                                  text: A provider who holds or is deemed to hold a current practising
                                    certificate.
                              - url: period
                                valuePeriod:
                                  start: 2019-02-01
                                  end: 2026-02-01
                          - url: http://hl7.org.nz/fhir/StructureDefinition/scope-of-practice
                            extension:
                              - url: code
                                valueCodeableConcept:
                                  coding:
                                    - version: 1.0.0
                                      code: NCRN
                                      system: https://standards.digital.health.nz/ns/practitioner-scope-of-practice-code
                                      display: Registered Nurse
                                  text: Registered Nurse
                              - url: period
                                valuePeriod:
                                  start: 2009-04-08
                                  end: 2029-03-27
                          - url: http://hl7.org.nz/fhir/StructureDefinition/condition-on-practice
                            extension:
                              - url: description
                                valueString: NCRN Must have a competence assessment completed by a senior nurse
                                  within three months
                              - url: period
                                valuePeriod:
                                  start: 2009-04-08
                          - url: http://hl7.org.nz/fhir/StructureDefinition/registration-initial-date
                            valueDate: 2009-02-01
                        identifier:
                          - use: official
                            system: https://standards.digital.health.nz/ns/nursing-council-id
                            value: "962054"
                            assigner:
                              reference: Organization/G00008-K
                        code:
                          coding:
                            - version: "2.0"
                              code: NC
                              system: https://standards.digital.health.nz/ns/practitioner-registration-authority-code
                              display: Nursing Council of New Zealand Register
                          text: Nursing Council of New Zealand Register Number
                        period:
                          start: 2019-02-01
                          end: 2026-02-01
                        issuer:
                          reference: Organization/G00008-K
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/registration-status-code
                            extension:
                              - url: status
                                valueCodeableConcept:
                                  coding:
                                    - version: "2.0"
                                      code: current
                                      system: https://standards.digital.health.nz/ns/practitioner-registration-status-code
                                      display: A provider who holds or is deemed to hold a current practising
                                        certificate.
                                  text: A provider who holds or is deemed to hold a current practising
                                    certificate.
                              - url: period
                                valuePeriod:
                                  start: 2020-12-10
                                  end: 2023-12-11
                          - url: http://hl7.org.nz/fhir/StructureDefinition/scope-of-practice
                            extension:
                              - url: code
                                valueCodeableConcept:
                                  coding:
                                    - version: 1.0.0
                                      code: NCRN
                                      system: https://standards.digital.health.nz/ns/practitioner-scope-of-practice-code
                                      display: Registered Nurse
                                  text: Registered Nurse
                              - url: period
                                valuePeriod:
                                  start: 2019-04-08
                                  end: 2022-04-11
                          - url: http://hl7.org.nz/fhir/StructureDefinition/scope-of-practice
                            extension:
                              - url: code
                                valueCodeableConcept:
                                  coding:
                                    - version: 1.0.0
                                      code: MWIF
                                      system: https://standards.digital.health.nz/ns/practitioner-scope-of-practice-code
                                      display: Midwife
                                  text: Midwife
                              - url: period
                                valuePeriod:
                                  start: 2019-04-08
                                  end: 2025-04-11
                          - url: http://hl7.org.nz/fhir/StructureDefinition/condition-on-practice
                            extension:
                              - url: description
                                valueString: NCRN Must have a competence assessment completed by a senior nurse
                                  within three months
                              - url: period
                                valuePeriod:
                                  start: 2019-04-08
                          - url: http://hl7.org.nz/fhir/StructureDefinition/registration-initial-date
                            valueDate: 2020-02-01
                        identifier:
                          - use: official
                            system: https://standards.digital.health.nz/ns/midwifery-council-id
                            value: "95579"
                            assigner:
                              reference: Organization/G00009-A
                        code:
                          coding:
                            - version: "2.0"
                              code: MW
                              system: https://standards.digital.health.nz/ns/practitioner-registration-authority-code
                              display: Midwifery Council Register
                          text: Midwifery Council Register Number
                        period:
                          start: 2020-12-10
                          end: 2022-12-11
                        issuer:
                          reference: Organization/G00009-A
                    communication: &a25
                      - coding:
                          - version: "2007"
                            code: eng
                            system: urn:iso:std:iso:639:-3
                            display: English
                        text: English
                      - coding:
                          - version: "2007"
                            code: eng
                            system: urn:iso:std:iso:639:-3
                            display: English
                        text: English
        "400":
          description: Unsuccessful read operation - 400
          content:
            application/json:
              schema: &a2
                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.


                        Modifier 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.


                              Modifier 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. 


                              For 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 read operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful read operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful read operation - 500
          content:
            application/json:
              schema: *a2
      security:
        - smartOnFhir:
            - system/Practitioner.r
  /Practitioner:
    get:
      summary: Search for Practitioner
      description: "GET,[base]/Practitioner, Queries against the Practitioner using
        name and other search parameters. Will return a Bundle (even if there
        are no matching resources),system/Practitioner.s "
      tags:
        - Practitioner
      operationId: searchPractitioner
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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: identifier
          in: query
          schema:
            type: string
        - name: name
          in: query
          schema:
            type: string
        - name: gender
          in: query
          schema:
            type: string
        - name: birthdate
          in: query
          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:
                            - *a1
                            - *a1
                        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.hip.digital.health.nz/fhir/hpi/v1//Practitioner/90ZZLP
                        resource: *a3
                        search:
                          mode: match
                      - fullUrl: https://api.hip.digital.health.nz/fhir/hpi/v1//Practitioner/91ZABY
                        resource: *a4
                        search:
                          mode: match
                      - fullUrl: https://api.hip.digital.health.nz/fhir/hpi/v1//Practitioner/92ZZRE
                        resource: *a5
                        search:
                          mode: match
                      - fullUrl: https://api.hip.digital.health.nz/fhir/hpi/v1//Practitioner/98ZZQJ
                        resource: *a6
                        search:
                          mode: match
        "400":
          description: Unsuccessful search operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful search operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful search operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful search operation - 500
          content:
            application/json:
              schema: *a2
      security:
        - smartOnFhir:
            - system/Practitioner.s
    post:
      summary: Create Practitioner
      description: POST',[base]/Practitioner, Creates a new Practitioner record ,
        system/Practitioner.c
      tags:
        - Practitioner
      operationId: createPractitioner
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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
      responses:
        "201":
          description: Successful create operation
          content:
            application/json:
              schema:
                anyOf:
                  - *a1
                  - *a1
              examples: *a7
        "400":
          description: Unsuccessful create operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful create operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful create operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful create operation - 500
          content:
            application/json:
              schema: *a2
      requestBody:
        description: Practitioner to create
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - *a1
                - *a1
            examples:
              Practitioner-90ZZLP-create: &a111
                value:
                  resourceType: Practitioner
                  meta: *a8
                  identifier: *a9
              Practitioner-91ZABY-create: &a113
                value:
                  resourceType: Practitioner
                  meta: *a10
                  extension: *a11
                  identifier: *a12
                  name: *a13
                  gender: female
                  birthDate: 1975-01-19
                  qualification: *a14
                  communication: *a15
              Practitioner-92ZZRE-create: &a115
                value:
                  resourceType: Practitioner
                  meta: *a16
                  identifier: *a17
                  name: *a18
                  communication: *a19
              Practitioner-98ZZQJ-create: &a117
                value:
                  resourceType: Practitioner
                  meta: *a20
                  extension: *a21
                  identifier: *a22
                  name: *a23
                  qualification: *a24
                  communication: *a25
      security:
        - smartOnFhir:
            - system/Practitioner.c
  /metadata:
    get:
      summary: Get CapabilityStatement
      description: Returns the FHIR CapabilityStatement for this server
      tags:
        - metadata
      operationId: getCapabilityStatement
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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
      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.


                        Modifier 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.


                                The 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.


                            Modifier 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.


                            Modifier 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.


                              The 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.


                              Modifier 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.


                                  Modifier 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.


                                    Modifier 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.


                                          Modifier 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.


                                          Modifier 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.


                                          Modifier 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.


                                    Modifier 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.


                                    Modifier 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.


                                    Modifier 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.


                              Modifier 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.


                                    Modifier 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.


                                    Modifier 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.


                              Modifier 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: HpiCapabilityStatement
                    meta:
                      profile:
                        - https://fhir-ig.digital.health.nz/hnz-digital-tooling/StructureDefinition/hnz-capability-statement
                    url: https://fhir-ig.digital.health.nz/CapabilityStatement/HpiCapabilityStatement
                    title: Capability Statement describing HPI FHIR APIs
                    description: This is the computable resource that describes the RESTful endpoint
                    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/hpi
                          - url: licenseName
                            valueString: Health New Zealand Digital Services Hub API Access and Use
                              Agreement
                          - extension:
                              - url: https://fhir-ig.digital.health.nz/hnz-digital-tooling/StructureDefinition/custom-headers-extension
                                extension:
                                  - url: key
                                    valueString: Correlation-Id
                                  - url: value
                                    valueUri: https://raw.githubusercontent.com/tewhatuora/schemas/main/shared-care/Correlation-Id.json
                                  - url: required
                                    valueBoolean: false
                              - 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: >-
                                      A base64-encoded JSON object that defines
                                      the context of the current request.

                                      See
                                      https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
                                      for the schema this object must conform
                                      to.
                                url: https://fhir-ig.digital.health.nz/hnz-digital-tooling/StructureDefinition/custom-headers-extension
                            url: globalHeaders
                    name: HPI_CapabilityStatement
                    date: 2020-04-01
                    status: draft
                    kind: instance
                    fhirVersion: 4.0.1
                    format:
                      - json
                    version: 1.5.0
                    implementation:
                      description: The HPI endpoint
                      url: https://api.hip.digital.health.nz/fhir/hpi/v1/
                    contact:
                      - name: Health New Zealand Te Whatu Ora
                        telecom:
                          - value: https://www.tewhatuora.govt.nz
                            system: url
                    rest:
                      - mode: server
                        security:
                          cors: true
                          service:
                            - coding:
                                - code: SMART-on-FHIR
                          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: http://fhir-registry.smarthealthit.org/StructureDefinition/capabilities
                              valueCode: client-confidential-symmetric
                        resource:
                          - type: Practitioner
                            supportedProfile:
                              - http://hl7.org.nz/fhir/StructureDefinition/HPIPractitioner
                            profile: http://hl7.org.nz/fhir/StructureDefinition/HPIPractitioner
                            documentation: |+
                              Practitioner query

                            interaction:
                              - code: read
                                documentation: GET,  [base]/Practitioner[cpn],  Retrieves a Practitioner
                                  resource by Id, system/Practitioner.r
                              - code: search-type
                                documentation: "GET,[base]/Practitioner, Queries against the Practitioner using
                                  name and other search parameters. Will return
                                  a Bundle (even if there are no matching
                                  resources),system/Practitioner.s "
                              - code: create
                                documentation: POST',[base]/Practitioner, Creates a new Practitioner record ,
                                  system/Practitioner.c
                            searchParam:
                              - name: identifier
                                type: token
                                documentation: For searching a Practitioner resource using their council/board
                                  registration number
                              - name: name
                                type: string
                                documentation: Should contain the person’s full name, include all given names
                                  and family name.
                              - name: gender
                                type: token
                                documentation: Use with name and birthdate. Search by gender alone is not
                                  allowed.
                              - name: birthdate
                                type: date
                                documentation: Use with name and gender. Search by birthdate alone is not
                                  allowed.
                            operation:
                              - name: update-core
                                definition: https://hpi-ig.hip.digital.health.nz/OperationDefinition/practitioner-update-core
                                documentation: POST, [base]/Practitioner[cpn],An operation that updates a health
                                  providers demographic
                                  details,  system/Practitioner.u
                          - type: PractitionerRole
                            supportedProfile:
                              - http://hl7.org.nz/fhir/StructureDefinition/HPIPractitionerRole
                            documentation: |
                              PractitionerRole query
                            interaction:
                              - code: read
                                documentation: GET, [base]/PractitionerRole[id], Used to retrieve a
                                  PractitionerRole resource by Id,
                                  system/PractitionerRole.r
                              - code: search-type
                                documentation: GET, [base]/PractitionerRole, Queries against PractitionerRole
                                  using hpi-person-id and other parameters. Will
                                  return a Bundle (even if there are no matching
                                  resources), system/PractitionerRole.s
                              - code: create
                                documentation: POST, [base]/PractitionerRole, Create a new PractitionerRole,
                                  system/PractitionerRole.c
                              - code: update
                                documentation: PUT, [base]/PractitionerRole[id], Update contact details and end
                                  date on an existing PractitionerRole record,
                                  system/PractitionerRole.u
                            searchParam:
                              - name: practitioner
                                type: reference
                                documentation: Given an hpi-person-id, returns the PractitionerRole records
                                  associated with that id
                              - name: organization
                                type: reference
                                documentation: Not yet enabled. Given an hpi-organization-id, returns the
                                  PractitionerRole records associated with that
                                  id
                              - name: location
                                type: token
                                documentation: Given an hpi-facility-id, returns the PractitionerRole records
                                  associated with that id
                              - name: role
                                type: token
                                documentation: Returns PractitionerRole records based on role code
                              - name: active
                                type: token
                                documentation: To enable exclusion of inactive PractitionerRole records
                            searchInclude:
                              - practitioner
                              - organization
                              - location
                          - type: Organization
                            supportedProfile:
                              - http://hl7.org.nz/fhir/StructureDefinition/HPIOrganization
                            documentation: |
                              Organization query
                            interaction:
                              - code: read
                                documentation: GET, [base]/Organization/[hpi-org-id], Used to retrieve an
                                  Organization resource by Id,
                                  system/Organization.r
                              - code: search-type
                                documentation: GET, [base]/Organization, Queries against the Organization using
                                  name or other parameters. Will return a Bundle
                                  (even if there are no matching resources),
                                  system/Organization.s
                            searchParam:
                              - name: active
                                type: token
                                documentation: To enable exclusion of inactive organizations
                              - name: name
                                type: string
                                documentation: For searching using the organisation’s name or an alias name
                              - name: identifier
                                type: token
                                documentation: For searching using an organisation’s New Zealand Business Number
                                  (NZBN) or their legacy NZHIS agency code.
                              - name: type
                                type: token
                                documentation: For searching using an organisation's type E.g. DHB, RA,
                                  Educational institution
                              - name: partOf
                                type: reference
                                documentation: For retrieving organizations that are 'part of' another.
                          - type: Location
                            supportedProfile:
                              - http://hl7.org.nz/fhir/StructureDefinition/HPILocation
                            documentation: Location query
                            interaction:
                              - code: read
                                documentation: GET, [base]/Location/[hpi-facid], Used to retrieve an Location
                                  resource by Id, system/Location.r
                              - code: search-type
                                documentation: GET, [base]/Location, Queries against the Location using name or
                                  other parameters. Will return a Bundle (even
                                  if there are no matching resources),
                                  system/Location.s
                            searchParam:
                              - name: identifier
                                type: token
                                documentation: For searching using an organization’s legacy NZHIS facility code.
                              - name: name
                                type: string
                                documentation: For searching using the Locations name or alias name
                              - name: type
                                type: token
                                documentation: Retrieve Locations of the given type
                              - name: address
                                type: string
                                documentation: Retrieve the Locations by address
                              - name: organization
                                type: reference
                                documentation: Retrieve Locations with the given ManagingOrganization
                              - name: dhb
                                type: token
                                documentation: Searching for Locations that are in a DHBs catchment area.
                              - name: status
                                type: token
                                documentation: Not yet enabled. To enable exclusion of inactive locations
                              - name: messaging-address
                                type: string
                                documentation: Search by EDI address
  /Practitioner/{rid}/$update-core:
    post:
      summary: "Update Core "
      description: Updates a health provider's name, birthdate, death-date
      tags:
        - Practitioner
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                      - Practitioner
                  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.


                        Modifier 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: An identifier that applies to this person in this role.
                      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.


                                The 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.
                  active:
                    type: boolean
                    description: Whether this practitioner's record is in active use.
                  name:
                    type: array
                    items:
                      description: The name(s) associated with the practitioner.
                      type: object
                      properties:
                        use:
                          type: string
                          enum:
                            - usual
                            - official
                            - temp
                            - nickname
                            - anonymous
                            - old
                            - maiden
                          description: Identifies the purpose for this name.
                        text:
                          type: string
                          pattern: "[ \\r\\n\\t\\S]+"
                          description: Specifies the entire name as it should be displayed e.g. on an
                            application UI. This may be provided instead of or
                            as well as the specific parts.
                        family:
                          type: string
                          pattern: "[ \\r\\n\\t\\S]+"
                          description: The part of a name that links to the genealogy. In some cultures
                            (e.g. Eritrea) the family name of a son is the first
                            name of his father.
                        given:
                          type: array
                          items:
                            type: string
                            pattern: "[ \\r\\n\\t\\S]+"
                            description: Given name.
                        prefix:
                          type: array
                          items:
                            type: string
                            pattern: "[ \\r\\n\\t\\S]+"
                            description: Part of the name that is acquired as a title due to academic,
                              legal, employment or nobility status, etc. and
                              that appears at the start of the name.
                        suffix:
                          type: array
                          items:
                            type: string
                            pattern: "[ \\r\\n\\t\\S]+"
                            description: Part of the name that is acquired as a title due to academic,
                              legal, employment or nobility status, etc. and
                              that appears at the end of the name.
                        period:
                          description: Indicates the period of time when this name was valid for the named
                            person.
                          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.
                  telecom:
                    type: array
                    items:
                      description: A contact detail for the practitioner, e.g. a telephone number or
                        an email address.
                      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.
                  address:
                    type: array
                    items:
                      description: "Address(es) of the practitioner that are not role specific
                        (typically home address). \rWork addresses are not
                        typically entered in this property as they are usually
                        role dependent."
                      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.
                  gender:
                    type: string
                    enum:
                      - male
                      - female
                      - other
                      - unknown
                    description: Administrative Gender &ndash; the gender that the person is
                      considered to have for administration and record keeping
                      purposes.
                  birthDate:
                    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 of birth for the practitioner.
                  photo:
                    type: array
                    items:
                      description: Image of the person.
                      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.
                  qualification:
                    type: array
                    items:
                      description: The official certifications, training, and licenses that authorize
                        or otherwise pertain to the provision of care by the
                        practitioner.  For example, a medical license issued by
                        a medical board authorizing the practitioner to practice
                        medicine within a certian locality.
                      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.


                              Modifier 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: An identifier that applies to this person's qualification in this
                              role.
                            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.


                                      The 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.
                        code:
                          description: Coded representation of the qualification.
                          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.
                        period:
                          description: Period during which the qualification is valid.
                          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.
                        issuer:
                          description: Organization that regulates and issues the qualification.
                          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.


                                The 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
                  communication:
                    type: array
                    items:
                      description: A language the practitioner can use in patient communication.
                      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:
                  - resourceType
        "400":
          description: Unsuccessful Update Core  operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful Update Core  operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful Update Core  operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful Update Core  operation - 500
          content:
            application/json:
              schema: *a2
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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
        - description: Resource id
          name: rid
          in: path
          required: true
          schema:
            type: string
      security:
        - smartOnFhir:
            - https://hpi-ig.hip.digital.health.nz/OperationDefinition/practitioner-update-core
      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-update-core-Practitioner-instance
  /PractitionerRole/{rid}:
    get:
      summary: Read PractitionerRole
      description: GET, [base]/PractitionerRole[id], Used to retrieve a
        PractitionerRole resource by Id, system/PractitionerRole.r
      tags:
        - PractitionerRole
      operationId: readPractitionerRole
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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
        - description: Resource id
          name: rid
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful read operation
          content:
            application/json:
              schema:
                anyOf:
                  - &a26
                    type: object
                    properties:
                      resourceType:
                        type: string
                        enum:
                          - PractitionerRole
                      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.


                            Modifier 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: Business Identifiers that are specific to a role/location.
                          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.


                                    The 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.
                      active:
                        type: boolean
                        description: Whether this practitioner role record is in active use.
                      period:
                        description: The period during which the person is authorized to act as a
                          practitioner in these role(s) for the organization.
                        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.
                      practitioner:
                        description: Practitioner that is able to provide the defined services for the
                          organization.
                        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.


                              The 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.
                      organization:
                        description: The organization where the Practitioner performs the roles
                          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.


                              The 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.
                      code:
                        type: array
                        items:
                          description: Roles which this practitioner is authorized to perform for the
                            organization.
                          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.
                        maxItems: 1
                      location:
                        type: array
                        items:
                          description: The location(s) at which this practitioner provides care.
                          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.


                                The 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
                      telecom:
                        type: array
                        items:
                          description: Contact details that are specific to the role/location/service.
                          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.
                      availableTime:
                        type: object
                        properties: {}
                    required:
                      - resourceType
                    description: http://hl7.org.nz/fhir/StructureDefinition/HPIPractitionerRole
              examples: &a27
                PractitionerRole-R00000012-G: &a28
                  value: &a31
                    resourceType: PractitionerRole
                    id: R00000012-G
                    meta: &a34
                      versionId: "13"
                      lastUpdated: 2022-11-21T17:02:33.184+13:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPIPractitionerRole
                      security:
                        - code: M
                          system: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
                    extension: &a35
                      - url: http://hl7.org.nz/fhir/StructureDefinition/practitionerRole-status-reason
                        valueCodeableConcept:
                          coding:
                            - version: 1.0.0
                              code: other
                              system: https://standards.digital.health.nz/ns/hpi-practitioner-role-status-reason-code
                              display: other
                          text: other
                      - url: http://hl7.org.nz/fhir/StructureDefinition/practitionerRole-creator
                        extension:
                          - url: person
                            valueReference:
                              reference: Person/testall
                          - url: organization
                            valueReference:
                              reference: Organization/G00001-G
                      - url: http://hl7.org.nz/fhir/StructureDefinition/messaging-address
                        extension:
                          - url: provider
                            valueString: healthlink
                          - url: value
                            valueString: changed-edi-address
                    identifier: &a36
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-practitionerrole-id
                        value: R00000012-G
                        assigner:
                          reference: Organization/G00001-G
                    active: false
                    period: &a37
                      start: 2000-02-10
                      end: 2000-02-11
                    practitioner: &a38
                      reference: Practitioner/90ZZLP
                    organization: &a39
                      reference: Organization/GZZ998-G
                    code: &a40
                      - coding:
                          - version: "1.2"
                            code: "542114"
                            system: http://www.abs.gov.au/ausstats/abs@.nsf/mf/1220.0
                            display: Medical Receptionist
                        text: Medical Receptionist
                    location: &a41
                      - reference: Location/FZZ999-B
                    telecom: &a42
                      - system: phone
                        value: "1324654788"
                        use: work
                        rank: 1
                        period:
                          start: 2000-02-10
                          end: 2010-05-05
                      - system: email
                        value: infoooor@infooooor.com
                        use: work
                        rank: 2
                        period:
                          start: 2000-02-10
                          end: 2010-05-06
                PractitionerRole-R00000015-C: &a29
                  value: &a32
                    resourceType: PractitionerRole
                    id: R00000015-C
                    meta: &a43
                      versionId: "1"
                      lastUpdated: 2022-09-01T15:21:57.885+12:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPIPractitionerRole
                      security:
                        - code: R
                          system: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
                        - code: REDACTED
                          system: http://terminology.hl7.org/CodeSystem/v3-ObservationValue
                    identifier: &a44
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-practitionerrole-id
                        value: R00000015-C
                        assigner:
                          reference: Organization/G00001-G
                    active: false
                    practitioner: &a45
                      reference: Practitioner/99ZZZS
                    code: &a46
                      - coding:
                          - version: "1.2"
                            code: "323112"
                            system: http://www.abs.gov.au/ausstats/abs@.nsf/mf/1220.0
                            display: Aircraft Maintenance Engineer (Mechanical)
                        text: Aircraft Maintenance Engineer (Mechanical)
                PractitionerRole-R00000029-P: &a30
                  value: &a33
                    resourceType: PractitionerRole
                    id: R00000029-P
                    meta: &a47
                      versionId: "4"
                      lastUpdated: 2022-11-23T11:10:39.516+13:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPIPractitionerRole
                      security:
                        - code: M
                          system: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
                    extension: &a48
                      - url: http://hl7.org.nz/fhir/StructureDefinition/practitionerRole-creator
                        extension:
                          - url: person
                            valueReference:
                              reference: Person/testall
                          - url: organization
                            valueReference:
                              reference: Organization/G00001-G
                      - url: http://hl7.org.nz/fhir/StructureDefinition/messaging-address
                        extension:
                          - url: provider
                            valueString: healthlink
                          - url: value
                            valueString: changed-edi-address
                    identifier: &a49
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-practitionerrole-id
                        value: R00000029-P
                        assigner:
                          reference: Organization/G00001-G
                    active: true
                    period: &a50
                      start: 2011-05-06
                    practitioner: &a51
                      reference: Practitioner/90ZZLP
                    organization: &a52
                      reference: Organization/GZZ998-G
                    code: &a53
                      - coding:
                          - version: "1.2"
                            code: "542111"
                            system: http://www.abs.gov.au/ausstats/abs@.nsf/mf/1220.0
                            display: Receptionist (General)
                        text: Receptionist (General)
                    location: &a54
                      - reference: Location/FZZ999-B
                    telecom: &a55
                      - system: phone
                        value: "1324654769"
                        use: work
                        rank: 1
                        period:
                          start: 2011-05-06
                      - system: email
                        value: saranya@test.com
                        use: work
                        rank: 2
                        period:
                          start: 2011-05-06
                      - system: url
                        value: 90ZZLP@contactme.com
                        use: work
                        rank: 1
                        period:
                          start: 2011-05-06
                      - system: sms
                        value: "1324654765"
                        use: work
                        rank: 1
                        period:
                          start: 2011-05-06
                      - system: phone
                        value: "1324654767"
                        use: work
                        rank: 3
                        period:
                          start: 2011-05-06
                      - system: phone
                        value: "1324654766"
                        use: temp
                        rank: 1
                        period:
                          start: 2011-05-06
                      - system: phone
                        value: "1324654768"
                        use: work
                        rank: 2
                        period:
                          start: 2011-05-06
        "400":
          description: Unsuccessful read operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful read operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful read operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful read operation - 500
          content:
            application/json:
              schema: *a2
      security:
        - smartOnFhir:
            - system/PractitionerRole.r
    put:
      summary: Update PractitionerRole
      description: PUT, [base]/PractitionerRole[id], Update contact details and end
        date on an existing PractitionerRole record, system/PractitionerRole.u
      tags:
        - PractitionerRole
      operationId: updatePractitionerRole
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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
        - description: Resource id
          name: rid
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful update operation
          content:
            application/json:
              schema:
                anyOf:
                  - *a26
              examples: *a27
        "400":
          description: Unsuccessful update operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful update operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful update operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful update operation - 500
          content:
            application/json:
              schema: *a2
      requestBody:
        description: PractitionerRole to create
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - *a26
            examples:
              PractitionerRole-R00000012-G: *a28
              PractitionerRole-R00000015-C: *a29
              PractitionerRole-R00000029-P: *a30
      security:
        - smartOnFhir:
            - system/PractitionerRole.u
  /PractitionerRole:
    get:
      summary: Search for PractitionerRole
      description: GET, [base]/PractitionerRole, Queries against PractitionerRole
        using hpi-person-id and other parameters. Will return a Bundle (even if
        there are no matching resources), system/PractitionerRole.s
      tags:
        - PractitionerRole
      operationId: searchPractitionerRole
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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: practitioner
          in: query
          schema:
            type: string
        - name: organization
          in: query
          schema:
            type: string
        - name: location
          in: query
          schema:
            type: string
        - name: role
          in: query
          schema:
            type: string
        - name: active
          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:
                            - *a26
                        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.hip.digital.health.nz/fhir/hpi/v1//PractitionerRole/R00000012-G
                        resource: *a31
                        search:
                          mode: match
                      - fullUrl: https://api.hip.digital.health.nz/fhir/hpi/v1//PractitionerRole/R00000015-C
                        resource: *a32
                        search:
                          mode: match
                      - fullUrl: https://api.hip.digital.health.nz/fhir/hpi/v1//PractitionerRole/R00000029-P
                        resource: *a33
                        search:
                          mode: match
        "400":
          description: Unsuccessful search operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful search operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful search operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful search operation - 500
          content:
            application/json:
              schema: *a2
      security:
        - smartOnFhir:
            - system/PractitionerRole.s
    post:
      summary: Create PractitionerRole
      description: POST, [base]/PractitionerRole, Create a new PractitionerRole,
        system/PractitionerRole.c
      tags:
        - PractitionerRole
      operationId: createPractitionerRole
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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
      responses:
        "201":
          description: Successful create operation
          content:
            application/json:
              schema:
                anyOf:
                  - *a26
              examples: *a27
        "400":
          description: Unsuccessful create operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful create operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful create operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful create operation - 500
          content:
            application/json:
              schema: *a2
      requestBody:
        description: PractitionerRole to create
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - *a26
            examples:
              PractitionerRole-R00000012-G-create: &a118
                value:
                  resourceType: PractitionerRole
                  meta: *a34
                  extension: *a35
                  identifier: *a36
                  active: false
                  period: *a37
                  practitioner: *a38
                  organization: *a39
                  code: *a40
                  location: *a41
                  telecom: *a42
              PractitionerRole-R00000015-C-create: &a119
                value:
                  resourceType: PractitionerRole
                  meta: *a43
                  identifier: *a44
                  active: false
                  practitioner: *a45
                  code: *a46
              PractitionerRole-R00000029-P-create: &a120
                value:
                  resourceType: PractitionerRole
                  meta: *a47
                  extension: *a48
                  identifier: *a49
                  active: true
                  period: *a50
                  practitioner: *a51
                  organization: *a52
                  code: *a53
                  location: *a54
                  telecom: *a55
      security:
        - smartOnFhir:
            - system/PractitionerRole.c
  /Organization/{rid}:
    get:
      summary: Read Organization
      description: GET, [base]/Organization/[hpi-org-id], Used to retrieve an
        Organization resource by Id, system/Organization.r
      tags:
        - Organization
      operationId: readOrganization
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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
        - description: Resource id
          name: rid
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful read operation
          content:
            application/json:
              schema:
                anyOf:
                  - &a56
                    type: object
                    properties:
                      resourceType:
                        type: string
                        enum:
                          - Organization
                      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.


                            Modifier 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: Identifier for the organization that is used to identify the
                            organization across multiple disparate systems.
                          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.


                                    The 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
                      active:
                        type: boolean
                        description: Whether the organization's record is still in active use.
                      type:
                        type: array
                        items:
                          description: The kind(s) of organization that this is.
                          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.
                      name:
                        type: string
                        pattern: "[ \\r\\n\\t\\S]+"
                        description: A name associated with the organization.
                      alias:
                        type: array
                        items:
                          type: string
                          pattern: "[ \\r\\n\\t\\S]+"
                          description: A list of alternate names that the organization is known as, or was
                            known as in the past.
                      telecom:
                        type: array
                        items:
                          description: A contact detail for 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.
                      partOf:
                        description: The organization of which this organization forms a part.
                        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.


                              The 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
                      - identifier
                    description: http://hl7.org.nz/fhir/StructureDefinition/HPIOrganization
              examples:
                Organization-GZZ956-B: &a93
                  value: &a57
                    resourceType: Organization
                    id: GZZ956-B
                    meta: &a94
                      versionId: "8910"
                      lastUpdated: 2022-04-05T15:04:16.000+12:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPIOrganization
                    extension: &a95
                      - url: http://hl7.org.nz/fhir/StructureDefinition/established
                        valuePeriod:
                          start: 2018-05-20
                    identifier: &a96
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-organisation-id
                        value: GZZ956-B
                        assigner:
                          reference: Organization/G00001-G
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-nzbn
                        value: "9999999999041"
                        assigner:
                          reference: Organization/MBIE
                    active: true
                    type: &a97
                      - coding:
                          - version: "1.1"
                            code: "999"
                            system: https://standards.digital.health.nz/ns/organisation-type-code
                            display: Other
                    name: Flat-Unit Address Org
                    alias: &a98
                      - Flat-Unit Address Org
                    _alias: &a99
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: legal
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Legal
                              text: Legal
                    telecom: &a100
                      - system: phone
                        value: 021 101010
                        use: work
                        rank: 1
                        period:
                          start: 1970-01-01
                Organization-GZZ991-D: &a101
                  value: &a58
                    resourceType: Organization
                    id: GZZ991-D
                    meta: &a102
                      versionId: "8961"
                      lastUpdated: 2022-04-05T15:04:28.000+12:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPIOrganization
                    extension: &a103
                      - url: http://hl7.org.nz/fhir/StructureDefinition/established
                        valuePeriod:
                          start: 2009-09-09
                    identifier: &a104
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-organisation-id
                        value: GZZ991-D
                        assigner:
                          reference: Organization/G00001-G
                      - use: official
                        system: https://standards.digital.health.nz/ns/nzhis-agency-id
                        value: "9006"
                        assigner:
                          reference: Organization/G00001-G
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-nzbn
                        value: "9999999999009"
                        assigner:
                          reference: Organization/MBIE
                    active: true
                    type: &a105
                      - coding:
                          - version: "1.1"
                            code: "008"
                            system: https://standards.digital.health.nz/ns/organisation-type-code
                            display: Education Institutions
                    name: Second Name
                    alias: &a106
                      - Wha Name
                      - Third Name
                      - Second Name
                      - Multiple Names Org
                    _alias: &a107
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: maori
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Māori
                              text: Māori
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: aka
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Aka
                              text: Aka
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: trade-as
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Trading as
                              text: Trading as
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: legal
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Legal
                              text: Legal
                    telecom: &a108
                      - system: email
                        value: ghi@email.com
                        use: work
                        rank: 1
                        period:
                          start: 2019-11-11
                      - system: phone
                        value: 027 123555
                        use: work
                        rank: 2
                        period:
                          start: 2019-11-11
                    partOf: &a109
                      reference: Organization/GZZ836-C
                      display: Multiple sub-organisation
        "400":
          description: Unsuccessful read operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful read operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful read operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful read operation - 500
          content:
            application/json:
              schema: *a2
      security:
        - smartOnFhir:
            - system/Organization.r
  /Organization:
    get:
      summary: Search for Organization
      description: GET, [base]/Organization, Queries against the Organization using
        name or other parameters. Will return a Bundle (even if there are no
        matching resources), system/Organization.s
      tags:
        - Organization
      operationId: searchOrganization
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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: active
          in: query
          schema:
            type: string
        - name: name
          in: query
          schema:
            type: string
        - name: identifier
          in: query
          schema:
            type: string
        - name: type
          in: query
          schema:
            type: string
        - name: partOf
          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:
                            - *a56
                        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.hip.digital.health.nz/fhir/hpi/v1//Organization/GZZ956-B
                        resource: *a57
                        search:
                          mode: match
                      - fullUrl: https://api.hip.digital.health.nz/fhir/hpi/v1//Organization/GZZ991-D
                        resource: *a58
                        search:
                          mode: match
        "400":
          description: Unsuccessful search operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful search operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful search operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful search operation - 500
          content:
            application/json:
              schema: *a2
      security:
        - smartOnFhir:
            - system/Organization.s
  /Location/{rid}:
    get:
      summary: Read Location
      description: GET, [base]/Location/[hpi-facid], Used to retrieve an Location
        resource by Id, system/Location.r
      tags:
        - Location
      operationId: readLocation
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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
        - description: Resource id
          name: rid
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful read operation
          content:
            application/json:
              schema:
                anyOf:
                  - &a59
                    type: object
                    properties:
                      resourceType:
                        type: string
                        enum:
                          - Location
                      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.


                            Modifier 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: Unique code or number identifying the location to its users.
                          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.


                                    The 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
                      status:
                        type: string
                        enum:
                          - active
                          - suspended
                          - inactive
                        description: The status property covers the general availability of the
                          resource, not the current value which may be covered
                          by the operationStatus, or by a schedule/slots if they
                          are configured for the location.
                      name:
                        type: string
                        pattern: "[ \\r\\n\\t\\S]+"
                        description: Name of the location as used by humans. Does not need to be unique.
                      alias:
                        type: array
                        items:
                          type: string
                          pattern: "[ \\r\\n\\t\\S]+"
                          description: A list of alternate names that the location is known as, or was
                            known as, in the past.
                      description:
                        type: string
                        pattern: "[ \\r\\n\\t\\S]+"
                        description: Description of the Location, which helps in finding or referencing
                          the place.
                      type:
                        type: array
                        items:
                          description: Indicates the type of function performed at the location.
                          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.
                      telecom:
                        type: array
                        items:
                          description: The contact details of communication devices available at the
                            location. This can include phone numbers, fax
                            numbers, mobile numbers, email addresses and web
                            sites.
                          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.
                      address:
                        description: Physical location.
                        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.
                      managingOrganization:
                        description: The organization responsible for the provisioning and upkeep of the
                          location.
                        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.


                              The 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.
                      partOf:
                        description: Another Location of which this Location is physically a part of.
                        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.


                              The 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
                      - identifier
                    description: http://hl7.org.nz/fhir/StructureDefinition/HPILocation
              examples:
                Location-FZZ941-D: &a63
                  value: &a60
                    resourceType: Location
                    id: FZZ941-D
                    meta: &a64
                      versionId: "8954"
                      lastUpdated: 2022-04-05T15:04:26.000+12:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPILocation
                    extension: &a65
                      - url: http://hl7.org.nz/fhir/StructureDefinition/established
                        valuePeriod:
                          start: 2016-06-06
                          end: 2019-09-09
                      - url: http://hl7.org.nz/fhir/StructureDefinition/dhb
                        valueCodeableConcept:
                          coding:
                            - version: 1.0.0
                              code: G00036-D
                              system: https://standards.digital.health.nz/ns/dhb-code
                              display: Capital and Coast District Health Board
                          text: Capital and Coast District Health Board
                    identifier: &a66
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-facility-id
                        value: FZZ941-D
                        assigner:
                          reference: Organization/G00001-G
                    status: inactive
                    name: Dental Clinic with Dist Date
                    alias: &a67
                      - Disestablished Dental
                      - Dental Clinic with Dist Date
                    _alias: &a68
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: aka
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Aka
                              text: Aka
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: current
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Current unverified or unofficial name
                              text: Current unverified or unofficial name
                    type: &a69
                      - coding:
                          - version: "1.0"
                            code: dental
                            system: https://standards.digital.health.nz/ns/location-type-code
                            display: Community Dental
                    telecom: &a70
                      - system: phone
                        value: 021 789878
                        use: work
                        rank: 1
                        period:
                          start: 2016-06-06
                    address: &a71
                      id: "1112139"
                      extension:
                        - url: http://hl7.org.nz/fhir/StructureDefinition/nz-geocode
                          extension:
                            - url: latitude
                              valueDecimal: -41.272975
                            - url: longitude
                              valueDecimal: 174.777729
                        - url: http://hl7.org.nz/fhir/StructureDefinition/suburb
                          valueString: Thorndon
                        - url: http://hl7.org.nz/fhir/StructureDefinition/building-name
                          valueString: Building name for eSAM address 1112139
                        - url: http://hl7.org.nz/fhir/StructureDefinition/domicile-code
                          valueCodeableConcept:
                            coding:
                              - version: "3.0"
                                code: "2077"
                                system: https://standards.digital.health.nz/ns/domicile-code
                                display: Thorndon - Tinakori Road
                            text: Thorndon - Tinakori Road
                      use: work
                      type: physical
                      text: Building name for eSAM address 1112139, 133 Molesworth Street, Thorndon
                        6011, Wellington
                      line:
                        - 133 Molesworth Street
                      city: Wellington
                      postalCode: "6011"
                    managingOrganization: &a72
                      reference: Organization/GZZ908-B
                      display: Org Disestablishment Date
                Location-FZZ958-K: &a73
                  value: &a61
                    resourceType: Location
                    id: FZZ958-K
                    meta: &a74
                      versionId: "10803"
                      lastUpdated: 2022-11-09T12:00:14.000+13:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPILocation
                    extension: &a75
                      - url: http://hl7.org.nz/fhir/StructureDefinition/established
                        valuePeriod:
                          start: 1980-12-12
                      - url: http://hl7.org.nz/fhir/StructureDefinition/dhb
                        valueCodeableConcept:
                          coding:
                            - version: 1.0.0
                              code: G00036-D
                              system: https://standards.digital.health.nz/ns/dhb-code
                              display: Capital and Coast District Health Board
                          text: Capital and Coast District Health Board
                    identifier: &a76
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-facility-id
                        value: FZZ958-K
                        assigner:
                          reference: Organization/G00001-G
                      - use: official
                        system: https://standards.digital.health.nz/ns/nzhis-facility-id
                        value: "9987"
                        assigner:
                          reference: Organization/G00001-G
                    status: active
                    name: Medical Centre Flat-Unit
                    alias: &a77
                      - Medical Centre Flat-Unit
                    _alias: &a78
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: current
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Current unverified or unofficial name
                              text: Current unverified or unofficial name
                    type: &a79
                      - coding:
                          - version: "1.0"
                            code: gpenrol
                            system: https://standards.digital.health.nz/ns/location-type-code
                            display: Enrolling GP Practice
                    telecom: &a80
                      - system: phone
                        value: 021 555558
                        use: temp
                        rank: 1
                        period:
                          start: 1980-12-12
                      - system: phone
                        value: 021 464646
                        use: work
                        rank: 1
                        period:
                          start: 1980-12-12
                    address: &a81
                      id: "1517156"
                      extension:
                        - url: http://hl7.org.nz/fhir/StructureDefinition/nz-geocode
                          extension:
                            - url: latitude
                              valueDecimal: -41.273494
                            - url: longitude
                              valueDecimal: 174.777705
                        - url: http://hl7.org.nz/fhir/StructureDefinition/suburb
                          valueString: Thorndon
                        - url: http://hl7.org.nz/fhir/StructureDefinition/domicile-code
                          valueCodeableConcept:
                            coding:
                              - version: "3.0"
                                code: "2077"
                                system: https://standards.digital.health.nz/ns/domicile-code
                                display: Thorndon - Tinakori Road
                            text: Thorndon - Tinakori Road
                      use: work
                      type: physical
                      text: 123 Molesworth Street, Thorndon 6011, Wellington
                      line:
                        - 123 Molesworth Street
                      city: Wellington
                      postalCode: "6011"
                    managingOrganization: &a82
                      reference: Organization/GZZ956-B
                      display: Flat-Unit Address Org
                Location-FZZ999-B: &a83
                  value: &a62
                    resourceType: Location
                    id: FZZ999-B
                    meta: &a84
                      versionId: "11148"
                      lastUpdated: 2023-02-24T17:14:14.000+13:00
                      profile:
                        - http://hl7.org.nz/fhir/StructureDefinition/HPILocation
                    extension: &a85
                      - url: http://hl7.org.nz/fhir/StructureDefinition/established
                        valuePeriod:
                          start: 2013-01-02
                      - url: http://hl7.org.nz/fhir/StructureDefinition/dhb
                        valueCodeableConcept:
                          coding:
                            - version: 1.0.0
                              code: G00036-D
                              system: https://standards.digital.health.nz/ns/dhb-code
                              display: Capital and Coast District Health Board
                          text: Capital and Coast District Health Board
                      - url: http://hl7.org.nz/fhir/StructureDefinition/messaging-address
                        extension:
                          - url: provider
                            valueString: healthlink
                          - url: value
                            valueString: livefacedi
                    identifier: &a86
                      - use: official
                        system: https://standards.digital.health.nz/ns/hpi-facility-id
                        value: FZZ999-B
                        assigner:
                          reference: Organization/G00001-G
                      - use: old
                        system: https://standards.digital.health.nz/ns/hpi-facility-id
                        value: FZZ997-J
                        assigner:
                          reference: Organization/G00001-G
                      - use: official
                        system: https://standards.digital.health.nz/ns/nzhis-facility-id
                        value: Z999
                        assigner:
                          reference: Organization/G00001-G
                    status: active
                    name: Live Facilty
                    alias: &a87
                      - Do not change details of this Facility
                      - Live Facilty
                    _alias: &a88
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: aka
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Aka
                              text: Aka
                      - extension:
                          - url: http://hl7.org.nz/fhir/StructureDefinition/alias-type
                            valueCodeableConcept:
                              coding:
                                - version: 1.0.0
                                  code: current
                                  system: https://standards.digital.health.nz/ns/alias-type-code
                                  display: Current unverified or unofficial name
                              text: Current unverified or unofficial name
                    type: &a89
                      - coding:
                          - version: "1.0"
                            code: gpenrol
                            system: https://standards.digital.health.nz/ns/location-type-code
                            display: Enrolling GP Practice
                    telecom: &a90
                      - system: email
                        value: email007@email.co.nz
                        use: work
                        rank: 1
                        period:
                          start: 2013-01-02
                      - system: phone
                        value: "02865865865"
                        use: work
                        rank: 1
                        period:
                          start: 2013-01-02
                    address: &a91
                      id: "1112139"
                      extension:
                        - url: http://hl7.org.nz/fhir/StructureDefinition/nz-geocode
                          extension:
                            - url: latitude
                              valueDecimal: -41.272975
                            - url: longitude
                              valueDecimal: 174.777729
                        - url: http://hl7.org.nz/fhir/StructureDefinition/suburb
                          valueString: Thorndon
                        - url: http://hl7.org.nz/fhir/StructureDefinition/domicile-code
                          valueCodeableConcept:
                            coding:
                              - version: "3.0"
                                code: "2077"
                                system: https://standards.digital.health.nz/ns/domicile-code
                                display: Thorndon - Tinakori Road
                            text: Thorndon - Tinakori Road
                      use: work
                      type: physical
                      text: 133 Molesworth Street, Thorndon 6011, Wellington
                      line:
                        - 133 Molesworth Street
                      city: Wellington
                      postalCode: "6011"
                    managingOrganization: &a92
                      reference: Organization/GZZ999-J
                      display: Verification Test Organisation
        "400":
          description: Unsuccessful read operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful read operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful read operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful read operation - 500
          content:
            application/json:
              schema: *a2
      security:
        - smartOnFhir:
            - system/Location.r
  /Location:
    get:
      summary: Search for Location
      description: GET, [base]/Location, Queries against the Location using name or
        other parameters. Will return a Bundle (even if there are no matching
        resources), system/Location.s
      tags:
        - Location
      operationId: searchLocation
      parameters:
        - name: Correlation-Id
          in: header
          required: false
          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: Request-Context
          in: header
          required: true
          description: >-
            A base64-encoded JSON object that defines the context of the current
            request.

            See
            https://github.com/tewhatuora/schemas/blob/main/json-schema/Request-Context-v2.json
            for the schema this object must conform to.
          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: identifier
          in: query
          schema:
            type: string
        - name: name
          in: query
          schema:
            type: string
        - name: type
          in: query
          schema:
            type: string
        - name: address
          in: query
          schema:
            type: string
        - name: organization
          in: query
          schema:
            type: string
        - name: dhb
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
        - name: messaging-address
          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:
                            - *a59
                        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.hip.digital.health.nz/fhir/hpi/v1//Location/FZZ941-D
                        resource: *a60
                        search:
                          mode: match
                      - fullUrl: https://api.hip.digital.health.nz/fhir/hpi/v1//Location/FZZ958-K
                        resource: *a61
                        search:
                          mode: match
                      - fullUrl: https://api.hip.digital.health.nz/fhir/hpi/v1//Location/FZZ999-B
                        resource: *a62
                        search:
                          mode: match
        "400":
          description: Unsuccessful search operation - 400
          content:
            application/json:
              schema: *a2
        "401":
          description: Unsuccessful search operation - 401
          content:
            application/json:
              schema: *a2
        "403":
          description: Unsuccessful search operation - 403
          content:
            application/json:
              schema: *a2
        "500":
          description: Unsuccessful search operation - 500
          content:
            application/json:
              schema: *a2
      security:
        - smartOnFhir:
            - system/Location.s
components:
  schemas:
    StructureDefinition-HPIPractitioner: *a1
    StructureDefinition-HPIPractitionerRole: *a26
    StructureDefinition-HpiOrganization: *a56
    StructureDefinition-HpiLocation: *a59
  securitySchemes:
    smartOnFhir:
      type: oauth2
      description: SMART-on-FHIR security scheme
      flows:
        clientCredentials:
          tokenUrl: https://auth.services.health.nz/realms/hnz-integration/protocol/openid-connect/token
          scopes:
            system/Practitioner.r: Practitioner.r access
            system/Practitioner.s: Practitioner.s access
            system/Practitioner.c: Practitioner.c access
            https://hpi-ig.hip.digital.health.nz/OperationDefinition/practitioner-update-core: Practitioner-update-core access
            system/PractitionerRole.r: PractitionerRole.r access
            system/PractitionerRole.u: PractitionerRole.u access
            system/PractitionerRole.s: PractitionerRole.s access
            system/PractitionerRole.c: PractitionerRole.c access
            system/Organization.r: Organization.r access
            system/Organization.s: Organization.s access
            system/Location.r: Location.r access
            system/Location.s: Location.s access
  examples:
    Location-FZZ941-D: *a63
    Location-FZZ941-D-create:
      value:
        resourceType: Location
        meta: *a64
        extension: *a65
        identifier: *a66
        status: inactive
        name: Dental Clinic with Dist Date
        alias: *a67
        _alias: *a68
        type: *a69
        telecom: *a70
        address: *a71
        managingOrganization: *a72
    Location-FZZ958-K: *a73
    Location-FZZ958-K-create:
      value:
        resourceType: Location
        meta: *a74
        extension: *a75
        identifier: *a76
        status: active
        name: Medical Centre Flat-Unit
        alias: *a77
        _alias: *a78
        type: *a79
        telecom: *a80
        address: *a81
        managingOrganization: *a82
    Location-FZZ999-B: *a83
    Location-FZZ999-B-create:
      value:
        resourceType: Location
        meta: *a84
        extension: *a85
        identifier: *a86
        status: active
        name: Live Facilty
        alias: *a87
        _alias: *a88
        type: *a89
        telecom: *a90
        address: *a91
        managingOrganization: *a92
    Organization-GZZ956-B: *a93
    Organization-GZZ956-B-create:
      value:
        resourceType: Organization
        meta: *a94
        extension: *a95
        identifier: *a96
        active: true
        type: *a97
        name: Flat-Unit Address Org
        alias: *a98
        _alias: *a99
        telecom: *a100
    Organization-GZZ991-D: *a101
    Organization-GZZ991-D-create:
      value:
        resourceType: Organization
        meta: *a102
        extension: *a103
        identifier: *a104
        active: true
        type: *a105
        name: Second Name
        alias: *a106
        _alias: *a107
        telecom: *a108
        partOf: *a109
    Practitioner-90ZZLP: *a110
    Practitioner-90ZZLP-create: *a111
    Practitioner-91ZABY: *a112
    Practitioner-91ZABY-create: *a113
    Practitioner-92ZZRE: *a114
    Practitioner-92ZZRE-create: *a115
    Practitioner-98ZZQJ: *a116
    Practitioner-98ZZQJ-create: *a117
    PractitionerRole-R00000012-G: *a28
    PractitionerRole-R00000012-G-create: *a118
    PractitionerRole-R00000015-C: *a29
    PractitionerRole-R00000015-C-create: *a119
    PractitionerRole-R00000029-P: *a30
    PractitionerRole-R00000029-P-create: *a120
tags:
  - name: Practitioner
    description: Operations related to Practitioner FHIR resource
    externalDocs:
      url: https://www.hl7.org/fhir/practitioner.html
  - name: metadata
    description: Operations related to metadata FHIR resource
    externalDocs:
      url: https://www.hl7.org/fhir/metadata.html
  - name: PractitionerRole
    description: Operations related to PractitionerRole FHIR resource
    externalDocs:
      url: https://www.hl7.org/fhir/practitionerrole.html
  - name: Organization
    description: Operations related to Organization FHIR resource
    externalDocs:
      url: https://www.hl7.org/fhir/organization.html
  - name: Location
    description: Operations related to Location FHIR resource
    externalDocs:
      url: https://www.hl7.org/fhir/location.html
