clinFHIR does AI: David Hay builds and validates FHIR bundles from plain-language clinical scenarios — Dec 3, 2026
Register to get the calendar and joining links for the weekly calls
One registration covers every upcoming Agents on FHIR call.
Loading your registration…
Don't have an account? Signing in creates one in seconds.
David Hay showed the AI assistant he added to clinFHIR. You describe a clinical scenario in plain language, and the assistant builds a FHIR bundle and checks it with the HAPI FHIR validator. Nikolai Ryzhikov hosted. Gino Canessa, Andrea Pitkus and Matt Blackmon joined the discussion.
Why clinFHIR exists
clinFHIR began in FHIR's early days as a visualization tool. Committees asked clinicians to help design resources, and clinFHIR let them see the resources and the references between them. It is still a training and design tool, not a place for real data, and the site warns against entering it. The code is open source: an AngularJS app that David has developed alone for 12 to 13 years. It still gets 50 to 100 visits a day.
The AI assistant
The assistant has two modes. Single conversation builds up one bundle through chat. Workflow mode models a sequence of steps, such as a request and then a report. Each step starts from the bundle of the previous one.
The app is a front end to Claude, with a Node.js server. The system prompt asks for a structured answer: the bundle plus assumptions, notes, warnings and cost. David uses Haiku for most work because it is fast and cheap. He uses Sonnet for bundle summaries, where Haiku is not strong enough. The HAPI validator checks every bundle the assistant returns. David trims its output, because messages about unrecognized codes from large value sets cluttered the result.
In the demo David built a GP visit for a sore ear and a histopathology workflow from request to report. He fixed details with follow-up prompts, such as the dose for a 5-year-old. Generated resources carry the AI security tag, and on request the assistant adds a Provenance resource that marks the bundle as AI-generated. The bundle viewer can also summarize a bundle with AI: Sonnet summarized Peter Jordan's IPS document in 32 seconds.
The AI picks resources and codes
The model decides which resources and codes to use, so users need to state their preferences. For example, you may want a MedicationRequest with a code instead of a separate Medication resource. Andrea pointed out that implementations differ on lab orders and on how to group pathology results, and that the US, UK and Australia use different code systems, which a terminology server has to cover. In the demo the AI used US Core extensions for ethnicity. For a breast lump workup it used ServiceRequest, not the Task-based approach of the clinical order workflows work. Gino noted that every IG publishes an llms.txt file, and David plans to use it to point the assistant at a specific IG.
Cost: API or SDK
David pays for Claude API usage himself. Nikolai suggested the Claude SDK with a subscription, which is now allowed and is about 5 times cheaper than paying for tokens. The SDK also handles steering and reasoning level. David does not want users to bring their own keys, because that would put off his audience.
Who would use it
David sees three audiences: clinicians learning FHIR, designers who need to model a scenario, and people developing the spec. Matt thinks it can produce clinically structured synthetic test data, which Synthea does not cover well, and help medical schools and clinical informatics programs. Andrea thinks HL7 work groups with few people could use it to start IG artifacts, as long as humans review them. Next, David plans to save bundles to a FHIR server and a shared library. Today they live only in the user's browser.
Bots on public endpoints
Gino warned that AI agents scan the internet for open endpoints and could push the assistant into unrelated work. David's only protection is a monthly spend cap of about $40. Nikolai suggested registration and per-user limits. Gino requires a free login past the first page of the XIG. Matt's group added Keycloak, geo-restrictions and fail2ban after receiving millions of requests a day.
Next steps
David and Nikolai agreed to talk about working together. Nikolai wants a tool that teaches non-technical people FHIR, with AI as the teacher, and thinks much of clinFHIR's assistant could be packaged as an agent skill. Nikolai and Gino have built skills that search FHIR Zulip. Connecting them would ground the answers in real community discussions, not only in training data. Nikolai also suggested linking the tool with Kai's work on teaching clinicians to model, which started with simple questionnaires.