Logo GenPRES

GenericProduct Module

Returns the generic products for a list of generic product codes, each with ATC code, form, routes, substances and prescription products. An empty list returns all generic products. Also finds the generic products of a brand and lists the barcodes of a generic product.

Functions and values

Function or value Description

create id nm lb ac an sh rt ss ps

Full Usage: create id nm lb ac an sh rt ss ps

Parameters:
Returns: GenericProduct

Create a GenericProduct

id : int
nm : string
lb : string
ac : string
an : string
sh : string
rt : string[]
ss : ProductSubstance[]
ps : PrescriptionProduct[]
Returns: GenericProduct

createSubstance si so sn sq su gi gn gq gu un ia

Full Usage: createSubstance si so sn sq su gi gn gq gu un ia

Parameters:
    si : int
    so : int
    sn : string
    sq : float
    su : string
    gi : int
    gn : string
    gq : float
    gu : string
    un : string
    ia : bool

Returns: ProductSubstance

Creates a ProductSubstance

si : int
so : int
sn : string
sq : float
su : string
gi : int
gn : string
gq : float
gu : string
un : string
ia : bool
Returns: ProductSubstance

findByBrand brand

Full Usage: findByBrand brand

Parameters:
    brand : string

Returns: GenericProduct array
brand : string
Returns: GenericProduct array

get

Full Usage: get

Returns: int list -> GenericProduct[]

Get the GenericProducts for the given Ids

This function is memoized

Returns: int list -> GenericProduct[]

getBarCodes gp

Full Usage: getBarCodes gp

Parameters:
Returns: (int * string array) array The GPK, BarCodes array

Get the BarCodes for the given GenericProduct

gp : GenericProduct

The GenericProduct

Returns: (int * string array) array

The GPK, BarCodes array

getRoutes gp

Full Usage: getRoutes gp

Parameters:
Returns: string array

Get the routes for a GenericProduct

gp : BST711T
Returns: string array

getSubstances un gp hpks

Full Usage: getSubstances un gp hpks

Parameters:
    un : string
    gp : BST711T
    hpks : int array

Returns: ProductSubstance array

Get the Substances for a GenericProduct

un : string
gp : BST711T
hpks : int array
Returns: ProductSubstance array

Type something to start searching.