Example config/output file of unit conversion
Based on Taiwan Conversions (almost all signals has single unit). transformed all units to lowercase to merge same units before calling this function. The file was created Automatically and only the row "Ca" was edited => mmol/l. Rows without edits will be kept "as is", no unit conversion and in most cases that's OK.
- signal is the "source" signal in Taiwan - already did the mapping before with a different file. when "to_signal" is empty will keep the same name as "signal"
- count - how common this signal
- unit - the unit with this signal
- unitcount - How common is the signal+unit combination. If single unit, it will be equal to count. Will sum up to count when taking all rows for the same signal
- to_signal - ย when "to_signal" is empty will keep the same name as "signal"
- to_unit - was taken from global+local signals file definitions configuration (just for convenient, not in use). Each signal definition has units
- multiple_by, additive_b0 - the linear transformation. Default is 1 for multiple_by and 0 for additive_b0 if not given (dioing nothing be default to multiple by 1 and add 0)
- value_0 - example values
Example of top 20 rows:
In this example, the Ca
signal with the mmol/l
unit was given a conversion factor of 4.01
. This factor is used to transform the values from mmol/l
to the target unit of mg/dL
. You can see this in the example values: the original values are around 2, while data from mg/dL
unit has values around 10. For all other signals in the example, the units were consistent and did not require any conversion, so the conversion fields were left blank.
ย
Full file:
ย
map_units_stats.cfg