PackagesCanonicalsLogsProblems
    Packages
    ca.on.mha.pds@2.0.0-snapshot11
    http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-profile-patient
description: Proposed constraints and extensions on the Patient Resource. This represents client information.
package_name: ca.on.mha.pds
derivation: constraint
name: Patient
type: Patient
elements:
  meta:
    mustSupport: true
    index: 0
    elements:
      profile:
        pattern: {type: Canonical, value: 'http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-profile-patient'}
        index: 1
    required: [profile]
  identifier:
    mustSupport: true
    index: 2
    elements:
      type:
        binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/client-identifier-type-code'}
        index: 3
      system: {isModifier: false, index: 4}
      value: {short: The value that is unique within the system., isModifier: false, index: 5}
    required: [type]
    slicing:
      rules: open
      discriminator:
      - {path: type, type: pattern}
      min: 1
      slices:
        MRN:
          match:
            type:
              coding:
              - {code: MR, system: 'http://terminology.hl7.org/CodeSystem/v2-0203', display: Medical record number}
          schema:
            mustSupport: true
            _required: true
            index: 6
            elements:
              type:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/client-identifier-type-code'}
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: MR, system: 'http://terminology.hl7.org/CodeSystem/v2-0203', display: Medical record number}
                index: 7
              system:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/mha/patient-mrn-identifier-system'}
                mustSupport: true
                index: 8
              value: {mustSupport: true, index: 9}
            required: [value, system]
        JHN:
          match:
            type:
              coding:
              - {code: JHN, system: 'http://terminology.hl7.org/CodeSystem/v2-0203', display: Jurisdictional health number}
          schema:
            constraint:
              jhn-inv-1: {human: Either both system and value exists or none of them exists, severity: error, expression: system.exists() = value.exists()}
              jhn-inv-2: {human: Healthcard must be provide either with value or data-absent-reason, severity: error, expression: '$this.where(type.coding.code = ''JHN'').value.exists() or $this.where(type.coding.code = ''JHN'').extension(''http://ontariohealth.ca/fhir/StructureDefinition/ext-ca-on-mha-data-absent-reason'').exists()'}
            mustSupport: true
            _required: true
            index: 10
            extensions:
              mHADataAbsentReason: {url: 'http://ontariohealth.ca/fhir/StructureDefinition/ext-ca-on-mha-data-absent-reason', max: 1, type: Extension, isModifier: false, mustSupport: true, index: 11}
            elements:
              extension:
                type: Extension
                isModifier: false
                mustSupport: true
                url: http://ontariohealth.ca/fhir/StructureDefinition/ext-ca-on-mha-data-absent-reason
                index: 11
                slicing:
                  slices:
                    mHADataAbsentReason:
                      match: {}
                      schema: {type: Extension, isModifier: false, mustSupport: true, url: 'http://ontariohealth.ca/fhir/StructureDefinition/ext-ca-on-mha-data-absent-reason', index: 11}
                      max: 1
              type:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/client-identifier-type-code'}
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: JHN, system: 'http://terminology.hl7.org/CodeSystem/v2-0203', display: Jurisdictional health number}
                index: 12
              system:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/mha/patient-jhn-identifier-system'}
                mustSupport: true
                index: 13
              value: {mustSupport: true, index: 14}
            required: [type]
        Anonymous:
          match:
            type:
              coding:
              - {code: ANON, system: 'http://terminology.hl7.org/CodeSystem/v2-0203'}
          schema:
            mustSupport: true
            index: 15
            elements:
              type:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/client-identifier-type-code'}
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: ANON, system: 'http://terminology.hl7.org/CodeSystem/v2-0203'}
                index: 16
              system: {mustSupport: true, index: 17}
              value: {mustSupport: true, index: 18}
            required: [value, type, system]
  active: {mustSupport: true, index: 19}
  name:
    short: A name associated with the patient(client)
    constraint:
      ca-baseline-name: {human: Patient.name.given  or Patient.name.family or both SHALL be present, source: 'http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-patient', severity: error, expression: family.exists() or given.exists()}
    mustSupport: true
    index: 20
    elements:
      family: {mustSupport: true, index: 21}
      given: {mustSupport: true, array: true, min: 1, max: 2, index: 22}
    required: [given, family]
  birthDate:
    constraint:
      bd-1: {human: birthDate must have a date value, severity: error, expression: hasValue() = true}
      bd-2: {human: 'If birthDate is "1900-01-01", BirthDate estimated flag must be set to ''true''', severity: error, expression: $this = @1900-01-01 implies $this.extension.value = true}
      bd-3: {human: BirthDate must not be before '1900-01-01' or after the current date and it must be a valid date, severity: error, expression: $this >= @1900-01-01 and $this < today()}
    mustSupport: true
    index: 23
    extensions:
      BirthDateEstimatedFlag: {url: 'http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ext-birthdate-estimated-flag', min: 1, max: 1, type: Extension, mustSupport: true, index: 25}
    elements:
      extension:
        index: 24
        slicing:
          slices:
            BirthDateEstimatedFlag:
              match: {}
              schema: {type: Extension, mustSupport: true, url: 'http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ext-birthdate-estimated-flag', index: 25}
              min: 1
              max: 1
    required: [extension]
  address:
    constraint:
      adr-key-1: {human: Province must be provided if 'address use' is provided, severity: error, expression: use.exists() implies state.exists()}
    mustSupport: true
    index: 26
    elements:
      use: {index: 27}
      line: {index: 28}
      city: {mustSupport: true, index: 29}
      state:
        binding: {strength: required, valueSet: 'http://ehealthontario.ca/fhir/ValueSet/province-code'}
        mustSupport: true
        index: 30
      postalCode:
        constraint:
          postalcode-inv-1: {human: postal code cannot have both value and data-absent-reason present, severity: error, expression: '$this.hasValue() != $this.extension(''http://ontariohealth.ca/fhir/StructureDefinition/ext-ca-on-mha-data-absent-reason'').exists()'}
        mustSupport: true
        index: 31
        extensions:
          mHADataAbsentReason: {url: 'http://ontariohealth.ca/fhir/StructureDefinition/ext-ca-on-mha-data-absent-reason', max: 1, type: Extension, isModifier: false, mustSupport: true, index: 32}
        elements:
          extension:
            type: Extension
            isModifier: false
            mustSupport: true
            url: http://ontariohealth.ca/fhir/StructureDefinition/ext-ca-on-mha-data-absent-reason
            index: 32
            slicing:
              slices:
                mHADataAbsentReason:
                  match: {}
                  schema: {type: Extension, isModifier: false, mustSupport: true, url: 'http://ontariohealth.ca/fhir/StructureDefinition/ext-ca-on-mha-data-absent-reason', index: 32}
                  max: 1
    required: [postalCode]
  communication:
    mustSupport: true
    index: 33
    extensions:
      languageUse: {url: 'http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-LanguageUse', min: 1, type: Extension, index: 35}
    elements:
      extension:
        index: 34
        slicing:
          slices:
            languageUse:
              match: {}
              schema: {type: Extension, url: 'http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-LanguageUse', index: 35}
              min: 1
      language:
        index: 36
        elements:
          coding:
            elements:
              system: {index: 37}
              code: {mustSupport: true, index: 38}
              display: {mustSupport: true, index: 39}
            required: [display, system, code]
    required: [extension]
    slicing:
      rules: open
      discriminator:
      - {path: extension.value.coding.code, type: value}
      min: null
      slices:
        languageOfComfort:
          match:
            extension:
              value:
                coding: {code: null}
          schema:
            mustSupport: true
            index: 40
            extensions:
              languageUse:
                url: http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-LanguageUse
                type: Extension
                index: 42
                elements:
                  value:
                    choices: []
                    index: 44
                  value[x]:
                    elements:
                      coding:
                        index: 45
                        elements:
                          system:
                            pattern: {type: Uri, value: 'http://snomed.info/sct'}
                            index: 46
                          code:
                            pattern: {type: Code, value: '428996008'}
                            index: 47
                required: [value]
            elements:
              extension:
                index: 41
                slicing:
                  slices:
                    languageUse:
                      match: {}
                      schema:
                        type: Extension
                        url: http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-LanguageUse
                        index: 42
                        elements:
                          value:
                            choices: []
                            index: 44
                          value[x]:
                            elements:
                              coding:
                                index: 45
                                elements:
                                  system:
                                    pattern: {type: Uri, value: 'http://snomed.info/sct'}
                                    index: 46
                                  code:
                                    pattern: {type: Code, value: '428996008'}
                                    index: 47
                        required: [value]
              language:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/human-language'}
                mustSupport: true
                index: 48
                elements:
                  coding:
                    mustSupport: true
                    index: 49
                    elements:
                      system: {mustSupport: true, index: 50}
                      code: {mustSupport: true, index: 51}
                      display: {mustSupport: true, index: 52}
                    required: [display, system, code]
                required: [coding]
            required: [extension]
        officialLanguage:
          match:
            extension:
              value:
                coding: {code: null}
          schema:
            mustSupport: true
            index: 53
            extensions:
              languageUse:
                url: http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-LanguageUse
                type: Extension
                index: 55
                elements:
                  value:
                    label: ServiceLanguage
                    choices: []
                    index: 57
                  value[x]:
                    elements:
                      coding:
                        index: 58
                        elements:
                          system:
                            pattern: {type: Uri, value: 'http://ontariohealth.ca/fhir/CodeSystem/LanguageUse'}
                            index: 59
                          code:
                            pattern: {type: Code, value: OFL}
                            index: 60
                required: [value]
            elements:
              extension:
                index: 54
                slicing:
                  slices:
                    languageUse:
                      match: {}
                      schema:
                        type: Extension
                        url: http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-LanguageUse
                        index: 55
                        elements:
                          value:
                            label: ServiceLanguage
                            choices: []
                            index: 57
                          value[x]:
                            elements:
                              coding:
                                index: 58
                                elements:
                                  system:
                                    pattern: {type: Uri, value: 'http://ontariohealth.ca/fhir/CodeSystem/LanguageUse'}
                                    index: 59
                                  code:
                                    pattern: {type: Code, value: OFL}
                                    index: 60
                        required: [value]
              language:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/official-language'}
                mustSupport: true
                index: 61
                elements:
                  coding:
                    mustSupport: true
                    index: 62
                    elements:
                      system: {mustSupport: true, index: 63}
                      code: {mustSupport: true, index: 64}
                      display: {mustSupport: true, index: 65}
                    required: [display, system, code]
                required: [coding]
            required: [extension]
package_version: 2.0.0-snapshot11
class: profile
kind: resource
url: http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-profile-patient
base: http://hl7.org/fhir/StructureDefinition/Patient
version: 2.0.0
required: [name, identifier, birthDate, meta, active]