Austedo Multisite-HD

# redcapAPI::unlockREDCap(c(rcon    = proj.name),
#              keyring     = proj.name,
#              envir       = globalenv(),
#              url         = 'https://redcap.vanderbilt.edu/api/')
# 
# data <- redcapAPI::exportRecordsTyped(rcon = rcon, checkboxLabels = TRUE)
# exportFieldNames(rcon = rcon)
# redcapAPI::exportRecordsTyped(rcon = rcon, checkboxLabels = TRUE, factors = TRUE)%>% select(contains("chor_tx_2"))
# mChoiceCast(data, rcon, style = "labelled", drop_fields = TRUE) %>% select(contains("chor_tx_2"))
##Extract new data from redcap
# keyring::key_set(proj.name)
j.redcap_extract(proj.name)


## Publish report to OneDrive for VSP (copied from vpn directory)
publish_to_vsp(qmd = rmd.name, 
               output = output.name,
               directory = vsp.onedrive.dir)

## Render blank html document with Table of contents only
# render_toc(rmd.name, output.name)

## Update continuous study notes
# key_set("notes")
# notes <- update_redcap_notes()

RedCAP data current as of 2023-08-18 12:22:55

1 Study Overview

1.1 Background

Deutetrabenazine (Austedo) is a vesicular monoamine transporter 2 inhibitor (VMAT2i) that was approved by the FDA in April 2017 for the treatment of chorea associated with Huntington’s Disease. Based on FDA approval, the maximum dose of deutetrabenazine is 48 mg per day given in two divided doses. Steps required for patients to start therapy include obtaining insurance approval, submitting a prior authorization (PA), often including appeals, medication counseling, and medication shipment. In the medical literature, there is a scarcity of data to support safety and efficacy of dosing deutetrabenazine higher than current FDA recommendations. The objective of this study is to describe treatment outcomes in patients treated with deutetrabenazine doses greater than 48 mg per day. To assess response to therapy, clinicians use the Unified Huntington’s Disease Rating Scale (UHDRS). Patients are seen approximately every 3-12 months and a UHDRS score is calculated at each visit; however, telemedicine visits may result in partial or no UHDRS completion.

1.2 Methods

Patients who were prescribed deutetrabenazine by a VUMC or UAB provider between April 1, 2017 and July 1, 2022 were included in the sample. A retrospective chart review was performed to gather relevant information.

1.3 Outcomes

  • Poster 1 (VSP)

    • Concomitant medication use
    • Abbreviated UHDRS findings
    • Rate of and time to AEs
  • Poster 2 (UAB)

    • Adherence
    • Dose changes and reason for dose change
    • Discontinuation rates and reasons
#### Create data dictionary ###############
dict <- read.csv("../data/MultisiteHDAustedo_DataDictionary_2023-07-17.csv") %>%namify() %>% remove.blank.columns()


## Data loading and cleaning #######

load(dat.file.path)
# changelog(data, by.vars = c("record_id", "redcap_repeat_instrument","redcap_repeat_instance" ))
austdeo.labels <- collect.labels(data)
hd <- data


## Fix dates
dates <- dict %>% filter(`text_validation_type_or_show_slider_number` == "date_mdy") %>% .[,1]
hd %<>% mutate(across(all_of(dates), ymd))

## Exclusions
exclusions <- hd %>%filter(reason_exclude %nin% c("", "N/A", NA)) %>% select(record_id,site, reason_exclude) %>%droplevels()
hd %<>%filter(record_id %nin% exclusions$record_id)

# Drop levels, but preserve labels
hd <- sjlabelled::copy_labels(droplevels(hd), hd) 

## Add site to each component dataset
hd %<>% group_by(record_id) %>% fill(site, .direction = "updown") %>%ungroup()


hdd <- hd %>%filter(redcap_repeat_instrument %in% NA) %>% remove.blank.columns2()
hd.lft <- hd %>%filter(redcap_repeat_instrument %in% "LFT Results") %>% remove.blank.columns2()
hd.ekg <- hd %>%filter(redcap_repeat_instrument %in% "EKG Results") %>% remove.blank.columns2()
hd.cv <- hd %>%filter(redcap_repeat_instrument %in% "Clinic Visit") %>% remove.blank.columns2()
hd.dose <- hd %>%filter(redcap_repeat_instrument %in% "Dose Change") %>% remove.blank.columns2()
hd.ae <- hd %>%filter(redcap_repeat_instrument %in% "Adverse Effects") %>% remove.blank.columns2()
hd.uh <- hd %>%filter(redcap_repeat_instrument %in% "UHDRS Assessment") %>% remove.blank.columns2()
hd.pd <- hd %>%filter(redcap_repeat_instrument %in% "Prescription Data (HSSP Patients Only)") %>% remove.blank.columns2()
hd.pi <- hd %>%filter(redcap_repeat_instrument %in% "Prescribing Information (EHR)") %>% remove.blank.columns2()



# calculate Total maximum chorea
hd.uh %<>% 
  mutate(across(starts_with("mc"), ~as.numeric(ac(.x)))) %>%
  mutate(total_max_chorea = mcrue + mclue + mcrle + mclle +mcf + mcbol + mct)

## Add time to AE
hd.ae %<>% left_join(., hdd %>% select(record_id, site, date_of_start), by = c("record_id", "site") ) %>%
  mutate(time_to_ae = as.numeric(date_ae - date_of_start))


## Matched UHDRS scores
uh.huh <- hd.uh %>% select(1, site, uhdrs_date, total_max_chorea) %>%
  group_by(record_id) %>%
  filter(uhdrs_date == min(uhdrs_date) | uhdrs_date == max(uhdrs_date)) %>%
  filter(!is.na(total_max_chorea)) %>%
  arrange(record_id, uhdrs_date) %>%
  mutate(n = 1:n(), matched = yesno(n()==2),
         when = ifelse(n==1, "Baseline", "Follow-up")) %>%ungroup()
## Adherence data prep
### Some of the UAB and a lot of the VUMC data has multiple fills on the same date
### When the days supply match, assume that the doses are meant to be taken together
### When the days supply don't match, take the larger of the days supply

hd.pd %<>% filter(!is.na(med_sold_date), prescription_data_hssp_patients_only_complete == "Complete")

hd_erx <- readxl::read_xlsx("/Users/joshdeclercq/Library/CloudStorage/OneDrive-VUMC/Documents - VSP Outcomes/Multisite HD (deutetrabenazine)/Data request and cleaning/Data from Bridget 07.01.2022/Erx.Dispenses.04.01.2017to06.30.2022.Austedo.deutetrabenazine .pulled.07.01.2022.xlsx", sheet = "Erx Fill Data") %>%
  namify() %>% mutate(mrn = as.numeric(mrn), med_sold_date = ymd(fill_date)) %>%filter(mrn %in% hdd$mrn) %>%
  left_join(., hdd %>% select(mrn, record_id, site), by = "mrn") %>%
  select(record_id,site, med_sold_date, med_dose = drug_name, med_ds = day_supply)

hd.pd %<>% select(record_id, site, med_sold_date, med_dose, med_ds) %>%
  group_by(record_id, med_sold_date, med_ds) %>% mutate(n2 = 1:n()) %>% 
  filter(n2 ==1) %>%
  group_by(record_id, site, med_sold_date) %>% 
  mutate(n3 = n(), max_ds = med_ds == max(med_ds)) %>% 
  filter(max_ds == TRUE)


hd_erx %<>% select(record_id, site, med_sold_date, med_dose, med_ds) %>%
  group_by(record_id, med_sold_date, med_ds) %>% mutate(n2 = 1:n()) %>% 
  filter(n2 ==1) %>%
  group_by(record_id, site, med_sold_date) %>% 
  mutate(n3 = n(), max_ds = med_ds == max(med_ds)) %>% 
  filter(max_ds == TRUE)

hd.pdc <- bind_rows(hd.pd, hd_erx) %>% select(-n2, -n3, -max_ds)


# readxl::read_xlsx("/Users/joshdeclercq/Library/CloudStorage/OneDrive-VUMC/Documents - VSP Outcomes/Multisite HD (deutetrabenazine)/Data request and cleaning/Data from Bridget 07.01.2022/Erx.Dispenses.04.01.2017to06.30.2022.Austedo.deutetrabenazine .pulled.07.01.2022.xlsx", sheet = "Erx Fill Data") %>%
#   filter(grepl("27", sig))

hd.pdc <- hd.pdc %>% 
  mutate(x = NA, csa = NA, csb = NA, dsw = NA, pdc.i = NA, tbf = NA, fn = NA, fd = NA, 
         fdd = med_sold_date, fs = as.numeric(med_ds), 
         id = record_id, switch = 0)

hd.pdc <- hd.pdc %>% gbb() %>% 
  mutate(end.dt = last(fdd))%>% 
  mutate(bt = as.numeric(fdd - first(fdd))) %>% 
  arrange(., id, fdd)%>% 
  do(PDC.interval(., plotting = FALSE, remove.last.fill = FALSE, remove.supply.on.switch = TRUE)) %>% 
  mutate(num = sum(dsw), denom =end.dt.num[1], pdc = num/denom, gap = tbf-dsw)%>%
  rename(day = bt)## added for plotting features

hd.PDC <- hd.pdc %>% gbb(site)  %>%
  dplyr::summarise(PDC = pdc[1], fills = n(), num = first(num),
                    first.fill = min(fdd),  
                   last.fill = max(fdd), last.covered.day = last.fill + last(csb), 
                   switches = sum(switch),
                   # distinct_meds = n_distinct(Medication),
                   longest.gap = max(tbf - dsw), 
                   gap.60.plus = sum(1*(gap > 60)), gap.days = sum(gap),
                   denom = denom[1], MPR = round((sum(fs)-last(fs))/denom, 2), 
                   # PDC = ifelse(fills <=2, NA, round(PDC, 2)),
                   avg.supply = round(mean(fs), 1), .groups = "drop")
## Additional info about dose change directions
hd.extra <- hd.dose%>% arrange(record_id, date_comm) %>% 
  #select(1, site, austedo_tdd, end_tdd, dose_change_direction) %>%
  group_by(record_id) %>% 
  mutate(start = austedo_tdd > 48, 
                                 end = end_tdd > 48,
                                 eqd = austedo_tdd == lag(end_tdd, default = FALSE),
                                 eq = start == lag(end, default = FALSE)) %>% 
  mutate(missed.change = ifelse(eqd, "No", "Yes"),
         change = end_tdd - austedo_tdd, 
         case = case_when(!start & !end ~ "stayed below",
                          !start & end ~ "transitioned above",
                          start & end ~ "stayed above",
                          start & !end ~ "transitioned below")) %>% 
  ungroup()

1.4 Exclusions

exclusions %>% select(-record_id) %>% jgt(., by = "site", overall = TRUE)
Characteristic N VUMC, N = 151 UAB, N = 71 Overall, N = 221
reason_exclude 22
    Concurrent use of strong CYP2D6 inhibitors 5 (33.3%) 4 (57.1%) 9 (40.9%)
    Deceased or lost to follow-up before study outcomes were evaluated 5 (33.3%) 1 (14.3%) 6 (27.3%)
    Prior study patient on > 48mg daily when moving to commercial product 5 (33.3%) 2 (28.6%) 7 (31.8%)
1 n (%)

2 Descriptive statistics

2.1 Demographics

hdd %>%select(age_at_start, gender, race, ethnicity, ins_type, diagnosis, site) %>%
  jgt(., by = "site", overall = TRUE)
Characteristic N VUMC, N = 171 UAB, N = 131 Overall, N = 301
Age at start of prescription therapy 30
    Mean (SD) 54.6 (12.9) 56.2 (10.4) 55.3 (11.7)
    Median (IQR) 55.0 (48.0 - 66.0) 57.0 (46.0 - 64.0) 56.0 (46.5 - 64.0)
    Range 28.0 - 71.0 41.0 - 71.0 28.0 - 71.0
Gender 30
    Female 9 (52.9%) 5 (38.5%) 14 (46.7%)
    Male 8 (47.1%) 8 (61.5%) 16 (53.3%)
Race 30
    White 17 (100.0%) 11 (84.6%) 28 (93.3%)
    Black or African American 0 (0%) 2 (15.4%) 2 (6.67%)
Ethnicity 30
    Not Hispanic, Latino/a, or Spanish origin 17 (100.0%) 11 (84.6%) 28 (93.3%)
    Hispanic or Latino 0 (0%) 1 (7.69%) 1 (3.33%)
    Unknown 0 (0%) 1 (7.69%) 1 (3.33%)
Medical insurance type 30
    Medicare 10 (58.8%) 6 (46.2%) 16 (53.3%)
    Medicaid 2 (11.8%) 1 (7.69%) 3 (10.0%)
    Tricare 0 (0%) 1 (7.69%) 1 (3.33%)
    Commercial 4 (23.5%) 4 (30.8%) 8 (26.7%)
    None 1 (5.88%) 1 (7.69%) 2 (6.67%)
Diagnosis 30
    Huntington's Disease 17 (100.0%) 13 (100.0%) 30 (100.0%)
