Inspiration

Clinical simulation can reveal whether a learner succeeded or failed, but feedback often arrives after the scenario has ended and rarely lets the learner immediately practice the exact decision that failed.

CrisisLoop Clinical was inspired by a simple educational question:

What if a clinical error could become an immediate, measurable learning loop?

The product transforms one failed attempt into four stages:

Fail → Understand → Replay → Improve

What it does

CrisisLoop Clinical is an adaptive clinical crisis simulator.

The current scenario presents an occult postoperative hemorrhage with progressive hypoperfusion. The learner observes the patient, advances time, performs interventions, and receives deterministic consequences.

The platform then:

  1. records every action, omission, and delay;
  2. calculates a deterministic score;
  3. identifies the critical decision failure;
  4. uses GPT-5.6 to explain the verified performance data;
  5. reconstructs the scenario from a calculated checkpoint before the failure;
  6. lets the learner retry the critical decisions;
  7. compares both attempts across score, harm, omissions, and timing.

In the validated public workflow, the learner improved from 22/100 to 90/100, producing:

  • a +68 point score improvement;
  • 25 points less harm;
  • 3 corrected critical omissions;
  • 0 new omissions;
  • a deterministic classification of IMPROVED.

How we built it

The frontend uses React, TypeScript, and Vite. The backend uses Python, FastAPI, Pydantic, and the OpenAI API.

The architecture deliberately separates simulation truth from AI explanation.

A deterministic engine controls:

  • physiological progression;
  • vital signs;
  • intervention effects;
  • safety rules;
  • scoring;
  • critical-failure detection;
  • replay timing;
  • patient harm;
  • pre/post comparison.

GPT-5.6 receives only the verified timeline, deterministic score, omissions, and replay checkpoint. It generates structured multilingual educational coaching, but it cannot modify physiology, scores, outcomes, or replay timing.

How we used Codex

Codex performed the final production-readiness audit of the repository.

It identified and repaired a production-relevant API and test deadlock, strengthened asynchronous GPT-5.6 structured-output handling, added service-boundary coverage, synchronized dependencies, improved environment and deployment guidance, and corrected submission-facing documentation.

Codex also reviewed its own changes and ran the final validation:

  • 44 backend and API tests passing;
  • frontend lint passing with 0 warnings and 0 errors;
  • frontend production build successful;
  • no actionable regressions identified.

The audited changes are preserved in commit:

cf4f4ab — fix: apply Codex production audit improvements

Codex session ID:

019f8343-81f8-7782-9523-d7ae8fa4b3a4

Challenges we faced

Separating AI from simulation truth

Allowing a language model to control physiology, scoring, or patient outcomes would reduce reproducibility. We therefore restricted GPT-5.6 to grounded explanation based on verified deterministic data.

Reconstructing a meaningful replay

Replay is not a simple reset. CrisisLoop must create a new session at a prior deterministic state, remove future failed actions, preserve the original result, and allow a corrected attempt.

Measuring learning

The platform needed to distinguish genuine improvement from simply completing a replay. We therefore compare score, harm, omissions, and action timing between two verified simulation sessions.

Production deployment

The frontend and backend were deployed separately on Vercel and Render, requiring environment configuration, CORS validation, structured error handling, and public end-to-end testing.

Accomplishments that we are proud of

  • Built a complete browser-based learning loop.
  • Preserved deterministic clinical control.
  • Integrated GPT-5.6 using validated structured output.
  • Implemented replay from a calculated pre-failure checkpoint.
  • Quantified improvement between attempts.
  • Deployed a functional public MVP.
  • Reached 44 passing automated tests after the Codex audit.
  • Demonstrated an objective improvement from 22/100 to 90/100.

What we learned

AI feedback becomes more useful when it is connected to an immediate opportunity to act differently.

We also learned that trustworthy AI architecture requires explicit boundaries:

AI explains. Deterministic code decides.

What's next

Future development could include:

  • additional clinical crisis scenarios;
  • faculty scenario-authoring tools;
  • persistent learner histories;
  • adaptive difficulty;
  • team-based simulations;
  • institutional analytics;
  • longitudinal competency tracking;
  • prospective educational validation;
  • integration with procedural and sensor-based simulation systems.

Safety

CrisisLoop Clinical is an educational simulation prototype.

It is not a medical device, diagnostic system, clinical decision-support system, or substitute for professional supervision. It must not be used for real patient care.

Built With

  • clinical
  • codex
  • fastapi
  • gpt-5.6
  • httpx
  • medicaleducation
  • openai
  • pydantic
  • pytest
  • python
  • react
  • render
  • simulation
  • typescript
  • vercel
  • vite
Share this project:

Updates