PackagesCanonicalsLogsProblems
    Packages
    cihi.irrs@1.0.0
    http://cihi.ca/fhir/irrs/StructureDefinition/irrs-patient
description: Patient information resource
package_name: cihi.irrs
derivation: constraint
name: IRRS Patient
type: Patient
elements:
  address:
    mustSupport: true
    index: 28
    slicing:
      rules: open
      discriminator:
      - {path: use, type: value}
      min: 1
      max: 1
      slices:
        homeAddress:
          match: {use: home}
          schema:
            mustSupport: true
            index: 29
            extensions:
              homeAddress: {url: h, min: 0, max: 1, type: Extension, short: Absent reason value for postal code (asked/not-applicable), index: 30}
            elements:
              extension:
                type: Extension
                short: Absent reason value for postal code (asked/not-applicable)
                url: h
                index: 30
                slicing:
                  slices:
                    homeAddress:
                      match: {}
                      schema: {type: Extension, short: Absent reason value for postal code (asked/not-applicable), url: h, index: 30}
                      min: 0
                      max: 1
              use:
                pattern: {type: code, value: home}
                mustSupport: true
                type: code
                index: 31
              postalCode: {mustSupport: true, index: 32}
            required: [use]
  meta:
    mustSupport: true
    index: 1
    elements:
      profile: {mustSupport: true, index: 2}
  managingOrganization:
    mustSupport: true
    index: 36
    elements:
      identifier:
        mustSupport: true
        index: 37
        elements:
          system: {short: Assigning authority URL of source organization identifier, mustSupport: true, index: 38}
          value: {short: Source organization identifier, mustSupport: true, index: 39}
        required: [system, value]
    required: [identifier]
  name: {index: 26}
  birthDate: {type: date, mustSupport: true, index: 27}
  extension:
    index: 3
    slicing:
      rules: open
      discriminator:
      - {path: url, type: value}
      min: null
      slices:
        birthSex:
          match: {url: null}
          schema: {short: Sex at birth, type: Extension, mustSupport: true, url: h, index: 4}
          min: 1
          max: 1
  communication:
    mustSupport: true
    index: 34
    elements:
      language: {mustSupport: true, index: 35}
    required: [language]
  id: {mustSupport: true, index: 0}
  identifier:
    mustSupport: true
    array: true
    min: 1
    max: 2
    index: 5
    slicing:
      rules: closed
      discriminator:
      - {path: type.coding.system, type: value}
      - {path: type.coding.code, type: value}
      min: 1
      max: 2
      slices:
        hcnIdentifier:
          match:
            type:
              coding: {system: 'http://hl7.org/fhir/v2/0203', code: JHN}
          schema:
            short: A health card number for this patient
            mustSupport: true
            _required: true
            index: 6
            extensions:
              absentReason:
                url: h
                min: 0
                max: 1
                constraint:
                  irrs-patient-hcn-unknown: {human: Please provide province code when HCN is unknown, severity: error, expression: 'identifier.extension(''http://cihi.ca/fhir/irrs/StructureDefinition/irrs-ext-data-absent-reason'').where(type=''JHN'').exists() implies adress.state.where(use=''old'').exists()'}
                pattern: {type: uri, value: 'http://cihi.ca/fhir/irrs/StructureDefinition/irrs-ext-data-absent-reason'}
                type: Extension
                mustSupport: true
                index: 8
            elements:
              extension:
                index: 7
                slicing:
                  rules: open
                  discriminator:
                  - {path: url, type: value}
                  min: null
                  slices:
                    absentReason:
                      match: {url: null}
                      schema:
                        constraint:
                          irrs-patient-hcn-unknown: {human: Please provide province code when HCN is unknown, severity: error, expression: 'identifier.extension(''http://cihi.ca/fhir/irrs/StructureDefinition/irrs-ext-data-absent-reason'').where(type=''JHN'').exists() implies adress.state.where(use=''old'').exists()'}
                        pattern: {type: uri, value: 'http://cihi.ca/fhir/irrs/StructureDefinition/irrs-ext-data-absent-reason'}
                        type: Extension
                        mustSupport: true
                        url: h
                        index: 8
                      min: 0
                      max: 1
              use:
                pattern: {type: code, value: official}
                type: code
                index: 9
              type:
                mustSupport: true
                index: 10
                elements:
                  coding:
                    mustSupport: true
                    index: 11
                    elements:
                      system:
                        pattern: {type: string, value: 'http://hl7.org/fhir/v2/0203'}
                        mustSupport: true
                        type: string
                        index: 12
                      code:
                        pattern: {type: code, value: JHN}
                        mustSupport: true
                        type: code
                        index: 13
                    required: [code, system]
                required: [coding]
              system: {mustSupport: true, index: 14}
              value: {mustSupport: true, index: 15}
              period: {mustSupport: true, index: 16}
            required: [type]
        crnIdentifier:
          match:
            type:
              coding: {system: 'http://hl7.org/fhir/v2/0203', code: MR}
          schema:
            min: 1
            short: A case record number for this patient
            mustSupport: true
            array: true
            _required: true
            index: 17
            elements:
              use:
                pattern: {type: code, value: official}
                type: code
                index: 18
              type:
                mustSupport: true
                index: 19
                elements:
                  coding:
                    mustSupport: true
                    index: 20
                    elements:
                      system:
                        pattern: {type: string, value: 'http://hl7.org/fhir/v2/0203'}
                        mustSupport: true
                        type: string
                        index: 21
                      code:
                        pattern: {type: code, value: MR}
                        mustSupport: true
                        type: code
                        index: 22
                    required: [code, system]
                required: [coding]
              system: {mustSupport: true, index: 23}
              value: {mustSupport: true, index: 24}
              period: {mustSupport: true, index: 25}
            required: [type, value]
  maritalStatus: {mustSupport: true, index: 33}
package_version: 1.0.0
extensions:
  birthSex: {url: h, min: 1, max: 1, short: Sex at birth, type: Extension, mustSupport: true, index: 4}
class: profile
kind: resource
url: http://cihi.ca/fhir/irrs/StructureDefinition/irrs-patient
base: http://hl7.org/fhir/StructureDefinition/Patient
version: null
required: [address, birthDate, identifier, managingOrganization]