Skip to content

Unit conversion support #56

@drthyl

Description

@drthyl

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions