OZO FHIR implementation guide
0.2.2 - ci-build
OZO FHIR implementation guide - Local Development build (v0.2.2) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
This manual provides step-by-step instructions for installing the OZO FHIR Implementation Guide package in a HAPI FHIR server.
The OZO FHIR Implementation Guide is distributed as a packaged release that can be installed on HAPI FHIR servers to enable validation and support for OZO-specific profiles, extensions, and resources.
There are two primary methods for installing the OZO FHIR package on your HAPI FHIR server:
This method involves configuring the HAPI FHIR server's application.yaml file to automatically download and install the OZO FHIR package on server startup.
Visit the OZO FHIR Implementation Guide releases page:
From the release page, copy the URL of the .tgz package file. For version 0.1.0, the package is:
fhir.ozo-0.1.0.tgz
The full download URL will be:
https://github.com/ozoverbindzorg/integrale-netwerk-communicatie/releases/download/v0.1.0/fhir.ozo-0.1.0.tgz
Open your HAPI FHIR server's application.yaml configuration file, typically located at:
src/main/resources/application.yaml
Navigate to the hapi.fhir.implementationguides section and add the OZO package configuration:
hapi:
fhir:
# ... other HAPI configuration ...
# Disable validation during package installation to bypass snapshot generation issues
iginstaller_validationenabled: false
# Flag filters resources during package installation
validate_resource_status_for_package_upload: false
implementationguides:
ozo:
name: fhir.ozo
version: 0.1.0
packageUrl: https://github.com/ozoverbindzorg/integrale-netwerk-communicatie/releases/download/v0.1.0/fhir.ozo-0.1.0.tgz
fetchDependencies: true
installMode: STORE_AND_INSTALL
| Parameter | Description | Recommended Value |
|---|---|---|
| name | The package identifier (must match the package ID) | fhir.ozo |
| version | The version of the package to install | 0.1.0 |
| packageUrl | Direct URL to the .tgz package file |
Release download URL |
| fetchDependencies | Whether to automatically fetch and install dependencies (NL-core profiles, etc.) | true |
| installMode | How to handle the package installation | STORE_AND_INSTALL |
The OZO package includes custom profiles and extensions. To ensure proper installation, add or verify these settings in your application.yaml:
hapi:
fhir:
# Enable repository validation to validate resources against OZO profiles
enable_repository_validating_interceptor: true
# Disable validation during IG installation to avoid snapshot issues
iginstaller_validationenabled: false
# Allow installation of resources regardless of status
validate_resource_status_for_package_upload: false
After updating the configuration:
application.yaml filemvn clean install
java -jar target/hapi-fhir-jpaserver.jar
Once the server has restarted, verify that the OZO package was installed successfully:
Look for log entries indicating successful package installation:
INFO: Installing package fhir.ozo version 0.1.0
INFO: Successfully installed implementation guide: fhir.ozo
Use the FHIR API to verify the ImplementationGuide was loaded:
curl http://localhost:8080/fhir/ImplementationGuide?_id=fhir.ozo
You should receive a response containing the OZO ImplementationGuide resource.
Verify that OZO profiles are available:
curl http://localhost:8080/fhir/StructureDefinition?url=http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOCareTeam
After installing the OZO package, you can create FHIR resources that conform to OZO profiles. To ensure proper validation, you must set the meta.profile element to the canonical URL of the OZO profile.
The OZO CareTeam profile has the following canonical URL:
http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOCareTeam
Create a JSON file (e.g., careteam-example.json) with the meta.profile element set to the OZO profile URL:
{
"resourceType": "CareTeam",
"meta": {
"profile": [
"http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOCareTeam"
]
},
"status": "active",
"subject": {
"reference": "Patient/example-patient",
"type": "Patient",
"display": "H. de Boer"
},
"participant": [
{
"member": {
"reference": "RelatedPerson/example-relatedperson",
"type": "RelatedPerson",
"display": "Kees Groot"
}
},
{
"member": {
"reference": "Practitioner/example-practitioner",
"type": "Practitioner",
"display": "Manu van Weel"
},
"onBehalfOf": {
"reference": "Organization/example-hospital",
"type": "Organization",
"display": "Ziekenhuis Amsterdam"
}
}
]
}
Use curl to POST the resource to your HAPI FHIR server:
curl -X POST http://localhost:8080/fhir/CareTeam \
-H "Content-Type: application/fhir+json" \
-d @careteam-example.json
The HAPI FHIR server will validate the resource against the OZO CareTeam profile. If the resource does not conform to the profile constraints, you will receive an OperationOutcome with validation errors.
Successful Response:
{
"resourceType": "CareTeam",
"id": "12345",
"meta": {
"versionId": "1",
"lastUpdated": "2024-12-05T10:30:00.000+00:00",
"profile": [
"http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOCareTeam"
]
},
"status": "active",
"subject": {
"reference": "Patient/example-patient",
"type": "Patient",
"display": "H. de Boer"
},
"participant": [...]
}
Validation Error Example:
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"diagnostics": "CareTeam.subject: minimum required = 1, but only found 0",
"expression": [
"CareTeam.subject"
]
}
]
}
The following table lists the canonical URLs for common OZO profiles:
| Profile Name | Canonical URL |
|---|---|
| OZOCareTeam | http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOCareTeam |
| OZOAuditEvent | http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOAuditEvent |
| OZOPatient | http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOPatient |
| OZOPractitioner | http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOPractitioner |
| OZORelatedPerson | http://ozoverbindzorg.nl/fhir/StructureDefinition/OZORelatedPerson |
| OZOOrganization | http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOOrganization |
| OZOCommunication | http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOCommunication |
| OZOTask | http://ozoverbindzorg.nl/fhir/StructureDefinition/OZOTask |
Always set meta.profile: The meta.profile element tells the HAPI FHIR server which profile to validate against.
Profile constraints: Each OZO profile has specific constraints (cardinality, required elements, value sets). Review the profile definition in the Artifacts section.
Referenced resources: OZO profiles often reference other OZO profiles (e.g., OZOCareTeam references OZOPatient, OZOPractitioner). Ensure all referenced resources also conform to their respective OZO profiles.
Validation mode: The HAPI server's enable_repository_validating_interceptor setting determines whether validation is enforced. If set to true, invalid resources will be rejected.
This method is useful for development and testing environments where you want to manually install the package without modifying server configuration.
Enable runtime IG upload in your application.yaml:
hapi:
fhir:
ig_runtime_upload_enabled: true
Download the .tgz package from the releases page:
wget https://github.com/ozoverbindzorg/integrale-netwerk-communicatie/releases/download/v0.1.0/fhir.ozo-0.1.0.tgz
Use the $install operation to upload the package:
curl -X POST \
-H "Content-Type: application/gzip" \
--data-binary @fhir.ozo-0.1.0.tgz \
"http://localhost:8080/fhir/ImplementationGuide/\$install"
Follow the same verification steps as in Method 1.
The OZO FHIR Implementation Guide depends on the following packages, which will be automatically installed if fetchDependencies: true is configured:
| Package | Version | Description |
|---|---|---|
| nictiz.fhir.nl.r4.zib2020 | 0.12.0-beta.4 | Dutch Health and Care Information models (ZIB) |
| nictiz.fhir.nl.r4.nl-core | 0.12.0-beta.4 | Dutch national core profiles |
These dependencies are required for proper validation of Dutch healthcare resources used in the OZO platform.
Solution: Ensure validation is disabled during installation:
hapi:
fhir:
iginstaller_validationenabled: false
Solution: The HAPI FHIR server may have issues generating snapshots for certain profiles. The iginstaller_validationenabled: false setting helps bypass this issue.
Solution: Verify that fetchDependencies: true is set in the implementation guide configuration. You may also need to ensure the server has internet access to download dependencies from package registries.
Solution: Increase the JVM heap size when starting the HAPI server:
java -Xmx4g -jar target/hapi-fhir-jpaserver.jar
Solution: Check the server logs for installation errors. Verify the package URL is accessible and the package file is valid.
To update to a newer version of the OZO FHIR package:
application.yaml:
implementationguides:
ozo:
name: fhir.ozo
version: 0.2.0 # New version
packageUrl: https://github.com/ozoverbindzorg/integrale-netwerk-communicatie/releases/download/v0.2.0/fhir.ozo-0.2.0.tgz
Restart the HAPI FHIR server
curl http://localhost:8080/fhir/ImplementationGuide?_id=fhir.ozo
The server will detect the version change and reinstall the package with the updated resources.
Below is a complete example of a HAPI FHIR server application.yaml configuration with the OZO package installed:
hapi:
fhir:
fhir_version: R4
server_address: http://localhost:8080/fhir/
# Enable repository validation
enable_repository_validating_interceptor: true
# Disable validation during IG installation
iginstaller_validationenabled: false
validate_resource_status_for_package_upload: false
# Implementation Guides
implementationguides:
# OZO FHIR Implementation Guide
ozo:
name: fhir.ozo
version: 0.1.0
packageUrl: https://github.com/ozoverbindzorg/integrale-netwerk-communicatie/releases/download/v0.1.0/fhir.ozo-0.1.0.tgz
fetchDependencies: true
installMode: STORE_AND_INSTALL
# Example: Other implementation guides can be added here
# koppeltaal:
# name: koppeltaalv2.00
# version: 0.15.0-beta.9
# packageUrl: https://github.com/vzvznl/Koppeltaal-2.0-FHIR/releases/download/v0.15.0-beta.9/koppeltaalv2-0.15.0-beta.9.tgz
# fetchDependencies: true
# installMode: STORE_AND_INSTALL
# Supported resource types (ensure OZO resources are included)
supported_resource_types:
- AuditEvent
- CareTeam
- Communication
- CommunicationRequest
- Organization
- Patient
- Practitioner
- RelatedPerson
- Task
# ... other resource types
For issues related to:
Installing the OZO FHIR Implementation Guide on a HAPI FHIR server enables:
By following this guide, you can ensure your HAPI FHIR server is properly configured to support OZO platform integrations.