Smile CDR v2024.05.PRE
On this page:

42.4.1smileutil: 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.

Note: In cases where multiple versions of a given ConceptMap have been loaded, the export-concept-to-csv command will only export the current or most recently updated version of the requested ConceptMap resource.

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

42.4.2Usage

 
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.

42.4.3Options

 
  • -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.
  • --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.