FHIR DrillDocs

Profiles & validation

Validate on the server

Use the IGs loaded into HAPI with $validate, and optionally reject non-conformant writes.

The IGs are already loaded#

The main server installs AU Base, AU Core, AU eRequesting, AU Patient Summary, the HL7 extensions pack and THO at startup. The list, and how to add more, is on The IG lab. Check one is there:

Shell
curl -s "$FHIR/StructureDefinition?url=http://hl7.org.au/fhir/core/StructureDefinition/au-core-patient&_elements=url,version" | jq '.entry[].resource'

Validate on demand#

Shell
curl -s -X POST "$FHIR/Patient/\$validate?profile=http://hl7.org.au/fhir/core/StructureDefinition/au-core-patient" \
  -H "Content-Type: application/fhir+json" --data-binary @step1.json | jq '.issue[] | select(.severity=="error")'

Reject invalid writes (optional)#

Switch on request validation so HAPI refuses resources that break the profiles they claim in meta.profile:

YAML
      hapi.fhir.validation.requests_enabled: "true"

For a server that already works this way, use the AU Core mock.

This breaks the Synthea load

With request validation switched on, Synthea's US Core-labelled bundles fail validation and are rejected, because their Synthea extensions can't be resolved. Switch it on after loading, or only for a specific drill.

The server isn't as complete as the CLI#

HAPI's built-in validator uses whatever terminology it has loaded locally, so it may accept codes that the CLI (backed by tx.fhir.org) rejects, or the other way round. The CLI result is the one that counts. Use server validation as a quick gate on incoming data.

FHIR Drill lab docs · synthetic data only · built 2026-11-26