Transformation
Prerequisities
To be able to start the project you need to have the following software installed on your machine :
- docker (VPN required, docker.int.raylytic.cloud accessible)
- docker-compose
- make
General
This repository contains the minimum needed software to be able to start a simple transformation from HLV v2.2 to FHIR.
There is one component : fhir-converter
which is used to convert Hl7v2 messages to FHIR resources.
Starting / Stopping
To start run make start
if you want to start everything. To stop run make stop
.
Configuration
Configuration is done via environment variables :
LISTENER_HOST
: ip address to use for the listener, default 0.0.0.0
LISTENER_PORT
: port of the listener, default 6664
DESTINATION_HOST
: Address of the fhir-converter, default "http://localhost:2019/api/v1/convert/hl7v2/${Template_id}"
FHIR_SERVER
: Address of the FHIR server, default "http://localhost:8080/fhir"
Makefile
Managing the project is done via a makefile, which supports the following commands :
clean Clean everything
pull-images Pull all images
watch-logs Open a tail on all the logs
build Build the container
start Start the FHIR Converter
dev Start in development mode
test Run the FHIR Converter acceptance tests
stop Stop running containers
push-image Builds and pushes all the docker images to the repository
restart Restart the app
docs-generate Generate docs
docs-serve Serve docs
FHIR Converter
To start the FHIR Converter use make start-fhir-convert
. This should start the application on http://localhost:2019.
To save the files created please copy them from fhir-converter\service-templates
to fhir-converter\templates
. This
is due to how the converter works, by copying the files from tempaltes
to service-templates
and storing everything
there.
Acceptance tests
To execute the acceptance test, please run make test
.
The following steps are needed to add a new acceptance test :
- under
fhir_converter/acceptance/tests
create a new folder if it's a new partner - under the folder with the partner name create a folder with the test name, note tests names should be meaningful
- create two files
01_request.hl7
which contains the hl7 message and01_response.json
containing the response - add the corresponding configuration in the
mapping.yaml
file
NOTES
- every transformation should have its own acceptance tests
- if a transformation does not provide acceptance tests, the PR will be denied