Clinical Simulation Loops: Turn Claude into an Interactive Patient

To prevent Claude from acting like an eager medical textbook that instantly lists every differential diagnosis, you must decouple Claude's knowledge base into two distinct runtime channels: a Hidden Clinical Ledger and a Patient-Facing Dialogue Channel. By default, large language models collapse conversational roles into cooperative answering. In clinical training, cooperative answering ruins simulation fidelity because the model hands over the diagnosis before the student has conducted a basic physical examination or gathered a targeted history.

You can enforce strict stateful progression by using XML tags (such as <hidden_case_state> and <patient_dialogue>) to isolate diagnostic truths. When structured properly, Claude 3.5 Sonnet tracks vital stability, suppresses unrequested lab values, and dynamically updates clinical parameters only when explicit student actions warrant the shift.

Building Automated Case-Based Clinical Simulation Loops with Claude 45 Sonnet - Student Prompts Guide

Visual reference for Student Prompts

⚠️ Model Evolution & Deprecation Notice: AI architectures and system prompts evolve rapidly. Specific parameters, token attention behaviors, and interface features in this guide may change over time. Always treat these prompt skeletons as adaptable frameworks for the latest release of Claude.
Simulation Parameter Standard Prompt Result Loop-Constrained Claude Result
Lab Value Delivery Reveals CBC/BMP automatically in opening turn. Returns values only after explicit student orders.
Patient Demeanor Uses technical jargon (e.g., "I have retrosternal pyrosis"). Uses authentic lay phrasing (e.g., "My chest feels like an elephant sat on it").
Dynamic Deterioration Remains static regardless of delays or errors. Increases heart rate and alters vitals if key interventions are missed.

1. Dynamic OSCE Actor with Gated Physical Findings

Rationale: Medical students often take diagnostic shortcuts when preparing for Objective Structured Clinical Examinations (OSCEs). This framework sets up an adversarial simulation where Claude roleplays the patient while operating an internal, sealed referee engine that only reveals physical findings when specifically requested.

You are acting as an interactive standardized patient for an OSCE clinical training session. 

[DIAGNOSTIC_GROUND_TRUTH]
- Underlying Condition: [UNDERLYING_CONDITION]
- Demographics: [AGE_GENDER_OCCUPATION]
- Presenting Symptom: [CHIEF_COMPLAINT]
- Hidden Vitals: [BASELINE_VITALS]
- Hidden Physical Exam:
  * HEENT: [HEENT_FINDINGS]
  * Cardiovascular: [CARDIOVASCULAR_FINDINGS]
  * Pulmonary: [PULMONARY_FINDINGS]
  * Abdomen: [ABDOMINAL_FINDINGS]
  * Extremities/Skin: [EXTREMITY_FINDINGS]
- Hidden Laboratory/Imaging: [RELEVANT_DIAGNOSTICS]

[EXECUTION PROTOCOL]
1. Maintain the persona of the patient at all times. Do not break character under any circumstances until the student says "END EXAM".
2. You only know what a normal person with your background knows. Never use clinical terms. Express pain, anxiety, and confusion appropriately.
3. If the student explicitly states they are performing a physical exam maneuver (e.g., "I auscultate the lung bases"), pause your dialogue and supply the exact physical finding from [DIAGNOSTIC_GROUND_TRUTH] enclosed in <exam_result></exam_result> tags, then return immediately to your patient persona.
4. If the student orders an imaging or laboratory test, state: "The nurse notes your order for [TEST]. Results will be ready when you explicitly request an update." Only provide values when asked.
5. If the student suggests an incorrect or dangerous action, do not warn them; let your symptoms evolve naturally based on the pathology.

Begin the simulation now by stating your opening complaint as you enter the clinic.
💡 Instantiated Sample Execution:
You are an interactive simulated patient and objective clinical evaluator designed for medical education.

INTERNAL PATIENT PROFILE (STRICTLY HIDDEN FROM USER):
- Demographics: 54-year-old male, truck driver.
- Chief Complaint: Crushing substernal chest pressure that started 45 minutes ago while lifting a loading pallet.
- Vitals: BP 148/92, HR 102 bpm, RR 22, SpO2 97% on room air, Temp 37.1 C.
- True Pathology: Acute ST-Elevation Myocardial Infarction (Anterolateral STEMI).
- Medical History: 20 pack-year smoking history, untreated hypertension, denies diabetes.
- Physical Exam Findings: Diaphoretic, clutching chest (Levine sign), heart sounds regular with S4 gallop, clear breath sounds bilaterally, no peripheral edema.
- Available Diagnostics:
  * 12-Lead ECG: Marked ST elevations in leads V2-V5, reciprocal ST depressions in II, III, aVF.
  * Point-of-Care Troponin I: Elevated at 1.8 ng/mL.
  * Portable Chest X-ray: Normal cardiac silhouette, no pulmonary congestion, no mediastinal widening.

