This project is an example of implementing a custom operation for hapi fhir and deploying it as part of a docker compose.
The operation is found in org.example.DummyOperation. This was built based on hapi 7.6, though the docker
Follow the following steps to try out the example:
- Build the jar
mvn package
- Copy the generated jar into the hapi-extra-classes directory
mkdir -p hapi-extra-classes
cp target/hapi-custom-operation-demo-1.0-SNAPSHOT.jar hapi-extra-classes
- Start the docker container
docker compose up -d
- Monitor the docker logs until hapi has started. (press ctr-C to exit)
docker logs -f fhir
- Check the end point
curl -X POST 'http://localhost:8080/fhir/$manualInputAndOutput'
This should output hello
with no new line.
hapi-custom-operation-demo$ curl -X POST 'http://localhost:8080/fhir/$manualInputAndOutput'
hellohapi-custom-operation-demo$