AllergyIntolerance - code and reaction.substance

Hi,

I am trying to understand the different between code element and reaction.substance element available in the profile. I would really appreciate if some is able to provide a real world example for these two elements.

Thank you in advance!

The definition of AllergyIntolerance.reaction.substance, http://build.fhir.org/allergyintolerance-definitions.html#AllergyIntolerance.reaction.substance, attempts to differentiate it from the code element as follows:

Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the ‘code’ and ignore the ‘reaction.substance’. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.

Comments indicate

Coding of the specific substance (or pharmaceutical product) with a terminology capable of triggering decision support should be used wherever possible. The ‘code’ element allows for the use of a specific substance or pharmaceutical product, or a group or class of substances. In the case of an allergy or intolerance to a class of substances, (for example, “penicillins”), the ‘reaction.substance’ element could be used to code the specific substance that was identified as having caused the reaction (for example, “amoxycillin”). Duplication of the value in the ‘code’ and ‘reaction.substance’ elements is acceptable when a specific substance has been recorded in ‘code’.

Thank you so much for clear and concise explanation. This was very helpful during the review