cql_runner
cql_runner copied to clipboard
Unit conversion support
Does CQL runner support unit conversion? We expected an output of 'mg/d' unit for "Product" but the return is 'mL'. Thank you!
define "MedicationStrength":
System.Quantity {value: 0.25, unit: 'mg/mL'}
define "Supply":
System.Quantity {value: 15, unit: 'mL'}
define "DaysSupplied":
System.Quantity {value: 29, unit: 'd'}
define "Product":
("Supply" * "MedicationStrength")/"DaysSupplied"
>> MedicationDose [1:1] 0.25 'mg/mL'
>> Supply [4:1] 15 'mL'
>> DaysSupplied [7:1] 29 'd'
>> Product [10:1] 0.12931034 'mL'