Skip to content

cloudflightio/hl7-at-messaging-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AT Messaging PoC

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.

Overview

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.

Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│                        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         │                                  │
│                └─────────────────────┘                                  │
└─────────────────────────────────────────────────────────────────────────┘

Quick Start

Prerequisites

Start the PoC

cd messaging-poc
docker compose up --build

The first startup will take several minutes as it:

  1. Builds the Spring Boot applications
  2. Starts PostgreSQL databases
  3. Initializes HAPI FHIR servers
  4. Configures Matrix Synapse
  5. Creates Matrix users and messaging room

Access the Applications

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

Services

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

Stopping the PoC

docker compose down

To also remove the data volumes:

docker compose down -v

Technology Stack

  • 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

PoC Limitations

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

About

A Docker-based Proof of Concept demonstrating the AT Messaging Implementation Guide for FHIR R5 message exchange between healthcare systems.

Resources

Stars

Watchers

Forks

Contributors