1 n (%)
# hdd %>%select(1, age_at_start, gender, race, ethnicity, ins_type, diagnosis, site) %>% jmiss(.,"record_id")

2.2 Concomitant medications

2.2.1 Summary variables

hd.cv %>% select(obj_assess, chorea_other_tx) %>%jgt()
Characteristic N N = 2411
Objective physical assessment measure at the time of prescribing 241
    UHDRS 174 (72.2%)
    None 67 (27.8%)
Is the patient on other chorea treatment? 241
    No 68 (28.2%)
    Yes 173 (71.8%)
1 n (%)
# 
# hd.cv %>% mutate(x = paste(record_id, redcap_repeat_instance)) %>%
# checkbox.by(., "chor_tx_2", id.vars = "x", by.var = "site", col.name = "Concomitant medication")

# checkbox.by2(dat = hd.cv, selection = "chor_tx_2", id.vars = "record_id", 
#              count = "any",by.var = "site", spanner.label = "Site",
#               add.none = TRUE, add.footnote = TRUE) 

# checkbox.by2(dat = hd.cv, selection = "chor_tx_2", id.vars = c("record_id", "redcap_repeat_instance"),
#              count = "any",by.var = "site", spanner.label = "Site",
#               add.none = TRUE, add.footnote = TRUE)

2.2.2 Patient-level any concomitant med

checkbox_gather(dat = hd.cv, selection = "chor_tx_2", id.var = "record_id", toggle.names = TRUE, simple.names = TRUE,
                 # repeat.var = "redcap_repeat_instance", 
                tidy.labels = TRUE,
             count = "any",by.var = "site", add.zero = TRUE, output = "summary", reorder.cols = TRUE,
             spanner.size = 2, spanner.text = "Site")
Characteristic Site Overall, N = 301
VUMC, N = 171 UAB, N = 131
Clonazepam 8 (47.1%) 6 (46.2%) 14 (46.7%)
Aripiprazole 9 (52.9%) 1 (7.69%) 10 (33.3%)
Olanzapine 5 (29.4%) 2 (15.4%) 7 (23.3%)
Haloperidol 2 (11.8%) 4 (30.8%) 6 (20.0%)
Risperidone 4 (23.5%) 1 (7.69%) 5 (16.7%)
Valproic acid/Divalproex 1 (5.88%) 4 (30.8%) 5 (16.7%)
Quetiapine 2 (11.8%) 0 (0%) 2 (6.67%)
Memantine 3 (17.6%) 0 (0%) 3 (10.0%)
Temazepam 1 (5.88%) 0 (0%) 1 (3.33%)
Pridopidine 2 (11.8%) 0 (0%) 2 (6.67%)
Lorazepam 1 (5.88%) 1 (7.69%) 2 (6.67%)
Pepinemab 1 (5.88%) 2 (15.4%) 3 (10.0%)
Diazepam 1 (5.88%) 0 (0%) 1 (3.33%)
Tetrabenazine 2 (11.8%) 0 (0%) 2 (6.67%)
Valbenazine 1 (5.88%) 0 (0%) 1 (3.33%)
[Zero selected] 9 (52.9%) 8 (61.5%) 17 (56.7%)
1 n (%)

2.2.3 Patient level summaries

checkbox_gather(dat = hd.cv, selection = "chor_tx_2", id.var = "record_id", toggle.names = TRUE, simple.names = TRUE,
               stats = "only",
                tidy.labels = TRUE,
             count = "any",by.var = "site", add.zero = TRUE, output = "summary", reorder.cols = TRUE,
             spanner.size = 2, spanner.text = "Site")
Characteristic Site Overall, N = 301
VUMC, N = 171 UAB, N = 131
Number of observations (rows)
    Mean (SD) 9.9 (4.4) 5.6 (2.3) 8.0 (4.2)
    Median (IQR) 9.0 (8.0 - 12.0) 5.0 (4.0 - 7.0) 7.5 (5.0 - 9.8)
    Range 3.0 - 18.0 1.0 - 9.0 1.0 - 18.0
No selections made across all observations 3 (17.6%) 4 (30.8%) 7 (23.3%)
Number of selections made
    Mean (SD) 11.2 (7.3) 6.3 (7.6) 9.1 (7.7)
    Median (IQR) 14.0 (6.0 - 17.0) 5.0 (0.0 - 8.0) 8.0 (1.5 - 15.8)
    Range 0.0 - 22.0 0.0 - 27.0 0.0 - 27.0
Number of unique selections made
    0 3 (17.6%) 4 (30.8%) 7 (23.3%)
    1 0 (0%) 3 (23.1%) 3 (10.0%)
    2 6 (35.3%) 1 (7.69%) 7 (23.3%)
    3 3 (17.6%) 4 (30.8%) 7 (23.3%)
    4 3 (17.6%) 1 (7.69%) 4 (13.3%)
    5 2 (11.8%) 0 (0%) 2 (6.67%)
1 n (%)

2.2.4 No concomitant meds

no.concom <- hd.cv %>% mutate(across(c(site, contains("chor_tx_2")), ac)) %>% sjlabelled::copy_labels(., hd.cv) %>% 
  rowwise() %>% mutate(None = sum(!is.na(across(contains("chor_tx_2"))))) %>%
  group_by(record_id, site) %>% summarise(NN = sum(None)) %>% filter(NN == 0)

no.concom %>% ungroup() %>% jgtt()
Record ID site NN
119145-1 UAB 0
119145-20 UAB 0
119145-4 UAB 0
119145-9 UAB 0
Z3630356 VUMC 0
Z3718750 VUMC 0
Z563959 VUMC 0
# hd.cv %>% group_by(record_id) %>%summarise(a= toString(unique(chorea_other_tx))) %>% filter(a == "No")

2.2.5 Recategorized

trib.meds<- tribble(~value, ~v2,
              'Haloperidol', 'Antipsychotics',
              'Risperidone', 'Antipsychotics',
              'Aripiprazole', 'Antipsychotics',
              'Quetiapine', 'Antipsychotics',
              'Olanzapine', 'Antipsychotics',
              'Clonazepam', 'Benzodiazepines',
              'Temazepam', 'Benzodiazepines',
              'Diazepam', 'Benzodiazepines',
              'Lorazepam', 'Benzodiazepines',
              'Tetrabenazine', NA,
              'Valbenazine', NA,
              'Pridopidine', 'Clinical trial medications',
              'Valproic acid/Divalproex', 'Valproic acid',
              'Pepinemab', 'Clinical trial medications',
              'Memantine', 'Memantine')              


hd.cv %>% select(1, site, contains("chor_tx_2")) %>% 
  pivot_longer(., -c(1:2), values_drop_na = TRUE) %>%
  left_join(., trib.meds, by = 'value') %>% 
  bind_rows(., no.concom %>% select(1,2) %>% mutate(v2 = "No concomitant meds")) %>% 
  group_by(record_id, site, v2) %>% summarise(x = "Yes") %>% 
  filter(!is.na(v2)) %>% 
 pivot_wider(., names_from = "v2", values_from = "x", values_fill = "No") %>% 
  ungroup() %>% 
  select(-record_id) %>% 
  jgt(., one_row_binary = TRUE, missing = "no", by = "site", overall = TRUE, add.n = FALSE)
Characteristic UAB, N = 131 VUMC, N = 171 Overall, N = 301
No concomitant meds 4 (30.8%) 3 (17.6%) 7 (23.3%)
Valproic acid 4 (30.8%) 1 (5.88%) 5 (16.7%)
Antipsychotics 6 (46.2%) 13 (76.5%) 19 (63.3%)
Benzodiazepines 7 (53.8%) 9 (52.9%) 16 (53.3%)
Clinical trial medications 2 (15.4%) 3 (17.6%) 5 (16.7%)
Memantine 0 (0%) 3 (17.6%) 3 (10.0%)
1 n (%)

2.3 UHDRS score

Scores with any missing components are excluded

2.3.1 Total maximum chorea

hd.uh %>% select(site, mcrue, mclue, mcrle, mclle, mcf, mcbol, mct, total_max_chorea) %>%
  jgt(., by = "site", overall = TRUE, force.continuous = TRUE)
Characteristic N VUMC, N = 126 UAB, N = 46 Overall, N = 172
mcrue 171
    Mean (SD) 1.7 (1.0) 2.1 (1.0) 1.8 (1.0)
    Median (IQR) 2.0 (1.0 - 2.0) 2.0 (1.0 - 3.0) 2.0 (1.0 - 3.0)
    Range 0.0 - 4.0 0.0 - 4.0 0.0 - 4.0
    Missing 1 0 1
mclue 170
    Mean (SD) 1.7 (1.1) 2.1 (1.0) 1.8 (1.1)
    Median (IQR) 1.0 (1.0 - 2.3) 2.0 (1.0 - 3.0) 2.0 (1.0 - 3.0)
    Range 0.0 - 4.0 0.0 - 4.0 0.0 - 4.0
    Missing 2 0 2
mcrle 170
    Mean (SD) 1.7 (1.1) 2.0 (1.0) 1.8 (1.1)
    Median (IQR) 2.0 (1.0 - 2.0) 2.0 (1.0 - 3.0) 2.0 (1.0 - 3.0)
    Range 0.0 - 4.0 0.0 - 4.0 0.0 - 4.0
    Missing 2 0 2
mclle 170
    Mean (SD) 1.7 (1.0) 2.0 (1.0) 1.8 (1.0)
    Median (IQR) 2.0 (1.0 - 2.0) 2.0 (1.0 - 3.0) 2.0 (1.0 - 2.8)
    Range 0.0 - 4.0 0.0 - 4.0 0.0 - 4.0
    Missing 2 0 2
mcf 170
    Mean (SD) 1.2 (1.0) 1.7 (1.0) 1.4 (1.0)
    Median (IQR) 1.0 (0.0 - 2.0) 1.5 (1.0 - 2.0) 1.0 (1.0 - 2.0)
    Range 0.0 - 4.0 0.0 - 4.0 0.0 - 4.0
    Missing 2 0 2
mcbol 169
    Mean (SD) 1.5 (1.1) 1.8 (1.1) 1.6 (1.1)
    Median (IQR) 1.0 (1.0 - 2.0) 2.0 (1.0 - 3.0) 1.0 (1.0 - 2.0)
    Range 0.0 - 4.0 0.0 - 4.0 0.0 - 4.0
    Missing 3 0 3
mct 170
    Mean (SD) 2.0 (1.2) 2.2 (1.1) 2.1 (1.2)
    Median (IQR) 2.0 (1.0 - 3.0) 2.0 (1.0 - 3.0) 2.0 (1.0 - 3.0)
    Range 0.0 - 4.0 0.0 - 4.0 0.0 - 4.0
    Missing 2 0 2
total_max_chorea 168
    Mean (SD) 11.5 (5.7) 14.0 (6.2) 12.2 (5.9)
    Median (IQR) 10.5 (7.0 - 15.8) 13.0 (10.0 - 18.0) 12.0 (7.0 - 17.0)
    Range 1.0 - 24.0 2.0 - 28.0 1.0 - 28.0
    Missing 4 0 4

2.3.1.1 Missing component scores

hd.uh %>% select(1, site,redcap_repeat_instance, mcrue, mclue, mcrle, mclle, mcf, mcbol, mct) %>%
  pivot_longer(., c(-record_id, -site, -redcap_repeat_instance)) %>% filter(is.na(value)) %>%
  jgtt()
Record ID site redcap_repeat_instance name value
Z663487 VUMC 9 mcrue NA
Z663487 VUMC 9 mclue NA
Z663487 VUMC 9 mcrle NA
Z663487 VUMC 9 mclle NA
Z663487 VUMC 9 mct NA
Z663487 VUMC 10 mcbol NA
Z2963498 VUMC 12 mcf NA
Z2963498 VUMC 12 mcbol NA
Z3627997 VUMC 1 mclue NA
Z3627997 VUMC 1 mcrle NA
Z3627997 VUMC 1 mclle NA
Z3627997 VUMC 1 mcf NA
Z3627997 VUMC 1 mcbol NA
Z3627997 VUMC 1 mct NA

2.3.1.2 Spaghetti plot

hd.uh %>% select(1, site, uhdrs_date, total_max_chorea) %>%
  ggplot(., aes(x = uhdrs_date, y = total_max_chorea, colour = site)) + 
  geom_line(aes(group = record_id), alpha = .5) + geom_smooth(aes(group = 1), method = "lm")

2.3.2 Change from baseline

Follow-up measure is the last measurement available

2.3.2.1 Paired data only

Paired data denotes that both baseline and follow-up measurements are available

(chor.box <- ggplot(uh.huh %>% filter(matched == "Yes"), aes(x = when, y = total_max_chorea)) +
         geom_line(aes(group = record_id), alpha = .5) + 
          geom_beeswarm( size = 1.5, dodge.width = .075) +
  geom_half_boxplot(data = uh.huh %>%filter(when == "Baseline", matched == "Yes"), 
                    nudge = .05, outlier.shape = NA)+
  geom_half_boxplot(data = uh.huh %>%filter(when == "Follow-up", matched == "Yes"), 
                    nudge = .05, outlier.shape = NA, side = "r") + 
  labs(y = "Total maximum chorea" ) +
  theme_classic() + 
   scale_y_continuous(breaks = c(0, 5, 10,15, 20, 25, 30),labels = c(0, 5, 10,15, 20, 25, 30), limits = c(0, 30)) +
   theme(axis.title.x = element_blank()) )

