adonis2014 / MobileAccessGateway

IPF HAPI-FHIR IHE ITI springboot example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MobileAccessGateway

The MobileAccessGateway is an implementation based on the CH EPR mHealth (CI-Build) implementation guide.
It provides a FHIR Gateway supporting the PMIR and MHD server actors and uses XDS/PIXV3 to communicate with an XDS Affinity Domain.

It uses IPF and HAPI-FHIR.

IHE-Profile ITI Transacation Name IHE Actor Implemented in the Gateway with following actors
PDQm ITI-78 Mobile Patient Demographics Query Patient Demographics Supplier PDQv3 Patient Demographics Consumer
PMIR ITI-83 Mobile Patient Identifier Crossreference Query Patient Identity Manager PIX V3 Patient Identifier Cross-reference Consumer
PMIR ITI-93 Mobile Patient Identity Feed Patient Identity Manager PIX V3 Patient Identitiy Source
MHD ITI-65 Provide Document Bundle Document Recipient XDS Document Source, X-Service-User
MHD ITI-66 Find Document Manifests Document Responder XDS Document Consumer, X-Service-User
MHD ITI-67 Find Document References Document Responder XDS Document Consumer, X-Service-User
MHD ITI-68 Retrieve Document Document Responder XDS Document Consumer, X-Service-User

Test setup

Current configuration works with XDSTools7, a simulator is setup where the MobileAccessGateway connects.

Patient Manager is used for simulating PIX V3.

See client.http for example calls to the Mobile Access Gateway.

Run the JAR

  1. Clone https://github.com/oehf/ipf.git
  2. run mvn clean install -DskipTests in this directory, this should produce 4.0-SNAPSHOT (you need at least jdk11)
  3. Clone this repo
  4. Install the dependencies: mvn install
  5. Either run it from your favorite IDE or in the CLI: mvn clean compile && mvn exec:java -Dexec.mainClass="ch.bfh.ti.i4mi.mag.MobileAccessGateway"

To run your own configuration stored in a properties file use the -Dspring.config.additional-location switch. Any config parameter that is not specified in the file will be taken from the defaults. If your config file is called "myownconfig.properties" run it using: mvn clean compile && mvn exec:java -Dexec.mainClass="ch.bfh.ti.i4mi.mag.MobileAccessGateway" -Dspring.config.additional-location=file:myownconfig.properties

Caution

  • a @ComponentScan had to be added to the main Application class, otherwise the routes / component could note be defined (see open issues)

Dev environment

Eclipse setup

  • install lombok
  • in pom.xml xpp3 has to be excluded, otherwise there is an error message with the java compiler (The package javax.xml.namespace is accessible from more than one module: , java.xml)

VSCode

  • Java Extension needed

open issues

  • ipf-platform-camel-ihe-fhir-r4-pixpdq works not nicely with spring-boot together, is the META-INF directory not added to the output source?

Deployment

The MobileAccessGateway can run in a docker container and can be deployed to a Kubernetes cluster.

Building an image

To create a new docker image run:

mvn clean package
docker build -t gateway:v020

Where "gateway" is the image name and v020 is the version. Then push to a registry.

Creating a configuration

  • Create an empty folder ("myconfig" in this example) and copy the contents of the example-config directory.
  • Edit the application.yml. Leave the pathes for the keystores as they are.
  • Provide p12 or jks keystores for the client certificate, the server certificate and for IDP.

Deploying to Kubernetes

  • Edit myconfig/kubernetes-config.yml as you need it
  • Create a config map for "application.yml" kubectl create configmap mobile-access-gateway-configmap --from-file=application.yml=myconfig/application.yml
  • Create a secret for the certificates and keys kubectl create secret generic mobile-access-gateway-secret --from-file=client.jks=myconfig/client-certificate.jks --from-file=server.p12=myconfig/server-certificate.jks --from-file=idp.jks=myconfig/idp.jks
  • Upload configuration kubectl apply -f myconfig/kubernetes-config.yml

About

IPF HAPI-FHIR IHE ITI springboot example

License:Apache License 2.0


Languages

Language:Java 99.8%Language:Dockerfile 0.2%Language:Shell 0.0%