Smile CDR v2022.11.PRE
On this page:

36.16smileutil: Upload Terminology


The upload-terminology command may be used to load an external vocabulary (e.g. SNOMED CT, LOINC) into a Smile CDR repository. It uses the distribution files provided by the authors of the vocabulary being uploaded.

See Uploading Standard Vocabularies for further information on the use of this command.


bin/smileutil upload-terminology -d "./" -v "dstu3" -t "http://localhost:8000" -u ""

In the example above, http://localhost:8000/ is the FHIR endpoint to which the data will be uploaded.


  • -d [file] – This argument provides the name of a file containing a terminology extract for the given code system. Note the following things:
    • The specific file(s) to be uploaded will vary by code system. There is no standard format for vocabulary files, and every vocabulary provides their data in their own format. Smile CDR has custom importers for each format that it supports.
    • The path should be local on the server, as opposed to being local to where the smileutil command is being executed. In other words, it is fine to execute this command from a different machine from the one where the actual server is running, but the terminology files must be copied to the server in advance.
    • It is possible to have multiple copies of this parameter on a single command line if the vocabulary is distributed in multiple files.
  • -t [endpoint] – The FHIR endpoint to which the data will be uploaded.
  • -u [url] – The code system URL. This should be set to for LOINC, for SNOMED or to an appropriate URL for other coding systems. See Uploading External CodeSystems for more information.
  • -m [mode] (or --mode [mode]) – (optional) This value allows Delta operations to be performed. Modes include SNAPSHOT (default), ADD, and REMOVE.
  • -hp [header] (or --header-passthrough [header]) – (optional, multiple) Additional headers added to generated http request.
  • -s [size] (or --size [header]) – (optional) A human-readable maximum size that the CLI util will attempt to send over the wire before defaulting to a local file references. Examples include "1GB", "100MB", "100000KB", "100000000B". Defaults to 10MB.
  • -v [version] (or --fhir-version [version]) – (optional) The version of FHIR supported by the server.
  • -b [username:password] (or --basic-auth [username:password]) – (optional) If specified, provides a username and password that will be supplied to the server in an HTTP Basic Authorization header in the form of "username:password". If the value supplied is "PROMPT", smileutil will prompt the user to enter credentials interactively.
  • --bearer-token [token](optional) If specified, provides a bearer token that will be supplied to the server in an HTTP Authorization header. If the value supplied is "PROMPT", smileutil will prompt the user to enter a bearer token interactively.
  • --tls-auth [filename](optional) If specified, this parameter supplies a path and filename for a Smile Util TLS JSON Authentication File that will be used to authenticate target FHIR server endpoints secured through HTTPS.

36.16.3Example: Add Delta to Custom Terminology


The following example shows a set of concepts being added to a codesystem.

bin/smileutil upload-terminology -v r4 -m ADD -t http://localhost:8000 -u http://mycodesystem -d ./concepts.csv -d ./hierarchy.csv

This example assumes that files called concepts.csv and hierarchy.csv exist at the path specified. The format for these files is described