Feature/warning scale
This commit is contained in:
parent
b4c5f8b372
commit
5beda5f34f
3 changed files with 23 additions and 29 deletions
|
|
@ -308,13 +308,6 @@ class ReportGenerator:
|
|||
context['permalink'] = generate_permalink(base_url, self.calculator_prefix, form)
|
||||
context['calculator_prefix'] = self.calculator_prefix
|
||||
|
||||
# For further information about these values visit https://gitlab.cern.ch/cara/cara/-/merge_requests/321.
|
||||
context['scale_warning'] = {
|
||||
'level': 'red-4', # 'red-4' - 'orange-3' - 'yellow-2' - 'green-1'
|
||||
'risk': 'strong', # 'strong' - 'medium' - 'reduced' - ''
|
||||
'onsite_access': '4’000', # '4’000' - '5’000' - '6’500' - '8’000'
|
||||
'threshold': '2%' # '2%' - '' - '' - ''
|
||||
}
|
||||
return context
|
||||
|
||||
def _template_environment(self) -> jinja2.Environment:
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ footer img {
|
|||
#download-pdf, #pdf_qrcode_aref {
|
||||
display: none;
|
||||
}
|
||||
#cern_level{
|
||||
#scale_warning{
|
||||
height: 15em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
{% 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' %}
|
||||
{% set cern_level = 'yellow-2' %} <!-- green-1, yellow-2, orange-3, red-4 -->
|
||||
{% if ((prob_inf > 10) or (expected_new_cases >= 1)) %} {% set scale_warning = 'red' %}
|
||||
{% elif (2 <= prob_inf <= 10) %} {% set scale_warning = 'orange' %}
|
||||
{% else %} {% set scale_warning = 'green' %}
|
||||
{% endif %}
|
||||
|
||||
{% block report_preamble_navtab %}
|
||||
|
|
@ -12,9 +13,9 @@
|
|||
{% endblock report_preamble_navtab %}
|
||||
|
||||
{% block warning_animation %}
|
||||
{% 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' %}
|
||||
{% if scale_warning == 'red' %} {% set warning_color= 'bg-danger' %}
|
||||
{% elif scale_warning == 'orange' %} {% set warning_color = 'bg-warning' %}
|
||||
{% elif scale_warning == '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">
|
||||
|
|
@ -28,18 +29,18 @@
|
|||
|
||||
{% block report_summary %}
|
||||
<div class="flex-row align-self-center">
|
||||
{% if cern_level == 'red' %}
|
||||
{% if scale_warning == '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 cern_level == 'orange' %}
|
||||
{% elif scale_warning == '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 cern_level == 'green' %}
|
||||
{% elif scale_warning == '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>*.
|
||||
|
|
@ -48,21 +49,21 @@
|
|||
|
||||
{% if (prob_inf > 2) %}
|
||||
<br>
|
||||
{% if scale_warning.level == "green-1" %}
|
||||
{% if cern_level == "green-1" %}
|
||||
<div class="alert alert-dark mb-0" role="alert" style="height:fit-content">
|
||||
Note: the current CERN COVID Scale is <b>Green – 1</b>. The risk of circulation of asymptomatic or pre-symptomatic infected individuals within the CERN site is considered negligible. There may be more than <b>{{scale_warning.onsite_access}} daily on-site accesses</b>. Align your risk assessment with the guidance and instructions provided by the HSE Unit.
|
||||
Note: the current CERN COVID Scale is <b>Green – 1</b>. The risk of circulation of asymptomatic or pre-symptomatic infected individuals within the CERN site is considered negligible. There may be more than <b>8'000 daily on-site accesses</b>. Align your risk assessment with the guidance and instructions provided by the HSE Unit.
|
||||
</div>
|
||||
{% elif scale_warning.level == "yellow-2" %}
|
||||
{% elif cern_level == "yellow-2" %}
|
||||
<div class="alert alert-dark mb-0" role="alert" style="height:fit-content">
|
||||
Note: the current CERN COVID Scale is <b>Yellow - 2</b>. There is a {{scale_warning.risk}} risk that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site. There may be around <b>{{scale_warning.onsite_access}} daily on-site accesses</b> during this stage. See with your supervisor, DSO/LEXGLIMOS and space manager if this scenario is acceptable and if any additional measures can be applied (ALARA).
|
||||
Note: the current CERN COVID Scale is <b>Yellow - 2</b>. There is a reduced risk that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site. There may be around <b>6'500 daily on-site accesses</b> during this stage. See with your supervisor, DSO/LEXGLIMOS and space manager if this scenario is acceptable and if any additional measures can be applied (ALARA).
|
||||
</div>
|
||||
{% elif scale_warning.level == "orange-3" %}
|
||||
{% elif cern_level == "orange-3" %}
|
||||
<div class="alert alert-dark mb-0" role="alert" style="height:fit-content">
|
||||
Warning: the current CERN COVID Scale is <b>Orange - 3</b>. There is a {{scale_warning.risk}} risk that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site. There may be around <b>{{scale_warning.onsite_access}} daily on-site accesses</b> during this stage. See with your supervisor, DSO/LEXGLIMOS and space manager if this scenario is acceptable and if any additional measures can be applied (ALARA).
|
||||
Warning: the current CERN COVID Scale is <b>Orange - 3</b>. There is a medium risk that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site. There may be around <b>5'000 daily on-site accesses</b> during this stage. See with your supervisor, DSO/LEXGLIMOS and space manager if this scenario is acceptable and if any additional measures can be applied (ALARA).
|
||||
</div>
|
||||
{% elif scale_warning.level == "red-4" %}
|
||||
{% elif cern_level == "red-4" %}
|
||||
<div class="alert alert-dark mb-0" role="alert" style="height:fit-content">
|
||||
Warning: the current CERN COVID Scale is <b>Red - 4</b>. There is a {{scale_warning.risk}} risk that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site. There may be around <b>{{scale_warning.onsite_access}} daily on-site accesses</b> during this stage. Please reduce the value below the threshold of {{scale_warning.threshold}}. See with your supervisor, DSO/LEXGLIMOS and space manager if this scenario is acceptable and if any additional measures are required.
|
||||
Warning: the current CERN COVID Scale is <b>Red - 4</b>. There is a strong risk that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site. There may be around <b>4'000 daily on-site accesses</b> during this stage. Please reduce the value below the threshold of 2%. See with your supervisor, DSO/LEXGLIMOS and space manager if this scenario is acceptable and if any additional measures are required.
|
||||
</div>
|
||||
{% else %}
|
||||
<p><b>Note:</b> The CERN COVID Level is not specified.</p>
|
||||
|
|
@ -72,13 +73,13 @@
|
|||
{% endblock report_summary %}
|
||||
|
||||
{% block report_summary_footnote %}
|
||||
{% if cern_level == 'red' %}
|
||||
{% if scale_warning == '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 cern_level == 'orange' %}
|
||||
{% elif scale_warning == '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 cern_level == 'green' %}
|
||||
{% elif scale_warning == 'green' %}
|
||||
This level of risk is within acceptable parameters, no further actions are required.
|
||||
{% endif %}
|
||||
{% endblock report_summary_footnote %}
|
||||
|
|
@ -133,7 +134,7 @@
|
|||
<div class="alert alert-warning" role="alert">Events with a <strong>P(i) between 2% and 10%</strong> shall be subject to ALARA principles (see footnote) to minimise the risk before proceeding.</div>
|
||||
<div class="alert alert-danger mb-0" role="alert">Events with a <strong>P(i) exceeding 10% or a number of expected new cases that exceeds 1</strong> may not take place until additional measures are in place and a risk reduction has been performed.</div>
|
||||
</div>
|
||||
<div class="col-xl-3 align-self-center text-center"><img id="cern_level" class="rounded" src="{{ calculator_prefix }}/static/images/warning_scale/{{scale_warning.level}}.png"></div>
|
||||
<div class="col-xl-3 align-self-center text-center"><img id="scale_warning" class="rounded" src="{{ calculator_prefix }}/static/images/warning_scale/{{ scale_warning }}.png"></div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
|
|
|||
Loading…
Reference in a new issue