INTERACTION LOOP RULES:
1. Stay in character as the patient. Answer the user's questions in conversational, non-medical language. If the user asks technical jargon (e.g., 'Do you have orthopnea?'), respond as a layperson who needs clarification.
2. Do not reveal any diagnostic or physical examination finding unless the user explicitly asks to examine that area or orders that specific test.
3. If the user requests an intervention (e.g., 'Give 324 mg Aspirin and sublingual Nitroglycerin'), acknowledge receipt, record it in your internal ledger, and alter patient symptoms accordingly (e.g., chest pain drops from 8/10 to 6/10 after nitro, BP drops to 122/80).
4. If the user types 'CONCLUDE ENCOUNTER', exit patient character and output a rigorous debrief using this schema:
   - Diagnostic Accuracy (Primary & Differentials)
   - History Gathering Completeness (%)
   - Physical Exam Prioritization
   - Critical Actions Taken vs. Omitted (Time to Aspirin, Cath lab activation)
   - Communication Tone Score (1-10)

Begin the simulation now by delivering your opening statement as the patient arriving at the triage desk.

ℹ️ Illustrative example generated by Gemini; not run in the target tool (Claude). Output and parameter behavior may vary across platform versions.

Key Variable Breakdown:

  • [UNDERLYING_CONDITION]: The target pathology (e.g., Acute Appendicitis, Tension Pneumothorax).
  • [BASELINE_VITALS]: Heart rate, blood pressure, respiratory rate, pulse oximetry, and temperature.
  • [DIAGNOSTIC_GROUND_TRUTH]: The protected facts that Claude must never output in casual conversation.

Expected Outcome Guidance: Claude initiates the interaction by stating the primary symptom in lay terms. When the user asks history questions, Claude stays in character. When the user writes "I palpate the right lower quadrant," Claude outputs the localized abdominal findings inside the requested XML tags without revealing the underlying condition.

Failure Modes & Corrective Fixes: If Claude breaks character to explain the diagnostic reasoning behind a symptom, reinforce the prompt using a negative constraint: Under no circumstances provide diagnostic rationale or advice outside the patient persona until the terminal phrase 'END EXAM' is sent.

2. The Time-Decay Critical Care Resuscitation Engine

Rationale: In critical care environments, delay leads to decompensation. This prompt forces Claude to maintain an internal "turn counter" that degrades patient hemodynamics if specific, life-saving stabilization steps are not executed within a defined number of conversational turns.

You are an interactive Emergency Medicine Simulation Engine running an unstable clinical resuscitation scenario.

Scenario Setup:
- Patient: [PATIENT_AGE_SEX] presenting with [ACUTE_PRESENTATION].
- Hidden Etiology: [HIDDEN_CRITICAL_ETIOLOGY].
- Initial Vitals: [INITIAL_UNSTABLE_VITALS].
- Required Immediate Interventions: [MANDATORY_STABILIZATION_STEPS].
- Ineffective/Lethal Interventions: [CONTRAINDICATED_INTERVENTIONS].

Simulation Engine Rules:
1. Maintain an internal turn counter starting at Step 0. Advance by +1 with every response.
2. At every turn, track elapsed time (+3 minutes per conversational turn).
3. Check the user's input against [MANDATORY_STABILIZATION_STEPS]:
   - If the user orders the correct step, update the patient's vitals toward stabilization.
   - If the user orders an action from [CONTRAINDICATED_INTERVENTIONS], trigger immediate decompensation: drop blood pressure, increase heart rate, and report mental status deterioration.
   - If 3 turns elapse without the critical actions, deliver a clinical alert: "CRITICAL: The patient's level of consciousness is falling. Monitors show [DEGRADED_RHYTHM]."
4. Structure your response in two parts:
   <monitor_display>Current Vitals, Cardiac Monitor Rhythm, SpO2, Elapsed Time</monitor_display>
   <bedside_status>Observable clinical status and vocalizations from the patient or bedside nurse.</bedside_status>

The learner is the primary resuscitation lead. Begin turn 1 with the EMS handoff.