uh.huh %>% filter(matched == "Yes") %>% select(1, total_max_chorea, when) %>% 
  jgt(., by = "when", include = -record_id) %>%
  add_p(test = everything() ~ "paired.wilcox.test", group = "record_id")
Characteristic N Baseline, N = 23 Follow-up, N = 23 p-value1
total_max_chorea 46 0.9
    Mean (SD) 13.5 (7.0) 13.2 (6.2)
    Median (IQR) 13.0 (9.0 - 19.0) 13.0 (7.0 - 18.0)
    Range 2.0 - 28.0 5.0 - 26.0
1 Wilcoxon signed rank test with continuity correction
uh.huh %>% select(record_id, total_max_chorea, when) %>%
  pivot_wider(., names_from = "when", names_repair = namify, values_from = "total_max_chorea") %>%
  mutate(difference = followup-baseline) %>% clear.labels() %>%
  select(difference) %>% jgt()
Characteristic N N = 30
difference 23
    Mean (SD) -0.3 (7.2)
    Median (IQR) 1.0 (-5.0 - 4.5)
    Range -14.0 - 14.0
    Missing 7
uh.huh %>% filter(matched == "Yes") %>%
  gbb() %>% summarise(diff = as.numeric(max(uhdrs_date)- min(uhdrs_date))/365.25, .groups = "drop") %>%
  select("Time from baseline to final measurement (years)" = diff) %>%
  jgt(., Digits = 2)
Characteristic N N = 23
Time from baseline to final measurement (years) 23
    Mean (SD) 3.26 (1.43)
    Median (IQR) 3.14 (2.18 - 4.33)
    Range 0.57 - 6.77
# ggsave("chor.box.png", chor.box, dpi = 400, width = 9*.42, height = 6.1*.46)

2.3.2.2 All measures

ggplot(uh.huh, aes(x = when, y = total_max_chorea)) +
         geom_line(aes(group = record_id), alpha = .5) + 
          geom_beeswarm( size = 2, dodge.width = .075, aes(shape = matched)) +
  scale_shape_manual(values = c(1,20)) +
  geom_half_boxplot(data = uh.huh %>%filter(when == "Baseline"), nudge = .05, outlier.shape = NA)+
  geom_half_boxplot(data = uh.huh %>%filter(when == "Follow-up"), nudge = .05, outlier.shape = NA, side = "r") + 
  labs(y = "Total maximum chorea" ) +
  theme_classic() + theme(axis.title.x = element_blank())

3 Adverse events

3.1 Time to adverse events

hd.ae %>% select(site,time_to_ae) %>%jgt(., by = "site", overall = TRUE)
Characteristic N VUMC, N = 22 UAB, N = 15 Overall, N = 37
time_to_ae 37
    Mean (SD) 632.1 (643.8) 440.6 (368.2) 554.5 (551.0)
    Median (IQR) 518.0 (109.8 - 825.0) 362.0 (225.5 - 646.5) 398.0 (124.0 - 803.0)
    Range 28.0 - 2745.0 15.0 - 1348.0 15.0 - 2745.0

3.1.1 Missing time to AE

hd.ae %>% select(record_id, site, redcap_repeat_instance, date_ae, date_of_start, time_to_ae) %>% 
  filter(is.na(time_to_ae)) %>% jgtt()
Record ID site redcap_repeat_instance date_ae date_of_start time_to_ae

3.2 Reports of adverse effects

3.2.1 Any AE reported (patient level)

Among 19 people who reported AEs

# checkbox.by2(hd.ae, "ade_experienced", c("record_id"),col.name= "AE experienced", by.var = "site", 
#              add.none = TRUE, count = "any", add.footnote = TRUE, spanner.label = "Site")

checkbox_gather(hd.ae, "ade_experienced",id.var = c("record_id"), count = "any", tidy.labels = TRUE,
                add.zero = FALSE, stats = "none", simple.names = TRUE, toggle.names = TRUE,
                reorder.cols = TRUE,spanner.text = "Site", spanner.size = 2,
                by.var = "site", output = "summary")
Characteristic Site Overall, N = 191
VUMC, N = 111 UAB, N = 81
Drowsiness/sedation 3 (27.3%) 4 (50.0%) 7 (36.8%)
Insomnia 3 (27.3%) 1 (12.5%) 4 (21.1%)
Akathisia 3 (27.3%) 0 (0%) 3 (15.8%)
Pseudoparkinsonism 1 (9.09%) 3 (37.5%) 4 (21.1%)
Anxiety 3 (27.3%) 1 (12.5%) 4 (21.1%)
Depression 2 (18.2%) 0 (0%) 2 (10.5%)
Worsened movements 1 (9.09%) 1 (12.5%) 2 (10.5%)
Diarrhea 0 (0%) 1 (12.5%) 1 (5.26%)
Sedation 1 (9.09%) 0 (0%) 1 (5.26%)
Urinary tract infection 1 (9.09%) 0 (0%) 1 (5.26%)
Worsening mood/behaviors 0 (0%) 1 (12.5%) 1 (5.26%)
Other 0 (0%) 1 (12.5%) 1 (5.26%)
Dizziness 1 (9.09%) 0 (0%) 1 (5.26%)
Vomiting 1 (9.09%) 0 (0%) 1 (5.26%)
Mental status changes 1 (9.09%) 0 (0%) 1 (5.26%)
Increased urination 1 (9.09%) 0 (0%) 1 (5.26%)
1 n (%)

Among full sample N = 30

hd.ae %>% left_join(hdd %>% select(record_id, site),., by = c("record_id", "site") )%>% 
checkbox_gather(., "ade_experienced",id.var = c("record_id"), count = "any", tidy.labels = TRUE,
                add.zero = FALSE, stats = "none", simple.names = TRUE, toggle.names = TRUE,
                reorder.cols = TRUE,
                by.var = "site", output = "summary")
Characteristic VUMC, N = 171 UAB, N = 131 Overall, N = 301
Drowsiness/sedation 3 (17.6%) 4 (30.8%) 7 (23.3%)
Insomnia 3 (17.6%) 1 (7.69%) 4 (13.3%)
Akathisia 3 (17.6%) 0 (0%) 3 (10.0%)
Pseudoparkinsonism 1 (5.88%) 3 (23.1%) 4 (13.3%)
Anxiety 3 (17.6%) 1 (7.69%) 4 (13.3%)
Depression 2 (11.8%) 0 (0%) 2 (6.67%)
Worsened movements 1 (5.88%) 1 (7.69%) 2 (6.67%)
Diarrhea 0 (0%) 1 (7.69%) 1 (3.33%)
Sedation 1 (5.88%) 0 (0%) 1 (3.33%)
Urinary tract infection 1 (5.88%) 0 (0%) 1 (3.33%)
Worsening mood/behaviors 0 (0%) 1 (7.69%) 1 (3.33%)
Other 0 (0%) 1 (7.69%) 1 (3.33%)
Dizziness 1 (5.88%) 0 (0%) 1 (3.33%)
Vomiting 1 (5.88%) 0 (0%) 1 (3.33%)
Mental status changes 1 (5.88%) 0 (0%) 1 (3.33%)
Increased urination 1 (5.88%) 0 (0%) 1 (3.33%)
1 n (%)

3.2.2 Total AEs reported (patient level)

Numbers are changed

# checkbox.by2(hd.ae, "ade_experienced", c("record_id"),col.name= "AE experienced", by.var = "site",
#              add.none = TRUE, count = "any", add.footnote = TRUE, spanner.label = "Site")

checkbox_gather(hd.ae, "ade_experienced",id.var = c("record_id"), count = "total", tidy.labels = TRUE,
                add.zero = FALSE, stats = "none", simple.names = TRUE, toggle.names = TRUE,
                reorder.cols = TRUE,
                by.var = "site", output = "summary")
Characteristic VUMC, N = 111 UAB, N = 81 Overall, N = 191
Drowsiness/sedation
    0 8 (72.7%) 4 (50.0%) 12 (63.2%)
    1 3 (27.3%) 3 (37.5%) 6 (31.6%)
    3 0 (0%) 1 (12.5%) 1 (5.26%)
Insomnia
    0 8 (72.7%) 7 (87.5%) 15 (78.9%)
    1 1 (9.09%) 1 (12.5%) 2 (10.5%)
    2 2 (18.2%) 0 (0%) 2 (10.5%)
Akathisia
    0 8 (72.7%) 8 (100.0%) 16 (84.2%)
    1 2 (18.2%) 0 (0%) 2 (10.5%)
    3 1 (9.09%) 0 (0%) 1 (5.26%)
Pseudoparkinsonism
    0 10 (90.9%) 5 (62.5%) 15 (78.9%)
    1 1 (9.09%) 2 (25.0%) 3 (15.8%)
    2 0 (0%) 1 (12.5%) 1 (5.26%)
Anxiety 3 (27.3%) 1 (12.5%) 4 (21.1%)
Depression 2 (18.2%) 0 (0%) 2 (10.5%)
Worsened movements 1 (9.09%) 1 (12.5%) 2 (10.5%)
Diarrhea 0 (0%) 1 (12.5%) 1 (5.26%)
Sedation 1 (9.09%) 0 (0%) 1 (5.26%)
Urinary tract infection 1 (9.09%) 0 (0%) 1 (5.26%)
Worsening mood/behaviors 0 (0%) 1 (12.5%) 1 (5.26%)
Other 0 (0%) 1 (12.5%) 1 (5.26%)
Dizziness 1 (9.09%) 0 (0%) 1 (5.26%)
Vomiting 1 (9.09%) 0 (0%) 1 (5.26%)
Mental status changes 1 (9.09%) 0 (0%) 1 (5.26%)
Increased urination 1 (9.09%) 0 (0%) 1 (5.26%)
1 n (%)

3.2.3 AEs reported (visit level)

# checkbox.by2(hd.ae, "ade_experienced", c("record_id", "redcap_repeat_instance"),col.name= "AE experienced", by.var = "site",   add.none = TRUE, count = "all", add.footnote = TRUE, spanner.label = "Site")

checkbox_gather(hd.ae, "ade_experienced",id.var = c("record_id"), count = "any", tidy.labels = TRUE,
                repeat.var = "redcap_repeat_instance",
                add.zero = FALSE, stats = "none", simple.names = TRUE, toggle.names = TRUE,
                reorder.cols = TRUE,spanner.text = "Site", spanner.size = 2,
                by.var = "site", output = "summary")
Characteristic Site Overall, N = 371
VUMC, N = 221 UAB, N = 151
Drowsiness/sedation 3 (13.6%) 6 (40.0%) 9 (24.3%)
Insomnia 5 (22.7%) 1 (6.67%) 6 (16.2%)
Akathisia 5 (22.7%) 0 (0%) 5 (13.5%)
Pseudoparkinsonism 1 (4.55%) 4 (26.7%) 5 (13.5%)
Anxiety 3 (13.6%) 1 (6.67%) 4 (10.8%)
Depression 2 (9.09%) 0 (0%) 2 (5.41%)
Worsened movements 1 (4.55%) 1 (6.67%) 2 (5.41%)
Diarrhea 0 (0%) 1 (6.67%) 1 (2.70%)
Sedation 1 (4.55%) 0 (0%) 1 (2.70%)
Urinary tract infection 1 (4.55%) 0 (0%) 1 (2.70%)
Worsening mood/behaviors 0 (0%) 1 (6.67%) 1 (2.70%)
Other 0 (0%) 1 (6.67%) 1 (2.70%)
Dizziness 1 (4.55%) 0 (0%) 1 (2.70%)
Vomiting 1 (4.55%) 0 (0%) 1 (2.70%)
Mental status changes 1 (4.55%) 0 (0%) 1 (2.70%)
Increased urination 1 (4.55%) 0 (0%) 1 (2.70%)
1 n (%)

3.2.4 AE level

checkbox_tally(hd.ae, "ade_experienced",id.var = c("record_id"), 
                by.var = "site", spanner.text = "Site", spanner.size = 2)
Characteristic N Site Overall, N = 421
VUMC, N = 261 UAB, N = 161
Selection 42
    Drowsiness/sedation 3 (11.5%) 6 (37.5%) 9 (21.4%)
    Insomnia 5 (19.2%) 1 (6.25%) 6 (14.3%)
    Akathisia 5 (19.2%) 0 (0%) 5 (11.9%)
    Pseudoparkinsonism 1 (3.85%) 4 (25.0%) 5 (11.9%)
    Anxiety 3 (11.5%) 1 (6.25%) 4 (9.52%)
    Depression 2 (7.69%) 0 (0%) 2 (4.76%)
    Worsened movements 1 (3.85%) 1 (6.25%) 2 (4.76%)
    Diarrhea 0 (0%) 1 (6.25%) 1 (2.38%)
    Sedation 1 (3.85%) 0 (0%) 1 (2.38%)
    Urinary tract infection 1 (3.85%) 0 (0%) 1 (2.38%)
    Worsening mood/behaviors 0 (0%) 1 (6.25%) 1 (2.38%)
    Other 0 (0%) 1 (6.25%) 1 (2.38%)
    Dizziness 1 (3.85%) 0 (0%) 1 (2.38%)
    Vomiting 1 (3.85%) 0 (0%) 1 (2.38%)
    Mental status changes 1 (3.85%) 0 (0%) 1 (2.38%)
    Increased urination 1 (3.85%) 0 (0%) 1 (2.38%)
