PackagesCanonicalsLogsProblems
    Packages
    hl7.cda.us.ccda@4.0.0-ballot
    http://hl7.org/cda/us/ccda/StructureDefinition/SubstanceOrDeviceAllergyIntoleranceObservation
description: This template reflects a discrete observation about a patient's allergy or intolerance to a substance or device. Because it is a discrete observation, it will have a statusCode of \"completed\". The effectiveTime, also referred to as the 'clinically relevant time' is the time at which the observation holds for the patient. For a provider seeing a patient in the clinic today, observing a history of penicillin allergy that developed five years ago, the effectiveTime is five years ago. \n\nThe effectiveTime of the Substance or Device Allergy - Intolerance Observation is the definitive indication of whether or not the underlying allergy/intolerance is resolved. If known to be resolved, then an effectiveTime/high would be present. If the date of resolution is not known, then effectiveTime/high will be present with a nullFlavor of \"UNK\".
package_name: hl7.cda.us.ccda
derivation: constraint
name: SubstanceOrDeviceAllergyIntoleranceObservation
type: http://hl7.org/cda/stds/core/StructureDefinition/Observation
elements:
  entryRelationship:
    index: 29
    slicing:
      rules: open
      discriminator:
      - {path: observation, type: profile}
      min: null
      slices:
        status:
          match: {}
          schema:
            short: entryRelationship
            index: 30
            elements:
              typeCode:
                pattern: {type: Code, value: SUBJ}
                index: 31
              inversionInd:
                pattern: {type: Boolean, value: true}
                index: 32
              observation: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Observation', index: 33}
            required: [inversionInd, observation]
        reaction:
          match: {}
          schema:
            short: entryRelationship
            array: true
            index: 34
            elements:
              typeCode:
                pattern: {type: Code, value: MFST}
                index: 35
              inversionInd:
                pattern: {type: Boolean, value: true}
                index: 36
              observation: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Observation', index: 37}
            required: [inversionInd, observation]
        severity:
          match: {}
          schema:
            short: entryRelationship
            index: 38
            elements:
              typeCode:
                pattern: {type: Code, value: SUBJ}
                index: 39
              inversionInd:
                pattern: {type: Boolean, value: true}
                index: 40
              observation: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Observation', index: 41}
            required: [inversionInd, observation]
        criticality:
          match: {}
          schema:
            short: entryRelationship
            index: 42
            elements:
              typeCode:
                pattern: {type: Code, value: SUBJ}
                index: 43
              inversionInd:
                pattern: {type: Boolean, value: true}
                index: 44
              observation: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Observation', index: 45}
            required: [inversionInd, observation]
  value:
    type: http://hl7.org/cda/stds/core/StructureDefinition/CD
    index: 17
    elements:
      nullFlavor: {index: 18}
      code:
        binding: {strength: required, valueSet: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.88.12.3221.6.2'}
        index: 19
    required: [code]
  participant:
    index: 21
    slicing:
      rules: open
      discriminator:
      - {path: typeCode, type: value}
      min: null
      slices:
        consumable:
          match: {typeCode: CSM}
          schema:
            short: participant
            array: true
            index: 22
            elements:
              typeCode:
                pattern: {type: Code, value: CSM}
                index: 23
              participantRole:
                index: 24
                elements:
                  classCode:
                    pattern: {type: Code, value: MANU}
                    index: 25
                  playingEntity:
                    index: 26
                    elements:
                      classCode:
                        pattern: {type: Code, value: MMAT}
                        index: 27
                      code:
                        binding: {strength: preferred, valueSet: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.1'}
                        index: 28
                    required: [classCode, code]
                required: [classCode, playingEntity]
  classCode:
    pattern: {type: Code, value: OBS}
    index: 4
  author: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Author', index: 20}
  id: {index: 6}
  code:
    index: 7
    elements:
      code:
        pattern: {type: Code, value: ASSERTION}
        index: 8
      codeSystem:
        pattern: {type: String, value: 2.16.840.1.113883.5.4}
        index: 9
    required: [codeSystem, code]
  moodCode:
    pattern: {type: Code, value: EVN}
    index: 5
  effectiveTime:
    short: The effectiveTime/low (a.k.a. "onset date") asserts when the allergy/intolerance became clinically active. The effectiveTime/high (a.k.a. "resolution date") asserts when the allergy/intolerance became clinically resolved. If the allergy/intolerance is known to be resolved, but the date of resolution is not known, then the high element SHALL be present, and the nullFlavor attribute SHALL be set to 'UNK'.
    index: 14
    elements:
      low: {index: 15}
      high: {index: 16}
    required: [low]
  templateId:
    index: 0
    slicing:
      rules: open
      discriminator:
      - {path: root, type: value}
      - {path: extension, type: value}
      min: 1
      slices:
        substance-device-allergy-intolerance-obs:
          match: {root: 2.16.840.1.113883.10.20.24.3.90, extension: '2014-06-09'}
          schema:
            _required: true
            index: 1
            elements:
              root:
                pattern: {type: String, value: 2.16.840.1.113883.10.20.24.3.90}
                index: 2
              extension:
                pattern: {type: String, value: '2014-06-09'}
                index: 3
            required: [root, extension]
            extensions: {}
  statusCode:
    index: 12
    elements:
      code:
        pattern: {type: Code, value: completed}
        index: 13
    required: [code]
  text:
    short: SHOULD reference the portion of section narrative text corresponding to this entry
    index: 10
    elements:
      reference:
        constraint:
          value-starts-octothorpe: {human: 'If reference/@value is present, it SHALL begin with a ''#'' and SHALL point to its corresponding narrative', source: 'http://hl7.org/cda/us/ccda/StructureDefinition/SubstanceOrDeviceAllergyIntoleranceObservation', severity: error, expression: value.exists() implies value.startsWith('#')}
        index: 11
package_version: 4.0.0-ballot
class: logical
kind: logical
url: http://hl7.org/cda/us/ccda/StructureDefinition/SubstanceOrDeviceAllergyIntoleranceObservation
base: http://hl7.org/cda/stds/core/StructureDefinition/Observation
version: 4.0.0-ballot
required: [id, effectiveTime, value, statusCode, templateId]