FHIR Implementation Guide Test Data Guide
Overview
This guide explains how to incorporate and manage test data in FHIR Implementation Guides, with a specific focus on FUT's Implementation Guide. The need for comprehensive test data is twofold: to exemplify profiling work and to accelerate development processes for both client and server implementations.
Understanding Test Data in FHIR Implementation Guides
FHIR Implementation Guides (including FUT's Implementation Guide) can incorporate test data that serves multiple purposes:
Exemplifying profiles: Shows how data profiles should be structured and used
Accelerate development: Provides ready-to-use examples for client and server development
Validation: Examples are verified by the toolchain that builds Implementation Guides, ensuring profiles work as intended
Finding Examples in the Implementation Guide
Navigate to the specific profile (e.g., ehealth-patient profile)
Click on the "Examples" tab
View the available example data that the author has included. For the ehealth-patient profile, you can find:
HTML rendered version: https://ehealth.sundhed.dk/fhir/Patient-patient01.html
JSON format: https://ehealth.sundhed.dk/fhir/Patient-patient01.json.html
FSH source: FHIR Shorthand (FSH). Test data is authored in FHIR Shorthand (FSH - pronounced "fish"). The source files can be found in the GitHub repository: https://github.com/fut-infrastructure/implementation-guide/blob/dfcd0d11744ee0821e282073056fe8d628b62c23/input/fsh/ehealth-patient.fsh#L77
What Test Data Can Cover
Arbitrary data graphs
Complex profiling scenarios
Multiple related resources
Various use cases and edge cases
Current Limitations
State Changes: Test data cannot express state transitions or temporal changes
Dynamic Scenarios: Limited to static snapshots of data
Governance Considerations
The second part of managing test data involves governance decisions around:
Deployment Frequency: How often test data should be deployed to environments
Environment Resets: When and how often environments should be reset
Data Set Management: Establishing and maintaining larger test data sets
Industry Standards
This approach follows standard FHIR practices used across the ecosystem:
HL7 Denmark:
https://hl7.dk/fhir/core/StructureDefinition-dk-core-patient-examples.htmlMedCom Implementation Guides: Similar structure and approach
International FHIR Implementation Guides: Consistent methodology worldwide
Best Practices
For Implementation Guide Authors
Start Small: Begin with basic examples and expand as needed
Quality Over Quantity: Focus on meaningful examples rather than volume
Maintenance Planning: Consider long-term maintenance when adding examples
Documentation: Document the purpose and context of each example