<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="UKCore-Observation-EarlyWarningTotalScore" />
  <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-EarlyWarningTotalScore" />
  <version value="0.1.0" />
  <name value="UKCoreObservationEarlyWarningTotalScore" />
  <title value="UK Core Observation Early Warning Total Score" />
  <status value="draft" />
  <date value="2023-12-12" />
  <publisher value="HL7 UK" />
  <contact>
    <name value="HL7 UK" />
    <telecom>
      <system value="email" />
      <value value="ukcore@hl7.org.uk" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="Defines the additional constraints and extensions on the UK Core Observation profile, to record an Early Warning Score, and its component scores." />
  <purpose value="To provide implementers with additional support when implementing an Early Warning Score system such as NEWS2 or NPEWS and to provide a consistent structure to how the data is presented." />
  <copyright value="Copyright © 2021+ HL7 UK Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation.status">
      <path value="Observation.status" />
      <fixedCode value="final" />
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.category.coding.system">
      <path value="Observation.category.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/observation-category" />
    </element>
    <element id="Observation.category.coding.code">
      <path value="Observation.category.coding.code" />
      <fixedCode value="survey" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <binding>
        <strength value="preferred" />
        <description value="A code from the SNOMED CT UK coding system for early warning score totals." />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-EarlyWarningTotalScore" />
      </binding>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <min value="1" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="Observation.value[x].system">
      <path value="Observation.value[x].system" />
      <fixedUri value="http://unitsofmeasure.org" />
    </element>
    <element id="Observation.value[x].code">
      <path value="Observation.value[x].code" />
      <fixedCode value="{ScoreOf}" />
    </element>
    <element id="Observation.component.code">
      <path value="Observation.component.code" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-EarlyWarningSubScore" />
      </binding>
    </element>
    <element id="Observation.component.value[x]">
      <path value="Observation.component.value[x]" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="Observation.component.value[x].system">
      <path value="Observation.component.value[x].system" />
      <fixedUri value="http://unitsofmeasure.org" />
    </element>
    <element id="Observation.component.value[x].code">
      <path value="Observation.component.value[x].code" />
      <fixedCode value="{ScoreOf}" />
    </element>
  </differential>
</StructureDefinition>