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.
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
Caution
a @ComponentScan had to be added to the main Application class, otherwise the routes / component could note be defined (see open issues)
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 mag:v030 .
Where "mag" is the image name and v030 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
请发表评论