<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ConditionMERT" />
  <url value="https://intrahealth.com/fhir/mert/StructureDefinition/ConditionMERT" />
  <name value="ConditionMERT" />
  <title value="Condition (MERT)" />
  <status value="draft" />
  <description value="This profile describes the Procedure for MERT." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Condition" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Condition" />
  <derivation value="constraint" />
  <differential>
    <element id="Condition.clinicalStatus">
      <path value="Condition.clinicalStatus" />
      <comment value="Support all standard clinicalStatus values when present." />
      <mustSupport value="true" />
    </element>
    <element id="Condition.category">
      <path value="Condition.category" />
      <short value="problem-list-item" />
      <comment value="Fixed to problem-list-item for MERT. Only problem list conditions are exchanged." />
      <min value="1" />
      <max value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-category" />
          <code value="problem-list-item" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Condition.severity">
      <path value="Condition.severity" />
      <comment value="Severity is optional. When populated, use a standard coded concept when available; otherwise, CodeableConcept.text may be used." />
      <mustSupport value="true" />
    </element>
    <element id="Condition.code">
      <path value="Condition.code" />
      <comment value="Prefer use of a standard diagnosis code when available (e.g., SNOMED CT, ICD-10-CA, or ICD-9). If no coded concept is available, populate CodeableConcept.text." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Condition.subject">
      <path value="Condition.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://intrahealth.com/fhir/mert/StructureDefinition/PatientMERT" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Condition.encounter">
      <path value="Condition.encounter" />
      <comment value="Include encounter when the condition is recorded/associated with a specific encounter." />
      <mustSupport value="true" />
    </element>
    <element id="Condition.onset[x]">
      <path value="Condition.onset[x]" />
      <comment value="Use onset[x] when available to indicate the estimated or actual onset of the condition." />
      <mustSupport value="true" />
    </element>
    <element id="Condition.abatement[x]">
      <path value="Condition.abatement[x]" />
      <mustSupport value="true" />
    </element>
    <element id="Condition.recordedDate">
      <path value="Condition.recordedDate" />
      <mustSupport value="true" />
    </element>
    <element id="Condition.asserter">
      <path value="Condition.asserter" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://intrahealth.com/fhir/mert/StructureDefinition/PractitionerMERT" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Condition.note">
      <path value="Condition.note" />
      <comment value="Use note for additional condition context (e.g., narrative details, qualifiers) when structured codings are insufficient." />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>