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: 28 slicing: rules: open discriminator: - {path: observation, type: profile} min: null slices: entryRelationship1: match: {} schema: short: entryRelationship index: 29 elements: typeCode: pattern: {type: Code, value: SUBJ} index: 30 inversionInd: pattern: {type: Boolean, value: true} index: 31 observation: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Observation', index: 32} required: [inversionInd, observation] entryRelationship2: match: {} schema: short: entryRelationship array: true index: 33 elements: typeCode: pattern: {type: Code, value: MFST} index: 34 inversionInd: pattern: {type: Boolean, value: true} index: 35 observation: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Observation', index: 36} required: [inversionInd, observation] entryRelationship3: match: {} schema: short: entryRelationship index: 37 elements: typeCode: pattern: {type: Code, value: SUBJ} index: 38 inversionInd: pattern: {type: Boolean, value: true} index: 39 observation: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Observation', index: 40} required: [inversionInd, observation] entryRelationship4: match: {} schema: short: entryRelationship index: 41 elements: typeCode: pattern: {type: Code, value: SUBJ} index: 42 inversionInd: pattern: {type: Boolean, value: true} index: 43 observation: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Observation', index: 44} required: [inversionInd, observation] value: type: http://hl7.org/cda/stds/core/StructureDefinition/CD index: 17 elements: code: short: Many systems will simply assign a fixed value here (e.g., "allergy to substance"). binding: {strength: required, valueSet: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.88.12.3221.6.2'} index: 18 required: [code] participant: index: 20 slicing: rules: open discriminator: - {path: typeCode, type: value} min: null slices: participant1: match: {typeCode: CSM} schema: short: participant array: true index: 21 elements: typeCode: pattern: {type: Code, value: CSM} index: 22 participantRole: index: 23 elements: classCode: pattern: {type: Code, value: MANU} index: 24 playingEntity: index: 25 elements: classCode: pattern: {type: Code, value: MMAT} index: 26 code: binding: {strength: preferred, valueSet: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.1'} index: 27 required: [code] required: [playingEntity] classCode: pattern: {type: Code, value: OBS} index: 4 author: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Author', index: 19} 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: 3.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: 3.0.0-ballot required: [id, effectiveTime, value, statusCode, templateId]