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 "./SnomedCT_RF2Release_INT_20160131.zip" -v "dstu3" -t "http://localhost:8000" -u "http://snomed.info/sct"
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.
--mode [mode]) – (optional) This value allows Delta operations to be performed (see below for examples)
--fhir-version [version]) – (optional) The version of FHIR supported by the server.
--basic-auth [username:password]) – (optional) If specified, provides a username and password that will be supplied to the server in an HTTP Basic
Authorizationheader 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
Authorizationheader. If the value supplied is "
PROMPT", smileutil will prompt the user to enter a bearer token interactively.
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