Skip to content

Commit

Permalink
docs: added doserule comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Casper Bollen authored and Casper Bollen committed Nov 6, 2023
1 parent 99546cf commit 248b330
Show file tree
Hide file tree
Showing 12 changed files with 317 additions and 107 deletions.
4 changes: 2 additions & 2 deletions src/Informedica.ZForm.Lib/GStand.fs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module GStand =
// TODO: rewrite to frequency mapping
/// Map GStand frequency string to a valid
/// frequency `ValueUnit`.
let mapFreq (fr: DR.Frequency) =
let mapFreq (fr: ZIndexTypes.RuleFrequency) =
let map vu =
match [
2N, ValueUnit.freqUnitPerNday 3N, ValueUnit.freqUnitPerNHour 36N
Expand Down Expand Up @@ -202,7 +202,7 @@ module GStand =

vu * x |> Some

let minmax n mapping (mm: DR.MinMax) =
let minmax n mapping (mm: ZIndexTypes.RuleMinMax) =
MinIncrMax.empty
|> setMin (mm.Min |> Option.bind (toVu n mapping))
|> setMax (mm.Max |> Option.bind (toVu n mapping))
Expand Down
15 changes: 15 additions & 0 deletions src/Informedica.ZIndex.Lib/Assortment.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ module Assortment =



/// <summary>
/// Create an Assortment product, a generic
/// product which is available in the assortment.
/// </summary>
/// <param name="gpk">The GPK code of the product.</param>
/// <param name="gen">The generic name of the product.</param>
/// <param name="tall">The tall man name of the product.</param>
/// <param name="div">The divisibility of the product.</param>
let create gpk gen tall div =
{
GPK = gpk
Expand Down Expand Up @@ -49,4 +57,11 @@ module Assortment =
)
|> StopWatch.clockFunc "Getting Formulary"


/// <summary>
/// Gets the assortment of products.
/// </summary>
/// <remarks>
/// This is a memoized function.
/// </remarks>
let assortment : unit -> Assortment [] = Memoization.memoize get_
7 changes: 7 additions & 0 deletions src/Informedica.ZIndex.Lib/ConsumerProduct.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module ConsumerProduct =
open Informedica.Utils.Lib


/// Creates a consumer product.
let create id nm lb qt ct br =
{
Id = id
Expand Down Expand Up @@ -39,4 +40,10 @@ module ConsumerProduct =
)


/// <summary>
/// Gets the consumer products for the given id.
/// </summary>
/// <remarks>
/// This is a memoized function.
/// </remarks>
let get : int -> ConsumerProduct [] = Memoization.memoize _get
Loading

0 comments on commit 248b330

Please sign in to comment.