On this page:

22.11smileutil: Export ConceptMap to CSV

 

The export-conceptmap-to-csv command can be used to export a ConceptMap resource as a CSV file of terminology mappings.

The first row of the CSV file will include the following headers:

  • SOURCE_CODE_SYSTEM – ConceptMap.group.source
  • SOURCE_CODE_SYSTEM_VERSION – ConceptMap.group.sourceVersion
  • TARGET_CODE_SYSTEM – ConceptMap.group.target
  • TARGET_CODE_SYSTEM_VERSION – ConceptMap.group.targetVersion
  • SOURCE_CODE – ConceptMap.group.element.code
  • SOURCE_DISPLAY – ConceptMap.group.element.display
  • TARGET_CODE – ConceptMap.group.element.target.code
  • TARGET_DISPLAY – ConceptMap.group.element.target.display
  • EQUIVALENCE – ConceptMap.group.element.target.equivalence (ConceptMapEquivalence)
  • COMMENT – ConceptMap.group.element.target.comment

22.11.1Usage

 
bin/smileutil export-conceptmap-to-csv -v "r4" -t "http://localhost:8000/" -u "http://example.com/conceptmap" -f "output.csv" -l

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

22.11.2Options

 
  • -v [version] (or --fhir-version [version]) – (optional) The version of FHIR supported by the server.
  • -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).
  • -f [filename] (or --filename [filename]) – The path and filename of the CSV file to be exported (e.g. ./output.csv).
  • -l or (or --logging) – (optional) If specified, verbose logging will be used.
  • -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.