HL7 AU FHIR Test Data contains sample FHIR instances for testing purposes, and to support developers. This repository includes synthetic (realistic but not real) data that conforms to HL7 AU FHIR Implementation Guides (IGs). The synthetic data covers a broader and expanded content scope over that in the FHIR instance examples included in published HL7 AU FHIR IGs.
This repository also contains 'test' data for some HL7 AU IGs, used to test fail cases. This data not conform to HL7 AU FHIR Implementation Guides.
- Patients, Practitioners, PractitionerRoles, Organizations, and Healthcare Services are not generated from a real world set. Any correspondence to real entities is entirely accidental.
- Resources with an IHI, HPI-I, or HPI-O have been provided by Services Australia and are present in the HI Vendor Test Environment. These resources may be in tests within that environment.
- Australian phone numbers are from the reserved set provided by the Australian Communications and Media Authority for use in creative works.
- Email addresses use the following domains set aside for development and testing: 'example', 'myownpersonaldomain domain', and 'my-own-personal-domain domain'.
- Addresses are valid addresses based on publically available address data from Australia Post.
- Names are randomly generated.
- IHIs, HPI-Os, HPI-Is are provided by Services Australia for test purposes and will pass Luhn check.
- Medicare Card Numbers and DVA numbers are provided by Services Australia for test purposes.
- Australian Health Practitioner Regulation Agency (Ahpra) Registration Numbers are provided by Services Australia for test purposes.
- ABNs present in the data for fictious organisations are not valid ABNs, i.e. they will not pass validity checks.
- Data in clinical resources e.g. AllergyIntolerance are not generated from a real world set.
Synthetic FHIR test data (JSON) files are located in:
- generated folder
- [direct-fhir-test-resources] (https://github.com/hl7au/au-fhir-test-data/tree/master/direct-fhir-test-resources) folder
- coming soon for AU eRequesting
Postman collection import files containing a selection of AU Core and AU eRequesting Test Data are located in the Postman folder
- Sparked AUCore Test Data.postman_collection.json
- Sparked AUeRequesting Test Data.postman_collection.json
Sample Postman environment import files are also located in the Postman folder:
- Sparked AUCore Test Data.postman_environment.json
- Sparked eReq FHIR Server Filler.postman_environment.json
- Sparked eReq FHIR Server Placer.postman_environment.json
This repository also contains source code for the command line utilities used to generate the FHIR JSON files and upload them to a FHIR Server. These utilities have been developed using DotNet. For further details see Test Data Command Line Utilities below.
We suggest using the Sparked Test Data Postman collection which contains:
- AU Core profiles, a selection of resources from the generated and direct-fhir-test-resources folders, including resource instances with missing data and suppressed data.
- AU Base Coverage resources. (coming soon)
- AU Base Healthcare Service resources. (coming soon)
- AU Base Related Person resource(s). (coming soon)
- AU Base Specimen resource(s). (coming soon)
Currently, this Postman collection does not contain non-conformant resources for negative testing.
If you would like to upload the Sparked generated or addition test data sets into your FHIR server by using the FHIR REST updateCreate (PUT) interaction, use the UploadGenerated.bat and UploadDirect.bat batch files (.sh files coming). Refer to the instructions below in the section Upload Data below.
The following test data files within the direct-fhir-test-resources folder support testing of significant test cases including missing and suppressed data.
File Name | Resource Id | Test Case | Expected Outcome |
---|---|---|---|
Patient-italia-sofia-suppressed-birthDate.json | italia-sofia-suppressed-birthDate | Patient with a suppressed birthDate | A Responder SHALL correctly populate a Data Absent Reason extension within a primitate data type extension and a Requester SHALL accept this extension without error. |
Patient-italia-sofia-suppressed-gender.json | italia-sofia-suppressed-gender | Patient with a suppressed gender | A Responder SHALL correctly populate using value of 'unknown' and a Requester SHALL accept the 'unknown' value without error. |
Patient-italia-sofia-suppressed-identifier.json | italia-sofia-suppressed-identifier | Patient with suppressed identifiers | A Responder SHALL correctly populate a Data Absent Reason extension within Identifier.extension and a Requester SHALL accept this extension without error. Currently validation using the Sparked Reference FHIR Server rejects this instance due to rule au-core-pat-01. |
Patient-italia-sofia-suppressed-name.json | italia-sofia-suppressed-name | Patient with suppressed names | A Responder SHALL correctly populate a Data Absent Reason extension within HumanName.extension and a Requester SHALL accept this extension without error. Currently validation using the Sparked Reference FHIR Server rejects this instance due to rules au-core-pat-02 and au-core-pat-04. |
Observation-pathresult-missing-effective.json | pathresult-missing-effective | Pathology Result Observation with missing effectiveDateTime | A Responder SHALL correctly populate a Data Absent Reason extension represented using a primitate data type extension, and a Requester SHALL accept this extension without error. Currently validation using the Sparked Reference FHIR Server rejects this instance due to rule Rule au-core-obs-01. |
Observation-pathresult-missing-status.json | pathresult-missing-status | Pathology Result Observation with missing status | A Responder SHALL correctly populate using value of 'unknown', and a Requester SHALL accept this value without error. |
Observation-pathresult-suppressed-code.json | pathresult-suppressed-code | Pathology Result Observation with suppressed code | A Responder SHALL correctly populate the coding using a code (masked or unknown) from the Data Absent Reason value set, and a Requester SHALL accept this coding without error. |
Observation-pathresult-suppressed-dataAbsentReason.json | pathresult-suppressed-dataAbsentReason | Pathology Result Observation with suppressed value using dataAbsentReason | Using dataAbsentReason is NOT the recommended representation of a suppressed test result value in AU Core. |
Observation-pathresult-suppressed-subject.json | pathresult-suppressed-subject | Pathology Result Observation with suppressed subject | A Responder SHALL correctly populate a Data Absent Reason extension within Reference.extension and a Requester SHALL accept this extension without error. |
Observation-pathresult-suppressed-valueCodeableConcept.json | pathresult-suppressed-valueCodeableConcept | Pathology Result Observation with suppressed codeable value | A Responder SHALL correctly populate the coding with a code (masked or unknown) from the Data Absent Reason value set, and a Requester SHALL accept this coding without error. |
Observation-pathresult-suppressed-valueQuantity.json | pathresult-suppressed-valueQuantity | Pathology Result Observation with suppressed non-coded value (complex data types) | A Responder SHALL correctly populate a Data Absent Reason extension within the value[x].extension and a Requester SHALL accept this extension without error. |
Search the Issues list in GitHub to ensure the error was not already reported.
If you're unable to find an open bug addressing the problem, please create a bug report or issue in this project.
If you have a question, feature request, or proposed change, the best place to start is Zulip i.e. the https://chat.fhir.org/#narrow/stream/179173-australia/topic/AU.20FHIR.20Test.20Data topic.
Search the Issues list in GitHub to check if this has already been reported.
If you're unable to find an open request, please create a GitHub to:
- contribute test data to the repository: state your details and the nature of the test data to be contributed
- suggest improvements or enhancements to the synthetic or test data set
There are two command line utilities to generate the FHIR JSON files and upload the generated test data to a FHIR Server. These utilites are developed using DotNet.
The Sparked.Csv2FhirMapping is a utility that maps the CSV files located in the testdata-csv folder and generates the FHIR JSON files.
The Sparked.Csv2FhirMapping.sln has a dependency on the fhir-net-mappinglanguage
submodule, which needs to be initialised as part of cloning this repo, or if you have already clone this repository you can initialise the submodule retrospectively.
$ git clone --recurse-submodules https://github.com/hl7au/au-fhir-test-data.git
$ git submodule update --init
After executing the submodule update command, the fhir-net-mappinglanguage
will no longer be empty.
- Install the dotnet framework in the appropriate version.
- Open a Command Prompt
cmd
(advice) - Type
BuildCsvFhirMapping.bat
. This will execute a batch file that builds.
- Open a Command Prompt
cmd
(advice) - Type
GenerateData.bat
followed by an output directory and resource type. This will execute a batch file that generates.
Usage:
GenerateData.bat output-folder resource-type
Example with local directory generated
and resource type Patient
:
GenerateData.bat generated Patient
- Open a Command Prompt
cmd
(advice) - Type
GenerateAll.bat
. This will execute a batch file that generates all.
Usage:
GenerateAll.bat
The Sparked.TestDataClient is a command line utility that uploads a batch of FHIR JSON files to a FHIR Server.
- Install the dotnet framework in the appropriate version.
- Open a Command Prompt
cmd
(advice) - Type
BuildTestDataClient.bat
. This will execute a batch file that builds.
- Open a Command Prompt
cmd
(advice) - Type
UploadData.bat
. This will execute a batch file that uploads all to the fhir-server of the specified resource-type located in the input-folder. The FHIR server request's Authorization header is generated using the auth-scheme and auth-parameter arguments.
Usage:
UploadData.bat fhir-server auth-scheme auth-parameter input-folder resource-type
Example:
UploadData.bat https://fhir.hl7.org.au/aucore/fhir/DEFAULT Basic {{base64-encouded-userid:password}} generated Patient
- Open a Command Prompt
cmd
(advice) - Type
UploadGenerated.bat
. This will execute a batch file that uploads all to the fhir-server all data located in the foldergenerated
. The FHIR server request's Authorization header is generated using the auth-scheme and auth-parameter arguments.
Usage:
UploadGenerated.bat fhir-server auth-scheme auth-parameter
Example:
UploadGenerated.bat https://fhir.hl7.org.au/aucore/fhir/DEFAULT Basic {{base64-encouded-userid:password}}
- Open a Command Prompt
cmd
(advice) - Type
UploadERequesting.bat
. This will execute a batch file that uploads all to the fhir-server all eRequesting data located in the foldergenerated
. The FHIR server request's Authorization header is generated using the auth-scheme and auth-parameter arguments.
Usage:
UploadERequesting.bat fhir-server auth-scheme auth-parameter
Example:
UploadERequesting.bat https://fhir.hl7.org.au/aucore/fhir/DEFAULT Basic {{base64-encouded-userid:password}}