Skip to main content
← All projectsDafe Ofoh / Case study 06
CLINICAL AI · AGENT SYSTEMS

From clinical question to reviewable evidence.

I built Fanoni Clinical AI to make the path behind an answer visible: choose a focused skill, retrieve from the right source, and stop when the record or evidence cannot support the claim.

Explore the workflow ↗Source temporarily private
SEE THE DECISION PATH

Four questions. Four focused routes.

Choose a use case to see the tools and rules behind the response. These are synthetic prompts based on the repository configuration; the screen does not display patient records or a live agent answer. The guideline example uses coded rules in the repository, not a live guideline feed.

ILLUSTRATIVE WORKFLOW / SYNTHETIC PROMPTSROUTED TO patient_chart
Before a visit

A question becomes a
reviewable path.

TOOL-GROUNDED
CLINICIAN REVIEW
CLINICIAN ASKS

“What medications is Nikolai Chen taking?”

HOW THE AGENT HANDLES IT01 → 02 → 03
01 / IdentifySearch for the patient and resolve an ambiguous match before reading records.search_fhir_patients
02 / RetrieveRead MedicationRequest resources for the confirmed patient.get_patient_fhir_resource
03 / ReturnSummarize only records the FHIR tool returned, with a source label.FHIR chart data
THE BOUNDARY

No match means stop. Multiple matches mean ask the clinician to choose.

Interactive portfolio walkthrough based on the skills configuration. The source repository is temporarily private during credential rotation.

INSIDE THE SYSTEM

The answer path is an architecture decision.

The current skills configuration connects a NeMo router to four tool-calling agents. Each branch has a small, explicit tool list and an instruction set for what to do when data is missing, ambiguous, or unavailable.

01 / SYSTEM LAYER

A single clinical entry point

The EHR agent surface sends a question through the clinical API to the NeMo service. The configured router selects one specialist skill instead of exposing every tool at once.

router_agent → one of four skillsmedical_ehr/configs/medical_ehr_SKILLS_gemini.yml
02 / SYSTEM LAYER

Limited tools for each job

The patient skill gets FHIR reads and cohort tools; medication safety, coding, and decision support each get their own shorter list. Each skill also has its own answer and failure rules.

skill → curated MCP / native toolsmedical_ehr/configs/medical_ehr_SKILLS_gemini.yml
03 / SYSTEM LAYER

Data stays behind source boundaries

The MCP server reads the selected FHIR backend for chart data. Medication checks inspect drug labels, code searches use terminology tools, and named risk scores run through calculator functions.

MCP → FHIR + specialist sourcesclinical-mcp-server/tools/fhir_tools.py
IDENTITY BEFORE DATA

A name is a search, not an identity.

A chart question first calls patient search. No match stops the flow; several matches are returned for a clinician to resolve before a record is read.

clinical-mcp-server/tools/fhir_tools.py
COUNTS WITH CONTEXT

Population answers define what is counted.

FHIR cohort tools count unique patients and support condition intersections and exclusions. The skill asks for numerator and denominator when it reports a percentage.

clinical-mcp-server/tools/fhir_tools.py
MEMORY IS SECONDARY

Remembered context cannot replace a chart.

Optional Graphiti memory is keyed by patient ID. The skill instructs the agent to verify current clinical state against FHIR, and a memory outage should not block a chart answer.

medical_ehr/src/nat_medical_ehr/tools/graphiti_memory_tool.py
EVIDENCE HAS A TYPE

A rule comparison is labeled as a rule comparison.

The guideline tool matches a condition and proposed plan against coded rules. Literature lookup is a separate PubMed tool. The portfolio does not present either as a continuously updated clinical guideline service.

clinical-mcp-server/tools/tier2_tools.py
THE PROBLEM

A confident answer can still be the wrong one.

Clinical questions span patient charts, medication references, coding sources, and published evidence. A general response is hard to trust when it skips patient matching, fills in absent records, or obscures which source was consulted.

This project gives each question a narrower route and a clear stopping rule. It is designed to help a clinician inspect information, not to make a diagnosis or treatment decision on their behalf.

WHAT IT COVERS

One entry point, four clinical jobs.

01

Patient context

Find a patient, read chart resources, or answer a cohort question from the FHIR store.

02

Medication review

Check an interaction, label, boxed warning, or medication list through curated safety tools.

03

Coding support

Look up ICD-10, CPT, or HCPCS data and review code or payment details returned by tools.

04

Clinical evidence

Compare plans with coded guideline rules, retrieve PubMed literature, or run deterministic scores for clinician review.

HOW I CHECKED IT

Test the failure path, not just a polished answer.

01Identity and no-record cases

The clinician suite asks for an ambiguous surname and for patients absent from the test store. It checks that the agent asks for a choice or stops instead of inventing a medication list.

02Known chart and cohort facts

The same script checks selected medication, encounter, diagnosis, and population answers against a mirrored synthetic FHIR dataset. It also checks that counts describe unique patients.

03Keep routes separate

Guideline and interaction prompts are checked for relevant source language, while an unsupported reimbursement question should say the data is unavailable. These checks are internal system tests, not clinical outcome evidence.

medical_ehr/evals/doctor_suite.py
OPEN RESEARCH

The public work behind the experiments.

These Fanoni Hugging Face assets document earlier medical EHR training and structured-output research. The current pilot configuration uses Gemini 2.5 Flash through Vertex AI.

Explore all public Fanoni work on Hugging Face ↗
PROJECT CONTEXT

Evaluated as a workflow, still under clinical review.

The repository’s clinician-flow suite checks patient disambiguation, missing-record stops, chart answers, cohorts, medication interactions, and evidence routing. These are internal system checks. The project remains a pre-deployment pilot, and the portfolio walkthrough uses synthetic questions rather than a live patient record.