1 n (%)

3.2.5 Summary statistics

hd.ae %>% left_join(hdd %>% select(record_id, site),., by = c("record_id", "site") )%>% 
checkbox_gather(., "ade_experienced",id.var = c("record_id"), count = "any", tidy.labels = TRUE,
                add.zero = FALSE, stats = "only", simple.names = TRUE, toggle.names = TRUE,
                reorder.cols = TRUE,
                by.var = "site", output = "summary")
Characteristic VUMC, N = 171 UAB, N = 131 Overall, N = 301
Number of observations (rows)
    1 12 (70.6%) 11 (84.6%) 23 (76.7%)
    2 3 (17.6%) 0 (0%) 3 (10.0%)
    4 1 (5.88%) 1 (7.69%) 2 (6.67%)
    5 0 (0%) 1 (7.69%) 1 (3.33%)
    6 1 (5.88%) 0 (0%) 1 (3.33%)
No selections made across all observations 6 (35.3%) 5 (38.5%) 11 (36.7%)
Number of selections made
    0 6 (35.3%) 5 (38.5%) 11 (36.7%)
    1 5 (29.4%) 6 (46.2%) 11 (36.7%)
    2 3 (17.6%) 0 (0%) 3 (10.0%)
    3 1 (5.88%) 0 (0%) 1 (3.33%)
    5 1 (5.88%) 2 (15.4%) 3 (10.0%)
    7 1 (5.88%) 0 (0%) 1 (3.33%)
Number of unique selections made
    0 6 (35.3%) 5 (38.5%) 11 (36.7%)
    1 6 (35.3%) 6 (46.2%) 12 (40.0%)
    2 2 (11.8%) 0 (0%) 2 (6.67%)
    3 1 (5.88%) 1 (7.69%) 2 (6.67%)
    4 1 (5.88%) 1 (7.69%) 2 (6.67%)
    5 1 (5.88%) 0 (0%) 1 (3.33%)
1 n (%)

3.2.6 Intersections

hd.ae %>% mutate(id = paste(record_id, redcap_repeat_instance)) %>%checkbox.upset2(., "ade_experienced", "id")

3.2.7 Patient details

  • Z2963498 reported 4 distinct AEs from a total of 6 visits with a total of 7 AEs reported.
## Checkbox count
a <- hd.ae %>% select(record_id,site, contains("ade_experienced")) %>%
  pivot_longer(., -c(1,2), values_drop_na = TRUE) %>%
  group_by(record_id,site,  value) %>%tally() %>%
  summarise(distinct = n(), .groups = "drop") 

b <- hd.ae %>% select(record_id,redcap_repeat_instance,site, contains("ade_experienced")) %>%
  pivot_longer(., -c(1,2,3), values_drop_na = TRUE) %>%
  group_by(record_id,redcap_repeat_instance,site) %>%tally() %>%
  group_by(record_id, site) %>%
  summarise(visits = n(), total = sum(n), .groups = "drop")

left_join(a, b, by = c("record_id", "site")) %>%
  arrange(desc(total)) %>%
  janitor::adorn_totals() %>% as.data.frame() %>%
  jgtt()
record_id site distinct visits total
Z2963498 VUMC 4 6 7
119145-10 UAB 3 5 5
119145-17 UAB 4 4 5
Z2774938 VUMC 5 4 5
Z2769796 VUMC 3 2 3
Z2679648 VUMC 2 1 2
Z3568365 VUMC 1 2 2
Z3720262 VUMC 2 2 2
119145-12 UAB 1 1 1
119145-13 UAB 1 1 1
119145-2 UAB 1 1 1
119145-3 UAB 1 1 1
119145-4 UAB 1 1 1
119145-9 UAB 1 1 1
Z1307311 VUMC 1 1 1
Z3539999 VUMC 1 1 1
Z3627997 VUMC 1 1 1
Z3706120 VUMC 1 1 1
Z551540 VUMC 1 1 1
Total - 35 37 42

3.2.8 AE details

  • 42 total AEs reported by 19 patients from 37 records
  • Anxiety was reported by 4 distinct patients a total of 4 times
  • Insomnia was reported by 4 distinct patients a total of 6 times
hd.ae %>% select(record_id, contains("ade_experienced")) %>%
  pivot_longer(., -c(1), values_drop_na = TRUE) %>%
  group_by(record_id, value) %>%tally() %>%
  group_by(value) %>%
  summarise(distinct = n(), total = sum(n), .groups = "drop") %>%
  arrange(desc(total)) %>%
  janitor::adorn_totals() %>% as.data.frame() %>%
  jgtt()
value distinct total
Drowsiness/sedation 7 9
Insomnia 4 6
Akathisia 3 5
Pseudoparkinsonism 4 5
Anxiety 4 4
Depression 2 2
Worsened movements 2 2
Diarrhea 1 1
Sedation 1 1
Urinary tract infection 1 1
Worsening mood/behaviors 1 1
Other 1 1
Dizziness 1 1
Vomiting 1 1
Mental status changes 1 1
Increased urination 1 1
Total 35 42

3.3 Figure

aex <- hd.ae %>% select(1, 3, date_ae,site,time_to_ae, contains("ade_experienced")) %>%
  pivot_longer(., -c(1:5), values_drop_na = TRUE, values_transform = ac)

# j.trib(aex, "value")

trib.aex<- tibble::tribble(
                      ~value,       ~ae_recat,
                 "Akathisia",           "EPS",
                   "Anxiety",   "Psychiatric",
                "Depression",   "Psychiatric",
                  "Diarrhea",            "GI",
                 "Dizziness",         "Other",
                     "Other",         "Other",
       "Drowsiness/sedation", "Sleep changes",
       "Increased urination",            "GU",
                  "Insomnia", "Sleep changes",
     "Mental status changes",   "Psychiatric",
        "Pseudoparkinsonism",           "EPS",
                  "Sedation", "Sleep changes",
   "Urinary tract infection",            "GU",
                  "Vomiting",            "GI",
        "Worsened movements",           "EPS",
  "Worsening mood/behaviors",   "Psychiatric"
  )

           

 aex %<>% left_join(., trib.aex, by = 'value')

ae_o <- ggplot(aex, aes(x = 1,  y = time_to_ae)) + 
  geom_boxplot(aes(group = 1),color="grey80", size= 1) +
  theme_classic() + labs(y = "Days from start", x = "Overall") + 
  guides(colour = "none") +scale_x_continuous(breaks = 1, minor_breaks = NULL, labels = "") +
  scale_y_log10() +theme_minimal() +guides(fill = "none") +theme(axis.text.x = element_blank())+
  geom_dotplot(aes(fill= ae_recat, colour = ae_recat), binwidth = .03,stackgroups = TRUE,
               method = "histodot", binaxis = "y", stackdir = "center")

ae_i <- ggplot(aex, aes(x = ae_recat, colour = ae_recat, y = time_to_ae)) +geom_boxplot(outlier.shape = NA) + 
  theme_classic() + labs(y = NULL, x = "By adverse event category") + guides(colour = "none") +
  scale_y_log10() +theme_minimal() + 
  theme(axis.text.y = element_blank(), axis.line.y = element_blank(), 
        axis.title.y = element_blank(), axis.ticks.y = element_blank())+
  geom_dotplot(aes(fill= ae_recat, colour = ae_recat), binwidth = .03,stackgroups = TRUE,
               method = "histodot", binaxis = "y", stackdir = "center") +guides(fill = "none")

plot_grid(ae_o, ae_i,  ncol = 2, align = "hv", rel_widths = c(0.25, 0.75))

4 Adherence

hd.PDC %>% select(site, PDC, fills, denom) %>% jgt(., force.continuous = TRUE, by = "site", Digits = 2, overall = TRUE) 
Characteristic N VUMC, N = 16 UAB, N = 9 Overall, N = 25
PDC 23
    Mean (SD) 0.83 (0.27) 0.99 (0.01) 0.88 (0.23)
    Median (IQR) 0.97 (0.71 - 1.00) 1.00 (0.99 - 1.00) 0.99 (0.94 - 1.00)
    Range 0.07 - 1.00 0.96 - 1.00 0.07 - 1.00
    Missing 1 1 2
fills 25
    Mean (SD) 31.56 (21.05) 18.22 (9.74) 26.76 (18.74)
    Median (IQR) 33.00 (12.25 - 48.00) 19.00 (16.00 - 24.00) 28.00 (15.00 - 35.00)
    Range 1.00 - 62.00 1.00 - 32.00 1.00 - 62.00
denom 25
    Mean (SD) 996.31 (616.85) 488.33 (275.41) 813.44 (570.12)
    Median (IQR) 1038.00 (625.50 - 1586.00) 530.00 (433.00 - 670.00) 750.00 (433.00 - 1390.00)
    Range 0.00 - 1665.00 0.00 - 875.00 0.00 - 1665.00
## VUMC 2017-11-27 ##UAB 2020-02-03
## VUMC 2022-6-30 ## UAB 2022-6-29
# 
# lu(hd.pdc$record_id)

4.1 Indiviual PDCs by number of fills

hd.PDC %>% filter(fills >2) %>% 
  arrange(fills, PDC) %>% 
  mutate(record_id = fct_inorder(record_id)) %>% 
  ggplot(., aes(x = record_id)) + 
  geom_segment(aes(xend = record_id,y = 0, yend = PDC ), size=1, color="grey80")+ 
  geom_point(aes(y = PDC, colour = fills ), size = 4) + theme_classic() + 
  scale_color_gradient(low = "tomato", high = "steelblue") +
  theme(axis.text.x = element_blank(), axis.ticks.x = element_blank()) + labs(x = NULL, y = "PDC")

4.2 Boxplot

hd.PDC %>% filter(!is.na(PDC)) %>% 
  mutate(site2 = ifelse(site == "VUMC", "Site 1", "Site2")) %>% 
  ggplot(., aes(x = site2, y = PDC)) + geom_boxplot(outlier.shape = NA) +
  geom_dotplot(aes(fill= site2, colour = site2), binwidth = .03,stackgroups = TRUE,
               method = "histodot", binaxis = "y", stackdir = "center")+
      scale_fill_manual(values = c("#5FA326", "#375724")) +
      scale_colour_manual(values = c("#5FA326", "#375724"))+ theme_minimal() +
  guides(fill = "none", colour = "none") + labs(x = NULL)

4.3 Dichotomized PDC

hd.PDC %>% transmute(pdc80 = ifelse(PDC >= 0.8, ">= 80%", "<80%"), site = site, fills = fills) %>% jgt(., by = "pdc80", overall = TRUE)
Characteristic N <80%, N = 51 >= 80%, N = 181 Overall, N = 231
site 23
    VUMC 5 (100.0%) 10 (55.6%) 15 (65.2%)
    UAB 0 (0%) 8 (44.4%) 8 (34.8%)
fills 23
    Mean (SD) 24.0 (19.0) 30.4 (17.8) 29.0 (17.8)
    Median (IQR) 35.0 (4.0 - 35.0) 28.0 (16.8 - 42.5) 28.0 (16.0 - 39.0)
    Range 3.0 - 43.0 4.0 - 62.0 3.0 - 62.0
1 n (%)
# hd.PDC %>% filter(PDC <0.8)

5 Dose changes

5.1 Table

hd.dose %>% select(method_intxn, dose_change_direction, austedo_tdd, end_tdd, who_did_dose_change, site) %>% 
  jgt(., by = "site", overall = TRUE)
Characteristic N VUMC, N = 901 UAB, N = 521 Overall, N = 1421
Method of patient interaction when dose change occurred 138
    Clinic visit 56 (65.1%) 17 (32.7%) 73 (52.9%)
    Communication with the pharmacist 10 (11.6%) 8 (15.4%) 18 (13.0%)
    Communication with the provider office 15 (17.4%) 19 (36.5%) 34 (24.6%)
    Other 2 (2.33%) 0 (0%) 2 (1.45%)
    Patient self-initiated 2 (2.33%) 1 (1.92%) 3 (2.17%)
    Study visit 1 (1.16%) 7 (13.5%) 8 (5.80%)
    Missing 4 0 4
Deutetrabenazine dose change direction 142
    Increase 59 (65.6%) 34 (65.4%) 93 (65.5%)
    Decrease 6 (6.67%) 5 (9.62%) 11 (7.75%)
    Discontinue 6 (6.67%) 1 (1.92%) 7 (4.93%)
    Initiate 19 (21.1%) 12 (23.1%) 31 (21.8%)
