Für die deutsche Version bitte hier klicken.
A rather general description of various use cases can be found here. Please note that this is not an exhaustive list of use cases. It shall only give you an impression of what is possible with TerminoloGit.
Code systems and extensional value sets should be added to terminologies/
directory in order to have it converted to all supported file formats by MaLaC-CT.
Intensional ValueSets and other FHIR® resources, on the other hand, have to be added to input/resources/
directory as the are not supported by MaLaC-CT.
Additional configuration of TerminoloGit is recommended when adding a terminology with a different base URL within its canonical.
Code systems and extensional value sets should be added to the terminologies/
directory in order to be converted to all other supported file formats by MaLaC-CT.
A new terminology can be created in any of the supported file formats. However, it is not recommended to use one of the deprecated file formats as in might result in information loss.
The following process describes how to add a new terminology based on the .1.propcsv.xlsx
file format:
[CodeSystem | ValueSet]-[id].1.propcsv.xlsx
terminologies/
according to the following pattern: [CodeSystem | ValueSet]-[id]
.1.propcsv.xlsx
file into the corresponding directory within the terminologies/
directory. The resulting path should be the following: terminologies/[CodeSystem | ValueSet]-[id]/[CodeSystem | ValueSet]-[id].1.propcsv.xlsx
e.g. terminologies/CodeSystem-appc-anatomie/CodeSystem-appc-anatomie.1.propcsv.xlsx
or terminologies/ValueSet-elga-laborparameter/ValueSet-elga-laborparameter.1.propcsv.xlsx
input/includes/
[CodeSystem | ValueSet]-[id]-download.xhtml
[CodeSystem | ValueSet]-[id]-previous-versions.xhtml
input/redirects/
[CodeSystem | ValueSet]/[id].html
terminologies/[CodeSystem | ValueSet]-[id]/
Intensional ValueSets or other FHIR® resources (as FHIR® XML or FHIR® JSON) have to be added to the input/resources/
directory as they cannot be converted by MaLaC-CT.
Consider the following requirements:
The following process describes how to add an intensional ValueSet or other FHIR® resources:
input/resources/
according to the following pattern: [FHIR® resource type]-[id].[xml | json]
input/includes/[CodeSystem | ValueSet]-[id]-download.xhtml
using the download template by replacing [CI_PROJECT_PATH]
, [CI_DEFAULT_BRANCH]
, and [CodeSystem | ValueSet]-[id]
accordingly. Furthermore, use the appropriate file extension xml
or json
depending on the format of the ValueSet.input/includes/[CodeSystem | ValueSet]-[id]-previous-versions.xhtml
using the previous versions template.input/redirects/[CodeSystem | ValueSet]/[id].html
using the redirects template by replacing [TERMGIT_CANONICAL]
and [CodeSystem | ValueSet]-[id]
accordingly.terminologies/terminologiesMetadata.csv
name
- [CodeSystem | ValueSet]-[id]
canonical
- [TERMGIT_CANONICAL]/[CodeSystem | ValueSet]/[id]
oid
- OID of the terminologyversion
- version of the terminologyid
- [id]
type
- [CodeSystem | ValueSet]
metadata-change-timestamp
- the time of the last change of the terminology metadata.It is possible to add terminologies which have a canonical URL whose base does not match the TERMGIT_CANONICAL
, e.g. the TERMGIT_CANONICAL
is https://termgit.elga.gv.at
but the terminology's canonical is http://terminology.hl7.org/ValueSet/v3-TargetAwareness
.
In such a case, follow the instructions as described above depending on which of them suits the resource to be added best, but additionally it is recommended to add the resources's canonical to the sushi-config.yaml
:
...
parameters:
...
special-url:
- http://terminology.hl7.org/ValueSet/v3-TargetAwareness
...
It is possible that a value set is based on a code system which is included neither in terminologies/
nor in input/resources/
, e.g. http://loinc.org
or http://terminology.hl7.org/CodeSystem/v3-AdministrativeGender
. In such a case, a manual entry in the terminologies/terminologiesMetadata.csv
has to be added in order to guarantee a conversion of the value set to all file formats.
Add a line to terminologies/terminologiesMetadata.csv
name
- emptycanonical
- canonical of the referenced code system, e.g. http://loinc.org
or http://terminology.hl7.org/CodeSystem/v3-AdministrativeGender
oid
- OID of the terminologyversion
- version of the terminologyid
- emptytype
- emptymetadata-change-timestamp
- emptySimply, any of the supported file formats of a terminology within the terminologies/
directory may be edited and commited in order to trigger an updated publication of the terminology.
If the business version of the terminology (CodeSystem.version
or ValueSet.version
, respectively) has been incremented, IGver.py
will automatically create a previous version for the terminology.
Simply, update the terminology within the input/resources/
directory.
If a previous version shall be created for the updated terminology, this has to be done manually:
TERMGIT_HTML_PROJECT
: YYYYMMDD-hhmmss-
represents the date and time of the creation of the copy: output/[CodeSystem | ValueSet]-[id].html
and create output/YYYYMMDD-hhmmss-[CodeSystem | ValueSet]-[id].html
output/[CodeSystem | ValueSet]-[id].download.html
and create output/YYYYMMDD-hhmmss-[CodeSystem | ValueSet]-[id].download.html
[CodeSystem | ValueSet]-[id]
accordingly: <div role="alert" class="alert alert-danger">
<p id="publish-box">This is an outdated version that is no longer valid! You can access the <a href=[CodeSystem | ValueSet]-[id].html>current version here</a>.</p>
</div>
TERMGIT_HTML_PROJECT
.input/includes/[CodeSystem | ValueSet]-[id]-previous-versions.xhtml
create a new line according to the following pattern. OLD_BUSINESS_VERSION
represents the business version of the outdated terminology. <tr><td><a href="YYYYMMDD-hhmmss-[CodeSystem | ValueSet]-[id].html">OLD_BUSINESS_VERSION</a></td><td><a onclick="createDiff('[CodeSystem | ValueSet]-[id].html', 'YYYYMMDD-hhmmss-[CodeSystem | ValueSet]-[id].html')" href="javascript:void(0);">Diff</a></td></tr>
Before a terminology is deleted from TerminoloGit, consider setting its
status
toretired
(seeCodeSystem.status
orValueSet.status
, respectively).
TERMGIT_HTML_PROJECT
: ls output/*[CodeSystem | ValueSet]-[id].*
ls output/[CodeSystem | ValueSet]/[id].html
TERMGIT_HTML_PROJECT
.input/includes/[CodeSystem | ValueSet]-[id]-previous-versions.xhtml
input/includes/[CodeSystem | ValueSet]-[id]-download.xhtml
input/redirects/[CodeSystem | ValueSet]/[id].html
terminologies/[CodeSystem | ValueSet]-[id]/
or input/resources/[CodeSystem | ValueSet]-[id].xml
terminologies/terminologiesMetadata.csv
Basically, there are four ways how the GitLab pipeline can be started:
CI_COMMIT_TITLE
. By doing so a commit will be simulated.The HL7® FHIR® IG Publisher creates a set of static HTML pages. These pages are ideal for research purposes or simply for browsing, as all terminologies are presented in a well-structured HTML page. The user has the possibility to retrieve different code systems and value sets in a structured form or to search for specific concepts with the help of the search function. There is always a link between the code systems and value sets to make it easier to find terminologies that belong together.
To ensure that a system is always up to date, there are different options of automatically importing terminologies. The options presented here focus on importing a specific terminology.
Basically, the following URL template can always be used to retrieve the latest version of a terminology:
terminologies/
directory: [GITLAB_URL]/[PROJECT_PATH]/-/raw/[DEFAULT_BRANCH]/terminologies/[NAME_OF_TERMINOLOGY]/[NAME_OF_TERMINOLOGY][FORMAT]
input/resources/
directory: [GITLAB_URL]/[PROJECT_PATH]/-/raw/[DEFAULT_BRANCH]/input/resources/[NAME_OF_TERMINOLOGY].xml
Here the
[GITLAB_URL]
represents the URL used to access the GitLab instance which hosts the Git repository holding the terminologies (e.g. https://gitlab.com
).[PROJECT_PATH]
the path to the Git repository holding the terminologies (e.g. elga-gmbh/termgit
).[DEFAULT_BRANCH]
specifies the name of the default branch of the Git repository (e.g. main
).[NAME_OF_TERMINOLOGY]
corresponds to the type of the terminology (CodeSystem
or ValueSet
) and the id of the terminology (e.g. iso-3166-1-alpha-3
). The type and id are linked with -
resulting in CodeSystem-iso-3166-1-alpha-3
.[FORMAT]
corresponds to the file extension of one of the supported file formats, e.g. .4.fhir.xml
.The result then may look like this:
https://gitlab.com/elga-gmbh/termgit/-/raw/main/terminologies/CodeSystem-iso-3166-1-alpha-3/CodeSystem-iso-3166-1-alpha-3.4.fhir.xml
Based on a particular file format of a terminology, different types of retrieval are presented in the next points. Note, the examples here are based on the Austrian terminology browser termgit.elga.gv.at.
Python:
response = urllib2.urlopen('https://gitlab.com/elga-gmbh/termgit/-/raw/main/terminologies/CodeSystem-iso-3166-1-alpha-3/CodeSystem-iso-3166-1-alpha-3.2.claml.xml?inline=false')
Java:
URL url = new URL("https://gitlab.com/elga-gmbh/termgit/-/raw/main/terminologies/CodeSystem-iso-3166-1-alpha-3/CodeSystem-iso-3166-1-alpha-3.2.claml.xml?inline=false");
URLConnection connection = url.openConnection();
InputStream is = connection.getInputStream();
// ... then download the file
First clone of the repository:
git clone git@gitlab.com:elga-gmbh/termgit.git
Update of the local Git repository (incl. Git-tags):
git fetch --tags -f
Checking the difference between current local directory content and that of the Git-tag of a terminology once the repository has been updated:
git log HEAD..tags/CodeSystem-iso-3166-1-alpha-3
or
git log HEAD..tags/1.0.3166.1.2.3
Checkout the latest version of a terminology with the corresponding Git-tag. Note: This will set the entire repository to the state of the Git-tag. Other terminologies might have a more recent state.
git checkout tags/CodeSystem-iso-3166-1-alpha-3
or
git checkout tags/1.0.3166.1.2.3
With Git via ssh without a local repository and the Git-tags for the corresponding terminology directory. All available download formats will be retrieved:
git archive -o C:/tmp/CS-ISO-3166-1-alpha-3.zip --remote git@gitlab.com:elga-gmbh/termgit.git CodeSystem-iso-3166-1-alpha-3:terminologies/CodeSystem-iso-3166-1-alpha-3
or
git archive -o C:/tmp/CS-ISO-3166-1-alpha-3.zip --remote git@gitlab.com:elga-gmbh/termgit.git 1.0.3166.1.2.3:terminologies/CodeSystem-iso-3166-1-alpha-3
With GitLab API via REST for a specific download format (here .2.claml.xml
). /
needs to be escaped with %2f
:
curl https://gitlab.com/api/v4/projects/33179072/repository/files/terminologies%2fCodeSystem-iso-3166-1-alpha-3%2fCodeSystem-iso-3166-1-alpha-3.2.claml.xml?ref=main
curl:
curl https://tergi.elga.gv.at/fhir-server/api/v4/CodeSystem/iso-3166-1-alpha-3
for more details see http://www.hl7.org/fhir/overview-dev.html#Interactions
For each terminology which is hosted two Git-tags will be automatically created which continuously point to the current version of the respective terminology:
name
, e.g. 1.0.3166.1.2.3
name
, e.g. CodeSystem-iso-3166-1-alpha-3
The GitLab API for Git Tags can be used for automated checks whether a particular terminology has been updated. The following command can be used to retrieve the metadata of a Git-tag:
curl https://gitlab.com/api/v4/projects/33179072/repository/tags/CodeSystem-iso-3166-1-alpha-3
Among other things, the metadata includes
message
).created_at
).In addition to the automatic import of terminologies, it is also possible to manually import all terminologies. For this, it is recommended to activate the tag news in GitLab. You will then receive an automatic notification for each change.
The system can also be used to check whether a particular code is part of a code system or value set. This works with the FHIR® operation $validate-code
for CodeSystems and $validate-code
for ValueSets.
curl https://tergi.elga.gv.at/fhir-server/api/v4/ValueSet/appc-anatomie/$validate-code?system=https://termgit.elga.gv.at/CodeSystem/appc-anatomie&code=0
If you are using the HAPI JPA server, please note the following limitations on the $validate-code
FHIR® operation which is working according to the FHIR R4 specification:
[base]/CodeSystem/$validate-code
does not allow a trailing slash for the GET parameter url
(eg. https://dev-tergi.elga.gv.at/fhir-server/api/v4/CodeSystem/$validate-code?code=100&url=https://termgit.elga.gv.at/CodeSystem/elga-e-health-anwendungen)[base]/CodeSystem/[id]/$validate-code
(eg. https://dev-tergi.elga.gv.at/fhir-server/api/v4/CodeSystem/appc-anatomie/$validate-code?code=100)[base]/ValueSet/$validate-code
does not allow a trailing slash for the GET parameters url
and system
(eg. https://dev-tergi.elga.gv.at/fhir-server/api/v4/ValueSet/$validate-code?url=https://termgit.elga.gv.at/ValueSet/appc-anatomie&code=0&system=https://termgit.elga.gv.at/CodeSystem/appc-anatomie)[base]/ValueSet/[id]/$validate-code
does not allow a trailing slash for the GET parameter system
(eg. https://dev-tergi.elga.gv.at/fhir-server/api/v4/ValueSet/appc-anatomie/$validate-code?system=https://termgit.elga.gv.at/CodeSystem/appc-anatomie&code=0)[base]/CodeSystem/$lookup
requires a trailing slash for the GET parameter system
(eg. https://dev-tergi.elga.gv.at/fhir-server/api/v4/CodeSystem/$lookup?code=100&system=https://termgit.elga.gv.at/CodeSystem/appc-anatomie/)[base]/ValueSet/$expand
does not allow a trailing slash for the GET parameter url
(eg. https://dev-tergi.elga.gv.at/fhir-server/api/v4/ValueSet/$expand?url=https://termgit.elga.gv.at/ValueSet/appc-anatomie&system=https://termgit.elga.gv.at/CodeSystem/appc-anatomie/)[base]/ValueSet/[id]/$expand
(eg. https://dev-tergi.elga.gv.at/fhir-server/api/v4/ValueSet/appc-anatomie/$expand?system=https://termgit.elga.gv.at/CodeSystem/appc-anatomie/)TerminoloGit managed resources can directly be uploaded to FHIR® servers. This can be accomplished by leveraging GitLab's Project-level Secure Files.
Use the template for specifying FHIR® server, fill in the information required and create a file for each additional FHIR® server. The FHIRServer
is madatory. You can choose between User
+UserPassword
or the TergiTunnelToken
, please leave the unused variable empty with ""
. For more information about the variables look at the setup.
Now add the created file in your TerminoloGit instance:
All new or updated terminologies or FHIR® resources located in the input/resources
directory are subsequently loaded onto the additional FHIR® servers.