@rubentalstra Can you write down here the steps to upload the LOINC terminology and run the server with the docker container?
Sure. The FerroTERM container image holds both the server and the build tool. You build an index from the LOINC release once, and the server serves it. The steps are also in the book, with the same commands and more detail: https://ferroterm.eu/docs/operate/install.html#build-serve-and-look-up-loinc
1. Get the compose file and make the two folders
curl -LO https://github.com/FerroHEALTH/FerroTERM/releases/latest/download/compose.yaml
mkdir -p releases index
cp ~/Downloads/Loinc_2.83.zip releases/
Put the Loinc_2.83.zip you downloaded from loinc.org into ./releases, as it is. ./releases is /releases inside the container, and ./index is /data/index. Create both folders first, because Docker does not create them for you.
2. Build the LOINC index, once per release
docker compose run --rm build --loinc /releases/Loinc_2.83.zip
The path in the command is a container path. The build writes ./index/loinc, and its last line names what it wrote.
On Linux the image runs as user 65532, so it can’t write to a folder you own. Run the build as yourself:
docker compose run --rm --user "$(id -u):$(id -g)" build --loinc /releases/Loinc_2.83.zip
Docker Desktop on macOS or Windows needs no flag.
3. Start the server
docker compose up -d --wait
It listens on 127.0.0.1:8080 by default. Set FERROTERM_BIND_HOST=0.0.0.0 to reach it from another machine, and FERROTERM_PORT to use another port.
4. Look up a code
curl 'http://localhost:8080/r4b/CodeSystem/$lookup?system=http://loinc.org&code=2345-7'
The answer is a Parameters resource with the display “Glucose [Mass/volume] in Serum or Plasma” and version 2.83. Each FHIR version has its own base path: /r4, /r4b, /r5 and /r6. GET /r4/metadata?mode=terminology lists what the server serves. LOINC’s implicit value sets work straight away:
http://loinc.org/vs: every codehttp://loinc.org/vs/LL…: an answer listhttp://loinc.org/vs/LP…: everything under a part
For a newer release later, build it into its own folder, for example --out loinc-2.84, and run docker compose restart ferroterm. Both releases are then served, and a request that names no version gets the newest.
SNOMED CT, ICD-10, ICD-11 and the others use the same build step with their own flag. The same page lists each one under “Other code systems”.
If something goes wrong, paste the build output or docker compose logs ferroterm, and I’ll take a look.