<StructureDefinition xmlns="http://hl7.org/fhir">
  <meta>
    <lastUpdated value="2019-05-07T22:27:15.789-04:00" />
  </meta>
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">VistA suggests substance codes based on user input, but the user selects the appropriate code. Each suggestion comes from a particular source file. These files tend to be specific to substance classifications - foods, drug ingredients, drug classes, products, e.g., so the source file could in principle be deduced from the coded value. Since this ability to deduce is not a requirement, and it has not been tested, this field captures which file was used to provide the selected code.</div>
  </text>
  <url value="https://www.VA.gov/FHIR/StructureDefinition/SubstanceSelectionSourceFile" />
  <name value="SubstanceSelectionSourceFile" />
  <status value="draft" />
  <date value="2019-03-01T04:07:34.521-05:00" />
  <description value="Identifier of file from which an AllergyIntolerance substance was selected" />
  <requirements value="Identify which VA file was used to select substance code" />
  <fhirVersion value="1.0.2" />
  <mapping>
    <identity value="VistAElements" />
    <uri value="http://www.va.gov/systems/VistAElements" />
    <name value="VistAElements" />
  </mapping>
  <kind value="datatype" />
  <constrainedType value="Extension" />
  <abstract value="false" />
  <contextType value="datatype" />
  <context value="Coding" />
  <base value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <differential>
    <element>
      <path value="Extension" />
      <short value="Substance selection source file" />
      <definition value="File from which coded substance was selected" />
      <min value="1" />
      <max value="1" />
      <mapping>
        <identity value="VistAElements" />
        <map value="120.8-1" />
      </mapping>
    </element>
    <element>
      <path value="Extension.url" />
      <fixedUri value="https://www.VA.gov/FHIR/StructureDefinition/SubstanceSelectionSourceFile" />
    </element>
    <element>
      <path value="Extension.valueCoding" />
      <short value="Substance selection source file" />
      <definition value="Identifier of file from which an AllergyIntolerance substance was selected" />
      <type>
        <code value="Coding" />
      </type>
      <binding>
        <strength value="required" />
        <valueSetUri value="http://www.va.gov/Terminology/VistADefinedTerms/120.8-1" />
      </binding>
    </element>
    <element>
      <path value="Extension.valueCoding.code" />
      <name value="SubstanceSelectionSourceFile" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <valueSetUri value="http://www.VA.gov/Terminology/VistAElements/120.8-1" />
      </binding>
    </element>
  </differential>
</StructureDefinition>