<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://npcr.se/fhir/StructureDefinition/npcr-pathology-diagnostic-report" />
  <name value="NPCR_Pathology_Diagnostic_Report" />
  <status value="draft" />
  <description value="Pathology diagnostic report aggregating all biopsy-derived observations for prostate cancer registration (Anmälan). This profile is the first DiagnosticReport profile in the NPCR profile set, differing from the 20 existing Observation/Procedure/Condition/ServiceRequest/Encounter/Patient profiles by grouping multiple observations under a single pathology report instance.&#xD;&#xA;&#xD;&#xA;Source variables covered (4 NPCR Variabelbeskrivning variables):&#xD;&#xA;- D_PrepNr → .identifier.value (PAD/CYT-nr, text business identifier)&#xD;&#xA;- D_PrepAr → .effective[x] (dateTime, year precision representing Preparatår — the year the specimen was registered at the pathology lab)&#xD;&#xA;- D_PatCytLista → .performer (Reference to Organization; Organization.name carries the pathology department name per NPCR Värdedomän)&#xD;&#xA;- D_PatCytKod → .performer (Reference to Organization; Organization.identifier.value carries the pathology department code)&#xD;&#xA;&#xD;&#xA;Note on D_PatCytAvd exclusion:&#xD;&#xA;The NPCR variable D_PatCytAvd (free-text pathology department name) has Teknisk giltighetstid 2025-09-30, i.e., it was deprecated in September 2025 per the Variabelbeskrivning changelog (&quot;AH 20250930: Sätter ett slutdatum. Finns inte i koden längre.&quot;). This profile reflects the post-deprecation state and does not map D_PatCytAvd.&#xD;&#xA;&#xD;&#xA;Aggregation design  .result references:&#xD;&#xA;.result uses FHIR's multiple-targetProfile pattern to reference any of 9 NPCR Observation profiles that can be derived from a pathology specimen: 3 BiopsyResults profiles (Targeted, Systematic, Unclear), 5 Gleason profiles (Summary, Targeted, Systematic, Unclear, TURP/Cysto), and WHOGrade. This creates the first explicit inter-profile dependency in the NPCR profile set, representing NPCR's &quot;one-report → many-observations&quot; clinical model.&#xD;&#xA;&#xD;&#xA;Design rationale  .code binding (documentation gap fallback):&#xD;&#xA;FHIR R4 mandates DiagnosticReport.code (1..1), but NPCR documentation does not specify a terminology binding for pathology report identification. This profile applies LOINC 60568-3 &quot;Pathology synoptic report&quot; as an internationally recognized, domain-appropriate fallback. This pattern, bridging NPCR documentation gaps with FHIR-recommended terminology, is consistent with other NPCR profiles in this set (e.g., Observation.category using FHIR observation-category CodeSystem).&#xD;&#xA;&#xD;&#xA;Design rationale  .category binding:&#xD;&#xA;.category uses HL7 v2 Table 0074 (Diagnostic Service Section ID) code &quot;PAT&quot; (Pathology), which is FHIR R4's default CodeSystem for the diagnostic-service-sections ValueSet bound to DiagnosticReport.category.&#xD;&#xA;&#xD;&#xA;Design rationale radiology/pathology asymmetry (Discussion finding):&#xD;&#xA;The NPCR profile set currently includes this pathology DiagnosticReport profile but no corresponding radiology DiagnosticReport profile, because NPCR captures explicit pathology report metadata (PAD/CYT-nr, Preparatår, Patologavdelning) enabling report-level aggregation, whereas no analogous radiology report metadata exists in NPCR Anmälan (only D_MRdatum, insufficient for report identification). This asymmetry is a documented feasibility finding.&#xD;&#xA;&#xD;&#xA;Conditional requirements (per NPCR Beteende/logik) — documented but not enforced:&#xD;&#xA;- D_PrepNr, D_PrepAr, D_PatCytLista are obligatoriskt when D_Diagr != 1 (i.e., when diagnosis involves pathology)&#xD;&#xA;- D_PatCytKod is obligatoriskt for monitors when D_Diagr != 1" />
  <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">
      <path value="DiagnosticReport" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier">
      <path value="DiagnosticReport.identifier" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.status">
      <path value="DiagnosticReport.status" />
      <fixedCode value="final" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category">
      <path value="DiagnosticReport.category" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category.coding.system">
      <path value="DiagnosticReport.category.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0074" />
    </element>
    <element id="DiagnosticReport.category.coding.code">
      <path value="DiagnosticReport.category.coding.code" />
      <fixedCode value="PAT" />
    </element>
    <element id="DiagnosticReport.category.coding.display">
      <path value="DiagnosticReport.category.coding.display" />
      <fixedString value="Pathology" />
    </element>
    <element id="DiagnosticReport.code">
      <path value="DiagnosticReport.code" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code.coding.system">
      <path value="DiagnosticReport.code.coding.system" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="DiagnosticReport.code.coding.code">
      <path value="DiagnosticReport.code.coding.code" />
      <fixedCode value="60568-3" />
    </element>
    <element id="DiagnosticReport.code.coding.display">
      <path value="DiagnosticReport.code.coding.display" />
      <fixedString value="Pathology synoptic report" />
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.effective[x]">
      <path value="DiagnosticReport.effective[x]" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer">
      <path value="DiagnosticReport.performer" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result">
      <path value="DiagnosticReport.result" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-biopsy-results-targeted-biopsy-observation" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-biopsy-results-systematic-biopsy-observation" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-biopsy-results-unclear-biopsy-observation" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-gleason-score-observation" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-gleason-score-targeted-biopsy-observation" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-gleason-score-systematic-biopsy-observation" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-gleason-score-unclear-biopsy-observation" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-gleason-score-turp-cysto-observation" />
        <targetProfile value="https://npcr.se/fhir/StructureDefinition/npcr-who-grade-observation" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>