Hi everyone,
I have been working hard on something new for the community, and it is finally at the point where I want to show it to you. It is called FerroTERM, a FHIR terminology server written in Rust. It started because every time I wanted to validate a coded field next to FerroEHR I had to docker compose an big stack with lots of RAM, and at some point that got annoying enough that I wrote my own.
- GitHub - rubentalstra/FerroTERM: a pure-Rust, machine-generated multi-version FHIR terminology server for SNOMED CT. No JVM, no Elasticsearch. · GitHub
- https://ferroterm.eu
It is one binary. No JVM, no Elasticsearch, nothing to provision. You compile your RF2 release into an index once, offline, and the server loads that index at startup and answers from it. R4, R4B, R5 and R6 are served at the same time out of the same process. SNOMED CT in any edition, LOINC, ICD-10, ICD-11, RxNorm, the G-Standaard, and anything else you give it as a FHIR CodeSystem (full list). It contains no licensed content, so you bring your own release.
The thing I care about most is that it writes nothing at all. No database behind it, no schema and no migration, so there is no state that can drift away from the release you think you are serving. When a new release comes out you build a new index and restart. I have lost too many evenings to an index that disagreed with itself.
It is also very fast, and I mean very fast. The International edition is 535,502 concepts, the index build takes about 22 seconds, and the server is answering 0.4 seconds after launch. $subsumes comes back in 64 µs, $validate-code in 93 µs, and a full $lookup with all the properties in roughly half a millisecond, warm p50 on a laptop. Records are on the benchmarks page. The memory numbers there I am re-taking, because my own harness was reading them with a tool that undercounts on macOS.
[!warning]
it is strict. The specification decides what it accepts, so it refuses things other servers wave through. If it ever refuses something the specification actually permits, that is just as much a bug and I off course want to hear about it or create an issue on: Issues · rubentalstra/FerroTERM · GitHub. I run the HL7 terminology ecosystem suite on every change and publish the score: 637 of 670 on R5, 635 on R4, 628 on R4B.
If you want to poke at it, take the compose file from the latest release and build an index from your own RF2 zip first:
curl -LO https://github.com/rubentalstra/FerroTERM/releases/latest/download/compose.yaml
FERROTERM_RF2=/path/to/SnomedCT_InternationalRF2_*****.zip docker compose run --rm build
docker compose up
FHIR is then on http://localhost:8080/r4b and the viewer on /ui. The docs cover the other code systems and serving several editions side by side.