Orderable.Component Module
Creates, changes and checks a component of an orderable, with its items, quantities, counts, concentration, dose and products.
Nested modules
| Modules | Description |
|
Holds the serializable shapes of a component and of its products, and converts a component to and from the component Dto. |
|
|
Prints the quantities, the counts, the concentration and the dose values of a component as plain text or Markdown. |
Functions and values
| Function or value |
Description
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Component.concentrations setsBack cmp
Parameters:
OrderVariable -> bool
cmp : Component
Returns: Component list
|
Returns the component once per combination of item concentrations, with the items fixed to that combination. With products, a combination is the strengths of one or more products with the same strengths, and the component quantity is fixed to their form quantities. Without products, the combinations come from the value lists of the item concentrations. A combination is left out when it leaves no value for a variable that setsBack does not set back.
|
Full Usage:
Component.create id nm frm cmp_qty orb_qty orb_qty_adj orb_cnt ord_qty ord_cnt orb_cnc dos ii
Parameters:
Id
-
The Id of the Component
nm : Name
-
The name of the Component
frm : string
-
The form of the Component
cmp_qty : Quantity
-
The quantity of the Component
orb_qty : Quantity
-
The quantity of the Component in the Orderable
orb_qty_adj : QuantityAdjust
-
The quantity of the Component in the Orderable per adjust unit
orb_cnt : Count
-
The count of the Component in the Orderable
ord_qty : Quantity
-
The quantity of the Component in the Order
ord_cnt : Count
-
The count of the Component in the Order
orb_cnc : Concentration
-
The concentration of the Component in the Orderable
dos : Dose
-
The dose of the Component
ii : Item list
-
The list of Items in the Component
Returns: Component
|
Creates a component without products from its order variables, dose and items.
|
Full Usage:
Component.createNew id orbN cmpN frm
Parameters:
string
-
The Id of the Component
orbN : string
-
The name of the Orderable
cmpN : string
-
The name of the Component
frm : string
-
The form of the Component
Returns: Component
|
Creates a component without items, with every order variable without a unit.
|
Full Usage:
Component.fromOrdVars ovars cmp
Parameters:
OrderVariable list
-
The list of OrderVariables
cmp : Component
-
The old Component
Returns: Component
|
Create a new Component from a list of OrderVariables using an old Component.
|
|
|
|
|
|
|
|
|
|
|
|
Whether the rules constrain the dose of a component or the dose of one of its items. When they do not, these doses only follow from the other variables, and no recalculation applies to them.
|
|
|
|
|
|
|
|
Narrows the item concentrations and the component quantity to the values of the products that apply. Returns whether a value was removed, with the component. A component without products is returned unchanged; a component with products of which none applies is an error.
|
|
|
Full Usage:
Component.productApplies cmp p
Parameters:
Component
p : ComponentProduct
Returns: bool
|
Whether a product applies to the values of a component: each strength of the product is among the concentration values of the item of that substance, and one of its form quantities is among the values of the component quantity. A variable without a value set excludes no product.
|
Full Usage:
Component.productsThatApply cmp
Parameters:
Component
Returns: ComponentProduct list
|
The products of a component that apply to its values.
|
|
|
Full Usage:
Component.toOrdVars cmp
Parameters:
Component
-
The Component
Returns: OrderVariable list
|
Return a Component as a list of OrderVariables
|
|
Create a string list from a Component where each string is a variable name with the value range and the Unit
|
|
GenPRES