pharmaship.inventory.parsers.medicines

pharmaship.inventory.parsers.medicines.parser(params)

Parse the database to render a dict of MoleculeGroup/Molecule/Medicine.

Process database data and set flags on medicines missing, expired or reaching near expiry.

Only molecules with pharmaship.inventory.models.MoleculeReqQty are listed.

Data is sorted by pharmaship.inventory.models.MoleculeGroup.

See pharmaship/schemas/parsers/medicines.json for details.

Parameters

params (object) – Global Parameters of the application (pharmaship.gui.view.GlobalParameters)

Returns

Dictionnary with list of Molecule by MoleculeGroup.

Return type

dict(list)

pharmaship.inventory.parsers.medicines.parser_element(molecule, data, warning_delay, today)

Parse the database to render a list of Molecule > Medicine.

Parameters
Returns

Formatted information with medicines.

Return type

dict