Matchbox is a FHIR server based on the hapifhir/hapi-fhir-jpaserver-starter
the server can be run in two configurations, development (allowing updating resources, set flag in application.yaml in matchbox.fhir.context.onlyOneEngine to true) or deployment (default), see also additional documentation
a public development server is hosted at https://test.ahdis.ch/matchbox/fhir with a corresponding gui https://test.ahdis.ch/matchbox/
a public test server is hosted at https://test.ahdis.ch/matchboxv3/fhir with a corresponding gui https://test.ahdis.ch/matchboxv3/
The docker file will create a docker image with no preloaded implementation guides. A list of implementation guides to load can be passed as config-map.
The easiest way to run this server entirely depends on your environment requirements. At least, the following 4 ways are supported:
With no implementation guide:
mvn clean install -DskipTests spring-boot:run
Load example implementation guides (needs postgres):
mvn clean install -DskipTests spring-boot:run -Dspring-boot.run.arguments=--spring.config.additional-location=file:with-preload/application.yaml
or
java -Dspring.config.additional-location=file:with-preload/application.yaml -jar target/matchbox.jar
mvn clean install -DskipTests spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
Then, browse to the following link to use the server:
http://localhost:8080/matchbox/fhir or http://localhost:8080/matchbox/#/
The database will be stored in the "data" directory. The configuration can be found in the "with-postgres" directory or in the "with-preload" directory.
Change to either with-posgres directory or the with-preload directory (contains a list of swiss ig's).
For the first time, you might need to do
docker-compose up matchbox-db
that the database gets initialized before matchbox is starting up (needs a fix)
mkdir data
mvn clean package -DskipTests
docker build -t matchbox .
docker-compose up
Matchbox will be available at http://localhost:8080/matchboxv3/fhir Matchbox-gui will be available at http://localhost:8080/matchboxv3/#/
Export the DB data:
docker-compose exec -T matchbox-test-db pg_dump -Fc -U matchbox matchbox > mydump
Reimport the DB data:
docker-compose exec -T matchbox-test-db pg_restore -c -U matchbox -d matchbox < mydump
cd matchbox-server
mvn package -DskipTests
docker build -t matchbox .
docker run -d --name matchbox -p 8080:8080 -v /Users/oegger/Documents/github/matchbox/matchbox-server/with-cda:/config matchbox
Server will then be accessible at http://localhost:8080/matchboxv3/fhir/metadata.
To dynamically configure run in a kubernetes environment and add a kubernetes config map that provides /config/application.yaml file with implementation guide list like in "with-preload/application.yaml"
docker tag matchbox eu.gcr.io/fhir-ch/matchbox:v313
docker push eu.gcr.io/fhir-ch/matchbox:v313
documentation is maintained in docs folder using mkdocs-material:
docs are then available at https://ahdis.github.io/matchbox/
kubectl cp matchbox-test-0:fhir.logdir_IS_UNDEFINED ./fhir.logdir/
kubectl cp matchbox-test-app-d684cf865 ./fhir.logdir/
mvn -Dtest=CapabilityStatementTests test
v.3.4.1
) in GitHub.matchbox-server
and publishes it to the Google Artifact registry.matchbox-engine
JAR and publishes it to the Maven Central Repository. The version used is the one
specified in the POM.