csv
Convert CSV files with custom column allocations
Command line usage
/*^babelfsh
csv
[--help] [--path PATH] [--url URL] [--delimiter DELIMITER]
[--csv-quote CSV_QUOTE] [--csv-escape CSV_ESCAPE] [--skip-empty-lines]
[--charset CHARSET] [--line-ending LINE_ENDING] [--headers HEADERS]
[--concept-filter CONCEPT_FILTER] --code-column CODE_COLUMN
--display-column DISPLAY_COLUMN [--definition-column DEFINITION_COLUMN]
[--allow-missing-code-column] [--property-mapping PROPERTY_MAPPING]
[--no-filter-duplicates]
[--split-code-and-display-using SPLIT_CODE_AND_DISPLAY_USING]
^babelfsh*/Command line argument reference
--code-column CODE_COLUMN
--cc CODE_COLUMN
Required
Name of the column containing the codes
--display-column DISPLAY_COLUMN
--dc DISPLAY_COLUMN
Required
Name of the column containing the display names
--allow-missing-code-column
Allow missing code column in CSV file (these rows are filtered out, useful for mapping source files that mainly define a ConceptMap). This is opt-in, i.e. default=false
--charset CHARSET
-c CHARSET
The charset of the file, with the name from java.nio.charset.Charset: Big5, Big5-HKSCS, CESU-8, EUC-JP, EUC-KR, ... See https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html
--concept-filter CONCEPT_FILTER
--cf CONCEPT_FILTER
Filter concepts based on the values in the CSV file. Supported operators with supported case-insensitive keywords in parentheses: EQUALS ('=', '==', 'equals'), NOT_EQUALS ('!=', '<>', 'not-equals', 'not_equals'), NOT_BLANK ('not-blank', 'not_blank'), BLANK ('blank')
--csv-escape CSV_ESCAPE
Escape character used in the CSV file. Default is double quote (")
--csv-quote CSV_QUOTE
Quote character used in the CSV file. Default is double quote (")
--definition-column DEFINITION_COLUMN
Name of the column containing the definitions
--delimiter DELIMITER
-d DELIMITER
Delimiter used in the CSV file. Default is comma (,)
--headers HEADERS
--hd HEADERS
List of headers to use, provided as a JSON list. If not provided, headers will be read from the file. Example: ["header1", "header2"]
--help
-h
show this help message and exit
--line-ending LINE_ENDING
--le LINE_ENDING
Line ending used in the CSV file, default
--no-filter-duplicates
--filter-duplicates
Filter duplicate concepts based on code and display name. If collisions occur, this will result in an error. Default false (all duplicates are treated as errors).
--path PATH
--file PATH
-p PATH
-f PATH
Path to the CSV file
--property-mapping PROPERTY_MAPPING
--pm PROPERTY_MAPPING
Mapping of additional properties to columns in the CSV file. The property mapping is a JSON array of objects, where each object has the following properties: <column>: the name of the column in the CSV file; <code>: the code of the property in the FHIR CodeSystem; <required>: whether the property is required (true or false, default false); <mapper>: a mapper specification (see below)Example: {"column": "my_column", "required": true, "property": "my_property", "mapper": {"id": "boolean", "arguments": {"1": "true", "0": "false"}}}Supported property mappers: boolean
--skip-empty-lines
-s
Skip empty lines in the CSV file
--split-code-and-display-using SPLIT_CODE_AND_DISPLAY_USING
If specified, split code and display columns using this separator. Default is not to split.
--url URL
-u URL
URL to the CSV file
Last updated