<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="fiphr-stepstaken-stu3" />
  <meta>
    <versionId value="0.11" />
    <lastUpdated value="2017-11-17T13:11: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-stepstaken-stu3" />
  <version value="0.11" />
  <name value="Finnish PHR steps taken profile" />
  <status value="draft" />
  <experimental value="true" />
  <date value="2017-06-02T20:30:00+03:00" />
  <publisher value="W2E" />
  <description value="Finnish PHR profile for fitness device measurement or patient-reported steps taken over a time period. 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 Steps-Taken profile" />
      <definition value="The PHR Steps-Taken profile is used to store step count observations of a patient over various measurement periods." />
      <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:steps">
      <path value="Observation.code.coding" />
      <sliceName value="steps" />
      <short value="Observation of steps taken over an arbitrary period" />
      <definition value="Measured steps during an arbitrary reported period." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.code.coding:steps.system">
      <path value="Observation.code.coding.system" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code.coding:steps.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="66334-4" />
    </element>
    <element id="Observation.code.coding:dailySteps">
      <path value="Observation.code.coding" />
      <sliceName value="dailySteps" />
      <short value="Observation of steps taken in 24h" />
      <definition value="Measured steps 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:dailySteps.system">
      <path value="Observation.code.coding.system" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code.coding:dailySteps.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="41950-7" />
    </element>
    <element id="Observation.code.coding:weeklySteps">
      <path value="Observation.code.coding" />
      <sliceName value="weeklySteps" />
      <short value="Observation of steps taken in a week" />
      <definition value="Measured steps during a week; use period startdate-enddate to mark the observation week." />
      <max value="1" />
    </element>
    <element id="Observation.code.coding:weeklySteps.system">
      <path value="Observation.code.coding.system" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code.coding:weeklySteps.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="41952-3" />
    </element>
    <element id="Observation.value[x]:valueQuantity">
      <path value="Observation.valueQuantity" />
      <definition value="Finnish PHR: Steps taken 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="1" />
    </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="1" />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>