<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="DiagnosticReportMERT" />
  <url value="https://intrahealth.com/fhir/mert/StructureDefinition/DiagnosticReportMERT" />
  <name value="DiagnosticReportMERT" />
  <title value="DiagnosticReport (MERT)" />
  <status value="draft" />
  <description value="This profile describes the DiagnosticReport for MERT." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DiagnosticReport" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" />
  <derivation value="constraint" />
  <differential>
    <element id="DiagnosticReport.status">
      <path value="DiagnosticReport.status" />
      <comment value="Required binding to DiagnosticReportStatus (base R4). MERT does not further constrain allowed codes." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category">
      <path value="DiagnosticReport.category" />
      <comment value="Base example binding applies. If category is provided, include category.text. Structured coding is encouraged but not required." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code">
      <path value="DiagnosticReport.code" />
      <comment value="Preferred binding to LOINC Diagnostic Report Codes (base R4). Binding intentionally not strengthened to Required to avoid rejecting valid local report codes." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://intrahealth.com/fhir/mert/StructureDefinition/PatientMERT" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.effective[x]">
      <path value="DiagnosticReport.effective[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.effective[x]:effectiveDateTime">
      <path value="DiagnosticReport.effective[x]" />
      <sliceName value="effectiveDateTime" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.issued">
      <path value="DiagnosticReport.issued" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result">
      <path value="DiagnosticReport.result" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.media">
      <path value="DiagnosticReport.media" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.media.comment">
      <path value="DiagnosticReport.media.comment" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm">
      <path value="DiagnosticReport.presentedForm" />
      <comment value="If available, include the full report as issued (e.g., HL7 raw message and/or PDF)." />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>