The Mobile Access Gateway 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.
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 |
Current configuration works with XDSTools7, a simulator is setup where the Mobile Access Gateway connects.
Patient Manager is used for simulating PIX V3.
See client.http for example calls to the Mobile Access Gateway.
- Clone https://github.com/oehf/ipf.git
- run mvn clean install -DskipTests in this directory, this should produce 4.0-SNAPSHOT (you need at least jdk11)
- Clone this repo
- Install the dependencies:
mvn install
- 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
- a @ComponentScan had to be added to the main Application class, otherwise the routes / component could note be defined (see open issues)
- 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)
- Java Extension needed
- 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?
The GUI is an Angular project stored in the angular/ directory. The compiled project is stored in the Java application resources (src/main/resources/static/). If you modify the Angular project, you have to rebuild it:
cd angular
npm install
npm run build-mag
The Mobile Access Gateway can run in a docker container and can be deployed to a Kubernetes cluster.
To create a new docker image run:
mvn clean package
docker build -t mag:v030 .
Where "mag" is the image name and v030 is the version. Then push to a registry.
- 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.
- 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