Inspiration

Aegis Follow-Up was inspired by a common healthcare workflow problem: abnormal results can be identified, viewed, and even discussed, but still fail to become a clearly documented follow-up task. In busy clinical settings, the gap between a result appearing and a clinician closing the loop can create operational risk.

I wanted to build something narrower and more practical than a general healthcare chatbot. The goal was to create a Prompt Opinion MCP server that acts as a clinical safety layer for follow-up review: auditable, cautious, workflow-focused, and useful inside a real clinician-controlled process.

What it does

Aegis Follow-Up helps clinicians review potentially unresolved abnormal results.

It can:

  • Show whether the workflow is using synthetic fixture data or FHIR context.
  • List follow-up tasks in a clinic-style priority queue.
  • Explain why a result was flagged or suppressed.
  • Assess follow-up priority using deterministic rule profiles.
  • Generate a guarded AI follow-up brief for clinician review.
  • Validate AI output and fall back to deterministic text if needed.
  • Create a handoff-ready payload for future scheduling or care-coordination workflows.
  • Optionally prove FHIR Patient reachability with a narrow read-only connectivity check.

The central design principle is:

Rules decide. AI synthesises. Safety validates. Clinician review remains in control.

How we built it

Aegis Follow-Up is built as a Python FastAPI and FastMCP server deployed on Render as a Streamable HTTP MCP endpoint.

The system has 15 MCP tools and supports Prompt Opinion’s FHIR Context extension. The primary demo uses synthetic fixture data, which means no PHI is required, no live FHIR access is required, and no EHR writes occur.

The clinical workflow is deterministic. Aegis Follow-Up uses structured patient fixtures, abnormal-result logic, rule profiles, audit trails, and priority tiers to decide what should be reviewed.

The AI layer is intentionally controlled. Gemini is used only to generate a clinician-facing narrative from deterministic evidence. It does not decide the clinical facts, priority level, or audit outcome. If Gemini is unavailable, or if the generated text fails safety validation, the server falls back to deterministic output.

The app also includes health endpoints, Docker deployment, CI, smoke tests, safety validation, redaction-aware design, a marketplace listing, a judge testing guide, a final code review, and a post-hackathon roadmap.

Challenges we ran into

The main challenge was balancing AI capability with clinical safety.

For a hackathon, it is tempting to make the AI do everything. In healthcare, that is not the safest architecture. I had to design the project so that the LLM adds value without becoming the source of clinical truth.

Another challenge was FHIR integration. I wanted the server to support Prompt Opinion FHIR Context, but I also did not want the demo to depend on live patient data or fragile external FHIR servers. The solution was to make the primary workflow synthetic and reliable, while adding a narrow optional FHIR connectivity proof that can confirm read-only Patient reachability when explicitly enabled.

The final challenge was demo clarity. The server has 15 tools, but a 3-minute demo cannot show everything. The final demo focuses on five tools: FHIR transparency, task queue, deterministic audit trail, AI brief, and handoff payload.

Accomplishments that we're proud of

I am proud that Aegis Follow-Up is more than a chatbot demo. It shows a real workflow:

  • A queue of follow-up tasks.
  • Deterministic priority logic.
  • An audit trail for flagged and suppressed results.
  • Guarded AI narrative generation.
  • Human-review handoff payloads.
  • Optional FHIR context support.
  • No autonomous EHR writes.

The safety model is also a major accomplishment. The server includes mandatory clinician-review framing, phrase-level output validation, deterministic fallback, no offline_access, no refresh-token support, no committed secrets, and no PHI in the default demo.

I am also proud of the engineering discipline. The project includes tests, CI, Docker build validation, Render deployment, smoke scripts, documentation, and a commercial roadmap.

What we learned

The biggest lesson was that healthcare AI should not always start with AI as the decision-maker. In this project, deterministic logic provides the safety and auditability, while AI improves readability and workflow usability.

I also learned that MCP is a strong fit for healthcare workflow tools. Prompt Opinion can act as the agent interface, while Aegis Follow-Up stays focused on reliable tool outputs, safety boundaries, and auditable clinical review support.

A second lesson was that transparency matters. The tool should clearly say whether it is using synthetic data, whether live FHIR reads occurred, whether an EHR write happened, and whether AI output was generated or replaced by fallback text.

What's next for Aegis Follow-Up

After the hackathon, the next step would be a controlled pilot roadmap.

The first phase would harden the current system: expand synthetic fixtures, improve logging without exposing PHI, refine rule profiles, and review the clinical safety language with advisors.

The second phase would add real read-only FHIR ingestion for resources such as Patient, Observation, DiagnosticReport, ServiceRequest, Task, Encounter, Condition, and MedicationStatement.

The third phase would add persistent human-in-the-loop workflow state: clinician review, dismissal reasons, team queues, review timestamps, and exportable audit trails.

Only after that would carefully scoped EHR writeback be considered, such as optional Task creation or draft note creation, always requiring clinician approval.

The long-term vision is for Aegis Follow-Up to become a commercial Prompt Opinion MCP safety layer for closing abnormal-result follow-up gaps while keeping clinicians in control.

Built With

Share this project:

Updates