version: 1
prompt_language: en
report_language: hu

defaults:
  tri_state:
    type: enum
    values: ["Yes", "No", "Not mentioned"]
    format_hint: "<Yes/No/Not mentioned>"

  binary:
    type: enum
    values: ["Yes", "No"]
    format_hint: "<Yes/No>"

  text:
    type: text
    nullable: true
    format_hint: "<free text or null>"

  text_bullets:
    type: text_bullets
    nullable: true
    format_hint: "<bullet points or null>"

  number_or_null:
    type: number
    nullable: true
    format_hint: "<number or null>"

  percent_or_null:
    type: number
    nullable: true
    unit: "%"
    format_hint: "<percentage number or null>"

fields:
  - key: MUM1
    short: "MUM1"
    label: "MUM1"
    description: "Multiple Myeloma Oncogene 1 or IRF4."
    group_id: 0
    extends: tri_state
    aliases_hu: ["MUM1", "IRF4"]

  - key: GC
    short: "GC"
    label: "GC"
    description: "Germinal Center lymphoma phenotype. If CD10/BCL6/MUM1 data are available, classify according to Hans algorithm."
    group_id: 0
    extends: tri_state
    aliases_hu: ["GC", "germinális centrum"]

  - key: nonGC
    short: "nonGC"
    label: "nonGC"
    description: "Non-Germinal Center lymphoma phenotype. If CD10/BCL6/MUM1 data are available, classify according to Hans algorithm."
    group_id: 0
    extends: tri_state
    aliases_hu: ["nonGC", "non-GC"]

  - key: CD10_positivity
    short: "CD10"
    label: "CD10 positivity"
    description: "CD10 immunohistochemical positivity."
    group_id: 0
    extends: tri_state
    aliases_hu: ["CD10"]

  - key: CD56_positivity
    short: "CD56"
    label: "CD56 positivity"
    description: "CD56 immunohistochemical positivity."
    group_id: 0
    extends: tri_state
    aliases_hu: ["CD56"]

  - key: anemia
    short: "anem"
    label: "anemia"
    description: >
      Mark Yes if anemia is explicitly mentioned OR if lab data indicates anemia.
      Lab-based anemia: hemoglobin (HGB/Hb) below typical adult reference range
      (men <130 g/L, women <120 g/L), OR hematocrit (HCT) clearly low (men <0.40,
      women <0.36), OR RBC clearly low (men <4.5 T/L, women <4.0 T/L).
      Mark No only if the report explicitly states no anemia / normal blood count.
      Otherwise mark Not mentioned.
      Ensure correct interpretation of measurement units.
    group_id: 1
    extends: tri_state
    aliases_hu: ["vérszegénység", "anaemia"]

  - key: thrombocytopenia
    short: "thrombo"
    label: "thrombocytopenia"
    description: >
      Mark Yes if thrombocytopenia is explicitly mentioned OR if lab data shows
      platelet count (PLT) below normal reference range. If no reference
      range is provided, consider PLT <150 G/L as thrombocytopenia in adults. 
      Mark No only if explicitly stated normal platelet count. Otherwise Not mentioned.
      Ensure correct interpretation of measurement units.
    group_id: 1
    extends: tri_state
    aliases_hu: ["thrombocytopenia", "alacsony vérlemezkeszám"]

  - key: neutropenia
    short: "neutro"
    label: "neutropenia"
    description: "Explicit mention of neutropenia."
    group_id: 1
    extends: tri_state
    aliases_hu: ["neutropenia", "neotropenia", "csökkent fehérvérsejtszám"]

  - key: elevated_LDH
    short: "LDH"
    label: "elevated LDH"
    description: >
      Mark Yes if elevated LDH is explicitly stated OR if lab data shows LDH above
      the reported upper reference limit. If no reference range is provided,
      use sex-specific adult reference ranges: 135-225 U/L (male) and
      135-214 U/L (female); therefore consider LDH >225 U/L elevated in males
      and LDH >214 U/L elevated in females (unless otherwise specified).
      Mark No only if LDH is explicitly stated as normal.
      Otherwise mark Not mentioned.
      Ensure correct interpretation of measurement units.
    group_id: 1
    extends: tri_state
    aliases_hu: ["magas LDH", "emelkedett LDH", "LDH szint magas"]

  - key: elevated_beta2_microglobulin
    short: "B2M"
    label: "elevated beta-2 microglobulin"
    description: "Explicit statement of elevated beta-2 microglobulin level."
    group_id: 1
    extends: tri_state
    aliases_hu: ["béta 2 mikroglobulin", "emelkedett béta 2 mikroglobulin"]

  - key: high_proliferative_activity
    short: "hiprol"
    label: "high proliferative activity"
    description: >
      Explicit mention of high proliferative activity. Treat Ki-67 or MIB-1
      or proliferation index as the same concept. Everything above 50%
      should be considered high.
    group_id: 1
    extends: tri_state
    aliases_hu: ["magas proliferációs aktivitás"]

  - key: BCL2_positivity
    short: "BCL2"
    label: "BCL2 positivity"
    description: "Explicit mention of BCL2 positivity."
    group_id: 2
    extends: tri_state
    aliases_hu: ["BCL2", "BCL2 pozitivitás"]

  - key: BCL6_positivity
    short: "BCL6"
    label: "BCL6 positivity"
    description: "Explicit mention of BCL6 positivity."
    group_id: 2
    extends: tri_state
    aliases_hu: ["BCL6", "BCL6 pozitivitás"]

  - key: MYC_positivity
    short: "MYC"
    label: "MYC positivity"
    description: "Explicit mention of MYC positivity."
    group_id: 2
    extends: tri_state
    aliases_hu: ["MYC", "MYC pozitivitás"]

  - key: MYD88_positivity
    short: "MYD88"
    label: "MYD88 positivity"
    description: "Explicit mention of MYD88 positivity."
    group_id: 2
    extends: tri_state
    aliases_hu: ["MYD88", "MYD88 pozitivitás"]

  - key: KSHV_infection
    short: "KSHV"
    label: "KSHV infection"
    description: "Explicit mention of Kaposi sarcoma-associated herpesvirus infection."
    group_id: 2
    extends: tri_state
    aliases_hu: ["KSHV", "Kaposi sarcoma asszociált herpesvirus"]

  - key: fatigue
    short: "fatig"
    label: "fatigue"
    description: "Explicit mention of fatigue or weakness."
    group_id: 2
    extends: tri_state
    aliases_hu: ["fáradékonyság", "kimerültség", "(fizikai) gyengeség"]

  - key: Ki67_proliferation
    short: "Ki67p"
    label: "Ki-67 proliferation"
    description: "Explicit mention of Ki-67 proliferation or high proliferative activity."
    group_id: 2
    extends: tri_state
    aliases_hu: ["Ki-67 proliferáció", "proliferációs aktivitás"]

  - key: Ki67_index
    short: "Ki67i"
    label: "Ki-67 index"
    description: "Numeric Ki-67 index. If a numeric value is explicitly stated (e.g. Ki-67: 70%), return the number (70). If a range is stated, return the midpoint. Otherwise return null."
    group_id: 2
    extends: percent_or_null
    aliases_hu: ["Ki-67", "Ki67"]

  - key: CD19_positivity
    short: "CD19"
    label: "CD19 positivity"
    description: "Explicit mention of CD19 positivity."
    group_id: 3
    extends: tri_state
    aliases_hu: ["CD19", "CD19 pozitivitás"]

  - key: CD20_positivity
    short: "CD20"
    label: "CD20 positivity"
    description: "Explicit mention of CD20 positivity."
    group_id: 3
    extends: tri_state
    aliases_hu: ["CD20", "CD20 pozitivitás"]

  - key: CD22_positivity
    short: "CD22"
    label: "CD22 positivity"
    description: "Explicit mention of CD22 positivity."
    group_id: 3
    extends: tri_state
    aliases_hu: ["CD22", "CD22 pozitivitás"]

  - key: CD79_positivity
    short: "CD79"
    label: "CD79 positivity"
    description: "Explicit mention of CD79 positivity."
    group_id: 3
    extends: tri_state
    aliases_hu: ["CD79", "CD79 pozitivitás"]

  - key: PAX5_positivity
    short: "PAX5"
    label: "PAX5 positivity"
    description: "Explicit mention of PAX5 positivity."
    group_id: 3
    extends: tri_state
    aliases_hu: ["PAX5", "PAX5 pozitivitás"]

  - key: family_history
    short: "famHx"
    label: "family history"
    description: "From the report, extract family medical history (családi anamnézis) in very short bullet points, only for parents/grandparents/siblings (not the patient). If not present, return `No info`."
    group_id: 4
    extends: text_bullets
    format_hint: "<family history in bullet points or No info>"
    aliases_hu: ["családi anamnézis", "familiáris anamnézis", "családi kórelőzmény"]

  - key: fever
    short: "fever"
    label: "fever"
    description: "Explicit mention of fever, or body temperature ≥38°C explicitly stated."
    group_id: 5
    extends: tri_state
    aliases_hu: ["láz"]

  - key: night_sweating
    short: "sweat"
    label: "night sweating"
    description: "Explicit mention of night sweats."
    group_id: 5
    extends: tri_state
    aliases_hu: ["éjszakai izzadás", "éjszakai verejtékezés"]

  - key: weight_loss
    short: "wtloss"
    label: "weight loss"
    description: "Explicit mention of weight loss."
    group_id: 5
    extends: tri_state
    aliases_hu: ["fogyás"]

  - key: anticoagulant
    short: "antico"
    label: "anticoagulant use"
    description: "Explicit mention of anticoagulant medication use."
    group_id: 5
    extends: tri_state
    aliases_hu: ["véralvadásgátló", "heparin", "Clexane", "warfarin", "Syncumar", "Xarelto", "Eliquis"]

  - key: high_grade_transformation
    short: "HGT"
    label: "high-grade transformation"
    description: "Explicit mention of high-grade transformation (conversion to a more aggressive, high-grade lymphoma)."
    group_id: 6
    extends: tri_state
    aliases_hu: ["transzformáció", "high-grade transzformáció", "transformatio"]

  - key: immunodeficiency
    short: "immuno"
    label: "immunodeficiency"
    description: "Explicit mention of immunodeficiency or immunosuppressed state."
    group_id: 6
    extends: tri_state
    aliases_hu: ["immundeficiencia", "immunhiány", "immunszupprimált"]

  - key: EBV_infection
    short: "EBV"
    label: "EBV infection"
    description: "Explicit mention of Epstein-Barr virus infection or EBV positivity."
    group_id: 6
    extends: tri_state
    aliases_hu: ["EBV", "Epstein-Barr", "Epstein-Barr vírus"]

  - key: HIV_infection
    short: "HIV"
    label: "HIV infection"
    description: "Explicit mention of HIV infection or HIV positivity."
    group_id: 6
    extends: tri_state
    aliases_hu: ["HIV", "HIV fertőzés"]

  - key: lymphadenomegaly
    short: "lymph"
    label: "lymph node enlargement"
    description: >
      Mark Yes if lymph node enlargement is explicitly mentioned ("lymphadenomegalia",
      "megnagyobbodott nyirokcsomó"). Also mark Yes if a lymph node is reported with
      size above typical limits AND location is given (e.g. ≥2 cm palpable; or imaging
      short-axis ≥10 mm, inguinal ≥15 mm). Also mark Yes if a core biopsy/excision is
      explicitly from a lymph node at a stated location (nyaki/axillaris/inguinalis etc.),
      including when lymphoma (B-sejtes/DLBCL) is proven. Mark No only if explicitly
      stated that nodes are not enlarged. Otherwise Not mentioned.
    group_id: 7
    extends: tri_state
    aliases_hu: ["kóros nyirokcsomó megnagyobbodás", "lymphadenomegalia", "lymphadenomegaly"]

  - key: pathological_lymph_node
    short: "pnode"
    label: "pathological lymph node"
    description: >
      Mark Yes if a lymph node is explicitly described as structurally or
      histologically abnormal (e.g. lymphoma or metastasis infiltration,
      necrosis, conglomerate formation, PET-positive, biopsy-proven disease),
      regardless of size. Mark No only if explicitly stated normal.
      Otherwise Not mentioned.
    group_id: 7
    extends: tri_state
    aliases_hu: ["patológiás nyirokcsomó", "daganatos nyirokcsomó", "lymphomás nyirokcsomó"]
    
  - key: hepatomegaly
    short: "hepato"
    label: "liver enlargement"
    description: "Explicit mention of liver enlargement."
    group_id: 7
    extends: tri_state
    aliases_hu: ["májmegnagyobbodás", "hepatomegalia", "hepatomegaly"]

  - key: splenomegaly
    short: "splen"
    label: "spleen enlargement"
    description: "Explicit mention of spleen enlargement."
    group_id: 7
    extends: tri_state
    aliases_hu: ["lépmegnagyobbodás", "splenomegalia", "splenomegaly"]

  - key: smoking
    short: "smoke"
    label: "smoking habit"
    description: "Classify the patient's smoking habit. Only mark if explicitly stated. Categories: Not a smoker (no current smoking), Occasional smoker (<10 cigarettes/day, irregular/social), Moderate smoker (daily ~10–19 cigarettes/day), Heavy smoker (≥20 cigarettes/day or ≥1 pack/day)."
    group_id: 8
    type: enum
    values: ["Not a smoker", "Occasional smoker", "Moderate smoker", "Heavy smoker"]
    format_hint: "<Not a smoker/Occasional smoker/Moderate smoker/Heavy smoker>"
    aliases_hu: ["dohányzik", "dohányzás", "cigaretta", "dohányos"]

  - key: drinking
    short: "drink"
    label: "alcohol consumption"
    description: "Classify the patient’s alcohol consumption. Only mark if explicitly stated. Categories: Not drinking (no current alcohol use), Occasionally drinking (rare/social, small amounts), Heavily drinking (frequent or high-risk intake)."
    group_id: 8
    type: enum
    values: ["Not drinking", "Occasionally drinking", "Heavily drinking"]
    format_hint: "<Not drinking/Occasionally drinking/Heavily drinking>"
    aliases_hu: ["alkohol", "alkoholfogyasztás", "iszik", "ivás"]
