{
  "resourceType": "StructureDefinition",
  "url": "https://npcr.se/fhir/StructureDefinition/npcr-gleason-score-turp-cysto-observation",
  "name": "NPCR_Gleason_Score_TURP_Cysto_Observation",
  "status": "draft",
  "description": "Gleason score observation for prostate tissue obtained via TUR-P (transurethral resection of prostate) or cystoprostatectomy (bladder + prostate removal). Part of the NPCR Gleason score observation family, consisting of one Summary-level profile (NPCRGleasonScoreObservation) and four source-specific profiles.\r\n\r\nSource variables covered (4 NPCR Variabelbeskrivning variables):\r\n- D_GleasSakn → component:missingFlag\r\n- D_GleasEtt → component:primaryGrade\r\n- D_GleasTva → component:secondaryGrade\r\n- D_GleasSa → component:gleasonSum\r\n\r\nClinical context: This profile applies when the primary diagnostic method is NOT core needle biopsy — specifically when D_Vavn = 2 (Cystoprostatektomi) or D_Vavn = 5 (TUR-P). In both scenarios, prostate cancer is discovered incidentally during surgery performed for other reasons: TUR-P for benign prostatic hyperplasia (BPH), or cystoprostatectomy for bladder cancer. The Gleason assessment is performed by the pathologist on the surgical specimen rather than on biopsy cores, and is entered directly by the registrar from the pathology report (PAD).\r\n\r\nDual-role note for source variables: The same variables D_GleasSakn / D_GleasEtt / D_GleasTva / D_GleasSa are also used as the \"Summary\" group in NPCR, which INCA auto-derives from Syst/Oklar/Rikt for D_Vavn=1 cases. This profile is only populated when D_Vavn = 2 or 5 (direct-entry scenario); the derived-summary role is represented separately by NPCRGleasonScoreObservation with Observation.derivedFrom references.\r\n\r\nThe Summary Gleason Observation (NPCRGleasonScoreObservation) may reference this profile via Observation.derivedFrom when D_Vavn = 2 or 5.\r\n\r\nTerminology binding — documentation gap (Observation.code):\r\nNPCR Informationsspecifikation §7 does not provide a section for Gleason score identification. Observation.code is Must Support but without fixed value or terminology binding, consistent with other NPCR observation profiles. Resource identification relies on meta.profile.\r\n\r\nConditional requirements (per NPCR Beteende/logik) — documented but not enforced:\r\n- D_GleasEtt, D_GleasTva, D_GleasSa are obligatoriskt when D_Vavn = 2 OR 5 AND D_GleasSakn != true",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "mustSupport": true
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "fixedCode": "final",
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.category.coding.system",
        "path": "Observation.category.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/observation-category"
      },
      {
        "id": "Observation.category.coding.code",
        "path": "Observation.category.coding.code",
        "fixedCode": "laboratory"
      },
      {
        "id": "Observation.category.coding.display",
        "path": "Observation.category.coding.display",
        "fixedString": "Laboratory"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "mustSupport": true
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://npcr.se/fhir/StructureDefinition/npcr-patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "code"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.component:primaryGrade",
        "path": "Observation.component",
        "sliceName": "primaryGrade",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:primaryGrade.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://npcr.se/fhir/CodeSystem/npcr-gleason-observation-types",
              "code": "primaryGrade"
            }
          ]
        }
      },
      {
        "id": "Observation.component:primaryGrade.value[x]",
        "path": "Observation.component.value[x]",
        "min": 1,
        "type": [
          {
            "code": "integer"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.component:secondaryGrade",
        "path": "Observation.component",
        "sliceName": "secondaryGrade",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:secondaryGrade.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://npcr.se/fhir/CodeSystem/npcr-gleason-observation-types",
              "code": "secondaryGrade"
            }
          ]
        }
      },
      {
        "id": "Observation.component:secondaryGrade.value[x]",
        "path": "Observation.component.value[x]",
        "min": 1,
        "type": [
          {
            "code": "integer"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.component:gleasonSum",
        "path": "Observation.component",
        "sliceName": "gleasonSum",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:gleasonSum.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://npcr.se/fhir/CodeSystem/npcr-gleason-observation-types",
              "code": "gleasonSum"
            }
          ]
        }
      },
      {
        "id": "Observation.component:gleasonSum.value[x]",
        "path": "Observation.component.value[x]",
        "min": 1,
        "type": [
          {
            "code": "integer"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.component:missingFlag",
        "path": "Observation.component",
        "sliceName": "missingFlag",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:missingFlag.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://npcr.se/fhir/CodeSystem/npcr-gleason-observation-types",
              "code": "missingFlag"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Observation.component:missingFlag.value[x]",
        "path": "Observation.component.value[x]",
        "min": 1,
        "type": [
          {
            "code": "boolean"
          }
        ],
        "mustSupport": true
      }
    ]
  }
}