Merge branch 'feature/cern_thresholds' into 'master'
Set new logic for the cern_level color variable See merge request cara/cara!326
This commit is contained in:
commit
d0ce546374
1 changed files with 14 additions and 9 deletions
|
|
@ -1,5 +1,10 @@
|
|||
{% extends "base/calculator.report.html.j2" %}
|
||||
|
||||
{% if ((prob_inf > 10) or (expected_new_cases >= 1)) %} {% set cern_level = 'red' %}
|
||||
{% elif (2 <= prob_inf <= 10) %} {% set cern_level = 'orange' %}
|
||||
{% else %} {% set cern_level = 'green' %}
|
||||
{% endif %}
|
||||
|
||||
{% block report_preamble_navtab %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="rules-tab" data-toggle="tab" href="#rules" role="tab" aria-controls="rules" aria-selected="false">Applicable Rules</a>
|
||||
|
|
@ -7,9 +12,9 @@
|
|||
{% endblock report_preamble_navtab %}
|
||||
|
||||
{% block warning_animation %}
|
||||
{% if ((prob_inf > 10) or (expected_new_cases >= 1)) %} {% set warning_color= 'bg-danger' %}
|
||||
{% elif (2 <= prob_inf <= 10) %} {% set warning_color = 'bg-warning' %}
|
||||
{% elif (prob_inf < 2) %} {% set warning_color = 'bg-success' %}
|
||||
{% if cern_level == 'red' %} {% set warning_color= 'bg-danger' %}
|
||||
{% elif cern_level == 'orange' %} {% set warning_color = 'bg-warning' %}
|
||||
{% elif cern_level == 'green' %} {% set warning_color = 'bg-success' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="intro-banner-vdo-play-btn {{warning_color}} m-auto d-flex align-items-center justify-content-center">
|
||||
|
|
@ -23,18 +28,18 @@
|
|||
|
||||
{% block report_summary %}
|
||||
<div class="flex-row align-self-center">
|
||||
{% if ((prob_inf > 10) or (expected_new_cases >= 1)) %}
|
||||
{% if cern_level == 'red' %}
|
||||
<div class="alert alert-danger mb-0" role="alert">
|
||||
<strong>Not Acceptable:</strong>
|
||||
Taking into account the uncertainties tied to the model variables, in this scenario, the <b>probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}</b> and the <b>expected number of new cases is {{ expected_new_cases | float_format }}</b>*.
|
||||
|
||||
</div>
|
||||
{% elif 2 <= prob_inf <= 10 %}
|
||||
{% elif cern_level == 'orange' %}
|
||||
<div class="alert alert-warning mb-0" role="alert">
|
||||
<strong>Attention:</strong>
|
||||
Taking into account the uncertainties tied to the model variables, in this scenario, the <b>probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}</b> and the <b>expected number of new cases is {{ expected_new_cases | float_format }}</b>*.
|
||||
</div>
|
||||
{% elif prob_inf < 2 %}
|
||||
{% elif cern_level == 'green' %}
|
||||
<div class="alert alert-success mb-0" role="alert">
|
||||
<strong>Acceptable:</strong>
|
||||
Taking into account the uncertainties tied to the model variables, in this scenario, the <b>probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}</b> and the <b>expected number of new cases is {{ expected_new_cases | float_format }}</b>*.
|
||||
|
|
@ -67,13 +72,13 @@
|
|||
{% endblock report_summary %}
|
||||
|
||||
{% block report_summary_footnote %}
|
||||
{% if ((prob_inf > 10) or (expected_new_cases >= 1)) %}
|
||||
{% if cern_level == 'red' %}
|
||||
This exceeds the authorised risk threshold or number of expected new cases.
|
||||
The risk level must be reduced before this activity can be undertaken.
|
||||
{% elif (2 <= prob_inf <= 10) %}
|
||||
{% elif cern_level == 'orange' %}
|
||||
This activity has an elevated level of risk, ALARA principles must be applied to minimise the level of risk before undertaking the activity.
|
||||
See the footnotes for more details on the ALARA principles.
|
||||
{% elif (prob_inf < 2) %}
|
||||
{% elif cern_level == 'green' %}
|
||||
This level of risk is within acceptable parameters, no further actions are required.
|
||||
{% endif %}
|
||||
{% endblock report_summary_footnote %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue