Load SNOMED CT into Aidbox
Start working with SNOMED CT terminology in Aidbox
SNOMED CT is a large medical terminology which can be used in FHIR ValueSet resources. It is distributed under a free license which you have to set up with them.
We provide out-of-the-box integration with SNOMED CT through Aidbox Configuration project. You may start using it after we make sure you have the required SNOMED license.
To correctly set up Aidbox, we'll utilize the Aidbox configuration projects.
There's an existing guide for this process. Adhere to this guide, but note a variation when you reach the
Configure the Aidbox
step: instead of using the recommended configuration projects (R4,R4B,R5,etc.) — clone this specific project: git clone \
https://github.com/Panthevm/aidbox-project-template-snomed.git \
aidbox-project && \
cd aidbox-project && \
rm -rf .git
This project is tailored with specific configurations essential for terminology loading.
SNOMED CT is distributed under a license which means that we can not redistribute it without making sure that other people have this license. You can confirm your eligibility for accessing SNOMED CT by contacting Aidbox team. See our contacts here.
If you already have a configuration project, you can replicate these steps to enable SNOMED terminology in your Aidbox instance.
By adding this dependency, we instruct Aidbox to load the
zen.fhir
ValueSet definition, which is meant to include all codes from SNOMED. This ValueSet definition contains a specific directive detailing the FTR manifest. Aidbox'll use this manifest to input the actual SNOMED concepts into the database.snomed/zrc/snomed.edn
1
{ns snomed,
2
import #{zen.fhir},
3
value-set
4
{:zen/tags #{zen.fhir/value-set},
5
:zen/desc
6
"Includes all concepts from SNOMEDCT US edition snapshot. Both active and inactive concepts included, but is-a relationships only stored for active concepts",
7
:zen.fhir/version "0.6.0",
8
:fhir/code-systems
9
#{{:fhir/url "http://snomed.info/sct", :zen.fhir/content :bundled}},
10
:uri "http://snomed.info/sct",
11
:version "20230901",
12
:ftr
13
{:module "snomed",
14
:source-url "https://storage.googleapis.com",
15
:ftr-path "ftr",
16
:source-type :cloud-storage,
17
:tag "prod"}}}
{ns main
import #{aidbox
config
snomed}
…}
Zen requires importing a namespace into the entrypoint to load the ValueSet definition into the definitions store.
By default, Aidbox does not load terminologies into the database as that can take a lot of disk space. This means that full terminology functionality won’t be available until you enable it manually. When you set it to
true
, Aidbox will load terminologies into the database on the next startup and start functioning as a fully-featured terminology server.To achieve that we set
ftr.pull.enable
to true in features
map.When adding this feature to existing configuration projects, be mindful. If you include dependencies like
hl7-fhir-r4-core
or hl7-fhir-us-core
, Aidbox will load terminologies from these packages, which are sizable. Therefore, loading all the concepts into the database might take a while.zrc/config.edn
features
{:zen/tags #{aidbox.config/features}
:ftr {:pull {:enable true}}}
When
ftr.pull.enable
is set to true
, Aidbox loads concepts asynchronously by default. This means that immediately after starting, there might be no concepts available because they are still loading. To address this behavior, set ftr.pull.sync
to true
.zrc/config.edn
features
{:zen/tags #{aidbox.config/features}
:ftr {:pull {:enable true
:sync true}}}
Access the Aidbox UI and navigate to
Database
> Running Queries
. Look for a query that includes "_import"
; this query is responsible for loading concepts into your database. Once this query disappears from the list, you can check the concepts in the database. Proceed to Database
> DB Console
and enter the following query:SELECT count(*) from concept where resource->>'system' = 'http://snomed.info/sct'
Currently, we support various SNOMED CT terminology translations, and we can incorporate additional translation variants as needed. Translations are stored in the concept .
designation
property, and when a package includes multiple languages, the original language is also retained within the .designation
property. To select the desired translation, simply modify the link to the corresponding package in zen-package.edn.
Zen Package Link | Languages (IETF BCP 47 tags) |
---|---|
[email protected]:zen-fhir/snomed.git | en |
[email protected]:zen-fhir/snomedca.git | en, fr |
Last modified 5d ago