Recruitment
Enrolment figures refer to the date of creation of each participation entity (patient, personal registry and procedure in the anatomical lung resection process) in the data platform.
Cumulative Recruitment
Code
a_datosClinicos <- readRDS("../participacion/actividad/a_datosClinicos.RDS") # patient level
a_regPersonal <- readRDS("../participacion/actividad/a_regPersonal.RDS") # op-log level
a_rpaPreop <- readRDS("../participacion/actividad/a_rpaPreop.RDS") # RPA level
reclutamiento_patient <- a_datosClinicos %>%
distinct(id, .keep_all = TRUE) %>%
mutate(creation = as.Date(creation_time)) %>%
filter(creation > "2023-01-01") %>%
mutate(week = week(creation)) %>%
count(creation) %>%
arrange(creation) %>%
mutate(acum = cumsum(n),
level = "Patients")
reclutamiento_regPersonal <- a_regPersonal %>%
distinct(id, .keep_all = TRUE) %>%
mutate(creation = as.Date(creation_time)) %>%
filter(creation > "2023-01-01") %>%
mutate(week = week(creation)) %>%
count(creation) %>%
arrange(creation) %>%
mutate(acum = cumsum(n),
level = "Personal Registries")
reclutamiento_rpa <- a_rpaPreop %>%
distinct(id, .keep_all = TRUE) %>%
mutate(creation = as.Date(creation_time)) %>%
filter(creation > "2023-01-01") %>%
mutate(week = week(creation)) %>%
count(creation) %>%
arrange(creation) %>%
mutate(acum = cumsum(n),
level = "ALR-Process Procedures")
reclutamiento <- bind_rows(reclutamiento_patient, reclutamiento_regPersonal,reclutamiento_rpa)
reclutamiento %>%
ggplot(aes(x = creation, y = acum, color= factor(level, levels=c("Personal Registries", "Patients", "ALR-Process Procedures")))) +
geom_line(size = 1.2) +
scale_x_date(breaks = "3 month", date_labels = "%b-%y")+
scale_color_manual(values = azul5) +
labs(x=NULL, y=NULL, color = "Level") +
theme_minimal() +
theme(axis.text.x = element_text(angle=30),
plot.caption = element_text(face="italic"),
legend.position = c(0.2,0.7))
Recruitment per Year
Code
n_year(level = "patient", path = "../participacion/actividad/a_datosClinicos.RDS")
Code
n_year(level = "operativelog", path = "../participacion/actividad/a_datosClinicos.RDS")
Code
n_year(level = "process", path = "../participacion/actividad/a_datosClinicos.RDS")
Recruitment per Quarter
Code
n_quarter(level = "patient", path = "../participacion/actividad/a_datosClinicos.RDS")
Code
n_quarter(level = "operativelog", path = "../participacion/actividad/a_datosClinicos.RDS")
Code
n_quarter(level = "process", path = "../participacion/actividad/a_datosClinicos.RDS")
Operative Log
Operative-Log figures refer to the date of surgery of each record in the data platform.
Due to the operative-log functionality of the personal records form, a single procedure in a given patient may have several personal records, leading to an undesirable multiplicity of data for the purpose of population analysis. To overcome this situation, we have opted to filter the multiple personal records for the same procedure based on a chronological criterion. Therefore, we have kept the earliest record to build the following plot.
Type of Procedures
Number of unique personal records: 4111
Code
n_oplog()
Code
n_oplog(2023)
Code
n_oplog(2024)
Anatomical Lung Resection Process
Total number of procedures: 2417
The number of procedures per Department can be consulted in the Centre Activity section.
Demographics
Code
datosClinicos_rpa$sexo <- factor(datosClinicos_rpa$sexo,
levels = c("Hombre", "Mujer"),
labels = c("Male", "Female"))
p1 <- datosClinicos_rpa %>%
filter(!is.na(sexo)) %>%
count(sexo) %>% mutate(percent = n/sum(n)) %>%
ggplot (aes(x = sexo, y = percent)) +
geom_col(aes(fill = sexo), width = 0.6) +
geom_label(aes(label=n), size=3) +
scale_fill_manual (values = c(color1, color2)) +
scale_y_continuous(label = scales::percent)+
theme_minimal() +
theme(
legend.position = "none") +
labs(y = "Pacientes\n", x = NULL)
p2 <- datosClinicos_rpa %>%
filter(edad_del_paciente_a_la_fecha_de_intervencion < 100, !is.na(sexo)) %>%
ggplot (aes(x = edad_del_paciente_a_la_fecha_de_intervencion, fill = sexo)) +
geom_histogram(color = "white", position = "dodge") +
scale_fill_manual(values = c(color1, color2))+
scale_y_continuous(position = "right")+
theme_minimal() +
labs(x = NULL, y = NULL, fill = NULL)
plot_grid(p1, p2, nrow = 1, rel_widths = c(1/4, 3/4))
Code
datosClinicos_rpa %>%
filter(!is.na(sexo)) %>%
ggplot(aes(x = fct_rev(fct_infreq(factor(hospital))), fill = as.factor(sexo))) +
geom_bar(width = 0.6, position = "fill") +
scale_y_continuous(breaks= pretty_breaks(), labels=scales::percent) +
scale_fill_manual(values = c(color1, color2)) +
coord_flip() +
theme_minimal() +
theme(
plot.caption = element_text(hjust = -2, face = "italic"),
axis.text.y = element_text(size = 7))+
labs(x = NULL, y = NULL, fill = NULL, caption = "Centres ordered by number of procedures")
Code
datosClinicos_rpa %>%
filter(edad_del_paciente_a_la_fecha_de_intervencion < 100) %>%
ggplot(aes(x = reorder(hospital, edad_del_paciente_a_la_fecha_de_intervencion, FUN=median) , y = edad_del_paciente_a_la_fecha_de_intervencion)) +
geom_boxplot(fill = color2) +
stat_summary(fun.y=mean, geom="point", shape=20, size=3, color= "orange") +
coord_flip() +
theme_minimal() +
theme(
plot.caption = element_text(hjust = -0.7, face = "italic"),
axis.text.y = element_text(size = 7))+
labs(x = NULL, y = "\nAge", caption = "Centres ordered by median age")
Type of Lung Resection
Type of Surgical Approach
Code
rpa_type(type = "abordaje_final")
Code
rpa_type(2023, "abordaje_final")
Code
rpa_type(2024, "abordaje_final")
Lung Resection and Surgical Approach
Complications
The percentage of patients with some type of complication recorded prior to discharge from hospital is 28.6 % for all the Registry. The distribution of complications according to their degree of severity is as follows:
Code
rpa_complications()
Code
rpa_complications(2023)
Code
rpa_complications(2024)
Postop. Stay and Type of Resection
Code
rpa_stay(type="procedimiento_pulmonar")
Code
rpa_stay(2023, type="procedimiento_pulmonar")
Code
rpa_stay(2024, type = "procedimiento_pulmonar")
Postop Stay and Surgical Approach
Code
rpa_stay(type = "abordaje_final")
Code
rpa_stay(2023, type = "abordaje_final")
Code
rpa_stay(2024, type = "abordaje_final")
Diagnosis
Code
datosClinicos_rpa$grupo_diagnostico2 <- fct_recode(
datosClinicos_rpa$grupo_diagnostico,
"Primary Malignant" = "Tumoral Maligno Primario",
"Secondary Malignant" = "Tumoral Maligno Secundario",
"Benign Tumour" = "Tumoral Benigno",
"Inflammatory Disease" = "Inflamatorio - Infeccioso",
"Trauma" = "Traumático",
"Bullous Disease" = "Enfisema Bulloso")
datosClinicos_rpa$grupo_diagnostico2 <- fct_explicit_na(datosClinicos_rpa$grupo_diagnostico2)
datosClinicos_rpa |>
mutate(dx = fct_lump_n(grupo_diagnostico2, 4)) |>
count(dx) |>
mutate(percent = round(100*n/sum(n),1)) |>
arrange(n) |>
ggplot(aes(x = reorder(dx,n), y=n, label = paste(percent, "%"))) +
geom_col(fill=color1, width = 0.7)+
geom_label()+
labs(x=NULL, y=NULL)+
theme_minimal()+
coord_flip()
The following charts on staging refer to the group of patients with primary malignant lung tumors that are not compatible with recurrence of a previous tumor.
Clinical Stage
Code
rpa_estadio(type = "estadio_clinico")
Code
rpa_estadio(2023, "estadio_clinico")
Code
rpa_estadio(2024, "estadio_clinico")
Pathological Stage
Code
rpa_estadio(type = "estadio_patologico")
Code
rpa_estadio(2023, "estadio_patologico")
Code
rpa_estadio(2024, "estadio_patologico")
Clinical vs Pathological Stage
Code
rpa_estadio(type = c("estadio_clinico", "estadio_patologico"))