<CodeSystem xmlns="http://hl7.org/fhir">
  <id value="npcr-biopsy-results-observation-types" />
  <url value="https://npcr.se/fhir/CodeSystem/npcr-biopsy-results-observation-types" />
  <name value="NPCRBiopsyResultsObservationTypes" />
  <title value="NPCR Biopsy Results Observation Component Types Code System" />
  <status value="draft" />
  <experimental value="false" />
  <description value="NPCR-internal code system identifying the component types used across three biopsy-results observation profiles: NPCRBiopsyResultsTargetedBiopsyObservation, NPCRBiopsyResultsSystematicBiopsyObservation, and NPCRBiopsyResultsUnclearBiopsyObservation. Unlike the Gleason score family — where three source-specific profiles share an identical 4-component structure — biopsy results metrics differ by source:&#xA;&#xA;- Targeted biopsies measure: cores count, longest cancer lesion, total biopsy length of the longest-cancer biopsy (plus per-metric missing flags). 6 components total.&#xA;- Systematic biopsies measure: cores count, cores with cancer count, total biopsy length, total cancer length in mm (plus per-metric missing flags). 8 components total.&#xA;- Unclear biopsies (combined targeted + systematic where PAD does not separate) measure the same set as systematic (cores count, cores with cancer, total biopsy length, total cancer length, plus per-metric missing flags). 8 components total — structurally identical to systematic biopsy.&#xA;&#xA;This shared CodeSystem provides all component codes needed across the three profiles; each profile uses the subset relevant to its source-specific metrics.&#xA;&#xA;NPCR documentation gap rationale: Informationsspecifikation §7 does not provide terminology bindings for biopsy-results variables (same pattern as MR findings, Gleason score). No international code systems (LOINC, SNOMED CT) provide equivalent coverage of this NPCR-specific granularity. This NPCR-internal CodeSystem preserves documentation fidelity by mirroring NPCR Variabelbeskrivning variable structure.&#xA;&#xA;Thesis Discussion note: Unlike Gleason (3 parallel source groups + 1 Summary), BiopsyResults has no equivalent 'summary' concept in NPCR — each biopsy source reports its metrics independently, with no cross-source aggregation in INCA. Therefore the BiopsyResults profiles are 3 source-specific profiles with no Summary Observation counterpart." />
  <caseSensitive value="true" />
  <content value="complete" />
  <count value="12" />
  <concept>
    <code value="coresCount" />
    <display value="Number of biopsy cores taken" />
    <definition value="Total number of biopsy cores taken in the specimen group (Antal tagna biopsikolvar). Used by all three biopsy results profiles. Corresponds to: D_Biop (systematic), D_AntalRiktBio (targeted), D_AntOklarBiop (unclear)." />
  </concept>
  <concept>
    <code value="coresCountMissing" />
    <display value="Cores count missing indicator" />
    <definition value="Boolean flag indicating that the number of biopsy cores is missing (Uppgift saknas om antal tagna biopsikolvar). Used by all three biopsy results profiles. Corresponds to: D_BiopSakn (systematic), D_AntalRiktSaknas (targeted), D_AntOklarSakn (unclear)." />
  </concept>
  <concept>
    <code value="coresWithCancerCount" />
    <display value="Number of biopsy cores containing cancer" />
    <definition value="Number of biopsy cores that contain cancer (Antal biopsikolvar med cancer). Used by systematic and unclear biopsy profiles. Corresponds to: D_BiopCa (systematic), D_OklarBiopCa (unclear). Not applicable to targeted biopsy, which uses longest-cancer and total-biopsy-of-longest metrics instead." />
  </concept>
  <concept>
    <code value="coresWithCancerMissing" />
    <display value="Cores with cancer count missing indicator" />
    <definition value="Boolean flag indicating that the number of cancer-positive cores is missing. Corresponds to: D_BiopCaSakn (systematic), D_OklarBiopCaSakn (unclear)." />
  </concept>
  <concept>
    <code value="totalBiopsyLength" />
    <display value="Total biopsy length in mm" />
    <definition value="Sum of biopsy lengths across all cores in the specimen group, in millimeters (Summa biopsilängd i mm i biopsikolvarna). Used by systematic and unclear biopsy profiles. Corresponds to: D_bioplangd (systematic), D_OklarBiopLangd (unclear)." />
  </concept>
  <concept>
    <code value="totalBiopsyLengthMissing" />
    <display value="Total biopsy length missing indicator" />
    <definition value="Boolean flag indicating that the total biopsy length is missing. Corresponds to: D_bioplangduppgsakn (systematic), D_OklarBioplangduppgsakn (unclear)." />
  </concept>
  <concept>
    <code value="totalCancerMm" />
    <display value="Total cancer length in mm" />
    <definition value="Sum of cancer lengths across all cores in the specimen group, in millimeters (Summa mm cancer i biopsikolvarna). Used by systematic and unclear biopsy profiles. Corresponds to: D_mmcancer (systematic), D_OklarBiopmmcancer (unclear)." />
  </concept>
  <concept>
    <code value="totalCancerMmMissing" />
    <display value="Total cancer length missing indicator" />
    <definition value="Boolean flag indicating that the total cancer length is missing. Corresponds to: D_mmcauppgsakn (systematic), D_OklarBiopmmcauppgsakn (unclear)." />
  </concept>
  <concept>
    <code value="longestCancerLength" />
    <display value="Longest cancer lesion length in a single biopsy (mm)" />
    <definition value="Length of the longest continuous cancer lesion found in a single biopsy core, in millimeters (Längsta cancerhärden i en biopsi). Used only by targeted biopsy profile. Corresponds to: D_LangstCancer. This metric is targeted-specific because MRI-guided targeted sampling aims at specific lesions, making the single longest lesion a clinically meaningful measurement." />
  </concept>
  <concept>
    <code value="longestCancerMissing" />
    <display value="Longest cancer lesion missing indicator" />
    <definition value="Boolean flag indicating that the longest cancer lesion length is missing. Corresponds to: D_LangstCancerSakn." />
  </concept>
  <concept>
    <code value="totalBiopsyOfLongest" />
    <display value="Total biopsy length of the longest-cancer biopsy (mm)" />
    <definition value="Total biopsy length (including benign and malignant tissue) in the core that contains the longest cancer lesion, in millimeters (Total biopsilängd i biopsin med längsta cancerhärden). Used only by targeted biopsy profile. Corresponds to: D_TotBiopsiLangst. Used together with longestCancerLength to compute cancer fraction in the dominant lesion." />
  </concept>
  <concept>
    <code value="totalBiopsyOfLongestMissing" />
    <display value="Total biopsy of longest missing indicator" />
    <definition value="Boolean flag indicating that the total biopsy length of the longest-cancer biopsy is missing. Corresponds to: D_TotBiopsiLangstSakn." />
  </concept>
</CodeSystem>