Smile CDR v2024.08.PRE
On this page:

43.7.1smileutil: Import CSV to ConceptMap


The import-csv-to-conceptmap command can be used to import a CSV file of terminology mappings and store it as a ConceptMap resource.

Note: In cases where multiple versions of a given ConceptMap have been loaded, the import-csv-to-conceptmap command will always replace the current version of the specified ConceptMap resource with the imported ConceptMap.

The first row of the CSV file is expected to include the following headers:

  • EQUIVALENCE – (ConceptMapEquivalence)

An example CSV file that describes the mapping of FHIR to HL7v2 for Administrative Gender would appear as follows:


These terminology mappings could then be imported with the following command:

bin/smileutil import-csv-to-conceptmap -v "r4" -t "http://localhost:8000/" -u "" -s "active" -i "" -o "" -f "input.csv" -l

Note the source and target value sets are provided when invoking the command.


bin/smileutil import-csv-to-conceptmap -v "r4" -t "http://localhost:8000/" -u "" -s "active" -i "" -o "" -f "input.csv" -l

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


  • -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.
  • --debug – Enable debug mode.
  • -f [filename] (or --filename [filename]) – The path and filename of the CSV file to be imported (e.g. ./input.csv).
  • -hp [header] (or --header-passthrough [header]) – If specified, this argument specifies headers to include in the generated request.
  • -i [source URI] (or --input [source URI]) – (optional) The source value set of the ConceptMap to be imported (i.e. ConceptMap.sourceUri).
  • -l (or --logging) – (optional) If specified, verbose logging will be used.
  • -o [target URI] (or --output [target URI]) – (optional) The target value set of the ConceptMap to be imported (i.e. ConceptMap.targetUri).
  • -s [ConceptMap Status] (or --status [ConceptMap Status]) – The status of the ConceptMap resource to be imported (i.e. ConceptMap.status).
  • -t [base URL] (or --target [base URL]) – This argument should point to the base URL of the target FHIR server endpoint.
  • -u [ConceptMap URL] (or --url [ConceptMap URL]) – The URL of the ConceptMap resource to be imported/exported (i.e. ConceptMap.url).
  • -v [version] (or --fhir-version [version]) – (optional) The version of FHIR supported by the server.
  • --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.