<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="fiphr-fitness-distance-stu3" />
  <meta>
    <versionId value="0.10" />
    <lastUpdated value="2017-11-17T09:59:00+03:00" />
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-summary">
    <valueMarkdown value="### Complete Summary of the Mandatory Requirements&#xA;&#xA;1.  One status in `Observation.status`which has a [required](http://hl7.org/fhir/terminologies.html#extensible) binding to:&#xA;    -    [ObservationStatus] value set.&#xA;1.  A category in `Observation.category` which must have:&#xA;    -   a fixed `Observation.category.coding.system`=&quot;http://hl7.org/fhir/observation-category&quot;&#xA;    -   a fixed `Observation.category.coding.code`= &quot;fitness&quot;&#xA;&#xA;1.  A code in `Observation.code`&#xA;    -   a fixed `Observation.code.coding.system`= &quot;http://loinc.org&quot;&#xA;    -   a LOINC code in `Observation.code.coding.code` which has an [extensible](http://hl7.org/fhir/terminologies.html#extensible) binding to:&#xA;         -   [Fitness] value set.&#xA;                &#xA;1.  One patient in `Observation.subject`&#xA;1.  A date and time in `effectiveDateTime` or `effectivePeriod`&#xA;1.  Either one `Observation.valueQuantity` or, if there is no value, one code in `Observation.DataAbsentReason`&#xA;    -   Each Observation.valueQuantity must have:&#xA;        -   One numeric value in `Observation.valueQuantity.value`&#xA;        -   a fixed `Observation.valueQuantity.system`=&quot;http://unitsofmeasure&quot;&#xA;        -   a UCUM unit code in `Observation.valueQuantity.code` which has an [required] binding to:&#xA;             -   [Fitness Units] value set.&#xA;    -   Observation.DataAbsentReason is bound to [Observation Value&#xA;        Absent Reason] value set.&#xA;&#xA;1.  When using a panel code to group component observations (Note: See&#xA;    the comments regarding blood pressure in the table above), one or&#xA;    more `Observation.component.code` each of which must have:&#xA;    -   a fixed&#xA;        `Observation.component.code.coding.system` =&quot;&lt;http://loinc.org&gt;&quot;&#xA;         -   a LOINC code in `Observation.code.coding.code` which has an [extensible] binding to:&#xA;             -   [Fitness Units] value set.&#xA;&#xA;1.  Either one `Observation.component.valueQuantity` or, if there is&#xA;    no value, one code in `Observation.component.DataAbsentReason`&#xA;    -   Each Observation.component.valueQuantity must have:&#xA;        -   One numeric value in&#xA;            `Observation.component.valueQuantity.value`&#xA;        -   a fixed `Observation.component.valueQuantity.system`= &quot;&lt;http://unitsofmeasure.org&gt;&quot;&#xA;        -   a UCUM unit code in&#xA;            `Observation.component.valueQuantity.code` which has an [required] binding to:&#xA;             -   [Fitness Units] value set.&#xA;    -   Observation.component.DataAbsentReason is bound to [Observation&#xA;        Value Absent Reason] value set.&#xA;&#xA;1.  When using a panel code to group observations, one or more reference&#xA;    to Fitness Observations in `Observation.related.target`&#xA;    -   a fixed `Observation.related.type`= &quot;has-member&quot;&#xA;&#xA; [Fitness]: valueset-observation-fitnessresult.html&#xA;  [Fitness Units]: valueset-ucum-fitness-common.html&#xA;  [extensible]: terminologies.html#extensible&#xA;  [ObservationStatus]: valueset-observation-status.html&#xA; [Observation Value Absent Reason]: valueset-observation-valueabsentreason.html&#xA;[required]: terminologies.html#required" />
  </extension>
  <url value="http://phr.kanta.fi/StructureDefinition/fiphr-distance-stu3" />
  <version value="0.10" />
  <name value="Finnish PHR Distance profile" />
  <status value="draft" />
  <experimental value="true" />
  <date value="2017-06-13T22:01:00+03:00" />
  <publisher value="W2E" />
  <description value="Finnish PHR profile for fitness device measurement or patient-reported distance reached over a time period. Profile does not disclose exercise types contributing to the cumulative value, as this is left for the exercise profiles. The profile is based on the Finnish PHR Fitness profile." />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://phr.kanta.fi/StructureDefinition/fiphr-fitness-stu3" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation">
      <path value="Observation" />
      <short value="Finnish PHR Distance profile" />
      <definition value="Finnish PHR profile for distance reached observation, used in Fitness or Physical Activity measurements made about a patient." />
      <comment value="." />
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="Observation.code.coding.code" />
        </discriminator>
        <ordered value="false" />
        <rules value="closed" />
      </slicing>
    </element>
    <element id="Observation.code.coding:distance">
      <path value="Observation.code.coding" />
      <sliceName value="distance" />
      <short value="Observation of distance reached over an arbitrary period" />
      <definition value="Measured distance (meters) during an arbitrary reported period." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.code.coding:distance.system">
      <path value="Observation.code.coding.system" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code.coding:distance.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="55430-3" />
    </element>
    <element id="Observation.code.coding:distance24h">
      <path value="Observation.code.coding" />
      <sliceName value="distance24h" />
      <short value="Observation of distance reached in 24h" />
      <definition value="Measured distance during a 24 hour period; use dateTime with 8 characters to mark the date of observation data." />
      <max value="1" />
    </element>
    <element id="Observation.code.coding:distance24h.system">
      <path value="Observation.code.coding.system" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code.coding:distance24h.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="41953-1" />
    </element>
    <element id="Observation.code.coding:weeklyDistance">
      <path value="Observation.code.coding" />
      <sliceName value="weeklyDistance" />
      <short value="Observation of distance reached in a week" />
      <definition value="Measured distance during a week; use period of 7 days (start date and end date) to mark the week observed. In Finland week starts with Monday." />
      <max value="1" />
    </element>
    <element id="Observation.code.coding:weeklyDistance.system">
      <path value="Observation.code.coding.system" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code.coding:weeklyDistance.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="41955-6" />
    </element>
    <element id="Observation.value[x]:valueQuantity">
      <path value="Observation.valueQuantity" />
      <definition value="Finnish PHR: Distance reached (meters) as integer" />
      <min value="1" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="valueQuantity:valueQuantity.value">
      <path value="Observation.valueQuantity.value" />
      <min value="1" />
    </element>
    <element id="valueQuantity:valueQuantity.comparator">
      <path value="Observation.valueQuantity.comparator" />
      <max value="0" />
    </element>
    <element id="valueQuantity:valueQuantity.unit">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Observation.valueQuantity.unit" />
      <min value="1" />
      <type>
        <code value="string" />
      </type>
      <fixedString value="m" />
    </element>
    <element id="valueQuantity:valueQuantity.system">
      <path value="Observation.valueQuantity.system" />
      <min value="1" />
      <fixedUri value="http://unitsofmeasure.org" />
    </element>
    <element id="valueQuantity:valueQuantity.code">
      <path value="Observation.valueQuantity.code" />
      <min value="1" />
      <type>
        <code value="code" />
      </type>
      <fixedCode value="m" />
    </element>
    <element id="Observation.bodySite">
      <path value="Observation.bodySite" />
      <max value="0" />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>