pharmaship.inventory.parsers.equipment

Parser for Equipment data.

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

Parse the database to render a dict of EquipmentGroup/Equipment/Article.

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

Only equipements with pharmaship.inventory.models.EquipmentReqQty are listed.

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

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

Parameters

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

Returns

Dictionnary with list of Equipment by EquimentGroup.

Return type

dict(list)

pharmaship.inventory.parsers.equipment.parser_element(equipment, data, warning_delay, today=datetime.date(2021, 4, 23))

Parse the database to render a list of Equipment > Article.

Parameters
Returns

Formatted information with articles.

Return type

dict