adapted report to display multiple PI
This commit is contained in:
parent
58811914c5
commit
971d9294de
5 changed files with 128 additions and 53 deletions
|
|
@ -432,9 +432,9 @@ function draw_plot(svg_id) {
|
|||
if (show_sr_legend) {
|
||||
sr_unique_activities.forEach((b, index) => {
|
||||
legendShortRangeAreaIcon[index].attr('x', legend_x_start)
|
||||
.attr('y', graph_height + 4 * size - 15/2);
|
||||
.attr('y', graph_height + (4 + index) * size - 15/2);
|
||||
legendShortRangeText[index].attr('x', legend_x_start + space_between_text_icon)
|
||||
.attr('y', graph_height + 4 * size + text_height);
|
||||
.attr('y', graph_height + (4 + index) * size + text_height);
|
||||
});
|
||||
legendLongCumulativeIcon.attr("x1", legend_x_start)
|
||||
.attr("x2", legend_x_start + 20)
|
||||
|
|
|
|||
BIN
cara/apps/static/images/1.png
Normal file
BIN
cara/apps/static/images/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
cara/apps/static/images/2.png
Normal file
BIN
cara/apps/static/images/2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -59,36 +59,70 @@
|
|||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
<div class="align-self-center">
|
||||
<div class="d-flex">
|
||||
<div class="split">
|
||||
<div class="col-md-3">
|
||||
<div style="text-align:center"><b>Probability of infection (%)</b></div>
|
||||
<div class="d-flex" style="min-height: 160px">
|
||||
{% block warning_animation %}
|
||||
<div class="intro-banner-vdo-play-btn animation-color m-auto d-flex align-items-center justify-content-center">
|
||||
<b>{{prob_inf | non_zero_percentage}}</b>
|
||||
<i class="glyphicon glyphicon-play whiteText" aria-hidden="true"></i>
|
||||
<span class="ripple animation-color"></span>
|
||||
<span class="ripple animation-color"></span>
|
||||
<span class="ripple animation-color"></span>
|
||||
</div>
|
||||
{% endblock warning_animation %}
|
||||
<div class="card card-body align-self-center" style="text-align:center; max-width: 300px">
|
||||
<h6 class="card-title">
|
||||
<b>Probability of infection (%)</b><br>
|
||||
{% if form.short_range_option == "short_range_yes" %} Without <b>short range interactions</b> {% endif %}
|
||||
</h6>
|
||||
<br>
|
||||
<img src="/static/images/1.png" class="align-middle mb-3">
|
||||
<div class="d-flex" style="min-height: 160px">
|
||||
{% block long_range_warning_animation %}
|
||||
<div class="intro-banner-vdo-play-btn animation-color m-auto d-flex align-items-center justify-content-center">
|
||||
<b>{{long_range_prob_inf | non_zero_percentage}}</b>
|
||||
<i class="glyphicon glyphicon-play whiteText" aria-hidden="true"></i>
|
||||
<span class="ripple animation-color"></span>
|
||||
<span class="ripple animation-color"></span>
|
||||
<span class="ripple animation-color"></span>
|
||||
</div>
|
||||
{% endblock long_range_warning_animation %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8 pr-0 pl-0 d-flex">
|
||||
<br>
|
||||
{% if form.short_range_option == "short_range_yes" %}
|
||||
<div class="card card-body align-self-center" style="text-align:center; max-width: 300px">
|
||||
<h6 class="card-title">
|
||||
<b>Probability of infection (%)</b><br>
|
||||
With <b>short range interactions</b>
|
||||
</h6>
|
||||
<br>
|
||||
<img src="/static/images/2.png" class="align-middle mb-3">
|
||||
<div class="d-flex" style="min-height: 160px">
|
||||
{% block warning_animation %}
|
||||
<div class="intro-banner-vdo-play-btn animation-color m-auto d-flex align-items-center justify-content-center">
|
||||
<b>{{prob_inf | non_zero_percentage}}</b>
|
||||
<i class="glyphicon glyphicon-play whiteText" aria-hidden="true"></i>
|
||||
<span class="ripple animation-color"></span>
|
||||
<span class="ripple animation-color"></span>
|
||||
<span class="ripple animation-color"></span>
|
||||
</div>
|
||||
{% endblock warning_animation %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="d-flex">
|
||||
{% block report_summary %}
|
||||
<div class="align-self-center alert alert-dark mb-0" role="alert">
|
||||
Taking into account the uncertainties tied to the model variables, in this scenario and assuming all occupants are exposed equally, 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>*.
|
||||
<br>
|
||||
<div class="flex-row align-self-center">
|
||||
<div class="align-self-center alert alert-dark mb-0" role="alert">
|
||||
Taking into account the uncertainties tied to the model variables, in this scenario and assuming all occupants are exposed equally, the <b>probability of one exposed occupant getting infected is {{ long_range_prob_inf | non_zero_percentage }}</b> and the <b>expected number of new cases is {{ expected_new_cases | float_format }}</b>*.
|
||||
</div>
|
||||
{% if form.short_range_option == "short_range_yes" %}
|
||||
<br>
|
||||
<div class="align-self-center alert alert-dark mb-0" role="alert">
|
||||
Taking into account the uncertainties tied to the model variables, in this scenario and assuming all occupants are exposed equally, 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>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock report_summary %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{% block report_summary_footnote %}
|
||||
{% endblock report_summary_footnote %}
|
||||
</div>
|
||||
<p id="section1">* The results are based on the parameters and assumptions published in the CARA publication: <a href="https://doi.org/10.1098/rsfs.2021.0076"> doi.org/10.1098/rsfs.2021.0076</a>.</p><br>
|
||||
<br><p id="section1">* The results are based on the parameters and assumptions published in the CARA publication: <a href="https://doi.org/10.1098/rsfs.2021.0076"> doi.org/10.1098/rsfs.2021.0076</a>.</p><br>
|
||||
{% if form.short_range_option == "short_range_yes" %}
|
||||
{% if 'Speaking' in form.short_range_interactions|string or 'Shouting' in form.short_range_interactions|string %}
|
||||
<button class="btn btn-sm btn-primary" id="button_full_exposure" disabled>Show full exposure</button>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
{% extends "base/calculator.report.html.j2" %}
|
||||
|
||||
{% set cern_level = 'green-1' %} <!-- green-1, yellow-2, orange-3, red-4 -->
|
||||
|
||||
{% if ((long_range_prob_inf > 10) or (long_range_expected_new_cases >= 1)) %} {% set long_range_scale_warning = 'red' %}
|
||||
{% elif (2 <= long_range_prob_inf <= 10) %} {% set long_range_scale_warning = 'orange' %}
|
||||
{% else %} {% set long_range_scale_warning = 'green' %}
|
||||
{% endif %}
|
||||
|
||||
{% 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' %}
|
||||
|
|
@ -12,12 +18,25 @@
|
|||
</li>
|
||||
{% endblock report_preamble_navtab %}
|
||||
|
||||
{% block long_range_warning_animation %}
|
||||
{% if long_range_scale_warning == 'red' %} {% set long_range_warning_color= 'bg-danger' %}
|
||||
{% elif long_range_scale_warning == 'orange' %} {% set long_range_warning_color = 'bg-warning' %}
|
||||
{% elif long_range_scale_warning == 'green' %} {% set long_range_warning_color = 'bg-success' %}
|
||||
{% endif %}
|
||||
<div class="intro-banner-vdo-play-btn {{long_range_warning_color}} m-auto d-flex align-items-center justify-content-center">
|
||||
<b>{{long_range_prob_inf | non_zero_percentage}}</b>
|
||||
<i class="glyphicon glyphicon-play whiteText" aria-hidden="true"></i>
|
||||
<span class="ripple {{long_range_warning_color}}"></span>
|
||||
<span class="ripple {{long_range_warning_color}}"></span>
|
||||
<span class="ripple {{long_range_warning_color}}"></span>
|
||||
</div>
|
||||
{% endblock long_range_warning_animation %}
|
||||
|
||||
{% block warning_animation %}
|
||||
{% 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">
|
||||
<b>{{prob_inf | non_zero_percentage}}</b>
|
||||
<i class="glyphicon glyphicon-play whiteText" aria-hidden="true"></i>
|
||||
|
|
@ -28,51 +47,73 @@
|
|||
{% endblock warning_animation %}
|
||||
|
||||
{% block report_summary %}
|
||||
{% set report_message = "Taking into account the uncertainties tied to the model variables, in this scenario and assuming all occupants are exposed equally, 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>*." %}
|
||||
{% set long_range_report_message = "Taking into account the uncertainties tied to the model variables, in this scenario and assuming all occupants are exposed equally, the <b>probability of one exposed occupant getting infected is " + long_range_prob_inf | non_zero_percentage + "</b> and the <b>expected number of new cases is " + long_range_expected_new_cases | float_format + "</b>*." %}
|
||||
<div class="flex-row align-self-center">
|
||||
{% if scale_warning == 'red' %}
|
||||
<br>
|
||||
{% if long_range_scale_warning == 'red' %}
|
||||
<div class="alert alert-danger mb-0" role="alert">
|
||||
<strong>Not Acceptable:</strong>
|
||||
{{ report_message }}
|
||||
{{ long_range_report_message }}
|
||||
</div>
|
||||
{% elif scale_warning == 'orange' %}
|
||||
{% elif long_range_scale_warning == 'orange' %}
|
||||
<div class="alert alert-warning mb-0" role="alert">
|
||||
<strong>Attention:</strong>
|
||||
{{ report_message }}
|
||||
{{ long_range_report_message }}
|
||||
</div>
|
||||
{% elif scale_warning == 'green' %}
|
||||
{% elif long_range_scale_warning == 'green' %}
|
||||
<div class="alert alert-success mb-0" role="alert">
|
||||
<strong>Acceptable:</strong>
|
||||
{{ report_message }}
|
||||
{{ long_range_report_message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if (prob_inf > 2) %}
|
||||
<br>
|
||||
{% 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>8'000 daily on-site accesses</b>. Align your risk assessment with the guidance and instructions provided by the HSE Unit.
|
||||
</div>
|
||||
{% 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 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 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 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 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 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>
|
||||
{% if form.short_range_option == "short_range_yes" %}
|
||||
<br>
|
||||
{% set report_message = "Taking into account the uncertainties tied to the model variables, in this scenario and assuming all occupants are exposed equally, 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>*." %}
|
||||
{% if scale_warning == 'red' %}
|
||||
<div class="alert alert-danger mb-0" role="alert">
|
||||
<strong>Not Acceptable:</strong>
|
||||
{{ report_message }}
|
||||
</div>
|
||||
{% elif scale_warning == 'orange' %}
|
||||
<div class="alert alert-warning mb-0" role="alert">
|
||||
<strong>Attention:</strong>
|
||||
{{ report_message }}
|
||||
</div>
|
||||
{% elif scale_warning == 'green' %}
|
||||
<div class="alert alert-success mb-0" role="alert">
|
||||
<strong>Acceptable:</strong>
|
||||
{{ report_message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if (prob_inf > 2) %}
|
||||
<br>
|
||||
{% if cern_level == "green-1" %}
|
||||
<div class="alert alert-dark mb-0" role="alert" style="height:fit-content">
|
||||
<b>Note:</b> 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 cern_level == "yellow-2" %}
|
||||
<div class="alert alert-dark mb-0" role="alert" style="height:fit-content">
|
||||
<b>Note:</b> 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 cern_level == "orange-3" %}
|
||||
<div class="alert alert-dark mb-0" role="alert" style="height:fit-content">
|
||||
<b>Warning</b>: 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 cern_level == "red-4" %}
|
||||
<div class="alert alert-dark mb-0" role="alert" style="height:fit-content">
|
||||
<b>Warning</b>: 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>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br>
|
||||
</div>
|
||||
{% endblock report_summary %}
|
||||
|
||||
{% block report_summary_footnote %}
|
||||
{% block report_summary_footnote %}
|
||||
<br>
|
||||
{% 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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue