<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="us-core-observationresults" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">
      <table border="0" cellpadding="0" cellspacing="0" style="border: 0px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;">
        <tr style="border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;">
          <th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a href="http://build.fhir.org/formats.html#table" title="The logical name of the element">Name</a>
          </th>
          <th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a href="http://build.fhir.org/formats.html#table" title="Information about the use of the element">Flags</a>
          </th>
          <th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a href="http://build.fhir.org/formats.html#table" title="Minimum and Maximum # of times the the element can appear in the instance">Card.</a>
          </th>
          <th style="width: 100px" class="hierarchy">
            <a href="http://build.fhir.org/formats.html#table" title="Reference to the type of the element">Type</a>
          </th>
          <th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a href="http://build.fhir.org/formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
            <span style="float: right">
              <a href="http://build.fhir.org/formats.html#table" title="Legend for this format">
                <img src="http://build.fhir.org/help16.png" alt="doco" style="background-color: inherit" />
              </a>
            </span>
          </th>
        </tr>
        <tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white;">
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1.png)" class="hierarchy">
            <img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy" />
            <a href="StructureDefinition-us-core-observationresults-definitions.html#Observation" title="The US Core Observation Result Profile is based upon the core FHIR Observation Resource and created to meet the 2015 Edition Common Clinical Data Set 'Laboratory test(s) and Laboratory value(s)/result(s)' requirements.">Observation</a>
            <a name="Observation"></a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="padding: 3px" title="This element has or is affected by some invariants">I</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="opacity: 0.4">0</span>
            <span style="opacity: 0.5">..</span>
            <span style="opacity: 0.4">*</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy" />
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">US Core Result Observation<br /><span style="font-weight:bold">us-core-2: </span>If there is no component or related element then either a value[x] or a data absent reason must be present</td>
        </tr>
        <tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white;">
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy">
            <img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="icon_primitive.png" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy" />
            <a href="StructureDefinition-us-core-observationresults-definitions.html#Observation.status">status</a>
            <a name="Observation.status"></a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="padding: 3px; color: white; background-color: red" title="This element must be supported">S</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="opacity: 0.4">1</span>
            <span style="opacity: 0.5">..</span>
            <span style="opacity: 0.4">1</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#code">code</a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="font-weight:bold">Binding: </span>
            <a href="http://build.fhir.org/valueset-observation-status.html">ObservationStatus</a> (<a href="http://build.fhir.org/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set">required</a>)</td>
        </tr>
        <tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white;">
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy">
            <img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="icon_datatype.gif" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy" />
            <a href="StructureDefinition-us-core-observationresults-definitions.html#Observation.category">category</a>
            <a name="Observation.category"></a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="padding: 3px; color: white; background-color: red" title="This element must be supported">S</span>
            <span style="padding: 3px" title="This element has or is affected by some invariants">I</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..*</td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#CodeableConcept">CodeableConcept</a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="font-weight:bold">us-core-5: </span>Must have a category of 'laboratory' and a code system 'http://hl7.org/fhir/observation-category'<br /></td>
        </tr>
        <tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white;">
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy">
            <img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="icon_datatype.gif" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy" />
            <a href="StructureDefinition-us-core-observationresults-definitions.html#Observation.code" title="The test that was performed.  A LOINC **SHALL** be used if the concept is present in LOINC.">code</a>
            <a name="Observation.code"></a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="padding: 3px; color: white; background-color: red" title="This element must be supported">S</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="opacity: 0.4">1</span>
            <span style="opacity: 0.5">..</span>
            <span style="opacity: 0.4">1</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#CodeableConcept">CodeableConcept</a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">Laboratory Test Name<br /><span style="font-weight:bold">Binding: </span><a href="http://build.fhir.org/valueset-observation-codes.html">LOINC Codes</a> (<a href="http://build.fhir.org/terminologies.html#extensible" title="To be conformant, the concept in this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated.  If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead.">extensible</a>)</td>
        </tr>
        <tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white;">
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy">
            <img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="icon_reference.png" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy" />
            <a href="StructureDefinition-us-core-observationresults-definitions.html#Observation.subject">subject</a>
            <a name="Observation.subject"></a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="padding: 3px; color: white; background-color: red" title="This element must be supported">S</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..1</td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a href="http://build.fhir.org/references.html">Reference</a>(<a href="StructureDefinition-us-core-patient.html">US Core Patient Profile</a>)</td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy" />
        </tr>
        <tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white;">
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy">
            <img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="icon_choice.gif" alt="." style="background-color: white; background-color: inherit" title="Choice of Types" class="hierarchy" />
            <a href="StructureDefinition-us-core-observationresults-definitions.html#Observation.effective[x]" title="For lab tests this is the specimen collection date.  For Ask at Order Entry Questions (AOE)'s this is the date the question was asked.">effective[x]</a>
            <a name="Observation.effective_x_"></a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="padding: 3px; color: white; background-color: red" title="This element must be supported">S</span>
            <span style="padding: 3px" title="This element has or is affected by some invariants">I</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="opacity: 0.4">0</span>
            <span style="opacity: 0.5">..</span>
            <span style="opacity: 0.4">1</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#dateTime">dateTime</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#Period">Period</a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="font-weight:bold">us-core-1: </span>Datetime must be at least to day.</td>
        </tr>
        <tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white;">
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy">
            <img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy" />
            <a href="StructureDefinition-us-core-observationresults-definitions.html#Observation.value[x]" title="The Laboratory result value.  If a coded value,  the valueCodeableConcept.code **SHOULD**  be selected from [SNOMED CT](http://hl7.org/fhir/ValueSet/uslab-obs-codedresults).  If a numeric value, valueQuantity.code **SHALL** be selected from [UCUM](http://unitsofmeasure.org).  A FHIR [UCUM Codes value set](http://hl7.org/fhir/STU3/valueset-ucum-units.html) that defines all UCUM codes is in the FHIR specification.">value[x]</a>
            <a name="Observation.value_x_"></a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="padding: 3px; color: white; background-color: red" title="This element must be supported">S</span>
            <span style="padding: 3px" title="This element has or is affected by some invariants">I</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="opacity: 0.4">0</span>
            <span style="opacity: 0.5">..</span>
            <span style="opacity: 0.4">1</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#Quantity">Quantity</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#CodeableConcept">CodeableConcept</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#string">string</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#boolean">boolean</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#Range">Range</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#Ratio">Ratio</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#SampledData">SampledData</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#Attachment">Attachment</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#time">time</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#dateTime">dateTime</a>
            <span style="opacity: 0.4">, </span>
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#Period">Period</a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">Result Value<br /><span style="font-weight:bold">us-core-4: </span>SHOULD use Snomed CT for coded Results<br /><span style="font-weight:bold">us-core-3: </span>SHALL use UCUM for coded quantity units.</td>
        </tr>
        <tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white;">
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck00.png)" class="hierarchy">
            <img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy" />
            <img src="icon_datatype.gif" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy" />
            <a href="StructureDefinition-us-core-observationresults-definitions.html#Observation.dataAbsentReason">dataAbsentReason</a>
            <a name="Observation.dataAbsentReason"></a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="padding: 3px; color: white; background-color: red" title="This element must be supported">S</span>
            <span style="padding: 3px" title="This element has or is affected by some invariants">I</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="opacity: 0.4">0</span>
            <span style="opacity: 0.5">..</span>
            <span style="opacity: 0.4">1</span>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <a style="opacity: 0.4" href="http://build.fhir.org/datatypes.html#CodeableConcept">CodeableConcept</a>
          </td>
          <td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
            <span style="font-weight:bold">Binding: </span>
            <a href="http://build.fhir.org/valueset-observation-valueabsentreason.html">Observation Value Absent Reason</a> (<a href="http://build.fhir.org/terminologies.html#extensible" title="To be conformant, the concept in this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated.  If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead.">extensible</a>)</td>
        </tr>
        <tr>
          <td colspan="5" class="hierarchy">
            <br />
            <a href="http://build.fhir.org/formats.html#table" title="Legend for this format">
              <img src="http://build.fhir.org/help16.png" alt="doco" style="background-color: inherit" /> Documentation for this format</a>
          </td>
        </tr>
      </table>
    </div>
  </text>
  <url value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults" />
  <version value="1.0.0" />
  <name value="US  Core Results Profile" />
  <status value="draft" />
  <date value="2016-08-01" />
  <publisher value="HL7 US Realm Steering Committee" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.healthit.gov" />
    </telecom>
  </contact>
  <fhirVersion value="3.1.0" />
  <mapping>
    <identity value="argonaut-dq-dstu2" />
    <uri value="http://unknown.org/Argonaut DQ DSTU2" />
    <name value="Argonaut DQ DSTU2" />
  </mapping>
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Mapping" />
  </mapping>
  <mapping>
    <identity value="sct-concept" />
    <uri value="http://snomed.info/conceptdomain" />
    <name value="SNOMED CT Concept Domain Binding" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/w5" />
    <name value="W5 Mapping" />
  </mapping>
  <mapping>
    <identity value="sct-attr" />
    <uri value="http://snomed.info/sct" />
    <name value="SNOMED CT Attribute Binding" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation">
      <path value="Observation" />
      <short value="US Core Result Observation" />
      <definition value="The US Core Observation Result Profile is based upon the core FHIR Observation Resource and created to meet the 2015 Edition Common Clinical Data Set 'Laboratory test(s) and Laboratory value(s)/result(s)' requirements." />
      <alias value="Obs" />
      <constraint>
        <key value="us-core-2" />
        <severity value="error" />
        <human value="If there is no component or related element then either a value[x] or a data absent reason must be present" />
        <expression value="(component.empty() and related.empty()) implies (dataAbsentReason or value)" />
        <xpath value="exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value)]) or exists(f:dataAbsentReason)" />
      </constraint>
      <mustSupport value="false" />
      <isModifier value="false" />
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation" />
      </mapping>
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/observation-status" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation.status" />
      </mapping>
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <constraint>
        <key value="us-core-5" />
        <severity value="error" />
        <human value="Must have a category of 'laboratory' and a code system 'http://hl7.org/fhir/observation-category'" />
        <expression value="where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='laboratory').exists()" />
        <xpath value="exists(f:coding/code[@value='laboratory']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])" />
      </constraint>
      <mustSupport value="true" />
      <isModifier value="false" />
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation.category" />
      </mapping>
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <short value="Laboratory Test Name" />
      <definition value="The test that was performed.  A LOINC **SHALL** be used if the concept is present in LOINC." />
      <comment value="The typical patterns for codes are:  1)  a LOINC code either as a  translation from a &quot;local&quot; code or as a primary code, or 2)  a local code only if no suitable LOINC exists,  or 3)  both the local and the LOINC translation.   Systems SHALL be capable of sending the local code if one exists.  When using LOINC , Use either the SHORTNAME or LONG_COMMON_NAME field for the display." />
      <alias value="Test Name" />
      <alias value="Observation Identifer" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
      <binding>
        <strength value="extensible" />
        <description value="LOINC codes" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/observation-codes" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation.code" />
      </mapping>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation.subject" />
      </mapping>
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <definition value="For lab tests this is the specimen collection date.  For Ask at Order Entry Questions (AOE)'s this is the date the question was asked." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="Period" />
      </type>
      <constraint>
        <key value="us-core-1" />
        <severity value="error" />
        <human value="Datetime must be at least to day." />
        <expression value="($this as dateTime).toString().length() &gt;= 8" />
        <xpath value="f:matches(effectiveDateTime,/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)" />
      </constraint>
      <mustSupport value="true" />
      <isModifier value="false" />
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation.effective[x]" />
      </mapping>
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <short value="Result Value" />
      <definition value="The Laboratory result value.  If a coded value,  the valueCodeableConcept.code **SHOULD**  be selected from [SNOMED CT](http://hl7.org/fhir/ValueSet/uslab-obs-codedresults).  If a numeric value, valueQuantity.code **SHALL** be selected from [UCUM](http://unitsofmeasure.org).  A FHIR [UCUM Codes value set](http://hl7.org/fhir/STU3/valueset-ucum-units.html) that defines all UCUM codes is in the FHIR specification." />
      <min value="0" />
      <max value="1" />
      <constraint>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice">
          <valueBoolean value="true" />
        </extension>
        <key value="us-core-4" />
        <severity value="warning" />
        <human value="SHOULD use Snomed CT for coded Results" />
        <expression value="valueCodeableConcept.coding.system.empty() or valueCodeableConcept.coding.system = 'http://snomed.info/sct'" />
        <xpath value="not(exists(f:valueCodeableConcept/f:coding/f:system) ) or  f:valueCodeableConcept/f:coding/f:system[@value='http://snomed.info/sct']" />
      </constraint>
      <constraint>
        <key value="us-core-3" />
        <severity value="error" />
        <human value="SHALL use UCUM for coded quantity units." />
        <expression value="valueQuantity.system.empty() or valueQuantity.system = 'http://unitsofmeasure.org'" />
        <xpath value="not(exists(f:valueQuantity/f:system) ) or  f:valueQuantity/f:system[@value='http://unitsofmeasure.org']" />
      </constraint>
      <mustSupport value="true" />
      <isModifier value="false" />
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation.value[x]" />
      </mapping>
    </element>
    <element id="Observation.dataAbsentReason">
      <path value="Observation.dataAbsentReason" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
      <binding>
        <strength value="extensible" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/observation-valueabsentreason" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation.dataAbsentReason" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>