Background: Code status discussions (CSDs) are essential but often inadequate in routine clinical practice. Simulation with standardized patients (SPs) can address CSD skills, but is resource-intensive and not widely available. As a result, many learners lack sufficient training in these difficult conversations. This study examined how artificial intelligence (AI)-driven simulation might enhance CSD training.

Methods: Following a lecture on effective CSDs, postgraduate year 2 (PGY-2) and 3 (PGY-3) internal medicine residents were randomized to the intervention or control group. Intervention residents engaged in one-on-one simulated CSDs with ChatMD, a novel AI chatbot, beginning with one hour of faculty-supervised practice and feedback, followed by one hour of independent practice. Control residents received usual clinical training. Eight weeks later (SD ± 2 weeks), all residents performed a CSD with an SP, graded by blinded SPs using a modified, validated checklist assessing general and CSD-specific communication skills. Open-ended survey responses from intervention residents were analyzed thematically using Braun and Clarke’s framework.

Results: Thirty-one out of 41 (75%) eligible residents enrolled, 25 of whom completed the study. Intervention residents (n=14) scored higher than control residents (n=11) on the overall checklist (72.5% vs. 66.0%, respectively, p=0.347). There was a larger difference in performance on CSD-specific skills, suggesting a trend toward improved performance among intervention residents (71.4% vs. 57.6%, p=0.145). Qualitative analysis revealed that residents valued ChatMD’s psychological safety, convenience, and opportunities for deliberate practice, while suggesting enhancements in emotional realism and AI-generated feedback. Additionally, residents reported ChatMD bolstered confidence in conducting CSDs and motivation to focus on eliciting patients’ goals and values.

Conclusions: In this proof-of-concept study, AI-based simulation was practical, scalable, and well-received by learners, offering a promising new avenue for training in complex ethical discussions.

IMAGE 1: Study flow diagram of the participation of internal medicine PGY2 and PGY-3 residents.

IMAGE 2: Resident perceptions of ChatMD for code status discussions discussions (7-point Likert; 1 = strongly disagree, 7 = strongly agree).