Inspiration
Specialist referral triage is repetitive, high-volume and clinically consequential. Important facts are buried in narrative text, urgency policies are difficult to apply consistently, and the reasoning behind a decision is rarely captured in a reusable form.
Clinical Referral Copilot explores a safer pattern for healthcare AI: AI structures and explains; a clinician decides.
What it does
The copilot turns a synthetic gastroenterology referral into:
- structured clinical facts;
- a recommended urgency and timeframe;
- evidence linked to exact phrases in the referral;
- transparent synthetic rule labels;
- missing information and uncertainty;
- a suggested pathway; and
- an explicit clinician approve, edit or reject decision.
The interface also includes a small synthetic evaluation dashboard, a safety case, identifier blocking and a narrative-free session audit trail.
How we built it
The project is a clean-room Next.js and TypeScript application. A server-side route calls GPT-5.6 through the OpenAI Responses API with medium reasoning effort, store: false and strict JSON Schema output. The user interface renders predictable structured fields and lets users cross-highlight each model reason against its exact source phrase.
A deterministic demonstration engine keeps the product testable without credentials. Common Singapore identifiers, phone numbers and email addresses are blocked before processing. The app is explicitly synthetic-only and takes no autonomous action.
How Codex was used
Codex was the primary engineering collaborator. It helped inspect two earlier repositories read-only for domain and privacy lessons, define a new hackathon scope, create and compare three visual directions, implement the complete product and API, write the safety and evaluation surfaces, run production checks and document the project.
The human made the product decisions: problem, name, workflow, safety boundary, target users and final visual direction.
Challenges
The central challenge was avoiding a persuasive but unsafe “AI doctor” demo. We deliberately made uncertainty, provenance, refusal boundaries and clinician authority visible in the product—not hidden in a disclaimer.
Accomplishments
- Complete clinician review workflow rather than a model-output screen
- Exact source-phrase-to-reason traceability
- Strict structured output for stable rendering
- Synthetic-only privacy boundary and identifier blocking
- Inspectable evaluation and safety-case views
- Responsive, accessible interface designed for rapid clinical review
What we learned
Healthcare AI trust is not created by confidence scores alone. A useful interface lets users inspect what information drove the result, see what is missing, disagree efficiently and preserve accountability.
What's next
A research version would evaluate representative synthetic cases, measure clinician–AI agreement and override reasons, monitor subgroup performance and drift, and undergo privacy, cybersecurity, clinical-safety and governance review before any real-world testing.
Built With
- codex
- gpt-5.6
- json-schema
- next.js
- openai-responses-api
- react
- typescript
Log in or sign up for Devpost to join the conversation.