HAPI FHIR and AU Core Test Data
Introduction
In a previous post, I wrote about the steps I followed to configure HAPI FHIR to store and install a FHIR Implementation Guide.
In this post, we'll take a look at some AU Core Test Data.
AU Core Test Data
In addition to the examples defined in the AU Core Implementation Guide, synthetic (realistic but not real) test data is maintained in the HL7 AU FHIR Test Data GitHub repository.
Postman
I downloaded the Sparked AU Core Test Data Postman collection:
I also created a new environment and defined the server
variable:
The collection includes sample data that you can use to: validate; create or update; and search or read.
Create or update
Every FHIR resource stored in HAPI FHIR has a resource ID.
If you create a resource using a HTTP POST (i.e., a FHIR 'create' operation) HAPI FHIR will assign the resource ID.
Note: By default, HAPI FHIR will assign a sequential numeric ID. However, you can configure HAPI FHIR to use a randomly generated UUID.
For example:
dao_config.server_id_mode: UUID
If you update a resource using a HTTP PUT (i.e., a FHIR 'update' operation) and you provide a resource ID (and no resource already exists on the server with the ID) a new resource will be created with the ID.
For example:
PUT /Patient/baratz-toni
Content-Type: application/fhir+json
{
"resourceType": "Patient",
"id": "baratz-toni",
"meta": {
"profile": [
"http://hl7.org.au/fhir/core/StructureDefinition/au-core-patient"
]
},
...
}
HAPI FHIR refers to IDs that you provide as 'client assigned IDs' and HAPI FHIR provides a property to control what IDs are permitted as client assigned IDs.
For example
client_id_strategy: ALPHANUMERIC
Source Code
Resources
- HAPI FHIR: Website
- HAPI FHIR: Documentation
- HL7: Implementation Guide
- HL7: FHIR NPM Packages
- AU Core: Publication (Version) History
- AU Core FHIR Implementation Guide: AU Core - 1.0.0-preview
- AU Core FHIR Implementation Guide: Testing FAQs
- Sparked AU Core Test Data Postman collection
- Google Group: HAPI FHIR