A Docker-based Proof of Concept demonstrating the AT Messaging Implementation Guide for FHIR R5 message exchange between healthcare systems.
Link to the Implementation Guide: https://fhir.hl7.at/r5-TC-FHIR-AG-Messaging-R5-main/index.html
Link to the IG source code: https://github.com/HL7Austria/TC-FHIR-AG-Messaging-R5
This PoC is not intended for any real life use. Simplifactions have been made that have severe security impacts in production systems. Most of the source code of this PoC has been generated by LLMs / Artificial Intelligence. Use with caution.
This PoC demonstrates secure FHIR R5 messaging between:
- Hospital Information System (HIS) - Sends discharge summaries and clinical documents, receives consult requests, sends answers to consult requests.
- General Practitioner (GP) Application - Receives and views messages, sends consult requests.
Messages are transported via Matrix protocol following the ATMessagingBundle profile.
┌─────────────────────────────────────────────────────────────────────────┐
│ Docker Compose Network │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ HAPI FHIR R5 │ │ HAPI FHIR R5 │ │
│ │ Port 8081 │ │ Port 8082 │ │
│ └────────┬────────┘ └────────┬────────┘ │
│ │ │ │
│ ┌────────▼────────┐ ┌────────▼────────┐ │
│ │ HIS App │ │ GP App │ │
│ │ (Spring Boot) │ │ (Spring Boot) │ │
│ │ Port 3001 │ │ Port 3002 │ │
│ └─────────────────┘ └─────────────────┘ │
│ │ │ │
│ └───────────────┬───────────────────────────┘ │
│ │ │
│ ┌──────────▼──────────┐ │
│ │ Synapse Matrix │ │
│ │ Port 8008 │ │
│ └─────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
- Docker and Docker Compose or docker-cli compatible products such as SUSE Rancher Desktop
- At least 4GB of available RAM (HAPI FHIR servers are memory-intensive)
cd messaging-poc
docker compose up --buildThe first startup will take several minutes as it:
- Builds the Spring Boot applications
- Starts PostgreSQL databases
- Initializes HAPI FHIR servers
- Configures Matrix Synapse
- Creates Matrix users and messaging room
| Application | URL | Description |
|---|---|---|
| HIS Web App | http://localhost:3001 | Hospital Information System |
| GP Web App | http://localhost:3002 | General Practitioner Application |
| HIS FHIR Server | http://localhost:8081 | Hospital FHIR R5 Server |
| GP FHIR Server | http://localhost:8082 | GP FHIR R5 Server |
| Matrix Server | http://localhost:8008 | Synapse Matrix Server* |
* The matrix room can be accessed using any matrix client (such as https://app.element.io/) with the following login credentials:
- Homeserver: http://localhost:8008 (must start with http, not https)
- User: gp_user
- Password: gp_password
| Service | Image | Purpose |
|---|---|---|
matrix |
matrixdotorg/synapse | Message transport |
matrix-db |
postgres:15-alpine | Matrix database |
his-app |
Custom (Java 21 + Spring Boot) | Hospital web app |
his-fhir |
hapiproject/hapi | Hospital FHIR server |
his-db |
postgres:15-alpine | Hospital FHIR database |
gp-app |
Custom (Java 21 + Spring Boot) | GP web app |
gp-fhir |
hapiproject/hapi | GP FHIR server |
gp-db |
postgres:15-alpine | GP FHIR database |
setup |
Alpine + curl | One-time Matrix setup |
docker compose downTo also remove the data volumes:
docker compose down -v- Backend: Java 21 + Spring Boot 3.2
- Frontend: Thymeleaf + Bootstrap 5
- FHIR: HAPI FHIR Client 7.0.2 (R5)
- FHIR Server: HAPI FHIR JPA Server
- Matrix: Synapse homeserver
- Database: PostgreSQL 15
This is a proof of concept with these simplifications:
- No TLS/encryption (HTTP only)
- Pre-configured Matrix users (no registration UI)
- Minimal FHIR validation (structure only)
- Single Matrix room for all messages
- No authentication in web applications
- Simple polling instead of real-time notifications
- Federation disabled on Matrix server
- FHIR servers have not installed the IG and cannot validate the resources. This is because indexing all needed ValueSet and CodeSystem packages would crash the dockerized HAPI resources.
- Encounter is still WIP in the IG thus not filled in the PoC