<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="devicemetricobservation" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">to do</div>
  </text>
  <url value="http://hl7.org/fhir/StructureDefinition/devicemetricobservation" />
  <name value="Device Metric Observation Profile" />
  <status value="draft" />
  <experimental value="false" />
  <date value="2014-11-17" />
  <publisher value="Health Level Seven International (Health Care Devices)" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org" />
    </telecom>
  </contact>
  <description value="This profile describes the direct or derived, qualitative or quantitative physiological measurement, setting, or calculation data produced by a medical device or a device component." />
  <fhirVersion value="3.0.1" />
  <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" />
      <min value="0" />
      <max value="*" />
    </element>
    <element id="Observation.identifier">
      <path value="Observation.identifier" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Identifier" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="false" />
    </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/StructureDefinition/Patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.context">
      <path value="Observation.context" />
      <min value="0" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Observation.effectiveDateTime">
      <path value="Observation.effectiveDateTime" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.issued">
      <path value="Observation.issued" />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="instant" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="Observation.interpretation">
      <path value="Observation.interpretation" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="Observation.comment">
      <path value="Observation.comment" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="Observation.bodySite">
      <path value="Observation.bodySite" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="Observation.method">
      <path value="Observation.method" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="Observation.specimen">
      <path value="Observation.specimen" />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Specimen" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="Observation.device">
      <path value="Observation.device" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceMetric" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange">
      <path value="Observation.referenceRange" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="false" />
    </element>
    <element id="Observation.related">
      <path value="Observation.related" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="false" />
    </element>
    <element id="Observation.related.type">
      <path value="Observation.related.type" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="Observation.related.target">
      <path value="Observation.related.target" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="Observation.component.extension:trend">
      <path value="Observation.component.extension.trend" />
      <sliceName value="trend" />
      <definition value="Shows the trend of glucose values" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.extension:systemTime">
      <path value="Observation.component.extension.systenTime" />
      <sliceName value="systemTime" />
      <definition value="Shows the system time and date" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.extension:displayTime">
      <path value="Observation.component.extension.displayTime" />
      <sliceName value="displayTime" />
      <definition value="Shows list of egvs" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.extension:realtimeValue">
      <path value="Observation.component.extension.realtimeValue" />
      <sliceName value="realtimeVlaue" />
      <definition value="Shows the system time and date" />
      <max value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.extension:status">
      <path value="Observation.component.extension.status" />
      <sliceName value="readingstatus" />
      <definition value="status of the current reading" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.extension:smoothedValue">
      <path value="Observation.component.extension.smoothedValue" />
      <sliceName value="smoothedValue" />
      <definition value="Estimated glucose value presented retrospectively on receiving device after smoothing; G6 devices only" />
      <max value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.extension:trendRate">
      <path value="Observation.component.extension.trendRate" />
      <sliceName value="trendRate" />
      <definition value="Rate at which glucose value is moving up or down" />
      <max value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>