There is a link on the FHIR downloads page to a zip file containing all the sample resources used throughout the documentation.
2,912 JSON files in total.
The difficulty is that they’re not transaction bundles. POSTing a single resource to your FHIR server will lead to broken reference links to other resources.
To ensure all the required resources exist, you need to use PUT requests and you need to do so for all the sample resources — every one of them.
Not a simple process when there are 2,912 files.
A few days ago I spent some time converting these files into Postman collections that can be run in bulk. I broke the files into two collections:
Collection 1: 940 PUT requests for all the interconnected resources
Collection 2: 2,000 PUT requests for CodeSystems, ValueSets, StructureDefinitions, etc.
Here’s a ZIP file containing the two Postman collections.
And here are the steps to follow to import and run the collections into your FHIR server:
- Download and extract the collections from the link above
- In Postman, click the “import” button and select one or both collections to import
- For each collection, open the “pre-request” Scripts tab and update with your FHIR server details. This is also where you add any custom code to get a bearer token if required. Here’s a screenshot.
- Select “Run collection” from the menu for each collection and click on the bright orange “Run” button to run all requests one after the other. Another screenshot.
It may take a few minutes to run each collection, but the end result is a FHIR server populated with inter-connected sample data for all resource types.
If you want to look at the raw data that was used to create the collections, here’s a direct link to the ZIP file: https://hl7.org/fhir/R4/examples-json.zip
---