<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="NHSEngland-Condition-GenomicsmCODE" />
  <url value="https://fhir.nhs.uk/StructureDefinition/NHSEngland-Condition-GenomicsmCODE" />
  <version value="0.3.0" />
  <name value="NHSEngland_Condition_GenomicsmCODE" />
  <title value="NHSEngland Condition GenomicsmCODE" />
  <status value="active" />
  <date value="2026-04-16" />
  <publisher value="NHS England" />
  <contact>
    <name value="NHS England" />
    <telecom>
      <system value="email" />
      <value value="interoperabilityteam@nhs.net" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="This profile defines the Genomics constraints and extensions on the mCODE FHIR resource [Primary Cancer Condition](http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-primary-cancer-condition)." />
  <purpose value="For detailing any Condition related information about the proband/consultands within a test order.&#xD;&#xA;&#xD;&#xA;It is expected that the information used to populate this resource SHOULD be sourced from the requesters EHR system. As such, there is no limit on the amount of detail that can be provided, though at a minimum the code and subject fields SHOULD be populated.&#xD;&#xA;&#xD;&#xA;It is also highly preferred if the verificationStatus, onsetDateTime, recordedDate, recorded and abatementDateTime are populated if applicable/known.&#xD;&#xA;&#xD;&#xA;The primary condition, being tested for SHOULD be referenced via ServiceRequest.reasonReference, additional relevant conditions SHOULD be referenced via ServiceRequest.supportingInfo.&#xD;&#xA;&#xD;&#xA;Where worflows do not require any additional condition related information apart from the clinical indication/test package code, the Condition resource is not required to be included.&#xD;&#xA;&#xD;&#xA;For representing metastatic sites vs. primary sites, the mCODE guidance SHOULD be followed, whereby the metastatic site SHOULD be referenced using an additional Condition resource, related to the primary condition using the Condition-related extension" />
  <copyright value="Copyright © 2026+ NHS England 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="Condition" />
  <baseDefinition value="http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-primary-cancer-condition" />
  <derivation value="constraint" />
  <differential>
    <element id="Condition.extension:conditionRelated">
      <path value="Condition.extension" />
      <sliceName value="conditionRelated" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/condition-related" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Condition.extension:conditionRelated.value[x]">
      <path value="Condition.extension.value[x]" />
      <definition value="Extension developed by mCODE to relate a Condition representing a metastatic site with a primary Condition." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSEngland-Condition-mCODE" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition" />
        <aggregation value="referenced" />
        <aggregation value="bundled" />
      </type>
    </element>
    <element id="Condition.clinicalStatus">
      <path value="Condition.clinicalStatus" />
      <min value="1" />
    </element>
    <element id="Condition.verificationStatus">
      <path value="Condition.verificationStatus" />
      <min value="1" />
    </element>
    <element id="Condition.category:ukcoreCategory">
      <path value="Condition.category" />
      <sliceName value="ukcoreCategory" />
      <binding>
        <strength value="extensible" />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-ConditionCategory" />
      </binding>
    </element>
    <element id="Condition.code">
      <path value="Condition.code" />
      <definition value="SHOULD be present. SNOMED CT coding is preferred, though alternative codings MAY be provided where the code is not present in SNOMED CT, e.g. more specific test directory Test Package codes MAY be used." />
    </element>
    <element id="Condition.code.coding">
      <path value="Condition.code.coding" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Condition.code.coding:codingSnomedCT">
      <path value="Condition.code.coding" />
      <sliceName value="codingSnomedCT" />
      <binding>
        <strength value="preferred" />
        <description value="A code from the SNOMED Clinical Terminology UK with the expression (&lt;404684003 |Clinical finding| OR &lt;413350009 |Finding with explicit context| OR &lt;272379006 |Event|)." />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-ConditionCode" />
      </binding>
    </element>
    <element id="Condition.code.coding:codingSnomedCT.system">
      <path value="Condition.code.coding.system" />
      <fixedUri value="http://snomed.info/sct" />
    </element>
    <element id="Condition.code.coding:codingDGTS">
      <path value="Condition.code.coding" />
      <sliceName value="codingDGTS" />
    </element>
    <element id="Condition.code.coding:codingDGTS.system">
      <path value="Condition.code.coding.system" />
      <fixedUri value="https://fhir.nhs.uk/CodeSystem/England-GenomicTestDirectory" />
    </element>
    <element id="Condition.bodySite.extension:bodyStructureReference">
      <path value="Condition.bodySite.extension" />
      <sliceName value="bodyStructureReference" />
      <definition value="Within the bodySite element, if topography and morphology information is required, user SHOULD use the bodySite extension to reference a BodyStructure resource. For collection of body structure information for primary and secondary tumours separately, these should be referenced from conditions associated with the primary and secondary tumour respectively." />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/bodySite" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Condition.subject">
      <path value="Condition.subject" />
      <definition value="SHALL be present. Reference to the associated Patient. This MAY be through a resource reference if the ID on the central service is known (or provided within the transaction bundle) or through NHS number where this is known and has been traced through PDS" />
    </element>
    <element id="Condition.recorder">
      <path value="Condition.recorder" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSEngland-PractitionerRole-Genomics" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <aggregation value="referenced" />
        <aggregation value="bundled" />
      </type>
    </element>
    <element id="Condition.asserter">
      <path value="Condition.asserter" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSEngland-PractitionerRole-Genomics" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <aggregation value="referenced" />
        <aggregation value="bundled" />
      </type>
    </element>
    <element id="Condition.note">
      <path value="Condition.note" />
      <definition value="For recording additional information regarding the condition where this does not fit into the structured fields or cannot be structured due to the way this information has been recorded in source systems." />
    </element>
  </differential>
</StructureDefinition>