senaite.panic

This add-on enables panic level alerts for SENAITE LIMS by means of the integration of panic ranges in Analysis Specifications. senaite.panic adds two sub-fields min_panic and max_panic: when the result of an analysis falls outside the valid range and below min_panic or above max_panic, a warning message is displayed next to the analysis and an informative panel in Sample’s view as well. From this informative panel, lab manager can easily send an e-mail notification to the client contact, as well as to other key personnel.

Table of Contents:

Installation

Add senaite.panic in the eggs section of your buildout:

eggs =
    senaite.lims
    senaite.panic

Run bin/buildout afterwards.

Once buildout finishes, start the instance, login with a user with “Site Administrator” privileges and activate the add-on:

http://localhost:8080/senaite/prefs_install_products_form

Note

It assumes you have a SENAITE zeo client listening to port 8080

Quickstart

This section gives an introduction about senaite.panic. It assumes you have SENAITE LIMS and senaite.panic already installed. Please read the Installation for further details.

Panic settings

Visit the control panel view for senaite.panic to configure the settings. This control panel is accessible to users with Site Administrator role, through “Site Setup” view, “Add-on Configuration” section:

http://localhost:8080/senaite/@@panic-controlpanel

Panic settings view

From this view you can configure the subject and e-mail to use for notifications when the results are below the minimum panic value or above the maximum panic value. Several wildcards like ${analyses}, ${lab_address}, ${sample_id}, or ${sample_url} are supported.

Adding panic levels

To add panic levels, click to the “gear” icon from top right, go to “Analysis Specifications” view and either choose one or create a new one. In the “specifications” section, choose the analysis, locate the columns “Panic < Min” and “Panic > Max” and type the desired values.

Assignment of panic levels to an analysis through Specifications

Results in panic

When a result with a value that is either below the “Min panic” value or above the “Max panic” value set in the specifications, the system displays a red alert icon next to the result:

Result in panic

Email notification

When a result is “in panic”, a notification panel is displayed at the top of the sample view prompting the user to send an e-mail notification to the client contact the sample is assigned to:

Panic viewlet notification

When the button is clicked, an e-mail form is displayed and auto-filled with the subject and template created in the Panic Settings view:

Panic e-mail form

Changelog

2.1.0 (unreleased)

  • #4 Fixed import for schema extender ExtBooleanField

2.0.0 (2020-10-15)

  • Fix Traceback when rendering the Email popup
  • Do not display the panic viewlet if user does not have ViewResults permission
  • Hide panic icon in analysis listing when no ViewResults permission
  • Compatibility with senaite.lims 2.x
  • Fix wildcard mappings in email body and subject
  • Fix Traceback when CC Contacts on panic alert notification

1.0.0 (2020-02-09)

First version

License

SENAITE.PANIC Copyright (C) 2019-2020 RIDING BYTES & NARALABS

SENAITE.PANIC is available under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.

The source code of this software, together with a copy of the license can be found at this repository: https://github.com/senaite/senaite.panic

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.