Deutetrabenazine total daily dose at beginning of encounter 142
    Mean (SD) 39.5 (23.1) 37.2 (25.9) 38.7 (24.1)
    Median (IQR) 48.0 (25.5 - 60.0) 45.0 (18.0 - 54.0) 48.0 (24.0 - 54.0)
    Range 0.0 - 72.0 0.0 - 84.0 0.0 - 84.0
Deutetrabenazine total daily dose at end of encounter 142
    Mean (SD) 49.3 (18.0) 51.9 (19.8) 50.2 (18.7)
    Median (IQR) 54.0 (42.0 - 60.0) 54.0 (42.0 - 63.0) 54.0 (42.0 - 60.0)
    Range 0.0 - 72.0 0.0 - 96.0 0.0 - 96.0
Who communicated with patient and identified need for dose change? 138
    Nursing staff 2 (2.33%) 9 (17.3%) 11 (7.97%)
    Pharmacist 10 (11.6%) 8 (15.4%) 18 (13.0%)
    Provider 71 (82.6%) 34 (65.4%) 105 (76.1%)
    Other 1 (1.16%) 0 (0%) 1 (0.72%)
    Patient self-initiated 2 (2.33%) 1 (1.92%) 3 (2.17%)
    Missing 4 0 4
1 n (%)

5.1.1 Missing values

hd.dose %>% select(1, redcap_repeat_instance, method_intxn, 
                   dose_change_direction, austedo_tdd, end_tdd, who_did_dose_change, site) %>% 
  jmiss(., id.vars = c("record_id", "site", "redcap_repeat_instance"))
Record ID redcap_repeat_instance site name value
Z551540 3 VUMC method_intxn NA
Z551540 3 VUMC who_did_dose_change NA
Z551540 4 VUMC method_intxn NA
Z551540 4 VUMC who_did_dose_change NA
Z934019 4 VUMC method_intxn NA
Z934019 4 VUMC who_did_dose_change NA
Z2679648 4 VUMC method_intxn NA
Z2679648 4 VUMC who_did_dose_change NA

5.1.2 Last dose

The first result inclusive of discontinuations, and the second is with the discontinuations removed.

# hd.dose %>% select(1, 3, austedo_tdd, end_tdd, site) %>%
#   group_by(record_id) %>% summarise_all(last) %>% ungroup() %>%
#   select(end_tdd, site)%>% 
#   jgt(., by = "site", overall = TRUE)

  hd.extra %>% group_by(record_id) %>% filter(date_comm == max(date_comm)) %>%
    mutate(end.no.disc = ifelse(dose_change_direction == "Discontinue", NA, end_tdd)) %>% 
    ungroup() %>%
    select(end_tdd, end.no.disc) %>%
    jgt(., force.continuous = TRUE)
Characteristic N N = 30
Deutetrabenazine total daily dose at end of encounter 30
    Mean (SD) 55.8 (26.0)
    Median (IQR) 60.0 (54.0 - 72.0)
    Range 0.0 - 96.0
end.no.disc 26
    Mean (SD) 64.4 (14.5)
    Median (IQR) 64.5 (57.8 - 72.0)
    Range 24.0 - 96.0
    Missing 4

5.1.3 Dose transitions by dose change direction

  hd.extra %>%
  select(dose_change_direction, case) %>%
  jgt(., by = "dose_change_direction", overall = TRUE)
Characteristic N Increase, N = 931 Decrease, N = 111 Discontinue, N = 71 Initiate, N = 311 Overall, N = 1421
case 142
    stayed above 33 (35.5%) 6 (54.5%) 0 (0%) 0 (0%) 39 (27.5%)
    stayed below 30 (32.3%) 0 (0%) 1 (14.3%) 25 (80.6%) 56 (39.4%)
    transitioned above 30 (32.3%) 0 (0%) 0 (0%) 6 (19.4%) 36 (25.4%)
    transitioned below 0 (0%) 5 (45.5%) 6 (85.7%) 0 (0%) 11 (7.75%)
1 n (%)

5.1.4 Minimum and maximum doses

Discontinuations not included

# hd.extra %>% filter(dose_change_direction == "Decrease" & case == "stayed above") %>% group_by(record_id) %>% tally()
  # hd.extra %>% filter(dose_change_direction == "Increase" & case == "stayed above") %>% group_by(record_id) %>% tally()
  

  hd.extra %>% group_by(record_id) %>%
    filter(dose_change_direction != "Discontinue") %>%
    summarise(min.dose = min(end_tdd), max.dose = max(end_tdd), .groups = "drop") %>% 
    select(-record_id) %>% jgt(., force.continuous = TRUE)
Characteristic N N = 30
min.dose 30
    Mean (SD) 38.9 (14.9)
    Median (IQR) 36.0 (24.0 - 48.0)
    Range 18.0 - 84.0
max.dose 30
    Mean (SD) 67.3 (10.6)
    Median (IQR) 66.0 (60.0 - 72.0)
    Range 54.0 - 96.0

5.1.5 Dose change reasons for transitions from >48 to <=48mg day

hd.extra %>% filter(dose_change_direction == "Decrease" & case == "transitioned below") %>%
    checkbox_gather(., selection = "dose_change_reason___", id.var = "record_id", output = "summary",
                    tidy.labels = TRUE, toggle.names = TRUE)
Characteristic N = 51
Adverse effects (any) 2 (40.0%)
Lack of efficacy (any) 1 (20.0%)
Therapy start (any)
    No 5 (100.0%)
Other (any) 1 (20.0%)
Deceased (any)
    No 5 (100.0%)
Financial difficulties (any) 1 (20.0%)
1 n (%)

5.1.6 Dose change details for increases and decreases

hd.dose %>% filter(dose_change_direction %in% c("Increase", "Decrease")) %>% 
  droplevels() %>% sjlabelled::copy_labels(., hd.dose) %>% 
  select(dose_change_direction, austedo_tdd, end_tdd, site) %>% 
  jgt(., by = "site", overall = TRUE)
Characteristic N VUMC, N = 651 UAB, N = 391 Overall, N = 1041
Deutetrabenazine dose change direction 104
    Increase 59 (90.8%) 34 (87.2%) 93 (89.4%)
    Decrease 6 (9.23%) 5 (12.8%) 11 (10.6%)
Deutetrabenazine total daily dose at beginning of encounter 104
    Mean (SD) 48.7 (11.4) 48.4 (18.3) 48.6 (14.3)
    Median (IQR) 48.0 (42.0 - 60.0) 48.0 (36.0 - 57.0) 48.0 (40.5 - 60.0)
    Range 24.0 - 66.0 18.0 - 84.0 18.0 - 84.0
Deutetrabenazine total daily dose at end of encounter 104
    Mean (SD) 56.6 (9.9) 55.5 (17.3) 56.2 (13.1)
    Median (IQR) 60.0 (48.0 - 60.0) 54.0 (48.0 - 64.5) 54.0 (48.0 - 63.8)
    Range 30.0 - 72.0 24.0 - 96.0 24.0 - 96.0
1 n (%)

5.2 Figures

5.2.1 Dose changes over time

ggplotly(hd.dose %>% select(record_id, site, date_comm, dose_change_direction) %>%
  ggplot(., aes(x = date_comm, y = factor(record_id), shape = dose_change_direction)) +
  geom_point() +facet_grid(site~., scales = "free", space = "free"))

5.2.2 Trajectories (transitions)

date_pair <-  hd.dose  %>%
  arrange(record_id, date_comm) %>% 
    select(record_id, site, date_comm, austedo_tdd, end_tdd) %>% group_by(record_id) %>% 
    mutate(nv = lead(date_comm),lead_aus = lead(austedo_tdd), end_match = 1*(lead(austedo_tdd) == end_tdd)) %>%
  mutate(direction = case_when(end_tdd > austedo_tdd ~ "Increase",
                               end_tdd < austedo_tdd ~ "Descrease",
                               end_tdd == austedo_tdd ~ "No change")) 

over_under <- date_pair %>% group_by(record_id) %>% mutate(o48 = cumsum(end_tdd > 48)) %>% filter(o48 > 0)%>% 
  mutate(o48 = cumsum(end_tdd <= 48)) %>% filter(any(o48 == 1)) %$% record_id %>% unique()

date_pair %<>% filter(record_id %in% over_under)

hd.dose %>% select(record_id, date_comm, method_intxn, dose_change_direction, who_did_dose_change, site, 
                   austedo_tdd, end_tdd) %>% 
  filter(record_id %in% over_under) %>%
  arrange(record_id, date_comm) %>%
  ggplot(., aes(x= date_comm, y = austedo_tdd)) +geom_hline(yintercept = 48, linetype = 3) + 
  # geom_point() + geom_point(aes(y = end_tdd), colour = "red") + 
  geom_linerange(data = date_pair,# %>% filter(record_id == 'Z3539999'), 
                 aes(xmin = date_comm, xmax = nv, y = lead_aus), colour = "grey76", linetype = 1) +
  geom_linerange(data = date_pair,# %>% filter(record_id == 'Z3539999'), 
                 aes(x = date_comm, ymin = austedo_tdd, ymax = end_tdd, colour = direction)) +
  facet_wrap(~record_id, ncol = 5) +
  theme_minimal()

5.2.3 Trajectories (VUMC)

date_pair <-  hd.dose  %>%
  arrange(record_id, date_comm) %>% 
    select(record_id, site, date_comm, austedo_tdd, end_tdd) %>% group_by(record_id) %>% 
    mutate(nv = lead(date_comm),lead_aus = lead(austedo_tdd), end_match = 1*(lead(austedo_tdd) == end_tdd)) %>%
  mutate(direction = case_when(end_tdd > austedo_tdd ~ "Increase",
                               end_tdd < austedo_tdd ~ "Descrease",
                               end_tdd == austedo_tdd ~ "No change")) %>%
  filter(site == "VUMC")

hd.dose %>% select(record_id, date_comm, method_intxn, dose_change_direction, who_did_dose_change, site, 
                   austedo_tdd, end_tdd) %>% filter(site == "VUMC") %>%
  # filter(record_id == 'Z3539999') %>%
  arrange(record_id, date_comm) %>%
  ggplot(., aes(x= date_comm, y = austedo_tdd))  +geom_hline(yintercept = 48, linetype = 3)+ 
  # geom_point() + geom_point(aes(y = end_tdd), colour = "red") + 
  geom_linerange(data = date_pair,# %>% filter(record_id == 'Z3539999'), 
                 aes(xmin = date_comm, xmax = nv, y = lead_aus), colour = "grey76", linetype = 1) +
  geom_linerange(data = date_pair,# %>% filter(record_id == 'Z3539999'), 
                 aes(x = date_comm, ymin = austedo_tdd, ymax = end_tdd, colour = direction)) +
  facet_wrap(~record_id) + theme_minimal()

5.3 Encounter where Dose transitioned to >48mg/day

hd.dose.48 <- hd.dose %>% 
    left_join(., hdd %>% select(record_id, date_of_start), by = "record_id") %>%
  select(1, site, date_of_start, date_comm, dose_change_direction, austedo_tdd, end_tdd) %>%
  group_by(record_id) %>% arrange(date_comm) %>% mutate(order = 1:n()) %>%
  filter(end_tdd > 48|austedo_tdd >48) %>% group_by(record_id) %>% mutate(seq = 1:n()) %>%
  mutate(case = case_when(order ==1 & austedo_tdd > 48~ "First dose record >48",
                          dose_change_direction =="Initiate" & end_tdd > 48~ "Initiated >48",
                          TRUE ~"Transitioned >48")) %>%
  slice(1) %>% select(-seq) %>%
  mutate(time_to_48plus = as.numeric(date_comm - date_of_start)) %>%
  left_join(hdd %>% select(record_id, site),.,by = c("record_id", "site")) %>%
  mutate(case = replace_na(case, "Dose never exceeded 48mg/day")) 

hd.dose.48 %>% select(site, dose_change_direction, austedo_tdd, end_tdd, case, time_to_48plus) %>%
  jgt(., by = "site", overall = TRUE)
Characteristic N VUMC, N = 171 UAB, N = 131 Overall, N = 301
Deutetrabenazine dose change direction 30
    Increase 16 (94.1%) 9 (69.2%) 25 (83.3%)
    Decrease 1 (5.88%) 0 (0%) 1 (3.33%)
    Discontinue 0 (0%) 0 (0%) 0 (0%)
    Initiate 0 (0%) 4 (30.8%) 4 (13.3%)
Deutetrabenazine total daily dose at beginning of encounter 30
    0 0 (0%) 4 (30.8%) 4 (13.3%)
    42 2 (11.8%) 1 (7.69%) 3 (10.0%)
    48 14 (82.4%) 8 (61.5%) 22 (73.3%)
    54 1 (5.88%) 0 (0%) 1 (3.33%)
Deutetrabenazine total daily dose at end of encounter 30
    45 1 (5.88%) 0 (0%) 1 (3.33%)
    54 7 (41.2%) 10 (76.9%) 17 (56.7%)
    60 9 (52.9%) 0 (0%) 9 (30.0%)
    72 0 (0%) 2 (15.4%) 2 (6.67%)
    84 0 (0%) 1 (7.69%) 1 (3.33%)
