{
  "resourceType": "StructureDefinition",
  "url": "https://npcr.se/fhir/StructureDefinition/npcr-who-grade-observation",
  "name": "NPCR_WHO_Grade_Observation",
  "status": "draft",
  "description": "Profile for WHO histological differentiation grade (D_DiffGrad) in NPCR Anmälan, based on NPCR Variabelbeskrivning and NPCR Manual för inrapportörer (page 13).\r\n\r\nSource variable: D_DiffGrad (Differentieringsgrad WHO)\r\nForm: NPCR Anmälan\r\nConditional requirement (per NPCR Beteende/logik 1998-01-02): D_DiffGrad becomes mandatory when D_Diagr = 5 (cytological diagnosis). For other diagnosis methods (histological, clinical-only), D_DiffGrad is not collected. This conditional requirement is documented but not enforced as a Profile-level constraint, as it would require linking across multiple Observation resources; it belongs to workflow-level rather than documentation-level mapping.\r\n\r\nRegistrar normalization rule (per NPCR Manual): \"Om 'högt till medelhögt' anges i svaret, registreras 'medelhögt'\" — borderline pathology results between high and moderate differentiation are normalized to G2 (moderately differentiated) at registrar entry.\r\n\r\nTerminology binding: NPCR Informationsspecifikation §7 does not include a section for D_DiffGrad and does not specify any international terminology binding (such as SNOMED CT) for this variable. This Profile binds value[x] to the NPCRWHOGradeCodes ValueSet, which enumerates the 5 NPCR-internal Listvärden (1, 2, 3, 9, 98) literally as defined in NPCR Variabelbeskrivning. The corresponding SNOMED CT mapping is provided as informative reference in the NPCRWHOGrade CodeSystem description but is not enforced; international SNOMED CT binding is left as future work.\r\n\r\nObservation.code is marked Must Support but not bound to a fixed value, as NPCR documentation does not specify how this observation type should be identified. Implementation-time decision is deferred to NKRR / INCA configuration.",
  "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",
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "min": 1,
        "max": "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.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]",
        "min": 1,
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "description": "WHO histological grade per NPCR D_DiffGrad (5 codes from NPCR-internal CodeSystem)",
          "valueSet": "https://npcr.se/fhir/ValueSet/npcr-who-grade-codes"
        }
      }
    ]
  }
}