- Copy .env.example -> .env
- Install the fhir client
pip install -r requirements.txt
- Run the hapi fhir server
docker-compose up -d --build
Simply run the following command:
docker-compose up -d --buildThis will not only start the FHIR server, but also the definition-importer which will import standard codesystems listed in the FHIR spec into your FHIR server.
The fhir server will be running on http://localhost:8080.
When the definition-importer ends, you should be able to find a list of valuesets in the web browser. If the importer has failed, it will still be empty.
There are several versions of the FHIR spec, and in various parts of this project this comes into play:
- HAPI FHIR server
- HAPI FHIR cli
- HAPI FHIR client
Because these are three different components, the FHIR version needs to be set in three different places. Currently, everything is set to STU3 by default but if you ever wish to change this to another version (e.g. R4) you will have to do the following:
-
The HAPI FHIR server and CLI version can be changed in one single step. Simply change the variable
FHIR_VERSIONto the appropriate version in your.envfile. Valid values are the values supported by the hapi fhir cli tool, which are currentlydstu2,dstu3,r4,r5. -
The FHIR client needs to be set with
pip install fhirclient==YOUR_FHIR_VERSION. Check the FHIR client documentation how the fhir-client versions align with the official FHIR specs.