case 30
    Initiated >48 0 (0%) 4 (30.8%) 4 (13.3%)
    Transitioned >48 17 (100.0%) 9 (69.2%) 26 (86.7%)
time_to_48plus 30
    Mean (SD) 542.9 (403.4) 478.8 (599.2) 515.1 (489.3)
    Median (IQR) 497.0 (119.0 - 812.0) 287.0 (0.0 - 749.0) 490.0 (85.8 - 796.3)
    Range 58.0 - 1309.0 0.0 - 2015.0 0.0 - 2015.0
1 n (%)

5.3.1 Detail

j.reactable(hd.dose.48, csv.file = "dose_increase_above_48")
hd.dose %>% filter(record_id == "Z2679648") %>% arrange(date_comm) %>% select(1, date_comm, dose_change_direction, austedo_tdd, end_tdd) %>%jgtt()
Record ID date_comm Deutetrabenazine dose change direction Deutetrabenazine total daily dose at beginning of encounter Deutetrabenazine total daily dose at end of encounter
Z2679648 2017-11-09 Increase 36 48
Z2679648 2018-07-02 Decrease 54 45
Z2679648 2018-07-09 Increase 45 54
Z2679648 2018-08-23 Increase 48 54

5.4 Dose change reasons

5.4.1 Patient level (any)

checkbox_gather(hd.dose, "dose_change_reason", output = "summary", id.var = "record_id",
                by.var = "site", tidy.labels = TRUE, toggle.names = TRUE, simple.names = TRUE )
Characteristic VUMC, N = 171 UAB, N = 131 Overall, N = 301
Adverse effects 4 (23.5%) 4 (30.8%) 8 (26.7%)
Lack of efficacy
    Yes 17 (100.0%) 13 (100.0%) 30 (100.0%)
Therapy start 16 (94.1%) 12 (92.3%) 28 (93.3%)
Other 2 (11.8%) 1 (7.69%) 3 (10.0%)
Deceased 2 (11.8%) 0 (0%) 2 (6.67%)
Financial difficulties 1 (5.88%) 1 (7.69%) 2 (6.67%)
1 n (%)

5.4.2 Patient level (count)

checkbox_gather(hd.dose, "dose_change_reason", output = "summary", id.var = "record_id",count = "total",
                by.var = "site", tidy.labels = TRUE, toggle.names = TRUE, simple.names = TRUE )
Characteristic VUMC, N = 171 UAB, N = 131 Overall, N = 301
Adverse effects 4 (23.5%) 4 (30.8%) 8 (26.7%)
Lack of efficacy
    1 3 (17.6%) 5 (38.5%) 8 (26.7%)
    2 2 (11.8%) 1 (7.69%) 3 (10.0%)
    3 4 (23.5%) 4 (30.8%) 8 (26.7%)
    4 2 (11.8%) 2 (15.4%) 4 (13.3%)
    5 4 (23.5%) 0 (0%) 4 (13.3%)
    6 1 (5.88%) 1 (7.69%) 2 (6.67%)
    8 1 (5.88%) 0 (0%) 1 (3.33%)
Therapy start
    0 1 (5.88%) 1 (7.69%) 2 (6.67%)
    1 13 (76.5%) 12 (92.3%) 25 (83.3%)
    2 3 (17.6%) 0 (0%) 3 (10.0%)
Other 2 (11.8%) 1 (7.69%) 3 (10.0%)
Deceased 2 (11.8%) 0 (0%) 2 (6.67%)
Financial difficulties
    0 16 (94.1%) 12 (92.3%) 28 (93.3%)
    1 1 (5.88%) 0 (0%) 1 (3.33%)
    2 0 (0%) 1 (7.69%) 1 (3.33%)
1 n (%)

5.4.3 Dose change level

checkbox_gather(hd.dose, "dose_change_reason", output = "summary", id.var = "record_id", 
                repeat.var = "redcap_repeat_instance",add.zero = TRUE,
                by.var = "site", tidy.labels = TRUE, toggle.names = TRUE, simple.names = TRUE )
Characteristic VUMC, N = 901 UAB, N = 521 Overall, N = 1421
Adverse effects 4 (4.44%) 4 (7.69%) 8 (5.63%)
Lack of efficacy 61 (67.8%) 33 (63.5%) 94 (66.2%)
Therapy start 19 (21.1%) 12 (23.1%) 31 (21.8%)
Other 2 (2.22%) 1 (1.92%) 3 (2.11%)
Deceased 2 (2.22%) 0 (0%) 2 (1.41%)
Financial difficulties 1 (1.11%) 2 (3.85%) 3 (2.11%)
[Zero selected] 1 (1.11%) 0 (0%) 1 (0.70%)
1 n (%)

5.4.4 Reason level

checkbox_tally(hd.dose, "dose_change_reason", id.var = "record_id",
                by.var = "site")
Characteristic N VUMC, N = 891 UAB, N = 521 Overall, N = 1411
Selection 141
    Lack of efficacy 61 (68.5%) 33 (63.5%) 94 (66.7%)
    Therapy start 19 (21.3%) 12 (23.1%) 31 (22.0%)
    Adverse effects 4 (4.49%) 4 (7.69%) 8 (5.67%)
    Other 2 (2.25%) 1 (1.92%) 3 (2.13%)
    Financial difficulties 1 (1.12%) 2 (3.85%) 3 (2.13%)
    Deceased 2 (2.25%) 0 (0%) 2 (1.42%)
1 n (%)
# hd.dose %>% mutate(x = paste(record_id, redcap_repeat_instance)) %>%
# checkbox.by(., "dose_change_reason", "x",col.name= "Dose change reason", by.var = "site")

5.4.5 Other reasons

hd.dose %>% select(1,redcap_repeat_instance,date_comm, site, other_dose_change) %>%na.omit() %>%jgtt()
Record ID redcap_repeat_instance date_comm site Other reason for dose change
119145-1 1 2021-03-31 UAB Patient needed re-titration due to running out of supply for >7 days
Z2679648 3 2018-07-02 VUMC Exact reason unknown. Patient met with Dr. Claassen outside of a clinic visit to discuss dose and the reduction to 45 mg was a short trial before increasing back up. No documentation in chart of reason for decrease as patient was concerned about increase in symptoms at that time.
Z2769796 6 2020-01-24 VUMC changed to tetrabenazine for ability to crush tabs
# hd.dose%>%rowwise() %>% mutate(x = sum(across(contains("dose_change_reason"), ~is.na(.x)))) %>% filter(x >5) %>%
#   select(1:3)
# hd.extra %>% select(record_id, site, date_comm, dose_change_direction, austedo_tdd, end_tdd, change, case) %>% 
#   mutate(case2 = ifelse(grepl("above", case), "above", "below")) %>% 
#   ggplot(., aes(y = record_id, x = date_comm))
# 
# hd.extra %>% select(record_id, site, date_comm, dose_change_direction, austedo_tdd, end_tdd, change, case) %>% 
#   mutate(case2 = ifelse(grepl("above", case), "above", "below")) 

6 Discontinuation

hdd %>% select(dc_during_study, time_to_dc, site) %>%
  mutate(months_to_dc = time_to_dc/30.475) %>%
  jgt(., by = "site", overall = TRUE, force.continuous = TRUE)
Characteristic N VUMC, N = 171 UAB, N = 131 Overall, N = 301
Deutetrabenazine discontinued during the study period 30
    No 11 (64.7%) 12 (92.3%) 23 (76.7%)
    Yes 6 (35.3%) 1 (7.69%) 7 (23.3%)
Time to deutetrabenazine discontinuation 7
    Mean (SD) 1303.7 (408.5) 382.0 (NA) 1172.0 (510.3)
    Median (IQR) 1443.5 (1089.5 - 1617.5) 382.0 (382.0 - 382.0) 1325.0 (822.5 - 1599.0)
    Range 634.0 - 1654.0 382.0 - 382.0 382.0 - 1654.0
    Missing 11 12 23
Time to deutetrabenazine discontinuation 7
    Mean (SD) 42.8 (13.4) 12.5 (NA) 38.5 (16.7)
    Median (IQR) 47.4 (35.8 - 53.1) 12.5 (12.5 - 12.5) 43.5 (27.0 - 52.5)
    Range 20.8 - 54.3 12.5 - 12.5 12.5 - 54.3
    Missing 11 12 23
1 n (%)
hdd %>% select(1, dc_during_study, site) %>% jmiss(., c("record_id", "site"))
Record ID site name value

6.1 Discontinuation reasons

hd.dose %>% filter(dose_change_direction == "Discontinue") %>%
  checkbox.by(., "dose_change_reason", "record_id",col.name= "Dose change reason", by.var = "site")
Dose change reason UAB (N = 1) VUMC (N = 6) Total (N = 7)
Deceased 0 (0%) 2 (33.3%) 2 (28.6%)
Adverse effects 1 (100%) 1 (16.7%) 2 (28.6%)
Other 0 (0%) 1 (16.7%) 1 (14.3%)
Lack of efficacy 0 (0%) 1 (16.7%) 1 (14.3%)
Financial difficulties 0 (0%) 1 (16.7%) 1 (14.3%)
# hd.dose %>% filter(dose_change_direction == "Discontinue") %>%
# checkbox_gather(., "dose_change_reason", output = "summary", id.var = "record_id", count = "any",
#                 by.var = "site", tidy.labels = TRUE, toggle.names = TRUE, simple.names = TRUE )

hd.dose %>% filter(dose_change_direction == "Discontinue") %>%
  select(1,redcap_repeat_instance,date_comm, site, other_dose_change) %>%na.omit() %>%jgtt()
Record ID redcap_repeat_instance date_comm site Other reason for dose change
Z2769796 6 2020-01-24 VUMC changed to tetrabenazine for ability to crush tabs

6.2 Discontinuation dose/time

hd.dose %>% filter(dose_change_direction == "Discontinue")  %>% select(1, site, date_comm, austedo_tdd, end_tdd) %>%
  left_join(., hdd %>% select(record_id, date_of_start, time_to_dc)) %>%
  mutate(time_to_dc_calc = as.numeric(date_comm - date_of_start)) %>%jgtt()
Record ID site date_comm Deutetrabenazine total daily dose at beginning of encounter Deutetrabenazine total daily dose at end of encounter date_of_start Time to deutetrabenazine discontinuation time_to_dc_calc
119145-3 UAB 2018-11-02 48 0 2017-10-30 382 368
Z563959 VUMC 2019-07-16 54 0 2017-10-20 634 634
Z1307311 VUMC 2022-03-18 72 0 2018-08-01 1325 1325
Z2769796 VUMC 2020-01-24 72 0 2017-04-18 1011 1011
Z2963498 VUMC 2021-10-30 60 0 2017-07-21 1562 1562
Z3539999 VUMC 2021-10-26 60 0 2017-05-04 1636 1636
Z3627997 VUMC 2021-10-31 72 0 2017-04-21 1654 1654

6.3 Discontinuation mismatch

All have been resolved

full_join(
  hd.dose %>% filter(dose_change_direction == "Discontinue") %>% select(1, site, dose_change_direction),
  hdd %>% select(1, site, dc_during_study) %>%filter(dc_during_study == "Yes"),
  by = c("record_id", "site")) %>% 
  left_join(., hdd %>% select(1, reason_exclude), by = "record_id") %>%
  jgtt()
Record ID site Deutetrabenazine dose change direction Deutetrabenazine discontinued during the study period Exclusion Criteria
119145-3 UAB Discontinue Yes N/A
Z563959 VUMC Discontinue Yes N/A
Z1307311 VUMC Discontinue Yes N/A
Z2769796 VUMC Discontinue Yes N/A
Z2963498 VUMC Discontinue Yes N/A
Z3539999 VUMC Discontinue Yes N/A
Z3627997 VUMC Discontinue Yes N/A

6.4 Demographics of discontinued patients

hdd %>%select(age_at_start, gender, race, ethnicity, ins_type, diagnosis, site, dc_during_study) %>%
  jgt(., by = "dc_during_study", overall = TRUE, spanner.size = 2, spanner.text = "DC during study")
Characteristic N DC during study Overall, N = 301
No, N = 231 Yes, N = 71
Age at start of prescription therapy 30
    Mean (SD) 56.0 (10.1) 52.9 (16.8) 55.3 (11.7)
    Median (IQR) 57.0 (51.5 - 64.0) 46.0 (43.5 - 69.0) 56.0 (46.5 - 64.0)
    Range 31.0 - 71.0 28.0 - 71.0 28.0 - 71.0
Gender 30
    Female 9 (39.1%) 5 (71.4%) 14 (46.7%)
    Male 14 (60.9%) 2 (28.6%) 16 (53.3%)
Race 30
    White 21 (91.3%) 7 (100.0%) 28 (93.3%)
    Black or African American 2 (8.70%) 0 (0%) 2 (6.67%)
Ethnicity 30
    Not Hispanic, Latino/a, or Spanish origin 21 (91.3%) 7 (100.0%) 28 (93.3%)
    Hispanic or Latino 1 (4.35%) 0 (0%) 1 (3.33%)
    Unknown 1 (4.35%) 0 (0%) 1 (3.33%)
