Dane do analizy

Opis zbioru danych do analizy. Kryteria włączenia. Charakterystyka grupy badanej. Lista zmiennych.

Piotr Wiśniewski
2023-09-11

Populacja badana

pacjenci z rejestru Eurocrine, którzy przebyli operację tarczycy 03.2020 - 03.2022, u których przed operacją wykonano ocenę TIRADS. Wiek pacjentów 16 lat i powyżej.

Kryteria włączenia / wykluczenia

Kolejne etapy kwalifikacji:

  1. cały zbiór - 32008 przypadków
  2. wiek >= 16 (31604 z 32008 przypadków, odpadło 404)
  3. dostępna ocena wg EU-TIRADS (21714 z 31604 przypadków, odpadło 9890)
  4. dostępna ocena hist-pat (20762 z 21714 przypadków, odpadło 952)

Kryterium wieku dodano 7.11.2022, w wyniku wcześniejszej wspólnej dyskusji autorów.

Lista zmiennych

hide
skim(df)
Table 1: Data summary
Name df
Number of rows 20762
Number of columns 44
_______________________
Column type frequency:
character 7
Date 1
factor 17
logical 1
numeric 18
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
oper_id 0 1.00 9 11 0 20762 0
pid 0 1.00 9 14 0 20691 0
country_id 0 1.00 1 2 0 10 0
site_id 0 1.00 1 3 0 111 0
patient_id 0 1.00 4 6 0 20691 0
size_main_cat 13084 0.37 5 11 0 4 0
clinical_risk 12855 0.38 3 12 0 3 0

Variable type: Date

skim_variable n_missing complete_rate min max median n_unique
oper_date 0 1 2020-03-01 2022-03-01 2021-03-03 566

Variable type: factor

