Logo GenPRES

GenPresProduct Module

Groups generic products with the same substances and form into GenPres products, cached in a file, finds GenPres products by name, form, route, text, brand or generic product code, and lists the routes, forms and units of all GenPres products.

Functions and values

Function or value Description

create nm sh rt ph gps dpn unt sns

Full Usage: create nm sh rt ph gps dpn unt sns

Parameters:
    nm : string
    sh : string
    rt : string[]
    ph : string[]
    gps : GenericProduct[]
    dpn : string
    unt : string
    sns : string[]

Returns: GenPresProduct

Create a GenPresProduct.

nm : string
sh : string
rt : string[]
ph : string[]
gps : GenericProduct[]
dpn : string
unt : string
sns : string[]
Returns: GenPresProduct

filter n f r

Full Usage: filter n f r

Parameters:
    n : string - The name
    f : string - The form
    r : string - The route

Returns: GenPresProduct array

Filter GenPresProducts by name, pharmaceutical form and route.

n : string

The name

f : string

The form

r : string

The route

Returns: GenPresProduct array

findByBrand n

Full Usage: findByBrand n

Parameters:
    n : string

Returns: GenPresProduct array
n : string
Returns: GenPresProduct array

findByGPK gpk

Full Usage: findByGPK gpk

Parameters:
    gpk : int

Returns: GenPresProduct array

Find GenPresProducts by GenericProduct Id.

gpk : int
Returns: GenPresProduct array

get

Full Usage: get

Returns: int list -> GenPresProduct array

Get all GenPresProducts for the given GenericProduct Ids.

This function is memoized

Returns: int list -> GenPresProduct array

getFormRoutes ()

Full Usage: getFormRoutes ()

Parameters:
    () : unit

Returns: (string * string array) array An array of tuples of Forms and Routes.

Get all FormRoutes for all GenPresProducts.

() : unit
Returns: (string * string array) array

An array of tuples of Forms and Routes.

getFormUnits

Full Usage: getFormUnits

Returns: unit -> (string * string) array An array of tuples of Form and Units.

Get all FormUnits for all GenPresProducts.

Returns: unit -> (string * string) array

An array of tuples of Form and Units.

getForms

Full Usage: getForms

Returns: unit -> string array

Get all pharmaceutical forms for all GenPresProducts.

Returns: unit -> string array

getGPKMap

Full Usage: getGPKMap

Returns: unit -> Map<int, GenPresProduct array>

Get a Map of GenericProduct Ids to GenPresProducts.

Returns: unit -> Map<int, GenPresProduct array>

getGPKS all

Full Usage: getGPKS all

Parameters:
    all : int list

Returns: int array

Get a list of all GenericProduct Ids.

all : int list
Returns: int array

getGenericProducts ()

Full Usage: getGenericProducts ()

Parameters:
    () : unit

Returns: GenericProduct array

Get all GenericProducts for all GenPresProducts.

() : unit
Returns: GenericProduct array

getGenericUnits

Full Usage: getGenericUnits

Returns: unit -> string array

Get all Generic Units for all GenPresProducts.

Returns: unit -> string array

getRoutes

Full Usage: getRoutes

Returns: unit -> string array

Get all Routes for all GenPresProducts.

Returns: unit -> string array

getSubstQtyUnit gpk

Full Usage: getSubstQtyUnit gpk

Parameters:
    gpk : int - The GenericProduct id

Returns: (string * float * string) array An array of tuples of Substance name, quantity and unit.

Get all Substance names, quantities and units all GenPresProducts that contain the given GenericProduct Id.

gpk : int

The GenericProduct id

Returns: (string * float * string) array

An array of tuples of Substance name, quantity and unit.

getSubstanceUnits

Full Usage: getSubstanceUnits

Returns: unit -> string array

Get all Substance Units for all GenPresProducts.

Returns: unit -> string array

getUnits

Full Usage: getUnits

Returns: unit -> string array

Get all Units for all GenPresProducts.

Returns: unit -> string array

load

Full Usage: load

Returns: int list -> unit

Load all GenPresProducts in memory.

Returns: int list -> unit

routeForms gpps

Full Usage: routeForms gpps

Parameters:
Returns: (string * string) array An array of tuples of Route and Form.

Get all RouteForms for an array of GenPresProducts.

gpps : GenPresProduct[]

The GenPresProducts

Returns: (string * string) array

An array of tuples of Route and Form.

search n

Full Usage: search n

Parameters:
    n : string - The string

Returns: GenPresProduct array

Find all GenPresProducts that contain the given string.

n : string

The string

Returns: GenPresProduct array

toString gpp

Full Usage: toString gpp

Parameters:
Returns: string

Get the string representation of a GenPresProduct.

gpp : GenPresProduct
Returns: string

Type something to start searching.