From e1a389d7c31855acd1426e1798d3abf1755f4079 Mon Sep 17 00:00:00 2001 From: Jose Costa Teixeira <16153168+costateixeira@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:03:09 +0100 Subject: [PATCH 1/2] Add default configuration for quick deployment Adds a defaults/ directory with seed configuration: a license-free terminology library (library.yml) and a TX-only server config (config.json). Enables new deployments to start with a working terminology server configuration out of the box. --- .gitignore | 4 ++++ defaults/config/library.yml | 36 ++++++++++++++++++++++++++++++++++++ defaults/data/config.json | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 defaults/config/library.yml create mode 100644 defaults/data/config.json diff --git a/.gitignore b/.gitignore index 07bb985..d82950e 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,7 @@ test-cases-summary.txt tx/data/CodeSystem-cpt.db coverage/ +/be +docker-compose.override.yml +/defaults/data/terminology-cache +/defaults/data/logs diff --git a/defaults/config/library.yml b/defaults/config/library.yml new file mode 100644 index 0000000..19f1b64 --- /dev/null +++ b/defaults/config/library.yml @@ -0,0 +1,36 @@ +# Default Terminology Library Configuration +# License-free terminology sources only +# +# For licensed systems (SNOMED CT, LOINC, RxNorm, CPT, etc.), +# mount your own config/ volume with a customized library.yml. + +base: + url: https://storage.googleapis.com/tx-fhir-org + +sources: + # Built-in code systems + - internal:lang + - internal:country + - internal:currency + - internal:mimetypes + + # UCUM - Unified Code for Units of Measure + # - ucum:data/terminology-cache/ucum-essence-2.2.xml + + # FHIR Packages (downloaded from packages.fhir.org) + # HL7 Terminology + - npm:hl7.terminology.r4 + - npm:hl7.terminology.r3#4.0.0 + + # FHIR Extensions + - npm:hl7.fhir.uv.extensions.r4#5.1.0 + - npm:hl7.fhir.uv.extensions.r4#1.0.0 + + # IHE Format Codes + - npm:ihe.formatcode.fhir#1.3.0 + - npm:ihe.formatcode.fhir#1.1.0 + + # Other FHIR packages + - npm:hl7.fhir.uv.sdc#3.0.0 + - npm:hl7.fhir.uv.bulkdata#2.0.0 + - npm:hl7.fhir.uv.smart-app-launch#2.1.0 diff --git a/defaults/data/config.json b/defaults/data/config.json new file mode 100644 index 0000000..5e087eb --- /dev/null +++ b/defaults/data/config.json @@ -0,0 +1,36 @@ +{ + "server": { + "port": 3000, + "cors": { + "origin": true, + "credentials": true + } + }, + "modules": { + "shl": { "enabled": false }, + "vcl": { "enabled": false }, + "xig": { "enabled": false }, + "packages": { "enabled": false }, + "registry": { "enabled": false }, + "publisher": { "enabled": false }, + "npmprojector": { "enabled": false }, + "token": { "enabled": false }, + "tx": { + "enabled": true, + "librarySource": "/app/config/library.yml", + "cacheTimeout": 30, + "expansionCacheSize": 1000, + "expansionCacheMemoryThreshold": 0, + "endpoints": [ + { + "path": "/tx/r4", + "fhirVersion": "4.0.1" + }, + { + "path": "/tx/r5", + "fhirVersion": "5.0.0" + } + ] + } + } +} From 7c357e873b8b45eda7f65147650c7cf25cf88b4b Mon Sep 17 00:00:00 2001 From: Jose Costa Teixeira <16153168+costateixeira@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:03:09 +0100 Subject: [PATCH 2/2] Add default configuration for quick deployment Adds a defaults/ directory with seed configuration: a license-free terminology library (library.yml) and a TX-only server config (config.json). Enables new deployments to start with a working terminology server configuration out of the box. --- .gitignore | 4 ++++ defaults/config/library.yml | 36 ++++++++++++++++++++++++++++++++++++ defaults/data/config.json | 36 ++++++++++++++++++++++++++++++++++++ docker-compose.yml | 15 +++++++++++++++ 4 files changed, 91 insertions(+) create mode 100644 defaults/config/library.yml create mode 100644 defaults/data/config.json create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index 07bb985..d82950e 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,7 @@ test-cases-summary.txt tx/data/CodeSystem-cpt.db coverage/ +/be +docker-compose.override.yml +/defaults/data/terminology-cache +/defaults/data/logs diff --git a/defaults/config/library.yml b/defaults/config/library.yml new file mode 100644 index 0000000..19f1b64 --- /dev/null +++ b/defaults/config/library.yml @@ -0,0 +1,36 @@ +# Default Terminology Library Configuration +# License-free terminology sources only +# +# For licensed systems (SNOMED CT, LOINC, RxNorm, CPT, etc.), +# mount your own config/ volume with a customized library.yml. + +base: + url: https://storage.googleapis.com/tx-fhir-org + +sources: + # Built-in code systems + - internal:lang + - internal:country + - internal:currency + - internal:mimetypes + + # UCUM - Unified Code for Units of Measure + # - ucum:data/terminology-cache/ucum-essence-2.2.xml + + # FHIR Packages (downloaded from packages.fhir.org) + # HL7 Terminology + - npm:hl7.terminology.r4 + - npm:hl7.terminology.r3#4.0.0 + + # FHIR Extensions + - npm:hl7.fhir.uv.extensions.r4#5.1.0 + - npm:hl7.fhir.uv.extensions.r4#1.0.0 + + # IHE Format Codes + - npm:ihe.formatcode.fhir#1.3.0 + - npm:ihe.formatcode.fhir#1.1.0 + + # Other FHIR packages + - npm:hl7.fhir.uv.sdc#3.0.0 + - npm:hl7.fhir.uv.bulkdata#2.0.0 + - npm:hl7.fhir.uv.smart-app-launch#2.1.0 diff --git a/defaults/data/config.json b/defaults/data/config.json new file mode 100644 index 0000000..5e087eb --- /dev/null +++ b/defaults/data/config.json @@ -0,0 +1,36 @@ +{ + "server": { + "port": 3000, + "cors": { + "origin": true, + "credentials": true + } + }, + "modules": { + "shl": { "enabled": false }, + "vcl": { "enabled": false }, + "xig": { "enabled": false }, + "packages": { "enabled": false }, + "registry": { "enabled": false }, + "publisher": { "enabled": false }, + "npmprojector": { "enabled": false }, + "token": { "enabled": false }, + "tx": { + "enabled": true, + "librarySource": "/app/config/library.yml", + "cacheTimeout": 30, + "expansionCacheSize": 1000, + "expansionCacheMemoryThreshold": 0, + "endpoints": [ + { + "path": "/tx/r4", + "fhirVersion": "4.0.1" + }, + { + "path": "/tx/r5", + "fhirVersion": "5.0.0" + } + ] + } + } +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f128eee --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +services: + nodeserver: + build: . + image: ghcr.io/healthintersections/fhirsmith/fhirsmith:latest + volumes: + - ./defaults/config:/app/config + - ./defaults/data:/app/data + ports: + - "3000:3000" + restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://localhost:3000/health || exit 1"] + interval: 10s + timeout: 3s + retries: 12