-
-
Prompt Opinion demo: ClearScript Guardian calls MCP tools and returns a HIGH-risk medication safety result using Maya Rivera's FHIR context.
-
Prompt Opinion patient record showing the generated prescription image uploaded for Maya Rivera.
-
Synthetic discharge prescription PNG passed to ClearScript Guardian as image input.
-
ClearScript Guardian thumbnail: medication image to FHIR-aware risk plan through MCP and A2A.
Inspiration
ClearScript Guardian was built for the moment right after discharge, when a patient has a prescription or medication sheet in hand, but the safety context lives somewhere else in the EHR. A generic summarizer can explain the paper. The harder and more clinically useful job is knowing whether that paper is safe for this specific patient.
Our demo follows Maya Rivera, a synthetic 5-day-postpartum breastfeeding patient. Her FHIR record contains a penicillin allergy, current sertraline use, and a postpartum/breastfeeding condition. Her discharge medication image includes tramadol. ClearScript catches the patient-specific danger: tramadol while breastfeeding, plus tramadol alongside an SSRI.
What it does
ClearScript Guardian reads a prescription or discharge medication document, receives Prompt Opinion FHIR/SHARP patient context through MCP, checks patient-specific medication risk, and returns two practical deliverables:
- Plain-language instructions a patient can act on.
- A clinician escalation note that explains what was found, what context was used, and why review is needed.
It is intentionally not just OCR and not just chat. It connects unstructured medication documents to structured FHIR context: allergies, current medications, conditions, and patient-specific risk flags.
How we built it
The project uses Prompt Opinion in both challenge modes:
- MCP Superpower: a ClearScript Guardian MCP server exposing composable medication safety tools.
- A2A Agent: a Prompt Opinion BYO agent with patient scope, A2A enabled, FHIR context enabled, and ClearScript tools attached.
The MCP server is based on Prompt Opinion's community MCP sample and implemented in Python. It advertises the Prompt Opinion FHIR context extension, receives patient context from the workspace, and exposes RunClearScriptGuardian plus smaller tools for document extraction, patient context lookup, risk checking, and action-plan generation.
Inside Prompt Opinion, the submitted workspace includes a published BYO agent, a published MCP listing, the synthetic patient Maya Rivera, FHIR resources for allergy/current medication/postpartum status, and uploaded medication images. The MCP is deployed on Railway with a stable public endpoint for judge testing.
What makes it useful
Medication safety after discharge is a high-friction workflow. Patients often leave with document-shaped instructions, while clinical safety context is patient-shaped. ClearScript closes that gap without requiring custom EHR glue because Prompt Opinion handles the MCP, A2A, and FHIR plumbing.
The agent is conservative by design. It does not tell the patient to start, stop, or change medication on its own. It flags risk, explains why it matters, and creates the safest next step: contact the prescriber or pharmacist before starting the medication.
Challenges we ran into
The hardest part was making the demo reliable enough for judging, not just impressive in a local run. We had to verify FHIR context propagation, patient lookup, image/document parsing, MCP stream stability, Prompt Opinion tool calls, marketplace publishing, and durable hosting. We also added a deterministic synthetic prescription image path so the visual demo works even if model quota is unavailable.
Accomplishments
ClearScript Guardian now runs end to end inside Prompt Opinion. The final demo shows tool calls to FindPatientId and RunClearScriptGuardian, returns Overall risk: HIGH, references FHIR as the patient context source, and produces both patient-facing and clinician-facing deliverables.
What's next
The next version would replace demo medication rules with RxNorm and clinical drug knowledge APIs, add pharmacist review/audit trails, and extend the same MCP/A2A pattern to prior authorization, discharge follow-up, and medication reconciliation workflows.
Log in or sign up for Devpost to join the conversation.