Tashae DeWalt
2026-08-05
Do patients of different racial/ethnic groups receive different intensities of medication categories, and does this relate to length of stay (LOS)?
Pharmacogenomics (PGx) research has historically underrepresented minority groups, limiting our understanding of how treatment decisions and medication intensity may differ across racial and ethnic populations. The CYP-GUIDES clinical trial provides a rare opportunity to examine these patterns in a real-world psychiatric inpatient setting.
Recent analyses of CYP-GUIDES show: - Race/ethnicity was significantly associated with readmission rates (RAR), indicating meaningful differences in clinical outcomes across groups. - Latino patients had significantly shorter LOS than White patients (p = 0.002), suggesting LOS varies by race even under similar treatment conditions. - Poor metabolizers receiving PGx-guided treatment had LOS reduced by 5.6 days, demonstrating that treatment intensity and drug-gene interactions directly affect LOS. - Drug-gene interaction prevalence was 40%, with significantly fewer interactions in Black patients (p < 0.001), highlighting racial differences in medication response.
The CYP-GUIDES dataset reveals significant racial differences in LOS, readmission rates, and drug-gene interactions. Because medication intensity is a core component of psychiatric treatment, examining whether racial/ethnic groups receive different intensities—and whether these patterns relate to LOS—provides critical insight into potential disparities in psychiatric care. This analysis helps clarify how treatment decisions intersect with race, diagnosis, and pharmacogenomic variability.
ggplot(ehrdata, aes(category_count)) +
geom_histogram(bins = 20, fill = "#FFB7C5", color = "white") +
theme_minimal()This histogram displays how many medication categories patients typically receive. Most patients fall within lower intensity ranges, but a meaningful subset receives multiple categories. This establishes the foundation for the high‑intensity variable.
ggplot(ehrdata, aes(high_intensity, LOS)) +
geom_boxplot(fill = "#C8A2C8", color = "black", size = 1.2, outlier.alpha = 0.4) +
coord_cartesian(ylim = c(0, 300)) + # zoom in on the meaningful range
labs(
x = "Medication Intensity",
y = "Length of Stay (LOS)",
title = "LOS by Medication Intensity"
) +
theme_minimal(base_size = 18)High‑intensity patients have noticeably higher LOS. This suggests that receiving multiple medication categories may be associated with longer hospitalization, directly addressing part of the research question.
ggplot(ehrdata, aes(RACE.ETHNICITY, fill = high_intensity)) +
geom_bar(position = "fill") +
scale_fill_manual(values = c("0" = "#FFB7C5", "1" = "#C8A2C8")) +
coord_flip() +
theme_minimal()This plot shows the proportion of high‑intensity treatment within each racial/ethnic group. Differences in bar height indicate variation in treatment intensity across groups, suggesting possible disparities in prescribing patterns.
diagnosis_summary <- ehrdata %>%
group_by(Diagnosis) %>%
summarize(
n = n(),
mean_LOS = mean(LOS, na.rm = TRUE),
mean_category_count = mean(category_count, na.rm = TRUE),
prop_high_intensity = mean(high_intensity == 1, na.rm = TRUE)
)
kable(diagnosis_summary)| Diagnosis | n | mean_LOS | mean_category_count | prop_high_intensity |
|---|---|---|---|---|
| Depression, unspecified type | 5 | 159.6000 | 0.8000000 | 0.2000000 |
| MDD, recurrent episode with anxious distress | 16 | 169.3750 | 0.1875000 | 0.0000000 |
| Adjustment Disorder With Depressed Mood | 1 | 145.0000 | 0.0000000 | 0.0000000 |
| Bipolar II Disorder | 1 | 84.0000 | 1.0000000 | 0.0000000 |
| Depression | 5 | 290.0000 | 0.4000000 | 0.0000000 |
| Depression with suicidal ideation | 2 | 314.5000 | 0.0000000 | 0.0000000 |
| Depressive Disorder NOS | 265 | 163.3208 | 0.4113208 | 0.0641509 |
| Dissociative Disorder NOS | 1 | 121.0000 | 0.0000000 | 0.0000000 |
| MDD | 115 | 246.7130 | 0.2608696 | 0.0347826 |
| MDD, Recurrent, Chronic | 13 | 154.7692 | 0.3076923 | 0.0769231 |
| MDD, Recurrent, Mild | 2 | 284.5000 | 0.0000000 | 0.0000000 |
| MDD, Recurrent, Moderate | 16 | 164.3750 | 0.4375000 | 0.0625000 |
| MDD, Recurrent, Severe With Psychotic Features | 84 | 180.9167 | 0.2738095 | 0.0357143 |
| MDD, Recurrent, Severe Without Psychotic Features | 320 | 180.4406 | 0.3187500 | 0.0437500 |
| MDD, Recurrent, Unspecified | 243 | 161.3745 | 0.3415638 | 0.0534979 |
| MDD, Single Episode, Mild | 2 | 63.0000 | 1.0000000 | 0.0000000 |
| MDD, Single Episode, Moderate | 5 | 95.0000 | 0.0000000 | 0.0000000 |
| MDD, Single Episode, Severe With Psychotic Features | 114 | 177.3333 | 0.4824561 | 0.0877193 |
| MDD, Single Episode, Unspecified | 26 | 130.3462 | 0.5769231 | 0.1153846 |
| MDD, Single Episode,Severe Without Psychotic Features | 238 | 159.3277 | 0.3781513 | 0.0462185 |
| MDD, recurrent episodes | 2 | 519.0000 | 0.0000000 | 0.0000000 |
| MDD, recurrent, severe | 10 | 187.0000 | 0.0000000 | 0.0000000 |
| MDD, recurrent, severe with atypical features | 1 | 42.0000 | 1.0000000 | 0.0000000 |
| MDD, single episode with psychotic features, mood-conguent | 1 | 135.0000 | 0.0000000 | 0.0000000 |
| Major depression, melancholic type | 1 | 91.0000 | 1.0000000 | 0.0000000 |
| Major depressive disorder, recurrent episode with anxious distress | 1 | 429.0000 | 0.0000000 | 0.0000000 |
| Major depressive disorder, recurrent episode, severe, with psychosis | 1 | 73.0000 | 0.0000000 | 0.0000000 |
| Major depressive disorder, recurrent, with postpartum onset | 1 | 113.0000 | 0.0000000 | 0.0000000 |
| Mood Disorder NOS | 1 | 188.0000 | 0.0000000 | 0.0000000 |
| Schizoaffective Disorder | 1 | 91.0000 | 1.0000000 | 0.0000000 |
| Severe episode of recurrent major depressive disorder, without psychotic features | 5 | 189.6000 | 0.6000000 | 0.2000000 |
| Unspecified Depressive Disorder | 1 | 2685.0000 | 0.0000000 | 0.0000000 |
Diagnosis strongly influences LOS and medication intensity. This table helps contextualize whether racial differences may be partially explained by diagnostic distribution.
ggplot(diagnosis_summary, aes(Diagnosis, mean_LOS, group = 1)) +
geom_line(color = "#FF69B4", size = 1.2) +
geom_point(color = "#FF69B4", size = 3) +
coord_flip() +
theme_minimal()## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
Some diagnoses are associated with substantially longer LOS. This highlights the importance of accounting for diagnosis when interpreting racial differences in LOS or treatment intensity.
long_med <- ehrdata %>%
select(ID, RACE.ETHNICITY, all_of(med_cols)) %>%
pivot_longer(cols = med_cols, names_to = "Category", values_to = "Given")## Warning: Using an external vector in selections was deprecated in tidyselect 1.1.0.
## ℹ Please use `all_of()` or `any_of()` instead.
## # Was:
## data %>% select(med_cols)
##
## # Now:
## data %>% select(all_of(med_cols))
##
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## `summarise()` has regrouped the output.
## ℹ Summaries were computed grouped by RACE.ETHNICITY and Category.
## ℹ Output is grouped by RACE.ETHNICITY.
## ℹ Use `summarise(.groups = "drop_last")` to silence this message.
## ℹ Use `summarise(.by = c(RACE.ETHNICITY, Category))` for per-operation grouping
## (`?dplyr::dplyr_by`) instead.
ggplot(heat_data, aes(Category, RACE.ETHNICITY, fill = count)) +
geom_tile() +
scale_fill_gradient(low = "#FFE6F2", high = "#FF69B4") +
theme_minimal()This heatmap visualizes how often each racial/ethnic group receives each medication category. Darker shades indicate higher frequency. This reveals category‑level prescribing patterns and adds nuance beyond the high‑intensity variable.
Author/Organization. (2021). Clinical Dataset of the CYP-GUIDES Trial. Retrieved from Kaggle: https://www.kaggle.com/datasets/shashwatwork/clinical-dataset-of-the-cypguides-trial/discussion?sort=hotness