Glycated hemoglobin (HbA1c) is an example of a laboratory analysis that is measured in two units of measurements, mmol/mol and %, whose conversion is not a multiplication
mmol/mol = (10.93 × %) – 23.5
To incorporate this functionality we will
- introduce a new column in the lab_unit_conversions csv where we will store the conversion from origin unit to target unit, in the format of a R valid expression that takes 'value' as an argument
- introduce in the function a test that checks that either 'multiplication factor' or the new column are non-empty, and not both, and that if non-empty the expression is valid
- modify the function to use this expression to convert whenever it is non-empty
@YMao-UMCU i will make this, including a unit test, and then make a pull request
Glycated hemoglobin (HbA1c) is an example of a laboratory analysis that is measured in two units of measurements, mmol/mol and %, whose conversion is not a multiplication
mmol/mol = (10.93 × %) – 23.5
To incorporate this functionality we will
@YMao-UMCU i will make this, including a unit test, and then make a pull request