skim_variable n_missing complete_rate ordered n_unique top_counts
diagn_main 0 1 FALSE 38 Pap: 6766, Nod: 5346, Fol: 4513, Gra: 1569
diagn_sec1 0 1 FALSE 36 (Mi: 13203, Lym: 2730, Nod: 1993, Fol: 1255
diagn_sec2 0 1 FALSE 24 (Mi: 19320, Lym: 639, Nod: 369, Fol: 156
diagn_sec3 0 1 FALSE 15 (Mi: 20575, Lym: 102, Par: 24, Nod: 19
oper_type_th 0 1 FALSE 11 Uni: 9647, Thy: 9465, Uni: 485, Ist: 457
oper_type_ln 0 1 FALSE 9 Non: 16218, Uni: 2132, Cen: 888, Bil: 877
oper_indic 0 1 FALSE 5 Exc: 8842, Com: 4318, Mal: 4235, Thy: 2817
eutirads 0 1 FALSE 5 TR4: 6831, TR5: 6157, TR3: 4133, TR2: 2412
sex 0 1 FALSE 2 Fem: 16508, Mal: 4254
tnm_t 0 1 FALSE 10 (Mi: 12704, pT1: 3739, pT1: 2285, pT2: 1278
tnm_n 0 1 FALSE 5 (Mi: 12581, pN0: 3591, pNx: 2347, pN1: 1437
tnm_m 0 1 FALSE 4 (Mi: 12639, pM0: 6749, pMx: 1276, pM1: 98
beth_class 0 1 FALSE 7 IV: 5787, Not: 5279, VI: 3505, II: 3147
age_cat 0 1 FALSE 4 (26: 10675, (53: 8671, (-0: 1046, (79: 370
oper_type_th_aggr 0 1 FALSE 3 Lob: 9647, Thy: 9465, Oth: 1650
oper_type_ln_aggr 0 1 FALSE 4 Non: 16218, CLN: 3009, CLN: 984, Oth: 551
tnm_t_orig 0 1 FALSE 10 (Mi: 12872, pT1: 3657, pT1: 2240, pT2: 1254

Variable type: logical

skim_variable n_missing complete_rate mean count
eutirads_reported 0 1 1 TRU: 20762

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
size_main 13084 0.37 15.87 14.15 0 7.0 12 20.00 150 ▇▁▁▁▁
size_sec1 20258 0.02 7.03 9.51 0 2.0 4 7.25 74 ▇▁▁▁▁
size_sec2 20736 0.00 6.73 8.17 1 2.0 4 8.75 40 ▇▂▁▁▁
size_sec3 20759 0.00 11.33 3.51 8 9.5 11 13.00 15 ▇▁▇▁▇
age 0 1.00 50.53 14.84 16 39.0 51 62.00 106 ▃▇▇▂▁
eutirads_5 0 1.00 0.30 0.46 0 0.0 0 1.00 1 ▇▁▁▁▃
malignant 0 1.00 0.38 0.49 0 0.0 0 1.00 1 ▇▁▁▁▅
malignant_sec1 0 1.00 0.03 0.16 0 0.0 0 0.00 1 ▇▁▁▁▁
malignant_sec2 0 1.00 0.00 0.04 0 0.0 0 0.00 1 ▇▁▁▁▁
malignant_sec3 0 1.00 0.00 0.01 0 0.0 0 0.00 1 ▇▁▁▁▁
malignant_sec 0 1.00 0.03 0.16 0 0.0 0 0.00 1 ▇▁▁▁▁
fna_indicated 13084 0.37 0.46 0.50 0 0.0 0 1.00 1 ▇▁▁▁▇
size_main_lt1 13084 0.37 0.46 0.50 0 0.0 0 1.00 1 ▇▁▁▁▇
tnm_t1a 12872 0.38 0.46 0.50 0 0.0 0 1.00 1 ▇▁▁▁▇
high_risk_profile 0 1.00 0.05 0.21 0 0.0 0 0.00 1 ▇▁▁▁▁
low_risk_profile 0 1.00 0.13 0.33 0 0.0 0 0.00 1 ▇▁▁▁▁
indeterminate_risk_profile 12855 0.38 0.54 0.50 0 0.0 1 1.00 1 ▇▁▁▁▇
oper_count 0 1.00 1.01 0.11 1 1.0 1 1.00 3 ▇▁▁▁▁

Charakterystyka pacjentów

Uwaga: tutaj uwzględniono tylko 1 rekord per pacjent (pierwszą operację u danego pacjenta)

hide
df1op <- df %>% 
  filter(oper_count == 1)

Wiek, płeć

hide
df1op %>% 
  select(age,sex) %>% 
  tbl_summary(
    label = list(
      age ~ "Age [years]",
      sex ~ "Sex"
    )
  ) %>%
  modify_caption("**Table. Patient characteristics**")
Table 2: Table. Patient characteristics
Characteristic N = 20,5261
Age [years] 51 (39, 62)
Sex
    Male 4,183 (20%)
    Female 16,343 (80%)
1 Median (IQR); n (%)
hide
df1op  %>%
  ggplot(aes(x=age, fill=sex)) +
  geom_histogram(binwidth = 1) 

Ocena przedoperacyjna

Wynik BAC

hide
df %>%
  select(
    beth_class
  ) %>%
  tbl_summary(
    label = list(beth_class ~ "Bethesda class")
  )  %>%
    modify_caption("**Table. Cytology results**") 
Table 3: Table. Cytology results
Characteristic N = 20,7621
Bethesda class
    Not performed 5,279 (25%)
    I 517 (2.5%)
    II 3,147 (15%)
    III 1,351 (6.5%)
    IV 5,787 (28%)
    V 1,176 (5.7%)
    VI 3,505 (17%)
1 n (%)

EUTIRADS.PRE

hide
df %>%
  select(
    eutirads
  ) %>%
  tbl_summary(
    label = list(eutirads ~ "EU-TIRADS")
  )  %>%
    modify_caption("**Table. Pre-operative ultrasound results**") 
Table 4: Table. Pre-operative ultrasound results
Characteristic N = 20,7621
EU-TIRADS
    TR1 1,229 (5.9%)
    TR2 2,412 (12%)
    TR3 4,133 (20%)
    TR4 6,831 (33%)
    TR5 6,157 (30%)
1 n (%)

Zabiegi

Liczba operacji z podziałem na pierwotne, wtórne

hide
df  %>% 
  select(oper_count) %>% 
  tbl_summary(
    label = list( oper_count ~ "Number of surgeries")
  ) %>%
  modify_caption("**Table. Number of surgeries per 1 patient**")
Table 5: Table. Number of surgeries per 1 patient
Characteristic N = 20,7621
Number of surgeries
    1 20,526 (99%)
    2 227 (1.1%)
    3 9 (<0.1%)
1 n (%)

Rodzaje zabiegów

hide
df %>%
  select(
    oper_type_th,
    oper_type_ln
  ) %>%
  mutate(
    oper_type_th = fct_infreq(oper_type_th),
    oper_type_ln = fct_infreq(oper_type_ln)   
  ) %>%
  tbl_summary(
    label = list(oper_type_th ~ "Thyroid surgery",
                 oper_type_ln ~ "Lymph node surgery")
  )  %>%
    modify_caption("**Table. Type of surgery**") 
Table 6: Table. Type of surgery
Characteristic N = 20,7621
Thyroid surgery
    Unilateral lobectomy of thyroid gland (BAA40) 9,647 (46%)
    Thyroidectomy (BAA60) 9,465 (46%)
    Unilateral resection of thyroid gland (BAA20) 485 (2.3%)
    Isthmus resection of thyroid gland (BAA30) 457 (2.2%)
    Bilateral resection of thyroid gland (BAA25) 322 (1.6%)
    Lobectomy and resection of contralateral lobe of thyroid gland (BAA50) 277 (1.3%)
    Other operation on thyroid gland (BAA99) 53 (0.3%)
    Percutanous thermal ablation (RFA, NWA, HIFU) 33 (0.2%)
    Biopsy of thyroid gland (BAA00) 11 (<0.1%)
    Incision of thyroid gland (BAA10) 8 (<0.1%)
    Exploration of thyroid gland (BAA05) 4 (<0.1%)
Lymph node surgery
    None 16,218 (78%)
    Unilateral central lymph node dissection (PJD41) 2,132 (10%)
    Central lymph node dissection (PJD41) and one-sided lat. Lymph node dissection (PJD51) 888 (4.3%)
    Bilateral central lymph node dissection (PJD41) 877 (4.2%)
    Extirpation of lymph nodes (PJD41) 329 (1.6%)
    Exploration of lymph nodes incl. Biopsy (PJD10) 143 (0.7%)
    Bilateral central lymphnode dissection AND bilateral lateral lymphnodedissection (PJD41, PJD51) 96 (0.5%)
    One-sided lateral lymph node dissection (PJD51) 55 (0.3%)
    Bilateral lateral lymph node dissection (PJD51) 24 (0.1%)
1 n (%)

Rodzaje zabiegów - zagregowane

hide
df %>%
  select(
    oper_type_th_aggr,
    oper_type_ln_aggr
  ) %>%
  mutate(
    oper_type_th_aggr = fct_infreq(oper_type_th_aggr),
    oper_type_ln_aggr = fct_infreq(oper_type_ln_aggr)   
  ) %>%
  tbl_summary(
    label = list(oper_type_th_aggr ~ "Thyroid surgery",
                 oper_type_ln_aggr ~ "Lymph node surgery")
  )  %>%
    modify_caption("**Table. Type of surgery**") 
Table 7: Table. Type of surgery
Characteristic N = 20,7621
Thyroid surgery
    Lobectomy 9,647 (46%)
    Thyroidectomy 9,465 (46%)
    Other 1,650 (7.9%)
Lymph node surgery
    None 16,218 (78%)
    CLND 3,009 (14%)
    CLND + LLND 984 (4.7%)
    Other 551 (2.7%)
1 n (%)

Wskaznie do operacji

hide
df %>%
  select(
    oper_indic
  ) %>%
  mutate(
    oper_indic = fct_infreq(oper_indic)   
  ) %>%
  tbl_summary(
    label = list(oper_indic ~ "Indication")
  )  %>%
    modify_caption("**Table. Main indications**") 
Table 8: Table. Main indications
Characteristic N = 20,7621
Indication
    Excluding malignancy 8,842 (43%)
    Compression symptom 4,318 (21%)
    Malignancy 4,235 (20%)
    Thyreotoxicosis 2,817 (14%)
    Other 550 (2.6%)
1 n (%)

Rozpoznania hist-pat

Histological main diagnosis.F1

hide
df %>%
  select(
    diagn_main 
  ) %>%
  mutate(
    diagn_main = fct_infreq(diagn_main)
  ) %>%
  tbl_summary(
    label = list(diagn_main ~ "Diagnosis")
  )  %>%
    modify_caption("**Table. Histological main diagnosis**") 
Table 9: Table. Histological main diagnosis
Characteristic N = 20,7621
Diagnosis
    Papillary cancer T-96 M-82603 6,766 (33%)
    Nodular goitre T-96 M-71640 5,346 (26%)
    Follicular adenoma T-96 M-83300 4,513 (22%)
    Graves´ disease T-96 D-2193 1,569 (7.6%)
    Hürtle cell (oxyphilic) adenoma T-96M-82900 589 (2.8%)
    Follicular cancer T-96 M-83303 395 (1.9%)
    Medullary cancer T-9605 M-85103 319 (1.5%)
    Lymphocytic thyroiditis Hashimoto T-96 M-45810 280 (1.3%)
    Hürtle cell (oxyphilic) carcinoma T-96 M-82903 183 (0.9%)
    Non-invasive follicular thyroid neoplasm with papillary-like nuclear features (NIFTP) 133 (0.6%)
    Other diagnosis 119 (0.6%)
    Well differentiated tumour of uncertain malignant potential (WDT-UMP) 66 (0.3%)
    Thyroid normal T-96 M 00110 63 (0.3%)
    Thyroid nothing malignant T-96 M 0945 63 (0.3%)
    Normal gland 52 (0.3%)
    Anaplastic cancer T-96 M-80123 40 (0.2%)
    Follicular tumour with uncertain malignant potential 40 (0.2%)
    Poorly differentiated thyroid cancer 36 (0.2%)
    Benign tumour UNS T-96 M-80000 32 (0.2%)
    Parathyroid adenoma (T-97 M-81400) 25 (0.1%)
    Subacute thyroiditis de Quervain T-96 M-44000 25 (0.1%)
    Hyalinizing trabecular tumour 16 (<0.1%)
    Lymph node metastasis papillary cancer T-082 M-82606 15 (<0.1%)
    C-cell hyperplasia T-9605 M-72000 14 (<0.1%)
    Metastasis from cancer UNS T-96 M-80106 11 (<0.1%)
    Cyst, ductus thyreoglossus T-96 M-26500 8 (<0.1%)
    Metastasis from malignant tumour UNS T-96 M-80006 8 (<0.1%)
    Lymphoma T-96 M-95903 7 (<0.1%)
    Acute thyroiditis T-96 M-41000 6 (<0.1%)
    Cancer UNS T-96 M 80103 6 (<0.1%)
    Parthyroid hyperplasia (T-97 M 72000) 4 (<0.1%)
    Chronic fibrotic thyroiditis Riedel T-96 M-45000 4 (<0.1%)
    Malignant tumour UNS T-96 M-80003 3 (<0.1%)
    Lymph node metastasis medullary cancer T082 M-85106 2 (<0.1%)
    Lymph node metastasis follicular cancer 1-082 M-83306 1 (<0.1%)
    Parathyroid normal 1 (<0.1%)
    Lymph node metastasis Hürthle cell (oxyphilic) carcinoma 1 (<0.1%)
    Acute thyroiditis with abscess T-96 M-41700 1 (<0.1%)
1 n (%)

Histological secondary diagnosis 1.F1

hide
df %>%
  select(
    diagn_sec1 
  ) %>%
  mutate(
    diagn_sec1 = fct_infreq(diagn_sec1)
  ) %>%
  tbl_summary(
    label = list(diagn_sec1 ~ "Diagnosis")
  )  %>%
    modify_caption("**Table. Histological secondary diagnosis**") 
Table 10: Table. Histological secondary diagnosis
Characteristic N = 20,7621
Diagnosis
    (Missing) 13,203 (64%)
    Lymphocytic thyroiditis Hashimoto T-96 M-45810 2,730 (13%)
    Nodular goitre T-96 M-71640 1,993 (9.6%)
    Follicular adenoma T-96 M-83300 1,255 (6.0%)
    Papillary cancer T-96 M-82603 440 (2.1%)
    Parathyroid adenoma (T-97 M-81400) 257 (1.2%)
    Graves´ disease T-96 D-2193 240 (1.2%)
    Hürtle cell (oxyphilic) adenoma T-96M-82900 148 (0.7%)
    Other diagnosis 70 (0.3%)
    Parthyroid hyperplasia (T-97 M 72000) 54 (0.3%)
    Subacute thyroiditis de Quervain T-96 M-44000 54 (0.3%)
    Parathyroid normal 44 (0.2%)
    Non-invasive follicular thyroid neoplasm with papillary-like nuclear features (NIFTP) 41 (0.2%)
    Follicular cancer T-96 M-83303 35 (0.2%)
    Thyroid nothing malignant T-96 M 0945 35 (0.2%)
    C-cell hyperplasia T-9605 M-72000 27 (0.1%)
    Lymph node metastasis papillary cancer T-082 M-82606 24 (0.1%)
    Hürtle cell (oxyphilic) carcinoma T-96 M-82903 15 (<0.1%)
    Normal gland 15 (<0.1%)
    Benign tumour UNS T-96 M-80000 13 (<0.1%)
    Chronic fibrotic thyroiditis Riedel T-96 M-45000 10 (<0.1%)
    Thyroid normal T-96 M 00110 9 (<0.1%)
    Medullary cancer T-9605 M-85103 6 (<0.1%)
    Cyst, ductus thyreoglossus T-96 M-26500 6 (<0.1%)
    Poorly differentiated thyroid cancer 5 (<0.1%)
    Acute thyroiditis T-96 M-41000 5 (<0.1%)
    Hyalinizing trabecular tumour 5 (<0.1%)
    Well differentiated tumour of uncertain malignant potential (WDT-UMP) 4 (<0.1%)
    Cancer UNS T-96 M 80103 4 (<0.1%)
    Follicular tumour with uncertain malignant potential 4 (<0.1%)
    Anaplastic cancer T-96 M-80123 3 (<0.1%)
    Metastasis from malignant tumour UNS T-96 M-80006 3 (<0.1%)
    Metastasis from cancer UNS T-96 M-80106 2 (<0.1%)
    Malignant tumour UNS T-96 M-80003 1 (<0.1%)
    Lymph node metastasis anaplastic cancer T082 M-80126 1 (<0.1%)
    Lymph node metastasis medullary cancer T082 M-85106 1 (<0.1%)
1 n (%)

Histological secondary diagnosis 2.F1

hide
df %>%
  select(
    diagn_sec2 
  ) %>%
  mutate(
    diagn_sec2 = fct_infreq(diagn_sec2)
  ) %>%
  tbl_summary(
    label = list(diagn_sec2 ~ "Diagnosis")
  )  %>%
    modify_caption("**Table. Histological secondary diagnosis**") 
Table 11: Table. Histological secondary diagnosis
Characteristic N = 20,7621
Diagnosis
    (Missing) 19,320 (93%)
    Lymphocytic thyroiditis Hashimoto T-96 M-45810 639 (3.1%)
    Nodular goitre T-96 M-71640 369 (1.8%)
    Follicular adenoma T-96 M-83300 156 (0.8%)
    Parathyroid adenoma (T-97 M-81400) 95 (0.5%)
    Parthyroid hyperplasia (T-97 M 72000) 29 (0.1%)
    Papillary cancer T-96 M-82603 23 (0.1%)
    Graves´ disease T-96 D-2193 23 (0.1%)
    Other diagnosis 21 (0.1%)
    Hürtle cell (oxyphilic) adenoma T-96M-82900 18 (<0.1%)
    Subacute thyroiditis de Quervain T-96 M-44000 12 (<0.1%)
    Parathyroid normal 10 (<0.1%)
    C-cell hyperplasia T-9605 M-72000 10 (<0.1%)
    Cyst, ductus thyreoglossus T-96 M-26500 10 (<0.1%)
    Chronic fibrotic thyroiditis Riedel T-96 M-45000 7 (<0.1%)
    Lymph node metastasis papillary cancer T-082 M-82606 6 (<0.1%)
    Non-invasive follicular thyroid neoplasm with papillary-like nuclear features (NIFTP) 4 (<0.1%)
    Normal gland 3 (<0.1%)
    Medullary cancer T-9605 M-85103 2 (<0.1%)
    Lymphoma T-96 M-95903 1 (<0.1%)
    Thyroid normal T-96 M 00110 1 (<0.1%)
    Metastasis from cancer UNS T-96 M-80106 1 (<0.1%)
    Lymph node metastasis medullary cancer T082 M-85106 1 (<0.1%)
    Benign tumour UNS T-96 M-80000 1 (<0.1%)
1 n (%)

Histological secondary diagnosis 3.F1

hide
df %>%
  select(
    diagn_sec3 
  ) %>%
  mutate(
    diagn_sec3 = fct_infreq(diagn_sec3)
  ) %>%
  tbl_summary(
    label = list(diagn_sec3 ~ "Diagnosis")
  )  %>%
    modify_caption("**Table. Histological secondary diagnosis**") 
Table 12: Table. Histological secondary diagnosis
Characteristic N = 20,7621
Diagnosis
    (Missing) 20,575 (99%)
    Lymphocytic thyroiditis Hashimoto T-96 M-45810 102 (0.5%)
    Parathyroid adenoma (T-97 M-81400) 24 (0.1%)
    Nodular goitre T-96 M-71640 19 (<0.1%)
    Follicular adenoma T-96 M-83300 14 (<0.1%)
    Parthyroid hyperplasia (T-97 M 72000) 9 (<0.1%)
    Other diagnosis 8 (<0.1%)
    Lymph node metastasis papillary cancer T-082 M-82606 2 (<0.1%)
    Cyst, ductus thyreoglossus T-96 M-26500 2 (<0.1%)
    Graves´ disease T-96 D-2193 2 (<0.1%)
    Parathyroid normal 1 (<0.1%)
    Benign tumour UNS T-96 M-80000 1 (<0.1%)
    Normal gland 1 (<0.1%)
    Follicular cancer T-96 M-83303 1 (<0.1%)
    Non-invasive follicular thyroid neoplasm with papillary-like nuclear features (NIFTP) 1 (<0.1%)
1 n (%)

nowa zmienna: malignant

hide
tar_load(malignant_codes)
Malignant = 1 Malignant = 0
gdy Histological main diagnosis.F1 przyjmuje wartość: gdy Histological main diagnosis.F1 przyjmuje wartość:
Non-invasive follicular thyroid neoplasm with papillary-like nuclear features (NIFTP), Papillary cancer T-96 M-82603, Anaplastic cancer T-96 M-80123, Follicular cancer T-96 M-83303, Medullary cancer T-9605 M-85103, Hürtle cell (oxyphilic) carcinoma T-96 M-82903, Lymphoma T-96 M-95903, Poorly differentiated thyroid cancer, Metastasis from malignant tumour UNS T-96 M-80006, Cancer UNS T-96 M 80103, Malignant tumour UNS T-96 M-80003, Metastasis from cancer UNS T-96 M-80106 Nodular goitre T-96 M-71640, Follicular adenoma T-96 M-83300, Normal gland, Graves´ disease T-96 D-2193, Lymphocytic thyroiditis Hashimoto T-96 M-45810, Hürtle cell (oxyphilic) adenoma T-96M-82900, Thyroid normal T-96 M 00110, Well differentiated tumour of uncertain malignant potential (WDT-UMP), Thyroid nothing malignant T-96 M 0945, Other diagnosis, Cyst, ductus thyreoglossus T-96 M-26500, Benign tumour UNS T-96 M-80000, Lymph node metastasis papillary cancer T-082 M-82606, Parathyroid adenoma (T-97 M-81400), Follicular tumour with uncertain malignant potential, C-cell hyperplasia T-9605 M-72000, Acute thyroiditis T-96 M-41000, Hyalinizing trabecular tumour, Lymph node metastasis follicular cancer 1-082 M-83306, Subacute thyroiditis de Quervain T-96 M-44000, Parthyroid hyperplasia (T-97 M 72000), Chronic fibrotic thyroiditis Riedel T-96 M-45000, Parathyroid normal, Lymph node metastasis Hürthle cell (oxyphilic) carcinoma, Lymph node metastasis medullary cancer T082 M-85106, Acute thyroiditis with abscess T-96 M-41700
hide
df %>%
  select(
    malignant 
  ) %>%
  tbl_summary(
    label = list(malignant ~ "Malignant diagnosis")
  )  %>%
    modify_caption("**Table. Histological main diagnosis category**") 
Table 13: Table. Histological main diagnosis category
Characteristic N = 20,7621
Malignant diagnosis 7,907 (38%)
1 n (%)

nowa zmienna: malignant_sec

malignant_sec = 1 malignant_sec = 0
gdy dowolna z 3 zmiennych Histological secondary diagnosis.F1 przyjmuje wartość: gdy wszystkie 3 zmienne Histological secondary diagnosis.F1 przyjmują wartość:
Non-invasive follicular thyroid neoplasm with papillary-like nuclear features (NIFTP), Papillary cancer T-96 M-82603, Anaplastic cancer T-96 M-80123, Follicular cancer T-96 M-83303, Medullary cancer T-9605 M-85103, Hürtle cell (oxyphilic) carcinoma T-96 M-82903, Lymphoma T-96 M-95903, Poorly differentiated thyroid cancer, Metastasis from malignant tumour UNS T-96 M-80006, Cancer UNS T-96 M 80103, Malignant tumour UNS T-96 M-80003, Metastasis from cancer UNS T-96 M-80106 Nodular goitre T-96 M-71640, Follicular adenoma T-96 M-83300, Normal gland, Graves´ disease T-96 D-2193, Lymphocytic thyroiditis Hashimoto T-96 M-45810, Hürtle cell (oxyphilic) adenoma T-96M-82900, Thyroid normal T-96 M 00110, Well differentiated tumour of uncertain malignant potential (WDT-UMP), Thyroid nothing malignant T-96 M 0945, Other diagnosis, Cyst, ductus thyreoglossus T-96 M-26500, Benign tumour UNS T-96 M-80000, Lymph node metastasis papillary cancer T-082 M-82606, Parathyroid adenoma (T-97 M-81400), Follicular tumour with uncertain malignant potential, C-cell hyperplasia T-9605 M-72000, Acute thyroiditis T-96 M-41000, Hyalinizing trabecular tumour, Lymph node metastasis follicular cancer 1-082 M-83306, Subacute thyroiditis de Quervain T-96 M-44000, Parthyroid hyperplasia (T-97 M 72000), Chronic fibrotic thyroiditis Riedel T-96 M-45000, Parathyroid normal, Lymph node metastasis Hürthle cell (oxyphilic) carcinoma, Lymph node metastasis medullary cancer T082 M-85106, Acute thyroiditis with abscess T-96 M-41700
hide
df %>%
  select(
    malignant_sec
  ) %>%
  tbl_summary(
    label = list(malignant_sec ~ "Malignant secondary diagnosis")
  )  %>%
    modify_caption("**Table. Histological secondary diagnosis category**") 
Table 14: Table. Histological secondary diagnosis category
Characteristic N = 20,7621
Malignant secondary diagnosis 578 (2.8%)
1 n (%)

Rodzaje nowotworów złośliwych

hide
df %>%
  filter(malignant == 1) %>%
  select(
    diagn_main 
  ) %>%
  mutate(
    diagn_main = fct_infreq(diagn_main),
    diagn_main = fct_lump_prop(diagn_main, prop = 0.01)
  ) %>%
  tbl_summary(
    label = list(diagn_main ~ "Diagnosis")
  )  %>%
    modify_caption("**Table. Histological main diagnosis**") 
Table 15: Table. Histological main diagnosis
Characteristic N = 7,9071
Diagnosis
    Papillary cancer T-96 M-82603 6,766 (86%)
    Follicular cancer T-96 M-83303 395 (5.0%)
    Medullary cancer T-9605 M-85103 319 (4.0%)
    Hürtle cell (oxyphilic) carcinoma T-96 M-82903 183 (2.3%)
    Non-invasive follicular thyroid neoplasm with papillary-like nuclear features (NIFTP) 133 (1.7%)
    Other 111 (1.4%)
1 n (%)

TNM

hide
df %>%
  filter(malignant == 1) %>%
  select(
    tnm_t,
    tnm_n,
    tnm_m
  ) %>%
  tbl_summary(
    label = list(
      tnm_t ~ "T: size or direct extent of the primary tumor",
      tnm_n ~ "N: degree of spread to regional lymph nodes",
      tnm_m ~ "M: presence of distant metastasis"
    )
  )  %>%
  modify_caption("**Table. Thyroid cancer stage according to the 8<sup>th</sup> edition of AJCC/TNM**") 
Table 16: Table. Thyroid cancer stage according to the 8th edition of AJCC/TNM
Characteristic N = 7,9071
T: size or direct extent of the primary tumor
    pT0 2 (<0.1%)
    pT1a 3,502 (44%)
    pT1b 2,260 (29%)
    pT2 1,267 (16%)
    pT3a 425 (5.4%)
    pT3b 156 (2.0%)
    pT4a 132 (1.7%)
    pT4b 13 (0.2%)
    pTx 9 (0.1%)
    (Missing) 141 (1.8%)
N: degree of spread to regional lymph nodes
    pN0 3,497 (44%)
    pN1a 1,414 (18%)
    pN1b 787 (10.0%)
    pNx 2,209 (28%)
    (Missing) 0 (0%)
M: presence of distant metastasis
    pM0 6,535 (83%)
    pM1 96 (1.2%)
    pMx 1,276 (16%)
    (Missing) 0 (0%)
1 n (%)

Wielkość ogniska nowotworu złośliwego

Uwaga: do poniższych zestawień włączyłem tylko przypadki z rozp. nowotworu złośliwego

hide
df %>% 
  filter(
    malignant == 1,
    !is.na(size_main)
  ) %>% 
  ggplot(aes(x=size_main)) + 
  geom_histogram(binwidth = 5) +
  labs(title = "Distribution of malignant tumor size",  subtitle = "n=7988 malignant thyroid tumors") +
  xlab("size [mm]") +
  theme_classic()

hide
df %>% 
  filter(malignant == 1) %>% 
  select(
    size_main_cat
  ) %>%
  mutate(
    size_main_cat = fct_infreq(size_main_cat)
  )%>%
  tbl_summary()  %>%
    modify_caption("**Table. Size of malignant tumors - categorized**") 
Table 17: Table. Size of malignant tumors - categorized
Characteristic N = 7,9071
size_main_cat
    <= 1cm 3,510 (46%)
    (1cm - 2cm] 2,350 (31%)
    (2cm - 4cm] 1,326 (17%)
    > 4cm 476 (6.2%)
    Unknown 245
1 n (%)