This wiki has undergone a migration to Confluence found Here
FHIR Allergy Sample
Contents
A FHIR Representation of the Patient with allergies to different substances CDA Sample (from CDA Template Example Task Force)
The CDA sample follows this structure:
<component>
<section>
<text /> <- I put this aside for the moment
Erythromycin Allergy
Bactrim Allergy
Peanut Allergy
Cat Dander Allergy
</section>
</component>
Erythromycin Allergy
This item contains a lot of the same questions as the other allergies. Let's focus on one for brevity and I'll include the rest later
Bactrim Allergy
This item contains a lot of the same questions as the other allergies. Let's focus on one for brevity and I'll include the rest later
Peanut Allergy
<AllergyIntolerance xmlns="http://hl7.org/fhir"> <contained> <Substance id="sub1"> <text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml">Peanut</div> </text> <type> <coding> <!--UNII--> <system value="urn:oid:2.16.840.1.113883.4.9"/><display value="PEANUT"/> </coding> </type> </Substance> </contained> <contained> <AdverseReaction id="react1"> <text> <div xmlns="http://www.w3.org/1999/xhtml">Anaphylaxis Reaction</div> </text> <!--effective time of CDA allergy observation. Not exactly when you noticed the allergy.. but when you noticed the reaction--> <reactionDate value="1988"/> <subject> <reference value="patient" /> </subject> <didNotOccurFlag value ="false" /> <!--Is this who discovered the allergy?--> <recorder> <reference value="author1" /> </recorder> <!--why not in identifier?--> <symptom>
<coding> <system value="http://snomed.info/id"/>
<!--CDA alaphylaxis observation.entryrelationship.observation.value [severity] In this case, the cda sample severity is "Severe" (snomed 24484000)--> <severity value="severe"/> </symptom> <!-- do we need this if the allergy contains the allergen? <exposure> <exposureDate value="2012-09-17"/> <exposureType value="coincidental"/> <substance> <reference value="sub1"/> </substance> </exposure>--> </AdverseReaction> </contained> <contained> <Practitioner id="author1"> <identifier> <system value ="urn:oid:2.16.840.1.113883.4.6" /> <value value="66778899" /> </identifier> </Practitioner> </contained> <contained> <Patient id="patient"> <!--not specified in the example--> </Patient> </contained> <!--CDA Note: not sure which (I took from the observation/id) entry/act/id... or entry/act/entryRelationship/observation/id. entry/act describes the id for the allergy act... entry/act/entryrelationship/obsevation is the actual allergy --> <identifier> <value value="urn:uuid:e70b70c6-48d2-47af-8138-9470ed249bab" /> </identifier> <!--Food allergy--> <identifier> <label value ="Food Allergy" /> <system value="http://snomed.info/id"/> <value value="414285001"/> </identifier> <!--CDA Note: reference text?--> <!--CDA Note: time the reaction occurred isn't recordable observation.entryrelationship.obsevation--> <!--Severe == high?--> <!--CDA Note: the CDA differentiates from the severity of the reaction and the severity of the allergy... but I don't see a FHIR equivalent.--> <criticality value="high" /> <!--CDA Note: we're inferring a bit here (because of snomed food allergy code)--> <sensitivityType value="allergy" /> <!--Act.effectivetime--> <recordedDate value="1998-05-01T11:45:00-08:00"/> <!--CDA Note: entry/act/statuscode denotes that the allergy is active and needs to be monitored. it doesn't really map 1:1 to confirmed--> <status value="confirmed" /> <subject> <reference value="#patient" /> </subject> <!--CDA Note: the author of the act--> <recorder> <reference value="#author1" /> </recorder> <substance> <reference value="#sub1"/> <display value="Peanut"/> </substance> <reaction> <reference value="#react1"/> <display value="Anaphylaxis"/> </reaction> <sensitivityTest></sensitivityTest> </AllergyIntolerance><display value="Anaphylaxis"/> </coding> <text value="Anaphylaxis reaction"/>
Cat Dander Allergy
The FHIR equivalent to the CDA Entry for cat allergy is:
<AllergyIntolerance xmlns="http://hl7.org/fhir"> <!--Cat dander substance (entry.act.entryRelationship.observation.participant.participantRole[classCode="MANU"].playingEntity[classCode="MMAT"].code Note too, that entry.act.entryRelationship.observation.effectiveTime.low indicates allergy onset, and I can't seem to find a place to map that... Adverse Reaction seems to have a time that indicates when the reaction occurred.--> <contained> <Substance id="sub1"> <text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml">Cat Dander</div> </text> <type> <coding> <!--UNII--> <system value="urn:oid:2.16.840.1.113883.4.9"/><display value="Felis catus dander"/> </coding> </type> </Substance> <!--Note that there does not seem an appropriate place to put entry.act.entryRelationship.observation.entryRelationship[typeCode="SUBJ"] (describing the severity of the allergy) SEE note at criticality node below--> </contained> <!--Eye Swelling Reaction (entry.act.entryRelationship.observation.entryRelationship[typeCode="MFST"].observation)--> <contained> <AdverseReaction id="react1"> <text> <div xmlns="http://www.w3.org/1999/xhtml">Eye swelling reaction</div> </text> <!--A reaction to cat dander was observed for 3 days in January 2009. We don't seem to have an equivalent way of representing it.--> <!--<effectiveTime> <low value="20090116"/> <high value="2009019"/> </effectiveTime>--> <reactionDate value="2009-01-16"/> <!--Since there's no way to do effectiveTime.low/high that I can see, I took the low'\--> <!--Making a safe assumption--> <subject> <reference value="patient" /> </subject> <!--Node CDA negation indicators, so...--> <didNotOccurFlag value ="false" /> <!--Since there's no other author specified, we'll go up the tree until we find one... and that's at entry.act.author--> <recorder> <reference value="author1" /> </recorder> <!--why not in identifier?--> <symptom>
<coding> <system value="http://snomed.info/id"/>
<!--entryrelationship[typeCode="SUBJ"].observation.value == 255604002 [mild severity]--> <severity value="mild"/> </symptom> </AdverseReaction> </contained> <!--Author--> <!--This is the CDA entry.act.author:--> <!--This author participant indicates the provider who recorded the allergy --> <!--<author> Same as when the allergy was first recorded in the patient's chart <time value="199805011145-0800"/>'' '''<-Since this is the same as the act effective time, we can ignore it <assignedAuthor> <id extension="66778899" root="2.16.840.1.113883.4.6"/> This ID points back to a provider described in the header </assignedAuthor> </author>--> <contained> <Practitioner id="author1"> <identifier> <system value ="urn:oid:2.16.840.1.113883.4.6" /> <value value="66778899" /> </identifier> </Practitioner> </contained> <!--Patient (referenced in another resource elsewhere)--> <contained> <Patient id="patient"> <!--assumed to be in the header in the CDA example--> </Patient> </contained> <!--CDA entry. should both act.id and entry.act.entryRelationship.observation.id be mapped?--> <!--I took act.id--> entry/act describes the id for the allergy act... entry/act/entryrelationship/obsevation is the actual allergy--></nowiki> <identifier> <value value="urn:uuid:dd8f01c9-fb0d-4744-aeda-75e7f208dca7" /> </identifier> <!--Allergy to substance (entry.act.entryRelationship.observation.value)--> <identifier> <label value ="Allergy to substance" /> <system value="http://snomed.info/id"/> <value value="419199007"/> </identifier> <!--Is this the correct inference?--> <!--the CDA differentiates from the severity of the reaction and the severity of the allergy... but I don't see a FHIR equivalent.--> <criticality value="" /> <!--we're inferring a bit here (because of snomed allergy code)--> <sensitivityType value="allergy" /> <!--entry.act.effectivetime.low--> <recordedDate value="1998-05-01T11:45:00-08:00"/> <!--CDA Note: entry.act.statuscode="active" denotes that the allergy is active and needs to be monitored. It doesn't seem to really map 1:1 to confirmed--> <status value="confirmed" /> <subject> <reference value="#patient" /> </subject> <!--CDA Note: the author of the act--> <recorder> <reference value="#author1" /> </recorder> <substance> <reference value="#sub1"/> <display value="Cat Dander"/> </substance> <reaction> <reference value="#react1"/> <display value="Eye swelling"/> </reaction> <sensitivityTest></sensitivityTest> </AllergyIntolerance><display value="Eye swelling"/> </coding> <text value="Eye swelling"/>