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:
-t [endpoint]– The FHIR endpoint to which the data will be uploaded.
-u [url]– The code system URL. This should be set to
http://snomed.info/sctfor SNOMED or to an appropriate URL for other coding systems. See Uploading External CodeSystems for more information.
--mode [mode]) – (optional) This value allows Delta operations to be performed. Modes include
--header-passthrough [header]) – (optional, multiple) Additional headers added to generated http request.
--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.
--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.
--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.
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