A HAPI FHIR JPA server plugin that implements the
AU Patient Summary FHIR IG and generates an Australian Patient
Summary document via the FHIR Patient/$summary operation.
It builds on the HAPI FHIR International Patient Summary (IPS) generator. When $summary is
invoked, the generator searches the JPA repository (one search per summary section) and remaps the
resulting document so that it conforms to the AU PS IG:
- the document
Bundleclaims conformance to the AU PS Bundle profile - the
Compositionclaims conformance to the AU PS Composition profile and is tagged with theen-AUlanguage - unambiguous resource types (
Patient,AllergyIntolerance,Condition,Encounter,Immunization,Medication,MedicationRequest,MedicationStatement,Organization,Practitioner,PractitionerRole,Procedure,RelatedPerson) are stamped with their AU PS profiles Observationresources are stamped when they can be classified as smoking status (LOINC72166-2) or pathology results (category = laboratory)- optional AU PS Alerts (LOINC
104605-1,Flag) and Patient Story (LOINC81338-6,DocumentReference) sections are included when matching resources are present
Note: This plugin stamps AU PS profiles and assembles an IPS-shaped document with AU section extensions. Full AU Core content validation (identifiers, terminology bindings, Must Support elements) remains the responsibility of the host server and its loaded IGs.
- Java 17+
- A HAPI FHIR JPA server that includes the IPS module (
hapi-fhir-jpaserver-ips), aligned with HAPI FHIR 8.10.0 (or compatible)
mvn clean verifyThe resulting target/au-ps-generator-<version>.jar can be installed into a HAPI FHIR server.
HAPI FHIR and Spring dependencies are declared with provided scope because they are supplied by
the host server at runtime.
The generator is published to GitHub Packages.
1. Authenticate with GitHub Packages
Add credentials to ~/.m2/settings.xml. The <id> must match the repository id used below
(github):
<settings>
<servers>
<server>
<id>github</id>
<username>YOUR_GITHUB_USERNAME</username>
<!-- Use a GitHub Personal Access Token (PAT) with read:packages scope -->
<password>YOUR_GITHUB_TOKEN</password>
</server>
</servers>
</settings>2. Add the repository to your pom.xml
<repositories>
<repository>
<id>github</id>
<name>GitHub Packages – Waymark Systems</name>
<url>https://maven.pkg.github.com/waymarksystems/au-ps-generator</url>
</repository>
</repositories>3. Add the dependency
<dependency>
<groupId>au.waymarksystems.health.fhir</groupId>
<artifactId>au-ps-generator</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>Replace 1.0.0-SNAPSHOT with the
latest published version.
Download the JAR from the GitHub Packages page and add it to your project classpath.
Enable the generator in application.yaml (or application.properties):
hapi:
fhir:
aups_enabled: true
# Avoid registering the built-in IPS strategy at the same time
ips_enabled: false
narrative_enabled: trueOr with properties syntax:
hapi.fhir.aups_enabled=true
hapi.fhir.ips_enabled=false
hapi.fhir.narrative_enabled=trueWhen enabled, the plugin auto-registers:
AuPsGenerationStrategy(asIIpsGenerationStrategy, if none is already defined)IpsGeneratorSvcImpl(asIIpsGeneratorSvc, if none is already defined)AuPatientSummaryGeneratorProvider(extendsIpsOperationProviderforPatient/$summary)AuPatientSummaryGeneratorSvcfor programmatic generation
Leave hapi.fhir.ips_enabled disabled (or otherwise avoid declaring a competing
IIpsGenerationStrategy) so the AU PS strategy is the one used for $summary.
For IG validation of generated documents, load the hl7.fhir.au.ps package in the host server
separately — this plugin does not package the Implementation Guide.
Section narratives are defined in
src/main/resources/au/ps/narrative/aups-narratives.properties and rendered from Thymeleaf HTML
templates under classpath:au/ps/narrative/. The Composition narrative title is
Australian Patient Summary. Shared rendering helpers reuse the IPS utility fragment name
(IpsUtilityFragments) so section templates stay compatible with HAPI's narrative engine.
Customise a section without breaking conformance by overriding the .narrative entry:
aups-allergyintolerance.resourceType=Bundle
aups-allergyintolerance.profile=https://hl7.org/fhir/uv/ips/StructureDefinition-Composition-uv-ips-definitions.html#Composition.section:sectionAllergies
aups-allergyintolerance.narrative=classpath:my/custom/allergyintolerance.htmlSNAPSHOT builds are published to GitHub Packages on every push to master. Release builds are
published for every v* tag.
git tag v1.0.0
git push origin v1.0.0The workflow (.github/workflows/publish.yml) deploys using GITHUB_TOKEN — no additional
secrets are required for GitHub Packages.
Apache License 2.0 — see LICENSE.