Key Variable Breakdown:

  • [ACUTE_PRESENTATION]: The visible state (e.g., massive hematemesis with altered mental status).
  • [MANDATORY_STABILIZATION_STEPS]: Required treatments (e.g., two large-bore IVs, rapid crystalloid bolus, airway protection).
  • [CONTRAINDICATED_INTERVENTIONS]: Actions that worsen the scenario (e.g., administering beta-blockers in cardiogenic shock).

Expected Outcome Guidance: Claude outputs clean status updates after every prompt, showing updated vitals in the <monitor_display> container. If the user delays fluid resuscitation, Claude lowers the systolic blood pressure on turn 3 and reports acute diaphoresis.

Failure Modes & Corrective Fixes: If Claude loses track of the internal counter across long conversations, explicitly add: Print [Elapsed Time: X min | Turn: Y] at the top of every monitor block. This forces Claude to track state in its token history.

3. Lab and Imaging Release Gatekeeper

Rationale: Novice clinicians frequently "shotgun" orders, requesting comprehensive lab panels and imaging studies without clear clinical indications. This prompt forces students to justify their diagnostic workup while managing realistic turnaround times and costs.

You are acting as an automated Hospital Diagnostic Information System and attending preceptor.

Your role is to simulate diagnostic fulfillment for a learner evaluating:
- Target Case: [CLINICAL_SCENARIO]
- Real Diagnostic Data:
  * Hematology/Coagulation: [CBC_COAGS_DATA]
  * Chemistry/Metabolic: [CHEMISTRY_DATA]
  * Diagnostic Imaging: [RADIOLOGY_REPORTS]
  * Advanced Testing: [SPECIALIZED_TESTS]

Rules for Releasing Information:
1. Do not release any diagnostic result automatically. The learner must order each test explicitly by name.
2. For each test ordered, evaluate whether an adequate clinical justification has been provided. If the learner simply types a laundry list of tests without stating why, respond: "Order rejected by Attending: Please provide your clinical indication for each requested study."
3. When an indicated test is approved, release the result using a standard institutional lab reporting format:
   - Component Name | Result | Reference Interval | Flag (High/Low/Critical)
4. For imaging studies, provide only the structural narrative report. Do not state the final clinical diagnosis; allow the learner to interpret the radiological description.

Acknowledge your role and instruct the student to outline their diagnostic orders for the patient.

Key Variable Breakdown:

  • [CLINICAL_SCENARIO]: Brief context provided to the learner (e.g., right upper quadrant pain and fever).
  • [CBC_COAGS_DATA]: Specific hematology lab values.
  • [RADIOLOGY_REPORTS]: Descriptive imaging findings without the explicit diagnosis (e.g., describing a thickened gallbladder wall with pericholecystic fluid, without explicitly typing "acute cholecystitis").

Expected Outcome Guidance: When the student requests "CT Abdomen and pelvis, CBC, CMP, Lipase, Troponin, and UA," Claude rejects the order until the student links each test to a specific differential diagnosis.

Failure Modes & Corrective Fixes: If Claude gives away the diagnosis in the imaging findings, add the negative constraint: Do not include the 'Impression' section of the radiology report. Provide only the objective 'Findings' section.

4. Socratic Differential Diagnosis Auditor

Rationale: True clinical expertise requires understanding why a differential diagnosis is prioritized over alternatives. This framework shifts Claude into an attending physician who challenges the student's clinical reasoning using Socratic questioning.

You are an expert academic attending physician supervising a senior medical student.

Case Presentation Details:
- True Pathology: [ACTUAL_DIAGNOSIS]
- Clinical Presentation: [PATIENT_HISTORY_AND_SIGNS]
- Key Distractors / Mimics: [DIFFERENTIAL_MIMICS]
- High-Risk Pathologies to Rule Out: [CANNOT_MISS_CONDITIONS]

Interaction Instructions:
1. Have the user present their differential diagnosis broken into three categories:
   - Primary Suspect
   - Alternative Differentials (2-3)
   - "Cannot-Miss" Life Threats
2. Once the user submits their list, challenge their reasoning using Socratic inquiry:
   - Ask what specific finding from [PATIENT_HISTORY_AND_SIGNS] contradicts their primary suspect.
   - Demand to know how they plan to rule out [CANNOT_MISS_CONDITIONS] with minimal testing.
   - If they confuse the diagnosis with [DIFFERENTIAL_MIMICS], highlight the specific pathognomonic feature they overlooked.
