diff --git a/src/Informedica.GenOrder.Lib/DrugOrder.fs b/src/Informedica.GenOrder.Lib/DrugOrder.fs index 17f9b33..8f2845a 100644 --- a/src/Informedica.GenOrder.Lib/DrugOrder.fs +++ b/src/Informedica.GenOrder.Lib/DrugOrder.fs @@ -166,7 +166,6 @@ module DrugOrder = // create the units let cu = "x[Count]" let ml = "ml[Volume]" - let dr = "dr[Volume]" let ou = d.Unit |> unitGroup let au = diff --git a/src/Informedica.GenOrder.Lib/OrderVariable.fs b/src/Informedica.GenOrder.Lib/OrderVariable.fs index d18f116..b65374e 100644 --- a/src/Informedica.GenOrder.Lib/OrderVariable.fs +++ b/src/Informedica.GenOrder.Lib/OrderVariable.fs @@ -313,7 +313,6 @@ module OrderVariable = let setUnit (ovar: OrderVariable) = [ ovar.Constraints.Min |> Option.map (Minimum.toValueUnit >> ValueUnit.getUnit) - ovar.Constraints.Incr |> Option.map (Increment.toValueUnit >> ValueUnit.getUnit) ovar.Constraints.Max |> Option.map (Maximum.toValueUnit >> ValueUnit.getUnit) ovar.Constraints.Values |> Option.map (ValueSet.toValueUnit >> ValueUnit.getUnit) ] @@ -347,6 +346,7 @@ module OrderVariable = member val Name = "" with get, set member val Constraints = Variable.Dto.dto () with get, set member val Variable = Variable.Dto.dto () with get, set + member val Unit = "" with get, set /// Create a new `Dto` for an OrderVariable @@ -380,6 +380,7 @@ module OrderVariable = let min = dto.Constraints.MinOpt |> Option.bind (ValueUnit.Dto.fromDto >> (Option.map (Minimum.create dto.Constraints.MinIncl))) let max = dto.Constraints.MaxOpt |> Option.bind (ValueUnit.Dto.fromDto >> (Option.map (Maximum.create dto.Constraints.MaxIncl))) + Constraints.create min incr max vs let n = dto.Name |> Name.fromString diff --git a/src/Informedica.GenOrder.Lib/Types.fs b/src/Informedica.GenOrder.Lib/Types.fs index ad868e9..6d26e36 100644 --- a/src/Informedica.GenOrder.Lib/Types.fs +++ b/src/Informedica.GenOrder.Lib/Types.fs @@ -21,9 +21,11 @@ module Types = /// type OrderVariable = { + /// The Constraints to apply to the Variable Constraints : Constraints /// Stores the values/range Variable: Variable + } and Constraints = {