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 "./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://loinc.org
for LOINC, http://snomed.info/sct
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.-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.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