<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="fiphr-sd-fitness" />
  <meta>
    <versionId value="12" />
    <lastUpdated value="2023-04-05T13:44:33.0255086+00:00" />
  </meta>
  <url value="http://phr.kanta.fi/StructureDefinition/fiphr-sd-fitness" />
  <version value="0.1.0" />
  <name value="FIPHRSDFitness" />
  <title value="Finnish PHR Fitness profile" />
  <status value="draft" />
  <experimental value="false" />
  <date value="2023-04-05T13:44:57.3431185+00:00" />
  <description value="Finnish PHR base profile for Fitness Observation resource" />
  <purpose value="Finnish PHR abstract base profile for Observation used in various fitness or wellness measurements provided about a patient. In many cases these measures are complementary or parallel to automatic vital sign measurements related to patient's wellness or fitness. Base profile defines profiled elements used in all fitness observation resources." />
  <copyright value="W2E" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="true" />
  <type value="Observation" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation">
      <path value="Observation" />
      <comment value="." />
    </element>
    <element id="Observation.meta">
      <path value="Observation.meta" />
      <min value="1" />
    </element>
    <element id="Observation.meta.profile">
      <path value="Observation.meta.profile" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="FinnishPHR: fiphrProfile SHALL be used. Other profiles MAY be used.&#xD;&#xA;The URL is a reference to [StructureDefinition.url]()." />
      <min value="1" />
    </element>
    <element id="Observation.meta.profile:fiphrProfile">
      <path value="Observation.meta.profile" />
      <sliceName value="fiphrProfile" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.language">
      <path value="Observation.language" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Finnish PHR: A code of human language." />
      </binding>
    </element>
    <element id="Observation.text">
      <path value="Observation.text" />
      <min value="1" />
    </element>
    <element id="Observation.extension">
      <path value="Observation.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="Observation.extension:creatingApplication">
      <path value="Observation.extension" />
      <sliceName value="creatingApplication" />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="http://phr.kanta.fi/StructureDefinition/fiphr-ext-creatingapplication" />
      </type>
    </element>
    <element id="Observation.identifier">
      <path value="Observation.identifier" />
      <definition value="A unique identifier assigned to this observation. &#xD;&#xA;Finnish PHR: At least one of the identifiers SHALL be globally unique (e.g. an uuid as the value and 'urn:ietf:rfc:3986' as the system)." />
      <min value="1" />
    </element>
    <element id="Observation.identifier.use">
      <path value="Observation.identifier.use" />
      <definition value="The purpose of this identifier. &#xD;&#xA;Finnish PHR: The code 'official' SHALL be only used if the given identifier value is truly globally unique (e.g. an uuid as the value and 'urn:ietf:rfc:3986' as the system)." />
      <comment value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary." />
    </element>
    <element id="Observation.identifier.system">
      <path value="Observation.identifier.system" />
      <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" />
      <min value="1" />
    </element>
    <element id="Observation.identifier.value">
      <path value="Observation.identifier.value" />
      <definition value="The portion of the identifier typically relevant to the user and which is unique within the context of the system. &#xD;&#xA;Finnish PHR: At least one of the identifiers SHALL be truly globally unique (e.g. an uuid as the value and 'urn:ietf:rfc:3986' as the system)." />
      <comment value="If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html)." />
      <min value="1" />
    </element>
    <element id="Observation.identifier.assigner">
      <path value="Observation.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="Observation.basedOn">
      <path value="Observation.basedOn" />
      <max value="0" />
    </element>
    <element id="Observation.partOf">
      <path value="Observation.partOf" />
      <max value="0" />
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <short value="Finnish PHR: Status final" />
      <definition value="Finnish PHR: The status of the result value." />
      <comment value="Finnish PHR: Only status 'final' shall be used in FinnishPHR." />
      <requirements value="Finnish PHR: Need to track the status of individual results. Erronous observation may not be stored in FinnishPHR." />
      <fixedCode value="final" />
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <short value="Classification of type of observation:" />
      <definition value="Classification of type of observation." />
      <comment value="FinnishPHR: Only value fitness valid in FinnishPHR (defined by the value set). More fine-grained filtering can be performed using the  Observation.code." />
      <requirements value="All resources are fitness (physical activity) observations." />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="extensible" />
        <description value="Finnish PHR: Codes for high level observation categories." />
        <valueSet value="http://phr.kanta.fi/ValueSet/fitness-category" />
      </binding>
    </element>
    <element id="Observation.category.coding">
      <path value="Observation.category.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <discriminator>
          <type value="value" />
          <path value="code" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="FinnishPHR: fiphrCategory SHALL be used. Other categories MAY be used.&#xD;&#xA;A reference to a code defined by a terminology system." />
      <min value="1" />
    </element>
    <element id="Observation.category.coding:fiphrCategory">
      <path value="Observation.category.coding" />
      <sliceName value="fiphrCategory" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.category.coding:fiphrCategory.system">
      <path value="Observation.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://phr.kanta.fi/fiphr-cs-fitnesscategory" />
    </element>
    <element id="Observation.category.coding:fiphrCategory.code">
      <path value="Observation.category.coding.code" />
      <short value="Fitness observation category" />
      <min value="1" />
      <fixedCode value="fitness" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <short value="Type of observation (type / code)" />
      <comment value="Describes type of observation." />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://phr.kanta.fi/ValueSet/fiphr-vs-fitnessresult" />
      </binding>
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <min value="1" />
    </element>
    <element id="Observation.code.coding.system">
      <path value="Observation.code.coding.system" />
      <min value="1" />
    </element>
    <element id="Observation.code.coding.code">
      <path value="Observation.code.coding.code" />
      <definition value="A symbol in syntax defined by the system." />
      <min value="1" />
    </element>
    <element id="Observation.code.coding.display">
      <path value="Observation.code.coding.display" />
      <min value="1" />
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <definition value="Finnish PHR: The patient described by the observation and into whose record the observation is placed." />
      <comment value="Finnish PHR: Who this observation is about. Usually the same person as the application user, but if the user is storing observations on behalf of someone else, the subject is the person whose measurements or other observations are entered." />
      <requirements value="Finnish PHR: Observations have always known Patient." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Observation.subject.reference">
      <path value="Observation.subject.reference" />
      <min value="1" />
    </element>
    <element id="Observation.subject.identifier.assigner">
      <path value="Observation.subject.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="Observation.focus">
      <path value="Observation.focus" />
      <max value="0" />
    </element>
    <element id="Observation.encounter">
      <path value="Observation.encounter" />
      <max value="0" />
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <min value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="Observation.issued">
      <path value="Observation.issued" />
      <short value="Finnish PHR: The date and time this observation is stored." />
      <definition value="Finnish PHR:  The date and time this observation is stored." />
      <min value="1" />
    </element>
    <element id="Observation.performer">
      <path value="Observation.performer" />
      <short value="Finnish PHR: Application user who is responsible for the observation" />
      <definition value="FinnishPHR: Application user who was responsible for asserting the observed value as &quot;true&quot;." />
      <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Observation.performer.reference">
      <path value="Observation.performer.reference" />
      <min value="1" />
    </element>
    <element id="Observation.performer.identifier.assigner">
      <path value="Observation.performer.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="Observation.dataAbsentReason">
      <path value="Observation.dataAbsentReason" />
      <max value="0" />
    </element>
    <element id="Observation.interpretation">
      <path value="Observation.interpretation" />
      <max value="1" />
    </element>
    <element id="Observation.interpretation.coding">
      <path value="Observation.interpretation.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="FinnishPHR: fiphrInterpretation  SHALL be used. Other interpretations MAY be used.&#xD;&#xA;A reference to a code defined by a terminology system." />
      <min value="1" />
    </element>
    <element id="Observation.interpretation.coding:fiphrInterpretation">
      <path value="Observation.interpretation.coding" />
      <sliceName value="fiphrInterpretation" />
      <definition value="Finnish PHR: The assessment made based on the result of the observation. Intended as a simple compact code placed adjacent to the result value. Otherwise known as abnormal flag." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.interpretation.coding:fiphrInterpretation.system">
      <path value="Observation.interpretation.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation" />
    </element>
    <element id="Observation.interpretation.coding:fiphrInterpretation.code">
      <path value="Observation.interpretation.coding.code" />
      <min value="1" />
    </element>
    <element id="Observation.interpretation.coding:fiphrInterpretation.display">
      <path value="Observation.interpretation.coding.display" />
      <min value="1" />
    </element>
    <element id="Observation.note.author[x]">
      <path value="Observation.note.author[x]" />
      <max value="0" />
      <type>
        <code value="Reference" />
        <aggregation value="referenced" />
      </type>
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Observation.bodySite">
      <path value="Observation.bodySite" />
      <max value="0" />
    </element>
    <element id="Observation.method">
      <path value="Observation.method" />
      <max value="0" />
    </element>
    <element id="Observation.specimen">
      <path value="Observation.specimen" />
      <max value="0" />
    </element>
    <element id="Observation.device">
      <path value="Observation.device" />
      <max value="0" />
    </element>
    <element id="Observation.hasMember">
      <path value="Observation.hasMember" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Observation.hasMember.identifier.assigner">
      <path value="Observation.hasMember.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="Observation.derivedFrom">
      <path value="Observation.derivedFrom" />
      <max value="0" />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <comment value="Profiled further in derived profiles that use components." />
    </element>
    <element id="Observation.component.code">
      <path value="Observation.component.code" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://phr.kanta.fi/ValueSet/fiphr-vs-fitnessresult" />
      </binding>
    </element>
    <element id="Observation.component.code.coding">
      <path value="Observation.component.code.coding" />
      <min value="1" />
    </element>
    <element id="Observation.component.code.coding.system">
      <path value="Observation.component.code.coding.system" />
      <min value="1" />
    </element>
    <element id="Observation.component.code.coding.code">
      <path value="Observation.component.code.coding.code" />
      <min value="1" />
    </element>
    <element id="Observation.component.code.coding.display">
      <path value="Observation.component.code.coding.display" />
      <min value="1" />
    </element>
    <element id="Observation.component.interpretation">
      <path value="Observation.component.interpretation" />
      <max value="1" />
    </element>
    <element id="Observation.component.interpretation.coding">
      <path value="Observation.component.interpretation.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="FinnishPHR: fiphrInterpretation  SHALL be used. Other interpretations MAY be used.&#xD;&#xA;A reference to a code defined by a terminology system." />
    </element>
    <element id="Observation.component.interpretation.coding:fiphrInterpretation">
      <path value="Observation.component.interpretation.coding" />
      <sliceName value="fiphrInterpretation" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.component.interpretation.coding:fiphrInterpretation.system">
      <path value="Observation.component.interpretation.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation" />
    </element>
    <element id="Observation.component.interpretation.coding:fiphrInterpretation.code">
      <path value="Observation.component.interpretation.coding.code" />
      <min value="1" />
    </element>
    <element id="Observation.component.interpretation.coding:fiphrInterpretation.display">
      <path value="Observation.component.interpretation.coding.display" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>