Medical insurance type 30
    Medicare 11 (47.8%) 5 (71.4%) 16 (53.3%)
    Medicaid 3 (13.0%) 0 (0%) 3 (10.0%)
    Tricare 1 (4.35%) 0 (0%) 1 (3.33%)
    Commercial 6 (26.1%) 2 (28.6%) 8 (26.7%)
    None 2 (8.70%) 0 (0%) 2 (6.67%)
Diagnosis 30
    Huntington's Disease 23 (100.0%) 7 (100.0%) 30 (100.0%)
site 30
    VUMC 11 (47.8%) 6 (85.7%) 17 (56.7%)
    UAB 12 (52.2%) 1 (14.3%) 13 (43.3%)
1 n (%)

7 AEs by dose 48mg/ day

7.1 Overall

hd.ae %>% left_join(., hd.dose.48 %>% select(record_id, date_comm), by = join_by(record_id)) %>% 
  mutate(when = ifelse(date_comm > date_ae, "Before", "On or after")) %>%
  checkbox.by2(., "ade_experienced", c("record_id"),col.name= "AE experienced", by.var = "when",
             add.none = TRUE, count = "any", add.footnote = TRUE, spanner.label = "Transitioned > 48mg/day")
AE experienced Transitioned > 48mg/day Total (N = 19)
Before (N = 9) On or after (N = 16)
Drowsiness/sedation 4 (44.4%) 3 (18.8%) 7 (36.8%)
Pseudoparkinsonism 2 (22.2%) 3 (18.8%) 4 (21.1%)
Insomnia 1 (11.1%) 3 (18.8%) 4 (21.1%)
Anxiety 2 (22.2%) 2 (12.5%) 4 (21.1%)
Akathisia 2 (22.2%) 2 (12.5%) 3 (15.8%)
Worsened movements 0 (0%) 2 (12.5%) 2 (10.5%)
Depression 2 (22.2%) 0 (0%) 2 (10.5%)
Worsening mood/behaviors 0 (0%) 1 (6.2%) 1 (5.3%)
Vomiting 1 (11.1%) 0 (0%) 1 (5.3%)
Urinary tract infection 0 (0%) 1 (6.2%) 1 (5.3%)
Sedation 0 (0%) 1 (6.2%) 1 (5.3%)
Other 0 (0%) 1 (6.2%) 1 (5.3%)
Mental status changes 1 (11.1%) 0 (0%) 1 (5.3%)
Increased urination 1 (11.1%) 0 (0%) 1 (5.3%)
Dizziness 1 (11.1%) 0 (0%) 1 (5.3%)
Diarrhea 0 (0%) 1 (6.2%) 1 (5.3%)
Values represent whether the item was selected at least once grouped according to record_id

7.2 UAB

hd.ae %>% left_join(., hd.dose.48 %>% select(record_id, date_comm), by = join_by(record_id)) %>% 
  mutate(when = ifelse(date_comm > date_ae, "Before", "On or after")) %>%
  filter(site == "UAB") %>%
  checkbox.by2(., "ade_experienced", c("record_id"),col.name= "AE experienced", by.var = "when",
             add.none = TRUE, count = "any", add.footnote = TRUE, spanner.label = "Transitioned > 48mg/day (UAB)")
AE experienced Transitioned > 48mg/day (UAB) Total (N = 8)
Before (N = 3) On or after (N = 7)
Drowsiness/sedation 3 (100%) 1 (14.3%) 4 (50%)
Pseudoparkinsonism 2 (66.7%) 2 (28.6%) 3 (37.5%)
Worsening mood/behaviors 0 (0%) 1 (14.3%) 1 (12.5%)
Worsened movements 0 (0%) 1 (14.3%) 1 (12.5%)
Other 0 (0%) 1 (14.3%) 1 (12.5%)
Insomnia 0 (0%) 1 (14.3%) 1 (12.5%)
Diarrhea 0 (0%) 1 (14.3%) 1 (12.5%)
Anxiety 0 (0%) 1 (14.3%) 1 (12.5%)
Values represent whether the item was selected at least once grouped according to record_id

7.3 VUMC

hd.ae %>% left_join(., hd.dose.48 %>% select(record_id, date_comm), by = join_by(record_id)) %>% 
  mutate(when = ifelse(date_comm > date_ae, "Before", "On or after")) %>%
  filter(site == "VUMC") %>%
  checkbox.by2(., "ade_experienced", c("record_id"),col.name= "AE experienced", by.var = "when",
             add.none = TRUE, count = "any", add.footnote = TRUE, spanner.label = "Transitioned > 48mg/day (VUMC)")
AE experienced Transitioned > 48mg/day (VUMC) Total (N = 11)
On or after (N = 9) Before (N = 6)
Akathisia 2 (22.2%) 2 (33.3%) 3 (27.3%)
Insomnia 2 (22.2%) 1 (16.7%) 3 (27.3%)
Drowsiness/sedation 2 (22.2%) 1 (16.7%) 3 (27.3%)
Anxiety 1 (11.1%) 2 (33.3%) 3 (27.3%)
Depression 0 (0%) 2 (33.3%) 2 (18.2%)
Worsened movements 1 (11.1%) 0 (0%) 1 (9.1%)
Vomiting 0 (0%) 1 (16.7%) 1 (9.1%)
Urinary tract infection 1 (11.1%) 0 (0%) 1 (9.1%)
Sedation 1 (11.1%) 0 (0%) 1 (9.1%)
Pseudoparkinsonism 1 (11.1%) 0 (0%) 1 (9.1%)
Mental status changes 0 (0%) 1 (16.7%) 1 (9.1%)
Increased urination 0 (0%) 1 (16.7%) 1 (9.1%)
Dizziness 0 (0%) 1 (16.7%) 1 (9.1%)
Values represent whether the item was selected at least once grouped according to record_id
# hd.ae %>% left_join(., hd.dose.48 %>% select(record_id, date_comm), by = join_by(record_id)) %>% 
#   mutate(when = ifelse(date_comm > date_ae, "Before", "On or after")) %>%
#   gbb() %>% summarise(when = toString(when))

8 AEs and DCs by dose level

8.1 AE Figure

## Find dose for each interval from beginning to end, punctuated by dose changes
## Find which interval the AE occurred in and the associated dose
aed <- hd.dose %>%
  left_join(., hdd %>% select(1, date_of_start, dc_date), by = "record_id") %>% 
  group_by(record_id) %>%
  bind_rows(., data.frame(record_id = hdd$record_id, date_comm = ymd("2022.07.01"))) %>% 
  arrange(record_id, date_comm) %>%
  mutate(prev_comm = lag(date_comm, default = date_of_start[1])) %>%
  select(record_id, austedo_tdd, end_tdd, date_of_start, contains("comm"), dc_date) %>%
  mutate(comm_interval = interval((prev_comm+days(1)), date_comm)) %>%
  left_join(., aex %>% select(record_id, date_ae, ae_recat), by = "record_id") %>%
  fill(., end_tdd,dc_date, .direction = "down") %>%
  mutate(dose = ifelse(is.na(austedo_tdd), end_tdd, austedo_tdd)) %>% ungroup()  

aedc <- aed %>% filter(!is.na(dc_date))%>% 
  mutate(within = dc_date %within% comm_interval) %>% 
  filter(within) %>% 
  distinct(., record_id, dc_date, comm_interval, .keep_all = TRUE)
  
aedx <- aed%>%   filter(!is.na(date_ae))%>%
  mutate(within = date_ae %within% comm_interval) %>%   
  filter(within) %>% mutate(dose= ifelse(dose == 0, 48, dose))## need to manually change one dose 119145-3
  # mutate(ae_recat = ifelse(ae_recat == "Other", "Dizziness", ae_recat))
  
ae_o <- aedx %>% 
  mutate(facet = "Adverse events") %>% 
  ggplot(., aes(x = 1,  y = dose)) + 
  geom_boxplot(aes(group = 1),color="grey80", size= 1) +
  theme_classic() + labs(y = "Dose (mg/day)", x = "Adverse event") + 
  guides(colour = "none") +scale_x_continuous(breaks = 1, minor_breaks = NULL, labels = "") +
  # scale_y_log10() +
  theme_bw() +#facet_grid(.~facet) +
  guides(fill = "none") +theme(axis.text.x = element_blank())+
  geom_dotplot(aes(fill= ae_recat, colour = ae_recat), binwidth = 2,stackgroups = TRUE,
               method = "histodot", binaxis = "y", stackdir = "center") +
  geom_hline(yintercept = 48, linetype = 2) + ylim(c(15, 90))

ae_i <- aedx %>% 
  mutate(facet = "Adverse event categories") %>% 
  mutate(ae_recat = str_wrap(ae_recat, 12)) %>% 
  ggplot(., aes(x = ae_recat, colour = ae_recat, y = dose)) +geom_boxplot(outlier.shape = NA) + 
  theme_classic() + labs(y = NULL, x = "Adverse event category") + guides(colour = "none") +
  # scale_y_log10() +
  theme_bw() + #facet_grid(.~facet) +
  theme(axis.text.y = element_blank(), axis.line.y = element_blank(), 
        axis.title.y = element_blank(), axis.ticks.y = element_blank())+
  geom_dotplot(aes(fill= ae_recat, colour = ae_recat), binwidth = 2,stackgroups = TRUE,
               method = "histodot", binaxis = "y", stackdir = "center") +guides(fill = "none") +
  geom_hline(yintercept = 48, linetype = 2) + ylim(c(15, 90))



(ae_dose <- plot_grid(ae_o, ae_i,  ncol = 2, align = "hv", rel_widths = c(0.25, 0.75)))

# ggsave("ae_dose.png", ae_dose, dpi = 400, width = 10.73*.52, height = 6.55*.52)

# aed%>%   filter(!is.na(date_ae))%>%
#   mutate(within = date_ae %within% comm_interval) %>%   
#   filter(within, ae_recat== "Other") 
# 119145-13 Palpitations
# Z2769796 Dizziness and Vomiting
# hd.ae %>% filter(record_id %in% c("119145-13", "Z2769796"))

8.2 AE Table

# aedx %>% mutate(time_length = time_length(comm_interval, unit = "days")) %>% distinct(record_id, comm_interval, .keep_all = TRUE)

aedx %>% mutate(dose.x = ifelse(dose >48, "> 48", "<=48")) %>% ungroup() %>% select(ae_recat, dose.x) %>%
  jgt(., by = "dose.x", percent = "row", overall = TRUE)
Characteristic N <=48, N = 211 > 48, N = 211 Overall, N = 421
ae_recat 42
    EPS 4 (33.3%) 8 (66.7%) 12 (100.0%)
    GI 1 (50.0%) 1 (50.0%) 2 (100.0%)
    GU 1 (50.0%) 1 (50.0%) 2 (100.0%)
    Other 1 (50.0%) 1 (50.0%) 2 (100.0%)
    Psychiatric 6 (75.0%) 2 (25.0%) 8 (100.0%)
    Sleep changes 8 (50.0%) 8 (50.0%) 16 (100.0%)
1 n (%)
# aedx %>% mutate(dose.x = ifelse(dose >48, "> 48", "<=48")) %>% group_by(record_id, dose.x) %>% 
#   tally() %>% ungroup() %>% select(dose.x) %>% jgt()
# 
# aedx %>% mutate(dose.x = ifelse(dose >48, "> 48", "<=48")) %>% group_by(record_id, dose.x) %>% 
#   tally() %>% group_by(record_id) %>% summarise(dose.x = toString(dose.x), .groups = "drop") %>% select(-record_id) %>% jgt()

8.3 DC Figure

dc_reasons <- hd.dose %>% filter(dose_change_direction == "Discontinue") %>% select(1, contains("dose_change_reason___")) %>%
  pivot_longer(., -1, values_drop_na = TRUE, values_to = "Reason", values_transform = as.character) %>%
  mutate(Reason = ifelse(Reason == "Other", "Administration issues", Reason))

ae_d <- aedc %>% mutate(dose= ifelse(dose == 0, 48, dose)) %>% ## need to manually change one dose 119145-3
  left_join(., dc_reasons, by = "record_id") %>% 
  mutate(facet = "Discontinuation") %>% 
ggplot(., aes(x = 1,  y = dose)) + 
  geom_boxplot(aes(group = 1),color="grey80", size= 1) +
  theme_classic() + labs(y = "Dose (mg/day)", x = "") + 
  # guides(colour = "none") +
  scale_x_continuous(breaks = 1, minor_breaks = NULL, labels = "") +
  # scale_y_log10() +
  theme_bw() + #facet_grid(.~facet) +
    # theme(axis.text.y = element_blank(), axis.line.y = element_blank(), 
    #     axis.title.y = element_blank(), axis.ticks.y = element_blank())+
  theme(axis.text.x = element_blank(), axis.ticks.x = element_blank())+
  geom_dotplot(aes(colour = Reason), binwidth = 2,stackgroups = TRUE,fill = "white",
               method = "histodot", binaxis = "y", stackdir = "center") +
  geom_hline(yintercept = 48, linetype = 2) + ylim(c(15, 90))


ae_d

