<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="cyehr-sd-exercise-r4" />
  <url value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-exercise" />
  <name value="CYEHRSDExercise" />
  <title value="Cyprus EHR Exercise profile" />
  <status value="draft" />
  <date value="2022-05-19" />
  <publisher value="eHealth4U" />
  <contact>
    <name value="eHealth Lab (University of Cyprus)" />
    <telecom>
      <system value="email" />
      <value value="ehealthl@ucy.ac.cy" />
      <use value="work" />
    </telecom>
  </contact>
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-socialhistory" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation.meta">
      <path value="Observation.meta" />
    </element>
    <element id="Observation.meta.profile">
      <path value="Observation.meta.profile" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Observation.meta.profile:CyprusEHRProfile">
      <path value="Observation.meta.profile" />
      <sliceName value="CyprusEHRProfile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-exercise" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <short value="Exercise activity code" />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.&#xD;&#xA;&#xD;&#xA;CyprusEHR: display: &quot;Exercise tracking panel&quot;" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="55409-7" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="code" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.component:exerciseActivity">
      <path value="Observation.component" />
      <sliceName value="exerciseActivity" />
      <max value="1" />
    </element>
    <element id="Observation.component:exerciseActivity.code">
      <path value="Observation.component.code" />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.&#xD;&#xA;&#xD;&#xA;CyprusEHR: display: &quot;Exercise activity&quot;" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="73985-4" />
        </coding>
      </patternCodeableConcept>
      <binding>
        <strength value="extensible" />
      </binding>
    </element>
    <element id="Observation.component:exerciseActivity.code.coding">
      <path value="Observation.component.code.coding" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseActivity.value[x]">
      <path value="Observation.component.value[x]" />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <binding>
        <strength value="extensible" />
        <valueSet value="http://ig.ehealth4u.eu/fhir/ValueSet/cyehr-vs-exerciseactivity" />
      </binding>
    </element>
    <element id="Observation.component:exerciseActivity.value[x].coding">
      <path value="Observation.component.value[x].coding" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseActivity.value[x].coding.system">
      <path value="Observation.component.value[x].coding.system" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseActivity.value[x].coding.code">
      <path value="Observation.component.value[x].coding.code" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseActivity.value[x].coding.display">
      <path value="Observation.component.value[x].coding.display" />
      <min value="1" />
    </element>
    <element id="Observation.component:frequencyPerWeek">
      <path value="Observation.component" />
      <sliceName value="frequencyPerWeek" />
      <max value="1" />
    </element>
    <element id="Observation.component:frequencyPerWeek.code">
      <path value="Observation.component.code" />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.&#xD;&#xA;&#xD;&#xA;CyprusEHR: display: &quot;Exercise duration/Exercise frequency&quot;" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="74009-2" />
        </coding>
      </patternCodeableConcept>
      <binding>
        <strength value="extensible" />
      </binding>
    </element>
    <element id="Observation.component:frequencyPerWeek.code.coding">
      <path value="Observation.component.code.coding" />
      <min value="1" />
    </element>
    <element id="Observation.component:frequencyPerWeek.value[x]">
      <path value="Observation.component.value[x]" />
      <min value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <patternQuantity>
        <unit value="/wk" />
        <system value="http://unitsofmeasure.org" />
        <code value="/wk" />
      </patternQuantity>
    </element>
    <element id="Observation.component:frequencyPerWeek.value[x].value">
      <path value="Observation.component.value[x].value" />
      <min value="1" />
    </element>
    <element id="Observation.component:frequencyPerWeek.value[x].unit">
      <path value="Observation.component.value[x].unit" />
      <min value="1" />
    </element>
    <element id="Observation.component:frequencyPerWeek.value[x].system">
      <path value="Observation.component.value[x].system" />
      <min value="1" />
    </element>
    <element id="Observation.component:frequencyPerWeek.value[x].code">
      <path value="Observation.component.value[x].code" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseDuration">
      <path value="Observation.component" />
      <sliceName value="exerciseDuration" />
      <max value="1" />
    </element>
    <element id="Observation.component:exerciseDuration.code">
      <path value="Observation.component.code" />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.&#xD;&#xA;&#xD;&#xA;CyprusEHR: display: &quot;Exercise duration&quot;" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="55411-3" />
        </coding>
      </patternCodeableConcept>
      <binding>
        <strength value="extensible" />
      </binding>
    </element>
    <element id="Observation.component:exerciseDuration.code.coding">
      <path value="Observation.component.code.coding" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseDuration.value[x]">
      <path value="Observation.component.value[x]" />
      <min value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <patternQuantity>
        <unit value="min" />
        <system value="http://unitsofmeasure.org" />
        <code value="min" />
      </patternQuantity>
    </element>
    <element id="Observation.component:exerciseDuration.value[x].value">
      <path value="Observation.component.value[x].value" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseDuration.value[x].unit">
      <path value="Observation.component.value[x].unit" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseDuration.value[x].system">
      <path value="Observation.component.value[x].system" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseDuration.value[x].code">
      <path value="Observation.component.value[x].code" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseIntensity">
      <path value="Observation.component" />
      <sliceName value="exerciseIntensity" />
      <max value="1" />
    </element>
    <element id="Observation.component:exerciseIntensity.code">
      <path value="Observation.component.code" />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.&#xD;&#xA;&#xD;&#xA;CyprusEHR: display: &quot;Exercise intensity&quot;" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="74008-4" />
        </coding>
      </patternCodeableConcept>
      <binding>
        <strength value="extensible" />
      </binding>
    </element>
    <element id="Observation.component:exerciseIntensity.code.coding">
      <path value="Observation.component.code.coding" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseIntensity.value[x]">
      <path value="Observation.component.value[x]" />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <binding>
        <strength value="extensible" />
        <valueSet value="http://ig.ehealth4u.eu/fhir/ValueSet/cyehr-vs-exerciseintensity" />
      </binding>
    </element>
    <element id="Observation.component:exerciseIntensity.value[x].coding">
      <path value="Observation.component.value[x].coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.component:exerciseIntensity.value[x].coding.system">
      <path value="Observation.component.value[x].coding.system" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseIntensity.value[x].coding.code">
      <path value="Observation.component.value[x].coding.code" />
      <min value="1" />
    </element>
    <element id="Observation.component:exerciseIntensity.value[x].coding.display">
      <path value="Observation.component.value[x].coding.display" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>