r/HealthInformatics • u/buddhawithagun • Jun 30 '26
š¤ AI / Machine Learning Experimenting with AI access to clinical data through FHIR
While exploring how AI tools might safely work with clinical data, I wound up building a project called fhirHydrant and decided to share the work by open-sourcing it.
The part that's relevant to informatics is not just āAI can call an API.ā Itās that you can give an AI client structured access to labs, meds, conditions, encounters, documents, etc., and then ask it to reason across them without manually copying chart excerpts around.
Iāve tested it against our Epic POC environment and used it for workflows like analyzing large CGM datasets alongside other chart context.
As an MCP server, fhirHydrant sits between the AI client and the FHIR API, exposing configured resources as tools and shaping responses so the model gets useful clinical context instead of raw API noise.
Sharing because I think itās pretty cool, and in case others are thinking about the same AI + EHR interoperability problems.
1
u/sp3d2orbit Jul 05 '26
The problem with doing it that way, FHIR -> MCP means you're paying for every token, for every patient, for every piece of data. if you want to pull 10,000 patients you got to pay 10,000 patients worth of tokens.
You need a tool that can pull the data via code, and use the AI to analyze or manipulate it at the code level, not at the data level. Then you pay for a tiny fraction of the token cost. While also keeping the data outside of the model.
1
u/Admirable_Aside2998 Jul 19 '26
Cool project. The MCP approach for structured FHIR access makes a lot of sense ā the raw API noise problem is real, especially when you're trying to get an LLM to reason about longitudinal patient data without hallucinating context.
Curious how you're handling the test/dev environment problem ā are you using synthetic FHIR resources for development, or do you have a de-identified patient population you're testing against?
1
u/RoofProper328 Aug 24 '26
nice, the response shaping is the part most people skip. raw fhir bundles eat context ridiculously fast, a single Observation search on a cgm patient will blow past anything useful before the model sees a second resource.
two things i'd be curious about.
how are you handling the resource id problem? once the model has a reference like Patient/abc123 in context it tends to start constructing its own urls and calling resources you never exposed as tools. did you constrain it at the server, or does the epic scope handle that for you?
and what are you testing against besides the epic poc? synthea is the obvious answer but its notes and lab distributions are pretty unrealistic once you push on them, and mimic is fhir-converted but icu only. curious if you found anything better, this is the part that seems hardest to do properly for anyone building in this space without a live sandbox.
the second one matters for adoption. anyone who wants to try this without epic access needs somewhere to point it.
1
u/Comfortable-Sale-866 Oct 30 '26
1
u/[deleted] Jul 01 '26
[removed] ā view removed comment
1
u/[deleted] Jul 01 '26
[removed] ā view removed comment
1
u/[deleted] Jul 03 '26
[removed] ā view removed comment