# ggsave("dc_dose.png", ae_d, dpi = 400, width = 9*.46, height = 7.25*.46)
# (ae_pg <- plot_grid(ae_o, ae_i, ae_d,  ncol = 3, align = "hv", rel_widths = c(0.25, 0.5, .3)))

# ggsave("ae_dc_dose.png", ae_pg, dpi = 400, width = 20*.52, height = 7.1*.52)

8.4 Dose changes after reaching >48mg

# 
# hd.dose %>%
#   left_join(., hdd %>% select(1, date_of_start), by = "record_id") %>% 
#   group_by(record_id) %>%
#   bind_rows(., data.frame(record_id = hdd$record_id, date_comm = ymd("2022.07.01"))) %>% 
#   arrange(record_id, date_comm) %>%
#   mutate(prev_comm = lag(date_comm, default = date_of_start[1])) %>%
#   select(record_id, austedo_tdd, end_tdd, date_of_start, contains("comm"))
# 
# aed %>% 
#   left_join(., hd.extra %>% select(record_id, site, date_comm, dose_change_direction, change, case) %>% 
#   mutate(case2 = ifelse(grepl("above", case), "above", "below")),
#   by = c("record_id", "date_comm"))
#   
#   ggplot(., aes(x = prev_comm, y = record_id)) + geom_segment(aes(xend = date_comm, yend = record_id))
  
hd.extra2 <-  hd.extra %>% select(record_id, site, date_comm, dose_change_direction, change, case) %>% 
  mutate(case2 = ifelse(grepl("above", case), "above", "below")) %>% 
    filter(dose_change_direction %in% c("Increase", "Decrease")) %>% 
    group_by(record_id) %>%
    mutate(c3 = cumsum(case2 == "above")) %>% filter(c3 >0) %>% 
    group_by(record_id) %>% mutate(i = (1:n()-1)) %>% ungroup() %>% 
    mutate(record_id = fct_reorder(record_id, i, max)) %>% 
    
    mutate(case2 = ifelse(i ==0, "first", case2 )) %>% 
    mutate(case2 = factor(case2, levels = c("first", "above", "below"), 
                          labels = c("First dose >48mg", "Dose >48 mg", "Dose <= 48mg"))) %>% 
    filter(i > 0) %>% 
    group_by(record_id) %>% mutate(id = factor(cur_group_id()) )

hd.extra2 %<>% mutate(c3 = case_when(dose_change_direction == "Increase" & case2 == "Dose >48 mg" ~ "Increase dose, remain > 48mg",
                                    dose_change_direction == "Decrease" & case2 == "Dose >48 mg" ~ "Decrease dose, remain > 48mg",
                                    dose_change_direction == "Decrease" & case2 == "Dose <= 48mg" ~ "Decrease dose to <= 48mg"),
                      c3 = factor(c3, levels = c("Increase dose, remain > 48mg", "Decrease dose, remain > 48mg", "Decrease dose to <= 48mg")))

    ggplot(hd.extra2) + 
        geom_rect(data = data.frame(id = factor(1:23)), aes(fill = id),xmin = -Inf,xmax = Inf,
            ymin = -Inf,ymax = Inf,alpha = 0.4)+ 
  scale_fill_manual(values = c(rep(c("white","#ECF7E8"), 11), "white")) + guides(fill = "none") + 
  ggnewscale::new_scale_fill() +
    geom_point(aes(x = i, y = id, shape = c3,
                   colour= c3, fill= c3), size = 2) +
    scale_shape_manual(values = c( 24, 25,25)) +
    facet_grid(id~., scales = "free", switch = "y")+ theme_classic() + 
    scale_x_continuous(breaks = c(1:6)) +
      scale_fill_manual(values = c("#5FA326", "#375724", "#d65d29")) +
      scale_colour_manual(values = c("#5FA326", "#375724", "#d65d29")) +
  theme(panel.grid.minor.y = element_blank()) + 
  # remove facet spacing on x-direction
  theme(panel.spacing.y = unit(0,"line")) +
  theme(strip.text.y.left = element_text(angle = 0))+
  theme(strip.placement = 'outside',
        strip.background.y = element_blank(), axis.text.y = element_blank(), axis.ticks.y =element_blank()) +
    labs(x = "Clinic visit upon starting high dose", y = "Patient ID", shape = "Dose change direction", colour = "Dose change direction", fill = "Dose change direction") +theme(legend.position = c(.75, .75))

    greens <- c("#16B050",
    "#375724",
    "#70AD46",
    "#C5E0B4",
    "#005333",
    "#ECF7E8",
    "#5FA326")

8.4.1 Table

hd.extra2 %>% ungroup() %>% select(case2, dose_change_direction) %>% 
      droplevels() %>% sjlabelled::copy_labels(., hd.extra2) %>% 
      jgt(., by = "case2", overall = TRUE)
Characteristic N Dose >48 mg, N = 391 Dose <= 48mg, N = 41 Overall, N = 431
Deutetrabenazine dose change direction 43
    Increase 33 (84.6%) 0 (0%) 33 (76.7%)
    Decrease 6 (15.4%) 4 (100.0%) 10 (23.3%)
1 n (%)

9 Appendix

9.1 Dates

## Read in valid date ranges
valid <- read.csv("../data/date_ranges.csv") %>%mutate(across(contains("valid"), mdy))

hd_dates <- hd %>% select(record_id, site, where(is.Date)) %>%
  pivot_longer(., c(-record_id, -site), names_to = "Date", values_drop_na = TRUE) %>% mutate(value = ymd(value)) %>%
  left_join(., valid, by = "Date") %>% 
  mutate(Interval = interval(validation_min, validation_max), valid_date = value %within% Interval) %>%
  mutate(Interval = as.character(Interval)) %>%
  select(-validation_min, -validation_max)


shared_data <- SharedData$new(hd_dates)

shiny::fluidRow(
  shiny::column(
    3,
    filter_checkbox("valid", "Valid date", shared_data, ~valid_date),
    filter_checkbox("Date", "Date", shared_data, ~Date),
    filter_checkbox("site", "Site", shared_data, ~site),
    filter_select("record_id", "Record ID", shared_data, ~record_id)
  ),
  shiny::column(
    9,
     j.reactable(shared_data, csv.file = "hd_dates")

  )
)
hd %>% clear.labels()%>% ungroup() %>% 
  filter(record_id %in% hdd$record_id) %>%
  select(record_id, where(is.Date))%>% 
  pivot_longer(., c(-record_id), values_drop_na = TRUE) %>% 
  arrange(name, value) %>% group_by(name) %>% 
  mutate(n = n(), sequence = 1:n(), value = ymd(value)) %>% 
  ggplot(., aes(x = value, y = name, height = stat(count))) + 
  ggridges::geom_density_ridges(stat = "binline", binwidth = 14, scale = 0.95, draw_baseline = FALSE, fill = "black") +  
  theme_minimal() +labs(x = "Date", y = "Date variable") + 
  geom_vline(xintercept = ymd("2017.4.1"), linetype = 2)+ 
  geom_vline(xintercept = ymd("2022.7.01"), linetype = 2)

9.1.1 Out of sequence

hd %>% select(record_id, site, where(is.Date)) %>% group_by(record_id) %>%fill("date_of_start", .direction = "updown") %>%
  pivot_longer(., c(-record_id, -site, -date_of_start), names_to = "Date", values_drop_na = TRUE) %>% 
  mutate(value = ymd(value)) %>%
  filter(value < date_of_start | is.na(date_of_start)) %>% jgtt()
site date_of_start Date value
119145-1
UAB 2018-10-12 visit 2018-10-10
UAB 2018-10-12 date_comm 2018-10-10
UAB 2018-10-12 uhdrs_date 2018-10-10
UAB 2018-10-12 med_sold_datev2 2018-10-11
UAB 2018-10-12 med_sold_datev2 2018-10-11
UAB 2018-10-12 med_sold_datev2 2018-10-11

9.2 Data dictionary

redcap_dictionary(dict)

9.3 Table of Contents

get_toc(rmd.name) %>%j.reactable(., csv.file = "austedo_toc")

9.4 Continuous study notes

print.work.logs("HD Austedo Multisite")
Summary of project requests
date request date done
2023-07-11 Initial data cleaning 2023-07-18
2023-07-18 Calculate adherence and other minor updates 2023-07-24
2023-08-01 Data cleaning notes 2023-08-04
2023-08-07 Pull new data and rerun report 2023-08-08
2023-08-08 clean up checkbox summaries and look into dose increase threshold times 2023-08-15
2023-08-15 Additional >48mg reporting 2023-08-16
2023-08-22 Add adherence data; clarify checkbox data for 2.4.2 2023-08-25
2023-08-29 Stratify AEs by dose escalation 2023-08-29
2023-08-29 Put 2.8 at patient level and send report 2023-08-30
2023-09-07 Abstract review 2023-09-12
2023-09-18 Re-review abstract 2023-09-19
2023-09-13 Additional UAB requests 2023-09-20
2023-09-27 table clarification 2023-09-27
2023-09-26 Abstract 2 review 2023-09-28
2023-09-19 Dose change figure 2023-10-06
2023-10-09 Figure clean up 2023-10-18
2023-10-20 Review poster 2023-10-25
2023-10-19 Adherence and dose change figures 2023-10-26
2023-10-30 UAB requests 2023-11-06
2023-10-31 Poster review 2023-11-06
2023-11-07 Clean up report and results requests NA

9.5 Data change log

# changelog.summary()

# update.redcap.changelog(id.vars = c("record_id", "redcap_repeat_instrument","redcap_repeat_instance" ), archive.location = "../data/temp/")

load("../data/redcap_changelog.rda")
redcap_changelog[[1]] %>%jgtt()
file download.time n n.diffs
2023-07-21_austedo.rda 2023-07-21 14:41:49 1 NA
2023-08-03_austedo.rda 2023-08-03 11:27:05 2 8
2023-08-04_austedo.rda 2023-08-04 09:52:16 3 0
2023-08-08_austedo.rda 2023-08-08 10:28:11 4 6
2023-08-18_austedo.rda 2023-08-18 12:22:55 5 0

9.6 Session Info

session_info(rmd.name)
package version n funs
dplyr 1.1.2 34 %>%, across, all_of, arrange, bind_rows, case_when, contains, cur_group_id, desc, distinct, do, everything, filter, first, full_join, group_by, join_by, lag, last, lead, left_join, mutate, n, rename, rowwise, select, slice, starts_with, summarise, tally, transmute, tribble, ungroup, where
ggplot2 3.4.2 32 aes, element_blank, element_text, facet_grid, facet_wrap, geom_boxplot, geom_dotplot, geom_hline, geom_line, geom_linerange, geom_point, geom_rect, geom_segment, geom_smooth, geom_vline, ggplot, guides, labs, scale_color_gradient, scale_colour_manual, scale_fill_manual, scale_shape_manual, scale_x_continuous, scale_y_continuous, scale_y_log10, stat, theme, theme_bw, theme_classic, theme_minimal, unit, ylim
.GlobalEnv NA 29 PDC.interval, ac, across, checkbox.by, checkbox.by2, checkbox.upset2, checkbox_gather, checkbox_tally, clear.labels, collect.labels, days, gbb, get_toc, j.reactable, jgt, jgtt, jmiss, labs, namify, print.work.logs, redcap_dictionary, remove.blank.columns, remove.blank.columns2, replace_na, select, session_info, slice, summarise, yesno
base 4.3.0 25 %in%, any, as.character, as.data.frame, as.numeric, c, cumsum, data.frame, droplevels, factor, grepl, ifelse, is.na, library, list, load, max, mean, min, paste, rep, require, round, sum, unique
plotly 4.10.2 14 %>%, arrange, distinct, do, filter, ggplotly, group_by, mutate, rename, select, slice, summarise, transmute, ungroup
tidyr 1.3.0 10 %>%, all_of, contains, everything, fill, pivot_longer, pivot_wider, replace_na, starts_with, tribble
gtsummary 1.7.1 8 %>%, add_p, all_of, contains, everything, mutate, select, starts_with
NA 5 adorn_totals, copy_labels, geom_density_ridges, new_scale_fill, source_url
gt 0.9.0 4 %>%, contains, everything, starts_with
lubridate 1.9.2 4 %within%, days, interval, ymd
data.table 1.14.8 3 first, last, set
forcats 1.0.0 3 %>%, fct_inorder, fct_reorder
magrittr 2.0.3 3 %$%, %<>%, %>%
stats 4.3.0 3 filter, lag, na.omit
crosstalk 1.2.0 2 filter_checkbox, filter_select
shiny 1.7.4 2 column, fluidRow
stringr 1.5.0 2 %>%, str_wrap
tibble 3.2.1 2 %>%, tribble
Hmisc 5.1.0 1 %nin%
arsenal 3.6.3 1 %nin%
cowplot 1.1.1 1 plot_grid
ggbeeswarm 0.7.2 1 geom_beeswarm
gghalves 0.1.4 1 geom_half_boxplot
methods 4.3.0 1 new
ordinal 2022.11.16 1 slice
readxl 1.4.2 1 read_xlsx
rms 6.7.0 1 ggplot
utils 4.3.0 1 read.csv
Current as of 2023-11-13 12:01:54