Agentic coding and FHIR
Agentic coding introduces a new variable into system design: the agent becomes a code-producing component that must operate within strict architectural boundaries.
Many people experimenting with agentic coding agree on one key principle: you must maintain control over the agent. Without clear structure and constraints, an agent-driven project can quickly become unmaintainable.
We believe that building FHIR-native applications and using FHIR as a framework for agentic coding in healthcare significantly increases the level of control you have over your system architecture.
FHIR provides strong guardrails in several critical areas.
Data model
This is one of the most crucial parts of any application. When you use a FHIR server as your backend, you can be confident that all data produced by the agent is stored as valid FHIR resources. The agent does not create custom data formats. All generated data must conform to standard FHIR resource structures.
Interaction patterns
FHIR specifications such as Subscriptions and SQL on FHIR define standardized ways for components to interact. This reduces ambiguity in integration logic and prevents the agent from inventing custom communication patterns.
Terminology
FHIR encourages the use of well-known code systems, ensuring that your application models data using interoperable and standardized vocabularies.
Interoperability by design
FHIR’s core design principles make interoperability a default rather than an afterthought.
In this post, we demonstrate a small example of using agentic skills to hide FHIR complexity while still preserving architectural control.
Example: Building a Patient Weight Dashboard
Imagine an application that uses a FHIR server for storage. For simplicity, assume we only have two resource types:
- Patient
- Observation (for body weight)

Now we want to implement a new feature using agentic coding.
Goal
Implement a patient dashboard where each patient can view their body weight over time, based on existing Observation data.
Prompt
/aidbox-dashboard Let’s implement a patient dashboard where each patient can view their body weight over time, based on
the Observation data we already have.
Result
After about two minutes of agent execution, we get a working dashboard.

How It Works Under the Hood
/aidbox-dashboard
is a Claude skill defined in the repository that teaches the agent how to build dashboards.
The skill instructs the agent to:
- Create a ViewDefinition FHIR resource
- Materialize the ViewDefinition into a real database view
- Generate backend code that queries the view directly using SQL
- Build frontend code to render the dashboard
It also tells the agent:
- Which frontend visualization library to use
- How to interact with the FHIR server and database
- How to configure the FHIR server so ViewDefinitions are deployed automatically
- How to debug common issues
In other words, the agent executes a controlled architectural playbook, rather than improvising freely.
How to try it
The code is available in the public repository.
You can run it locally. Requirements:
- Docker
- Bun
- Claude Code
Try extending it — for example, ask Claude to generate more seed data or build additional dashboards using the
/aidbox-dashboard skill.
Questions or feedback? Contact us using the form below.






