PackagesCanonicalsLogsProblems
    Packages
    OntariomiCDRFHIRImplementationGuide@0.10.00-0.1.0
    http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-Encounter
description: null
package_name: OntariomiCDRFHIRImplementationGuide
derivation: constraint
name: MICdrEncounter
type: Encounter
elements:
  diagnosis:
    mustSupport: true
    index: 51
    elements:
      condition:
        type: Reference
        mustSupport: true
        refers: ['http://ontariohealth.ca/fhir/StructureDefinition/ca-on-accdr-profile-Condition']
        index: 52
  meta:
    mustSupport: true
    index: 0
    elements:
      profile:
        mustSupport: true
        pattern: {type: Canonical, value: 'http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-Encounter|1.0.0'}
        index: 1
    required: [profile]
  reasonCode:
    mustSupport: true
    index: 46
    elements:
      coding:
        mustSupport: true
        index: 47
        elements:
          system: {mustSupport: true, index: 48}
          code: {mustSupport: true, index: 49}
          display: {mustSupport: true, index: 50}
        required: [display, code]
    required: [coding]
  type:
    mustSupport: true
    index: 13
    slicing:
      rules: open
      discriminator:
      - {path: $this, type: pattern}
      min: null
      max: 1
      slices:
        slice-local-Encounter-Type:
          match: {}
          schema:
            binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/local-PV1-4values'}
            mustSupport: true
            index: 14
            elements:
              coding:
                mustSupport: true
                index: 15
                elements:
                  system: {mustSupport: true, index: 16}
                  code: {mustSupport: true, index: 17}
                  display: {mustSupport: true, index: 18}
                required: [display, system, code]
            required: [coding]
        slice-virtual-visit-modality:
          match: {}
          schema:
            binding: {strength: required, valueSet: 'http://cihi.ca/fhir/ValueSet/aac-admit-category'}
            mustSupport: true
            index: 19
            elements:
              coding:
                mustSupport: true
                index: 20
                elements:
                  system: {mustSupport: true, index: 21}
                  code: {mustSupport: true, index: 22}
                  display: {mustSupport: true, index: 23}
                required: [display, system, code]
            required: [coding]
  participant:
    mustSupport: true
    index: 36
    elements:
      type:
        mustSupport: true
        index: 37
        elements:
          coding:
            mustSupport: true
            index: 38
            elements:
              system: {mustSupport: true, index: 39}
              code: {mustSupport: true, index: 40}
              display: {mustSupport: true, index: 41}
            required: [display, system, code]
        required: [coding]
      individual:
        type: Reference
        mustSupport: true
        refers: ['http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-practitioner']
        index: 42
    required: [individual, type]
  serviceType:
    binding: {strength: required, valueSet: 'http://cihi.ca/fhir/ValueSet/aac-hospital-service'}
    mustSupport: true
    index: 24
    elements:
      coding:
        mustSupport: true
        index: 25
        elements:
          system: {mustSupport: true, index: 26}
          code: {mustSupport: true, index: 27}
          display: {mustSupport: true, index: 28}
        required: [display, system, code]
      text: {mustSupport: true, index: 29}
  contained: {mustSupport: true, index: 2}
  priority:
    binding: {strength: required, valueSet: 'http://ehealthontario.ca/fhir/ValueSet/acCDR-encounter-priority'}
    mustSupport: true
    index: 30
    elements:
      coding:
        mustSupport: true
        index: 31
        elements:
          system: {mustSupport: true, index: 32}
          code: {mustSupport: true, index: 33}
          display: {mustSupport: true, index: 34}
        required: [display, system, code]
    required: [coding]
  status: {mustSupport: true, index: 11}
  class:
    binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/acCDR-encounter-class'}
    mustSupport: true
    index: 12
  identifier:
    mustSupport: true
    index: 3
    elements:
      type:
        mustSupport: true
        index: 4
        elements:
          coding:
            mustSupport: true
            index: 5
            elements:
              system:
                pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/v2-0203'}
                mustSupport: true
                index: 6
              code:
                pattern: {type: Code, value: VN}
                mustSupport: true
                index: 7
              display:
                pattern: {type: String, value: Visit Number}
                mustSupport: true
                index: 8
            required: [display, system, code]
        required: [coding]
      system: {mustSupport: true, index: 9}
      value: {mustSupport: true, index: 10}
    required: [value, type, system]
  hospitalization:
    mustSupport: true
    index: 53
    elements:
      admitSource:
        binding: {strength: required, valueSet: 'http://cihi.ca/fhir/ValueSet/AacAdmitSource'}
        mustSupport: true
        index: 54
        elements:
          coding:
            mustSupport: true
            index: 55
            elements:
              system: {mustSupport: true, index: 56}
              code: {mustSupport: true, index: 57}
              display: {mustSupport: true, index: 58}
            required: [display, system, code]
        required: [coding]
      dischargeDisposition:
        binding: {strength: required, valueSet: 'http://cihi.ca/fhir/ValueSet/AacDischargeDisposition'}
        mustSupport: true
        index: 59
        elements:
          coding:
            index: 60
            elements:
              system: {index: 61}
              code: {index: 62}
              display: {index: 63}
            required: [display, system, code]
        required: [coding]
  period:
    mustSupport: true
    index: 43
    elements:
      start: {mustSupport: true, index: 44}
      end: {mustSupport: true, index: 45}
  location:
    mustSupport: true
    index: 64
    slicing:
      rules: open
      discriminator:
      - {path: physicalType.coding.code, type: value}
      min: 1
      slices:
        slice-location-bed:
          match:
            physicalType:
              coding: {code: null}
          schema:
            mustSupport: true
            index: 65
            elements:
              location:
                mustSupport: true
                index: 66
                elements:
                  display: {mustSupport: true, index: 67}
                required: [display]
              physicalType:
                mustSupport: true
                index: 68
                elements:
                  coding:
                    mustSupport: true
                    index: 69
                    slicing:
                      rules: open
                      discriminator:
                      - {path: $this, type: pattern}
                      min: 1
                      slices:
                        slice-location-type-bed:
                          match: {}
                          schema:
                            binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/acCDR-location-physical-type'}
                            mustSupport: true
                            _required: true
                            index: 70
                            elements:
                              system:
                                pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/location-physical-type'}
                                mustSupport: true
                                index: 71
                              code:
                                pattern: {type: Code, value: bd}
                                mustSupport: true
                                index: 72
                              display:
                                pattern: {type: String, value: Bed}
                                mustSupport: true
                                index: 73
                            required: [display, system, code]
                        slice-bed-type:
                          match: {}
                          schema:
                            binding: {strength: required, valueSet: 'http://cihi.ca/fhir/ValueSet/aac-bed-type'}
                            mustSupport: true
                            index: 74
                            elements:
                              system:
                                pattern: {type: Uri, value: 'http://cihi.ca/fhir/CodeSystem/aac-bed-type'}
                                mustSupport: true
                                index: 75
                              code: {mustSupport: true, index: 76}
                              display: {mustSupport: true, index: 77}
                            required: [display, system, code]
                required: [coding]
            required: [physicalType]
        slice-location-room:
          match:
            physicalType:
              coding: {code: ro}
          schema:
            mustSupport: true
            index: 78
            elements:
              location:
                mustSupport: true
                index: 79
                elements:
                  display: {mustSupport: true, index: 80}
                required: [display]
              physicalType:
                mustSupport: true
                index: 81
                elements:
                  coding:
                    mustSupport: true
                    index: 82
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/location-physical-type'}
                        mustSupport: true
                        index: 83
                      code:
                        pattern: {type: Code, value: ro}
                        mustSupport: true
                        index: 84
                      display:
                        pattern: {type: String, value: Room}
                        mustSupport: true
                        index: 85
                    required: [display, system, code]
                required: [coding]
            required: [physicalType]
        slice-location-facility:
          match:
            physicalType:
              coding: {code: si}
          schema:
            mustSupport: true
            _required: true
            index: 86
            elements:
              location:
                type: Reference
                mustSupport: true
                refers: ['http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-Location']
                index: 87
                elements:
                  reference: {mustSupport: true, index: 88}
                required: [reference]
              physicalType:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/acCDR-location-physical-type'}
                mustSupport: true
                index: 89
                elements:
                  coding:
                    mustSupport: true
                    index: 90
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/location-physical-type'}
                        mustSupport: true
                        index: 91
                      code:
                        pattern: {type: Code, value: si}
                        mustSupport: true
                        index: 92
                      display: {mustSupport: true, index: 93}
                    required: [display, system, code]
                required: [coding]
            required: [physicalType]
        slice-location-building:
          match:
            physicalType:
              coding: {code: bu}
          schema:
            mustSupport: true
            index: 94
            elements:
              location:
                mustSupport: true
                index: 95
                elements:
                  display: {mustSupport: true, index: 96}
                required: [display]
              physicalType:
                mustSupport: true
                index: 97
                elements:
                  coding:
                    mustSupport: true
                    index: 98
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/location-physical-type'}
                        mustSupport: true
                        index: 99
                      code:
                        pattern: {type: Code, value: bu}
                        mustSupport: true
                        index: 100
                      display:
                        pattern: {type: String, value: Building}
                        mustSupport: true
                        index: 101
                    required: [display, system, code]
                required: [coding]
            required: [physicalType]
        slice-location-floor:
          match:
            physicalType:
              coding: {code: lvl}
          schema:
            mustSupport: true
            index: 102
            elements:
              location:
                mustSupport: true
                index: 103
                elements:
                  display: {mustSupport: true, index: 104}
                required: [display]
              physicalType:
                mustSupport: true
                index: 105
                elements:
                  coding:
                    mustSupport: true
                    index: 106
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://cihi.ca/fhir/CodeSystem/aac-discharge-disposition'}
                        mustSupport: true
                        index: 107
                      code:
                        pattern: {type: Code, value: lvl}
                        mustSupport: true
                        index: 108
                      display:
                        pattern: {type: String, value: Level}
                        mustSupport: true
                        index: 109
                    required: [display, system, code]
                required: [coding]
            required: [physicalType]
        slice-location-point-of-care:
          match:
            physicalType:
              coding: {code: wi}
          schema:
            mustSupport: true
            index: 110
            elements:
              location:
                mustSupport: true
                index: 111
                elements:
                  display: {mustSupport: true, index: 112}
                required: [display]
              physicalType:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/acCDR-location-physical-type'}
                mustSupport: true
                index: 113
                elements:
                  coding:
                    mustSupport: true
                    index: 114
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/location-physical-type'}
                        mustSupport: true
                        index: 115
                      code:
                        pattern: {type: Code, value: wi}
                        mustSupport: true
                        index: 116
                      display: {mustSupport: true, index: 117}
                    required: [display, system, code]
                required: [coding]
            required: [physicalType]
        slice-location-description:
          match:
            physicalType:
              coding: {code: Id}
          schema:
            mustSupport: true
            index: 118
            elements:
              location:
                mustSupport: true
                index: 119
                elements:
                  display: {mustSupport: true, index: 120}
                required: [display]
              physicalType:
                binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ValueSet/acCDR-location-physical-type'}
                mustSupport: true
                index: 121
                elements:
                  coding:
                    mustSupport: true
                    index: 122
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://ontariohealth.ca/fhir/CodeSystem/accdr-bed-desc-code'}
                        index: 123
                      code:
                        pattern: {type: Code, value: Id}
                        mustSupport: true
                        index: 124
                      display:
                        pattern: {type: String, value: location or bed description}
                        mustSupport: true
                        index: 125
                    required: [display, system, code]
                required: [coding]
            required: [physicalType]
  subject:
    type: Reference
    mustSupport: true
    refers: ['http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-Patient']
    index: 35
package_version: 0.10.00-0.1.0
class: profile
kind: resource
url: http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-Encounter
base: http://hl7.org/fhir/StructureDefinition/Encounter
version: 0.1.0
required: [location, identifier, subject, meta]