160 lines
4.4 KiB
Text
160 lines
4.4 KiB
Text
---
|
|
title: "Physical activity before stroke, small vessel disease and cognitive decline after stroke"
|
|
format:
|
|
revealjs:
|
|
footer: "Andreas"
|
|
slide-number: c/t
|
|
show-slide-number: all
|
|
toc: true
|
|
toc-title: "Overview"
|
|
logo: dsc_tekst.png
|
|
theme: serif
|
|
css: style.css
|
|
editor: visual
|
|
---
|
|
|
|
## Hypothesis
|
|
|
|
```{r}
|
|
library(tidyverse)
|
|
# remotes::install_github("agdamsbo/REDCapRITS")
|
|
|
|
library(gtsummary)
|
|
library(patchwork)
|
|
library(REDCapRITS)
|
|
|
|
# REDCapR::redcap_instruments(redcap_uri = "https://redcap.au.dk/api/", token = keyring::key_get("enigma_api_key"))$data
|
|
|
|
d_list <- REDCapRITS::read_redcap_tables(
|
|
uri = "https://redcap.au.dk/api/",
|
|
token = keyring::key_get("enigma_api_key"),
|
|
fields = c("record_id", "incl_by" , "incl_date"),
|
|
forms = c(
|
|
"klassifikation_af_primre_stroke",
|
|
"baseline_stroke",
|
|
"registrering",
|
|
"baseline_nihss",
|
|
"mrs",
|
|
"uddannelsesniveau",
|
|
"hjde_vgt_og_blodtryk",
|
|
"rygeanamnese",
|
|
"rbans",
|
|
"iqcode",
|
|
"eos"
|
|
)
|
|
)
|
|
```
|
|
|
|
```{r message=FALSE}
|
|
d <- REDCapRITS::redcap_wider(d_list)
|
|
```
|
|
|
|
> Higher level of PA before acute ischemic stroke (AIS) is associated with decreased risk of cognitive decline after stroke independently of stroke severity and cSVD burden.
|
|
|
|
## Data {.smaller}
|
|
|
|
- Physical Activity Scale in the Elderly (**PASE**) questionnaire
|
|
- Modified Rankin Scale (**mRS**)
|
|
- Level of education
|
|
- Informant Questionnaire on Cognitive Decline in the Elderly, short version (**IQCODE**)
|
|
- Repeatable Battery for the Assessment of Neuropsychological Status (**RBANS**), Scandinavian version
|
|
- Wellbeing and depressive symptoms
|
|
- Cerebral Small vessel disease burden (**cSVD score**)
|
|
|
|
## Education {.smaller}
|
|
|
|
```{r education}
|
|
# dput(levels(factor(d$education_inclusion_long)))
|
|
|
|
d |>
|
|
select(kon, education_inclusion_long, ) |>
|
|
mutate(
|
|
education_inclusion_long = factor(
|
|
education_inclusion_long,
|
|
levels = c(
|
|
"Folkeskole (9-10 år)",
|
|
"Gymnasiale/erhvervsfaglige uddannelser (11-12 år)",
|
|
"Erhvervsakademiuddannelser (13-14 år)",
|
|
"Professionsbachelor/universitetsbachelor (15-17 år)",
|
|
"Kandidatuddannelser (18-19 år)",
|
|
"PhD ( > 20 år)"
|
|
)
|
|
)) |>
|
|
tbl_summary(
|
|
by = "kon",
|
|
missing = "ifany",
|
|
missing_text = "Not classified",
|
|
label = list(education_inclusion_long ~ "Level of education")
|
|
) |>
|
|
add_overall(
|
|
)
|
|
```
|
|
|
|
## SVD scoring
|
|
|
|
- Number of microbleeds (SWI)
|
|
- Superficiel siderose (SWI)
|
|
- Lacunes (3D FLAIR)
|
|
- White matter hyperintensities (3D FLAIR)
|
|
- Enlarged Perivascular Space (3D FLAIR)
|
|
- Atrophy (3D T1)
|
|
|
|
## SVD score {.scrollable}
|
|
|
|
```{r}
|
|
REDCapTidieR::read_redcap(
|
|
redcap_uri = "https://redcap.au.dk/api/",
|
|
token = keyring::key_get("enigma_api_key"),
|
|
forms = c("svd_score")) |> REDCapTidieR::bind_tibbles()
|
|
|
|
svd_score |> filter(svd_initials=="AGD",redcap_event=="inclusion") |> select(svd_score) |> na.omit() |> mutate(svd_score = as.numeric(svd_score)) |> tbl_summary()
|
|
```
|
|
|
|
## IQCODE og RBANS {.smaller}
|
|
|
|
```{r}
|
|
d |>
|
|
select(kon,
|
|
mrs_score_inclusion_long,
|
|
iq_score,
|
|
rbans_e_is_3_months_long,
|
|
rbans_e_is_12_months_long
|
|
# ,
|
|
# svd_score
|
|
) |>
|
|
mutate(mrs_score_inclusion_long=factor(mrs_score_inclusion_long,labels = c("0","1","2"))) |>
|
|
tbl_summary(
|
|
by = "kon",
|
|
missing = "no",
|
|
label = list(
|
|
mrs_score_inclusion_long~"mRS at inclusion",
|
|
iq_score~"IQCODE score",
|
|
rbans_e_is_3_months_long~"RBANS 3 months",
|
|
rbans_e_is_12_months_long~"RBANS 12 months"#,
|
|
# svd_score~"SVD score at inclusion"
|
|
)
|
|
) |>
|
|
add_overall()
|
|
```
|
|
|
|
## RBANS plot
|
|
|
|
```{r}
|
|
source("/Users/au301842/ENIGMAtrial_R/src/plot_index.R")
|
|
|
|
rbans <- d_list$rbans |>
|
|
dplyr::select(c("record_id",
|
|
"redcap_event_name",
|
|
ends_with(c("_is","_lo","_up","_per")))) |>
|
|
na.omit()|>
|
|
dplyr::mutate(redcap_event=factor(redcap_event_name,
|
|
levels = c("3_months","12_months"),
|
|
labels = c("3 months","12 months"))) |>
|
|
dplyr::tibble()
|
|
|
|
rbans |>
|
|
dplyr::filter(record_id %in% record_id[duplicated(record_id)]) |> # Only patients with both 3 and 12 month
|
|
dplyr::filter(record_id %in% sample(record_id,5)) |> # 5 random patients
|
|
# filter(record_id %in% 28:32) |> # Only specified number
|
|
plot_index(id="redcap_event_name",facet.by = "record_id")
|
|
```
|