The Tabular Columns Set-Header handler adds the specified list of column headers to a tabular data block. If the original data has had a header row, then it will be replaced with the new one from this handler.
In the handler’s parameter, the new header columns are specified as comma-separated or semicolon-separated values, and the number of the column headers should be the same as the tabular data these headers attach to. When the specified column headers are more than the number of the columns of the tabular data, the exceeded number of headers will be dropped (from the end); and if the supplied headers are less than the data’s columns, dummy blank headers will be added.
In the parameter ‘column-headers’, the new header columns are specified as comma-separated or semicolon-separated values, and the number of the column headers should be the same as the tabular data these headers attach to.
Whether the separator is comma or semicolon is determined dynamically, depending on whether there are more commas or there are more semi-colons in the parameter line. So you can have commas or semi-colons (but not both) as part of a header value without the need for escape or qualifier characters, as long as such cases aren’t more than half of the total column numbers.
|column-headers||Comma- or semicolon-separated strings, as the new column headers of the output tabular data.|
In the following example, the handler’s config specified six column headers, the first header value is ‘Message Type’ and the last header-value is ‘ABC;xyz’.
Note in the last column header, semicolon ‘;’ is part of the header value, in such case, comma ‘,’ is chosen as the value separator. The handler dynamically configure this, as there are more comma than semicolons in this parameter config line.
<Handler>TabularColumnsSetHeader</Handler> <Parameters> <Parameter> <Name>column-headers</Name> <Value>Message Type,MRN,Patient Name,Gender,SSN,ABC;xyz</Value> </Parameter> </Parameters>