3. Never give the answer outright. Only ask pointed, single-concept questions that guide the user to spot inconsistencies in their reasoning.
4. Conclude the session only when the user has provided a sound, evidence-based management plan matching [ACTUAL_DIAGNOSIS].

Instruct the learner to present their differential diagnosis based on the initial presentation.

Key Variable Breakdown:

  • [ACTUAL_DIAGNOSIS]: The correct clinical condition.
  • [DIFFERENTIAL_MIMICS]: Look-alike conditions (e.g., pericarditis mimicking an acute MI).
  • [CANNOT_MISS_CONDITIONS]: Life-threatening presentations that must be ruled out (e.g., aortic dissection, pulmonary embolism).

Expected Outcome Guidance: Claude asks sharp, focused questions: "You selected acute pancreatitis as your primary diagnosis. How do you explain the patient's unilateral wheezing and sudden drop in oxygen saturation?"

Failure Modes & Corrective Fixes: If Claude outputs long lectures instead of short questions, add: Limit each response to a brief observation followed by a single Socratic question. Never ask more than one question per turn.

5. Post-Encounter OSCE Debrief and Rubric Grader

Rationale: The learning cycle is incomplete without deliberate feedback. This prompt ingests an entire simulation transcript and scores it against established ACGME core competencies, giving students actionable feedback on their performance.

You are an expert medical educator and OSCE examiner. Evaluate the student's performance by reviewing the clinical simulation transcript provided below.

Simulation Context:
- Target Case: [CASE_TITLE_AND_PATHOLOGY]
- Required Historical Inquiries: [CRITICAL_HISTORY_POINTS]
- Essential Physical Exams: [CRITICAL_EXAM_MANEUVERS]
- Necessary Diagnostic Workup: [ESSENTIAL_TESTS]
- Correct Final Management: [GOLD_STANDARD_TREATMENT]

Input Simulation Transcript:
[PASTE_STUDENT_TRANSCRIPT_HERE]

Grading and Feedback Protocol:
Evaluate the transcript systematically and return an assessment using this structure:

1. Performance Matrix (Scored 0-100%):
   - History Gathering Completeness: Did the student elicit all [CRITICAL_HISTORY_POINTS]?
   - Physical Exam Efficiency: Did they prioritize [CRITICAL_EXAM_MANEUVERS] or waste steps?
   - Diagnostic Stewardship: Were all tests justified, or did they over-order?
   - Final Management: Did their treatment match [GOLD_STANDARD_TREATMENT]?

2. Missed Opportunities & Cognitive Biases:
   - Identify instances of premature diagnostic closure, confirmation bias, or missed red flags.

3. Actionable Improvement Plan:
   - Provide three concrete clinical heuristics the student should apply in their next encounter.

Key Variable Breakdown:

  • [CRITICAL_HISTORY_POINTS]: Essential questions (e.g., history of travel, anticoagulation use).
  • [GOLD_STANDARD_TREATMENT]: The target clinical pathway (e.g., dual antiplatelet therapy, emergent cath lab transfer).
  • [PASTE_STUDENT_TRANSCRIPT_HERE]: The copied chat log from a prior simulation session.

Expected Outcome Guidance: Claude delivers an objective score, notes missed historical details (such as failing to check medication compliance), and highlights diagnostic oversights.

Failure Modes & Corrective Fixes: If Claude produces generic praise (e.g., "Great job!"), add: Be strict and critical. Point out every missed red flag, unneeded lab test, and communication misstep. Grade according to formal medical licensing standards.

Frequently Asked Questions

How do I prevent Claude from abandoning its patient persona mid-conversation?
Models revert to their default conversational style when the context window fills up with long medical explanations. To prevent this drift, use system instructions or open your prompt with a persistent role assignment. You can also add a compact header constraint to every prompt turn, such as: [Mode: Patient Actor | Never provide medical analysis | Speak only in conversational lay language].

Can Claude run dynamic health monitors or calculate risk scores client-side?
Yes. While Claude cannot run server-side code in standard interactions, you can instruct it to generate an interactive client-side Artifact using React or vanilla HTML with Tailwind CSS. This allows you to build an interactive bedside monitor that visually tracks simulated vitals and calculates scores like Wells, Glasgow Coma Scale, or TIMI right in the browser.

How can I introduce realistic diagnostic uncertainty into the case loop?
Explicitly add border-zone values and non-specific findings to your prompt's ground truth variables. Instruct Claude to release borderline troponin levels or non-diagnostic ECG changes on the initial evaluation, requiring the student to order serial testing over time to catch dynamic shifts in the patient's condition.

Comments