| features |
|
|||||
|---|---|---|---|---|---|---|
| languages |
|
Traditional FHIR Implementation Guide development is complex and time-consuming. Creating and validating FHIR StructureDefinition resources and terminology resources requires deep technical expertise, which led to the development of additional tooling like the FSH (FHIR Shorthand) language.
With the advent of Large Language Models, we can now explore a different approach: describing all profiles, code systems, and value sets in natural language and having an LLM generate the complete Implementation Guide from those descriptions.
This project demonstrates how the Aidbox FHIR Server enables LLMs to immediately test and validate each generated resource, creating a seamless AI-assisted development workflow for FHIR Implementation Guides.
- Documentation-Driven Development: Natural language markdown specifications automatically converted to FHIR resources
- AI-Assisted Resource Generation: Claude Code generates compliant FHIR resources from requirements
- Integrated Testing Environment: Local Aidbox FHIR server for real-time validation and testing
- Comprehensive Test Suite: HTTP-based automated testing for all resource types
- Publication Ready: Direct integration with HL7 FHIR IG Publisher
- Docker and Docker Compose - Container orchestration
- Claude Code - Primary tool for AI-assisted IG development
- httpyac - HTTP client for testing FHIR resources
- HL7 FHIR IG Publisher - Official FHIR IG publishing tool (
publisher.jar) - Download and put thepublisher.jarin theig-publisherdirectory - Aidbox - Local FHIR server for testing and validation
-
Clone the repository:
git clone git@github.com:Aidbox/examples.git cd examples/agentic-coding-ig-development -
Start the FHIR server:
docker compose up -d
-
Initialize Aidbox:
- Open http://localhost:8080 in your browser
- Log in and initialize the instance with your Aidbox account
- The init bundle automatically configures:
- Client with Basic authentication (
basic:secret) - Access policies for the client
- Client with Basic authentication (
agentic-coding-ig-development/
├── .claude/ # Claude Code configuration
│ ├── commands/ # Custom development commands
│ │ ├── publish-ig.md # Publish IG using publisher.jar
│ │ ├── test-cs.md # Test and validate CodeSystems
│ │ ├── test-profile.md # Test and validate Profiles
│ │ ├── test-vs.md # Test and validate ValueSets
│ │ └── view-ig.md # View published IG in browser
│ └── settings.local.json # Local Claude Code settings
├── CLAUDE.md # Claude Code main configuration file
├── README.md # Project documentation
├── docker-compose.yaml # FHIR server orchestration
├── ig-publisher/ # IG publisher configuration
│ ├── ig.ini
│ ├── ig.json
│ └── input/
├── src/ # FHIR resource definitions
│ ├── CS/ # CodeSystem resources
│ ├── VS/ # ValueSet resources
│ └── Profiles/Extensions/ # Profile and Extension definitions
├── target/ # Generated canonical resources (empty)
└── test/ # HTTP-based test suite
├── CS/ # CodeSystem tests
├── VS/ # ValueSet tests
└── *.http # Individual test files
Write requirements in natural language markdown files in the src directory.
Couple of examples:
- CodeSystem definition CSIdentidadGenero
- ValueSet definition VSIdentidadGenero
- Profile definition PacienteCl
Ask Claude to generate the FHIR resource for the definition in the markdown file.
claude
> Generate FHIR resource for CSIdentidadGenero codesystemCheck the generated resources in the target directory.
Couple of examples:
- CodeSystem definition CSIdentidadGenero
- ValueSet definition VSIdentidadGenero
- Profile definition PacienteCl
We need to test the generated resources and it's very easy to do that with Aidbox FHIR Server.
The testing methodology is described in the following commands:
- test-cs.md - test CodeSystem resources against FHIR server
- test-vs.md - test ValueSet resources and expansion
- test-profile.md - test StructureDefinition profiles with sample data
Ask Claude to test the resources:
Test CodeSystems:
claude
> /test-cs CSIdentidadGeneroTest ValueSets:
claude
> /test-vs VSIdentidadGeneroTest Profiles:
claude
> /test-profile PacienteClTake a look at the test cases that were generated in the test directory:
Each test run provides a detailed log of executing the test cases - you should be able to see the log files next to the .http file.
The stable .http file with all the test cases gives you the ability to rerun all the test cases manually when needed and enables the LLM to iterate on fixing any issues that arise.
Once we are happy with the results, we can generate the Implementation Guide.
The following command will generate all the required HTML files with the IG content and put them to ig-publisher/output folder:
Generate and publish the complete IG:
claude
> /publish-igOnce the IG is generated, we can view it in the browser.
claude
> /view-igOnce the IG is generated, you can load it into Aidbox to start using it in your projects.
Navigate to the Aidbox UI -> FAR.
Click "Import package" button and select the ig-publisher/output/package.tgz file.
Apart from Claude commands we used above, there's a general configuration file for the Claude in the CLAUDE.md file.