Abstract
Background:
Hospitalized patients with serious illnesses often lack code status documentation, increasing the risk of goal-discordant care during hospitalization.
Local Problem:
Patients with a prior preference for do-not-attempt-resuscitation (DNAR) sometimes lacked a code status order during subsequent encounters, creating a patient safety risk of undesired resuscitation in the event of cardiac arrest.
Intervention:
In May 2025, we developed an electronic health record (EHR) alert to prompt code status discussion for hospitalized medicine patients with prior DNAR or partial code.
Methods:
We compared the proportion of patients with active code status during admission and timing of order before and after intervention.
Results:
Of 713 patients with prior DNAR or partial code status, the percentage with an active code status order increased following implementation (96.4% vs. 89.6%, p < 0.001). Only 6.1% of code status orders were placed within five minutes of alert. Median time from admission to first order increased post-implementation (eight vs. seven hours, p = 0.03).
Conclusions:
An EHR alert to prompt code status discussions in patients with prior DNAR or partial code status increased code status order documentation. Further studies could explore expanding alerts to other services and assessing impact on goal-concordant care.
Keywords
Introduction
Discussing code status with seriously ill patients is essential for goal-concordant care. 1 Despite its recognized importance, many patients with a poor prognosis lack documented code status orders.2–5 Patients who express a preference for do-not-attempt-resuscitation (DNAR) but do not have corresponding orders in place are at risk of receiving unwanted resuscitation during cardiac arrest. At our institution, this potential risk was further amplified by system-level factors: Code status orders were limited to inpatient encounters, did not carry forward across admissions or settings, and defaulted to full code in the absence of a newly entered order—regardless of previously documented preferences.
While clinician-level barriers, including limited time and insufficient training, contribute to gaps in code status documentation,6,7 system-level challenges also play a critical role. We hypothesized that features of the local electronic health record (EHR) made it challenging for clinicians to identify patients with prior DNAR or partial code (select advanced cardiovascular life support (ACLS) interventions) preferences. Prior studies have evaluated EHR-based alerts to prompt goals of care discussions or resuscitation orders in selected high-risk populations—such as patients with metastatic cancer, those with predicted poor prognosis, and nursing home residents—with mixed results.8–12 However, there is limited evidence on the use of EHR alerts to prompt code status discussions among general medicine inpatients with previously expressed restrictive resuscitation preferences across a broad range of diagnoses.
Although code status preferences may evolve over time, 13 patients with prior restrictive preferences may be particularly vulnerable to receiving non-goal-concordant care if code status is not revisited during hospitalization. To address this gap, we developed an EHR-based alert to identify hospitalized medicine patients with prior DNAR or partial code preferences, with the aim of increasing the placement of active code status orders during subsequent admissions. This intervention offers a scalable, systems-based approach to integrating prompts for code status ordering into routine workflows beyond the specialty palliative care settings.
Methods
We conducted a retrospective cohort study with a pre–post intervention analysis at a 1000-bed tertiary academic medical center from March 14, 2025, to September 13, 2025. The study was deemed exempt by the University of Michigan Institutional Review Board (#HUM00272822). Adult patients (≥18 years old) admitted to internal medicine or family medicine who had a prior DNAR or partial code status and no current code status were included; surgical admissions were excluded. At the study site, code statuses are inactivated after discharge, and a new code status needs to be ordered for each admission; there is no hard stop for code status entry on admission. Both general and intensive care unit (ICU) admissions were included.
During the intervention period, an Epic “OurPractice Advisory” (OPA) disruptive alert notified physicians and advanced practice providers at chart opening if eligible patients lacked an active code status. The alert additionally summarized prior DNAR/partial code status, listed up to five most recent code status orders, and urged discussion with the patient prior to order placement, as preferences can change. An option to order code status directly from the alert was intentionally omitted. Users cleared the OPA by selecting one of the following: Remind me next time the chart is opened or in six hours, provider to discuss, reviewing the chart as a consultant, or other. If a user selected “remind me,” the OPA would reappear when the chart was opened at the specified time interval by that user; the alert would not reappear for the individual user if another acknowledgment reason was selected. The OPA was designed by a multidisciplinary group of stakeholders, approved by appropriate hospital committees, and tested for function prior to implementation.
We collected data for two months pre- and post-alert implementation (May 14, 2025). Each admission was treated as a unique encounter. Patient variables included age, sex, race, ethnicity, need for an interpreter, Charlson Comorbidity Index 14 score, and if last code status was DNAR or partial. Encounter variables included time in the ICU; presence, type, and number of code status orders; and time from admission to first code status. OPA metrics included alert frequency, acknowledgment choice, and time from alert to order.
The primary outcome was the proportion of patients with any active code status during admission. Secondary outcomes included time from admission to first code status order and percentage of orders within five minutes of OPA trigger. Descriptive statistics were summarized as median (interquartile range [IQR]) for continuous variables and count (percentage) for categorical variables. The Wilcoxon rank test, Fisher’s exact test, and chi-square tests were applied to compare differences between pre- and post-interventions. Statistical significance was defined as p < 0.05. All analyses were performed using RStudio software version 2024.09.0 (Boston, MA, United States).
Results
Of 7353 admissions, 713 (9.7%) had a prior DNAR or partial code order with no difference in frequency pre- versus post-OPA (347/3539 (9.8%) vs. 366/3814 (9.6%), p = 0.76). Table 1 describes demographics of the sample. There was no difference in baseline characteristics across the study period. Slightly over half of eligible patients (406/713, 56.9%) had a most recent code status of DNAR or partial code; the remainder had a prior DNAR or partial code, but their most recent status was full code.
Patient Characteristics with Comparison by Pre- and Post-Electronic Health Record Alert
Wilcoxon rank sum test; Pearson’s chi-squared test; Fisher’s exact test.
DNAR, do-not-attempt-resuscitation; ICU, intensive care unit; IQR, interquartile range.
After OPA implementation, 7.7% of all admissions (295/3814) and 80.6% of eligible patients (295/366) triggered the alert, with a median of two alerts per encounter (IQR: 1, 4). Providers most often acknowledged the alert as “reviewing chart only as consultant” (53.6%), followed by “remind me the next time I open the chart” (23.5%) and “provider to discuss” (19.8%). Median time from alert to order was 58 minutes (IQR: 26, 129).
Table 2 compares code status ordering during hospital encounters before and after OPA implementation. Active code status orders increased from 89.6% (311/347) to 96.4% (353/366) after OPA implementation (p < 0.001), with no significant change in code status order type or number. There was no difference in proportion of patients with final DNAR or partial code status after intervention (180/366 (49.2%) vs. 166/347 (47.8%), p = 0.76). Median time from admission to first order increased post-OPA (eight vs. seven hours, p = 0.03). Only 6.1% of orders were placed within five minutes of OPA firing (18/295).
Comparison of Code Status Orders Pre- and Post-Electronic Health Record Alert
Wilcoxon rank sum test; Pearson’s chi-squared test; Fisher’s exact test.
Discussion
In this study, EHR alerts targeting medicine patients with prior DNAR or partial code led to increased code status orders during admission. Our results support the use of EHR-based nudges to encourage code status orders in patients who have expressed prior restrictive resuscitation preferences, even in settings with high baseline ordering rates. While we saw no change in the proportion of restrictive code orders after implementation, the EHR alert could serve as a patient safety tool to circumvent avoidable harm—mainly undesired resuscitation in the event of cardiac arrest. Only a few clinicians ordered code status immediately after the alert, suggesting the alert did not encourage reflexive action without discussion.
Our findings align with previous research showing that EHR alerts improve code status documentation in targeted groups, such as patients with advanced cancer. 12 Unlike prior work, our study demonstrates that EHR prompts can also be effective for broader, high-risk populations defined by prior DNAR or partial code preference, rather than specific diagnoses. Notably, the baseline rate of code status orders in our study (almost 90%) is higher than in other studies of hospitalized adults.3,4 Despite a high baseline rate, our results suggest that EHR prompts can reinforce good practice and support review of patient code status preference. For example, physicians may have already discussed code status but forgotten to place the order in the EHR, making the alert a timely reminder. The effect of an alert for clinicians less accustomed to discussing code status regularly or in non-medical patients is unknown.
While the goal of the intervention was to increase code status orders and decrease the risk of goal-discordant care in the event of cardiac arrest, a potential negative outcome was that providers might reflexively assume stability in patient preference and order DNAR without discussion. Fewer than 10% of patients had a code status ordered within five minutes of OPA, indicating minimal unintended effects; the observed longer post-implementation time from admission to first order also argues against reflexive ordering driven by OPA. In contrast to other studies that utilized clinical decision support to reconcile code status at the end of hospitalization, we did not find an increase in the total number of DNAR or partial code status orders post-intervention. 15 It is unknown if or how the alert impacted code status discussions, given the outcome measured was the presence of a code status order. More work is needed to understand the impact of the alert on the quality of code status discussions and to determine whether orders accurately reflect patients’ wishes.
A risk with any EHR alert is disruption of workflow and alert fatigue. We adapted several principles such as utilizing a multidisciplinary design group, testing prior to implementation, and having a feedback option to optimize the OPA.16,17 While efforts were made to limit the alert to users who would be responsible for code status orders, over half of users acknowledged the OPA as not applying to them as consultants, suggesting adjustments are still needed to optimize functionality.
There were several limitations to our study. First, our scope was limited to medicine services with high baseline code status orders; the impact of the OPA on patients admitted to other services or targeted to providers less frequently addressing code status is unknown. Due to variability in code status options across institutions and states, our findings may not be generalizable to other hospital systems, particularly those who utilize outpatient code statuses or require a hard stop code status entry on admission. Our primary outcome was limited to the placement of an active code status order; we did not assess the quality of the code status discussions or if order was concordant with a patient’s true preference. Similarly, we did not assess if the OPA impacted goal-concordant care and interventions in the event of cardiac arrest.
In conclusion, an automated EHR alert to nudge providers to discuss code status in admitted patients with a prior DNAR or partial code preference led to an increase in active code status orders in medicine patients and has the potential to improve patient safety. This EHR intervention has the potential to be expanded to and adapted by other specialties with targeted education and prompts tailored to local needs. Further studies could additionally examine the impact of such an EHR prompt on patient and family experience along with the impact on goal concordant care in the event of cardiac arrest.
Authors’ Contributions
E.J. conceptualized and designed the study; led data collection, analysis, and interpretation; drafted the initial article; reviewed and revised the article; and approved the final article as submitted. R.K., A.X., S.S., and M.S. contributed to conceptualization and design of study, drafted initial article, reviewed and revised the article. and approved the final article as submitted. S.T. contributed to the design of the study, conducted analysis and interpretation of data, reviewed and revised the article, and approved the final article as submitted.
Disclosures
Declaration of generative artificial intelligence (AI) and AI-assisted technologies in the writing process: During the preparation of this work, the authors used U-M GPT to edit text for clarity. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the content of the publication.
Ethical Approval
This study was exempted by the University of Michigan Institutional Review Board.
Footnotes
Acknowledgments
Declaration of generative AI and AI-assisted technologies in the writing process: During the preparation of this work, the authors used U-M GPT to edit text for clarity. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the content of the article.
Author Disclosure Statement
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding Information
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
