From 9e2a96550565bbe32b8d2562e6a95145434ca735 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Wed, 14 Jul 2021 12:03:15 +0200 Subject: [PATCH 01/66] Report header title and image --- .../templates/base/calculator.report.html.j2 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cara/apps/calculator/templates/base/calculator.report.html.j2 b/cara/apps/calculator/templates/base/calculator.report.html.j2 index a22372cc..57f165d7 100644 --- a/cara/apps/calculator/templates/base/calculator.report.html.j2 +++ b/cara/apps/calculator/templates/base/calculator.report.html.j2 @@ -14,18 +14,17 @@ {% block report_header %} -
- -

Report

+
+ +
+

CARA - CALCULATOR REPORT

+

Created {{ creation_date }} using CARA calculator version v{{ form.calculator_version }}

+
-

Created {{ creation_date }} using CARA calculator version v{{ form.calculator_version }}


- {% endblock report_header %} - {% block report_preamble %} - {% endblock report_preamble %} {% block simulation_overview %} From 8ceb3341012d0253cf3866fe52f094a2a52d076a Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Wed, 14 Jul 2021 14:41:41 +0200 Subject: [PATCH 02/66] two tabs - results and input data --- .../templates/base/calculator.report.html.j2 | 559 +++++++++--------- 1 file changed, 292 insertions(+), 267 deletions(-) diff --git a/cara/apps/calculator/templates/base/calculator.report.html.j2 b/cara/apps/calculator/templates/base/calculator.report.html.j2 index 57f165d7..cec1e611 100644 --- a/cara/apps/calculator/templates/base/calculator.report.html.j2 +++ b/cara/apps/calculator/templates/base/calculator.report.html.j2 @@ -24,292 +24,317 @@ {% endblock report_header %} -{% block report_preamble %} -{% endblock report_preamble %} + -{% block simulation_overview %} -

Simulation:

+
+ +
+ {% block report_preamble %} + {% endblock report_preamble %} -

Simulation Name: {{ form.simulation_name }}

-

Room Number: {{ form.room_number }}

+ {% block report_results %} +

Results:

+

+ {% block report_summary %} + Taking into account the uncertainties tied to the model variables, in this scenario, the probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}[*] and the expected number of new cases is {{ expected_new_cases | float_format }}. + {% endblock report_summary %} +

[*] The results are based on the parameters and assumptions published in the CERN Open Report CERN-OPEN-2021-004

+

-

Input data:

-
    -
  • Virus variant: - {% if form.virus_type == "SARS_CoV_2" %} - SARS-CoV-2 (nominal strain) - {% elif form.virus_type == "SARS_CoV_2_B117" %} - SARS-CoV-2 (Alpha VOC) - {% elif form.virus_type == "SARS_CoV_2_P1" %} - SARS-CoV-2 (Gamma VOC) - {% elif form.virus_type == "SARS_CoV_2_B16172" %} - SARS-CoV-2 (Delta VOC) - {% endif %} -

  • -
  • Room Volume: {{ model.concentration_model.room.volume }} m³

  • -
  • Room Central Heating: {{ "On" if form.room_heating_option else "Off" }}

  • -
+ -

Ventilation data:

-
    -
  • Mechanical ventilation: - {% if form.ventilation_type == "mechanical_ventilation" %} - Yes

  • -
      -
    • - {% if form.mechanical_ventilation_type == "mech_type_air_supply"%} - Air supply flow rate: {{ form.air_supply }} m³ / hour - {% elif form.mechanical_ventilation_type == "mech_type_air_changes"%} - Air changes per hour: {{ form.air_changes }} h⁻¹ - {% endif %} -

    • -
    - {% else %} - No - {% endif %} -
  • Natural ventilation: - {% if form.ventilation_type == "natural_ventilation"%} - Yes

  • -
      -
    • Number of windows: {{ form.windows_number }}

    • -
    • Height of window: {{ form.window_height }} m

    • -
    • Window type: - {% if form.window_type == "window_hinged" %} - Top- or Bottom-Hung

    • -
    • Width of window: {{ form.window_width }} m

    • - {% elif form.window_type == "window_sliding" %} - Sliding / Side-Hung

      - {% endif %} -
    • Opening distance: {{ form.opening_distance }} m

    • -
    • Windows open: - {% if form.window_opening_regime == "windows_open_periodically" %} - Periodically for {{ form.windows_duration | readable_minutes}} - every {{ form.windows_frequency | readable_minutes}} - {% elif form.window_opening_regime == "windows_open_permanently" %} - Permanently - {% endif %} -

    • -
    -

    When using the natural ventilation option, air flows are calculated using averaged hourly temperatures for the Geneva region, based on historical data for the month selected.

    - {% else %} - No

    - {% endif %} -
  • HEPA Filtration: {{ 'Yes' if form.hepa_option else 'No' }}

  • - {% if form.hepa_option %} -
      -
    • HEPA amount: {{ form.hepa_amount }} m³ / hour

    • -
    - {% endif %} -
+

Alternative scenarios:

-

Event data:

-
    -
  • Number of attendees and infected people: {{ form.total_people }} in attendance, of whom {{ form.infected_people }} - {{ "is" if form.infected_people == 1 else "are" }} - infected.

  • -
  • - Activity type: - {% if form.activity_type == "office" %} - Office – typical scenario with all persons seated, talking occasionally (talking assumed for 1/3rd of the time). - {% elif form.activity_type == "meeting" %} - Meeting – typical scenario with all persons seated, one person talking at a time. - {% elif form.activity_type == "callcentre" %} - Call Centre = typical office-like scenario with all persons seated, all talking continuously. - {% elif form.activity_type == "controlroom-day" %} - Control Room (Day Shift) = specific control room scenario, all persons seated, all talking 50% of the time. - {% elif form.activity_type == "controlroom-night" %} - Control Room (Night Shift) = specific control room scenario with all persons seated, all talking for 10% of the time. - {% elif form.activity_type == "library" %} - Library = Library scenario with all persons seated, breathing and not talking. - {% elif form.activity_type == "workshop" %} - Workshop = assembly workshop environment, all persons doing moderate physical activity, talking 50% of the time. - {% elif form.activity_type == "training" %} - Training – one person (the trainer) standing, talking, all others seated, talking quietly (whispering). It is assumed the trainer is the infected person, for the worst case scenario. - {% elif form.activity_type == "lab" %} - Laboratory = Lab or technical environment, all persons doing light physical activity, talking 50% of the time. - {% elif form.activity_type == "gym" %} - Gym = For comparison only, all persons doing heavy physical exercise, breathing and not talking. - {% endif %} -

  • -
  • Exposed occupant(s) activity time:

  • + + + {% block report_scenarios_summary_table %} + + + + + + + + + + {% for scenario_name, scenario_stats in alternative_scenarios.stats.items() %} + + + + + + {% endfor %} + +
    ScenarioP(I)Expected new cases
    {{ scenario_name }} {{ scenario_stats.probability_of_infection | non_zero_percentage }}{{ scenario_stats.expected_new_cases | float_format }}
    + {% endblock report_scenarios_summary_table %} + +

    Notes for alternative scenarios:
    +

      +
    1. This graph shows the concentration of infectious quanta in the air. The filtration of Type I and FFP2 masks, if worn, applies not only to the emission rate but also to the individual exposure (i.e. inhalation). + For this reason, scenarios with different types of mask will show the same concentration on the graph but have different absorbed doses and infection probabilities.
    2. +
    3. If you have selected more sophisticated options, such as HEPA filtration or FFP2 masks, this will be indicated in the plot as the "base scenario", representing the inputs inserted in the form.
      + The other alternative scenarios shown for comparison will not include either HEPA filtration or FFP2 masks.
    4. +
    +
    +

    + + {% endblock report_results %} + + {% block report_footer %} +
    + + +

    + Click the QR code to regenerate the report and get a shareable link.
    Alternatively, scan to regenerate the report.
    Mobile-friendly app coming soon! +

    +
    +
    +
    + + {% block disclaimer_container %} +


    +
    + {% block disclaimer %} +

    Disclaimer:

    + +

    + CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. +

    +

    + CARA models the concentration profile of potential infectious viruses in enclosed spaces with clear and intuitive graphs. + The user can set a number of parameters, including room volume, exposure time, activity type, mask-wearing and ventilation. + The report generated indicates how to avoid exceeding critical concentrations and chains of airborne transmission in spaces such as individual offices, meeting rooms and labs. +

    +

    + The risk assessment tool simulates the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming a homogenous mixture, and estimates the risk of COVID-19 infection therein. + The results DO NOT include short-range airborne exposure (where the physical distance is a significant factor) nor the other known modes of SARS-CoV-2 transmission. + Hence, the output from this model is only valid when the other recommended public health & safety instructions are observed, such as adequate physical distancing, good hand hygiene and other barrier measures. +

    +

    + The model used is based on scientific publications relating to airborne transmission of infectious diseases, dose-response exposures and aerosol science, as of February 2021. + It can be used to compare the effectiveness of different airborne-related risk mitigation measures. +

    +

    + Note that this model applies a deterministic approach, i.e., it is assumed at least one person is infected and shedding viruses into the simulated volume. + Nonetheless, it is also important to understand that the absolute risk of infection is uncertain, as it will depend on the probability that someone infected attends the event. + The model is most useful for comparing the impact and effectiveness of different mitigation measures such as ventilation, filtration, exposure time, physical activity and + the size of the room, only considering long-range airborne transmission of COVID-19 in indoor settings. +

    +

    + This tool is designed to be informative, allowing the user to adapt different settings and model the relative impact on the estimated infection probabilities. + The objective is to facilitate targeted decision-making and investment through comparisons, rather than a singular determination of absolute risk. + While the SARS-CoV-2 virus is in circulation among the population, the notion of 'zero risk' or 'completely safe scenario' does not exist. + Each event modelled is unique, and the results generated therein are only as accurate as the inputs and assumptions. +

    +

    + CARA has not undergone review, approval or certification by competent authorities, and as a result, it cannot be considered + as a fully endorsed and reliable tool, namely in the assessment of potential viral emissions from infected hosts to be modelled. +

    + + {% endblock disclaimer %} +
    + {% endblock disclaimer_container %} + {% endblock report_footer %} + +
+ +
+ {% block simulation_overview %} +

Simulation:

+ +

Simulation Name: {{ form.simulation_name }}

+

Room Number: {{ form.room_number }}

+ +

Input data:

    -
  • Start time: {{ form.exposed_start | minutes_to_time }}    End time: {{ form.exposed_finish | minutes_to_time }}

  • +
  • Virus variant: + {% if form.virus_type == "SARS_CoV_2" %} + SARS-CoV-2 (nominal strain) + {% elif form.virus_type == "SARS_CoV_2_B117" %} + SARS-CoV-2 (Alpha VOC) + {% elif form.virus_type == "SARS_CoV_2_P1" %} + SARS-CoV-2 (Gamma VOC) + {% elif form.virus_type == "SARS_CoV_2_B16172" %} + SARS-CoV-2 (Delta VOC) + {% endif %} +

  • +
  • Room Volume: {{ model.concentration_model.room.volume }} m³

  • +
  • Room Central Heating: {{ "On" if form.room_heating_option else "Off" }}

-
  • Infected occupant(s) activity time:

  • -
      -
    • Start time: {{ form.infected_start | minutes_to_time }}    End time: {{ form.infected_finish | minutes_to_time }}

    • -
    -
  • Event for the month of {{ form.event_month }}

  • - -

    Break data:

    - {% if form.infected_dont_have_breaks_with_exposed %} -

    Exposed occupant(s):

    - {% endif %} -
      -
    • Lunch break: - {% if form.exposed_lunch_option%} - Yes

    • -
        -
      • Start time: {{ form.exposed_lunch_start | minutes_to_time }}    End time: {{ form.exposed_lunch_finish | minutes_to_time }}

      • -
      - {% else%} - No - {% endif %} -

      -
    • Coffee breaks: {{ form.exposed_number_of_coffee_breaks() }} - {% if form.exposed_number_of_coffee_breaks() > 0 %} - each of {{ form.exposed_coffee_duration }} minutes duration -

    • -
        - {%- for start_time, end_time in form.exposed_coffee_break_times() %} -
      • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

      • - {%- endfor %} -
      - {% endif %} -
    +

    Ventilation data:

    +
      +
    • Mechanical ventilation: + {% if form.ventilation_type == "mechanical_ventilation" %} + Yes

    • +
        +
      • + {% if form.mechanical_ventilation_type == "mech_type_air_supply"%} + Air supply flow rate: {{ form.air_supply }} m³ / hour + {% elif form.mechanical_ventilation_type == "mech_type_air_changes"%} + Air changes per hour: {{ form.air_changes }} h⁻¹ + {% endif %} +

      • +
      + {% else %} + No + {% endif %} +
    • Natural ventilation: + {% if form.ventilation_type == "natural_ventilation"%} + Yes

    • +
        +
      • Number of windows: {{ form.windows_number }}

      • +
      • Height of window: {{ form.window_height }} m

      • +
      • Window type: + {% if form.window_type == "window_hinged" %} + Top- or Bottom-Hung

      • +
      • Width of window: {{ form.window_width }} m

      • + {% elif form.window_type == "window_sliding" %} + Sliding / Side-Hung

        + {% endif %} +
      • Opening distance: {{ form.opening_distance }} m

      • +
      • Windows open: + {% if form.window_opening_regime == "windows_open_periodically" %} + Periodically for {{ form.windows_duration | readable_minutes}} + every {{ form.windows_frequency | readable_minutes}} + {% elif form.window_opening_regime == "windows_open_permanently" %} + Permanently + {% endif %} +

      • +
      +

      When using the natural ventilation option, air flows are calculated using averaged hourly temperatures for the Geneva region, based on historical data for the month selected.

      + {% else %} + No

      + {% endif %} +
    • HEPA Filtration: {{ 'Yes' if form.hepa_option else 'No' }}

    • + {% if form.hepa_option %} +
        +
      • HEPA amount: {{ form.hepa_amount }} m³ / hour

      • +
      + {% endif %} +
    - {% if form.infected_dont_have_breaks_with_exposed %} -

    Infected occupant(s):

    -
      -
    • Lunch break: - {% if form.infected_lunch_option%} - Yes

    • -
        -
      • Start time: {{ form.infected_lunch_start | minutes_to_time }}    End time: {{ form.infected_lunch_finish | minutes_to_time }}

      • -
      - {% else%} - No - {% endif %} -

      -
    • Coffee breaks: {{ form.infected_number_of_coffee_breaks() }} - {% if form.infected_number_of_coffee_breaks() > 0 %} - each of {{ form.infected_coffee_duration }} minutes duration -

    • -
        - {%- for start_time, end_time in form.infected_coffee_break_times() %} -
      • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

      • - {%- endfor %} -
      - {% endif %} -
    - {% endif %} +

    Event data:

    +
      +
    • Number of attendees and infected people: {{ form.total_people }} in attendance, of whom {{ form.infected_people }} + {{ "is" if form.infected_people == 1 else "are" }} + infected.

    • +
    • + Activity type: + {% if form.activity_type == "office" %} + Office – typical scenario with all persons seated, talking occasionally (talking assumed for 1/3rd of the time). + {% elif form.activity_type == "meeting" %} + Meeting – typical scenario with all persons seated, one person talking at a time. + {% elif form.activity_type == "callcentre" %} + Call Centre = typical office-like scenario with all persons seated, all talking continuously. + {% elif form.activity_type == "controlroom-day" %} + Control Room (Day Shift) = specific control room scenario, all persons seated, all talking 50% of the time. + {% elif form.activity_type == "controlroom-night" %} + Control Room (Night Shift) = specific control room scenario with all persons seated, all talking for 10% of the time. + {% elif form.activity_type == "library" %} + Library = Library scenario with all persons seated, breathing and not talking. + {% elif form.activity_type == "workshop" %} + Workshop = assembly workshop environment, all persons doing moderate physical activity, talking 50% of the time. + {% elif form.activity_type == "training" %} + Training – one person (the trainer) standing, talking, all others seated, talking quietly (whispering). It is assumed the trainer is the infected person, for the worst case scenario. + {% elif form.activity_type == "lab" %} + Laboratory = Lab or technical environment, all persons doing light physical activity, talking 50% of the time. + {% elif form.activity_type == "gym" %} + Gym = For comparison only, all persons doing heavy physical exercise, breathing and not talking. + {% endif %} +

    • +
    • Exposed occupant(s) activity time:

    • +
        +
      • Start time: {{ form.exposed_start | minutes_to_time }}    End time: {{ form.exposed_finish | minutes_to_time }}

      • +
      +
    • Infected occupant(s) activity time:

    • +
        +
      • Start time: {{ form.infected_start | minutes_to_time }}    End time: {{ form.infected_finish | minutes_to_time }}

      • +
      +
    • Event for the month of {{ form.event_month }}

    • +
    -

    Mask wearing:

    -
      -
    • Masks worn at workstations? {{ 'Yes' if form.mask_wearing_option == "mask_on" else 'No' }}

    • - {% if form.mask_wearing_option == "mask_on" %} -
    • Mask type: {{ form.mask_type }}

    • - {% endif %} +

      Break data:

      + {% if form.infected_dont_have_breaks_with_exposed %} +

      Exposed occupant(s):

      + {% endif %} +
        +
      • Lunch break: + {% if form.exposed_lunch_option%} + Yes

      • +
          +
        • Start time: {{ form.exposed_lunch_start | minutes_to_time }}    End time: {{ form.exposed_lunch_finish | minutes_to_time }}

        • +
        + {% else%} + No + {% endif %} +

        +
      • Coffee breaks: {{ form.exposed_number_of_coffee_breaks() }} + {% if form.exposed_number_of_coffee_breaks() > 0 %} + each of {{ form.exposed_coffee_duration }} minutes duration +

      • +
          + {%- for start_time, end_time in form.exposed_coffee_break_times() %} +
        • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

        • + {%- endfor %} +
        + {% endif %} +
      -
    + {% if form.infected_dont_have_breaks_with_exposed %} +

    Infected occupant(s):

    +
      +
    • Lunch break: + {% if form.infected_lunch_option%} + Yes

    • +
        +
      • Start time: {{ form.infected_lunch_start | minutes_to_time }}    End time: {{ form.infected_lunch_finish | minutes_to_time }}

      • +
      + {% else%} + No + {% endif %} +

      +
    • Coffee breaks: {{ form.infected_number_of_coffee_breaks() }} + {% if form.infected_number_of_coffee_breaks() > 0 %} + each of {{ form.infected_coffee_duration }} minutes duration +

    • +
        + {%- for start_time, end_time in form.infected_coffee_break_times() %} +
      • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

      • + {%- endfor %} +
      + {% endif %} +
    + {% endif %} -{% endblock simulation_overview %} +

    Mask wearing:

    +
      +
    • Masks worn at workstations? {{ 'Yes' if form.mask_wearing_option == "mask_on" else 'No' }}

    • + {% if form.mask_wearing_option == "mask_on" %} +
    • Mask type: {{ form.mask_type }}

    • + {% endif %} -{% block report_results %} -

      Results:

      -

      - {% block report_summary %} - Taking into account the uncertainties tied to the model variables, in this scenario, the probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}[*] and the expected number of new cases is {{ expected_new_cases | float_format }}. - {% endblock report_summary %} -

      [*] The results are based on the parameters and assumptions published in the CERN Open Report CERN-OPEN-2021-004

      -

      +
    - + {% endblock simulation_overview %} -

    Alternative scenarios:

    -

    - +

    +
    - {% block report_scenarios_summary_table %} - - - - - - - - - - {% for scenario_name, scenario_stats in alternative_scenarios.stats.items() %} - - - - - - {% endfor %} - -
    ScenarioP(I)Expected new cases
    {{ scenario_name }} {{ scenario_stats.probability_of_infection | non_zero_percentage }}{{ scenario_stats.expected_new_cases | float_format }}
    - {% endblock report_scenarios_summary_table %} -

    -
    -

    Notes for alternative scenarios:
    -

      -
    1. This graph shows the concentration of infectious quanta in the air. The filtration of Type I and FFP2 masks, if worn, applies not only to the emission rate but also to the individual exposure (i.e. inhalation). - For this reason, scenarios with different types of mask will show the same concentration on the graph but have different absorbed doses and infection probabilities.
    2. -
    3. If you have selected more sophisticated options, such as HEPA filtration or FFP2 masks, this will be indicated in the plot as the "base scenario", representing the inputs inserted in the form.
      - The other alternative scenarios shown for comparison will not include either HEPA filtration or FFP2 masks.
    4. -
    -
    -

    + -{% endblock report_results %} -{% block report_footer %} -
    - - -

    - Click the QR code to regenerate the report and get a shareable link.
    Alternatively, scan to regenerate the report.
    Mobile-friendly app coming soon! -

    -
    -
    -
    - {% block disclaimer_container %} -


    -
    - {% block disclaimer %} -

    Disclaimer:

    - -

    - CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. -

    -

    - CARA models the concentration profile of potential infectious viruses in enclosed spaces with clear and intuitive graphs. - The user can set a number of parameters, including room volume, exposure time, activity type, mask-wearing and ventilation. - The report generated indicates how to avoid exceeding critical concentrations and chains of airborne transmission in spaces such as individual offices, meeting rooms and labs. -

    -

    - The risk assessment tool simulates the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming a homogenous mixture, and estimates the risk of COVID-19 infection therein. - The results DO NOT include short-range airborne exposure (where the physical distance is a significant factor) nor the other known modes of SARS-CoV-2 transmission. - Hence, the output from this model is only valid when the other recommended public health & safety instructions are observed, such as adequate physical distancing, good hand hygiene and other barrier measures. -

    -

    - The model used is based on scientific publications relating to airborne transmission of infectious diseases, dose-response exposures and aerosol science, as of February 2021. - It can be used to compare the effectiveness of different airborne-related risk mitigation measures. -

    -

    - Note that this model applies a deterministic approach, i.e., it is assumed at least one person is infected and shedding viruses into the simulated volume. - Nonetheless, it is also important to understand that the absolute risk of infection is uncertain, as it will depend on the probability that someone infected attends the event. - The model is most useful for comparing the impact and effectiveness of different mitigation measures such as ventilation, filtration, exposure time, physical activity and - the size of the room, only considering long-range airborne transmission of COVID-19 in indoor settings. -

    -

    - This tool is designed to be informative, allowing the user to adapt different settings and model the relative impact on the estimated infection probabilities. - The objective is to facilitate targeted decision-making and investment through comparisons, rather than a singular determination of absolute risk. - While the SARS-CoV-2 virus is in circulation among the population, the notion of 'zero risk' or 'completely safe scenario' does not exist. - Each event modelled is unique, and the results generated therein are only as accurate as the inputs and assumptions. -

    -

    - CARA has not undergone review, approval or certification by competent authorities, and as a result, it cannot be considered - as a fully endorsed and reliable tool, namely in the assessment of potential viral emissions from infected hosts to be modelled. -

    - - {% endblock disclaimer %} -
    - {% endblock disclaimer_container %} -{% endblock report_footer %} + + + From f43c7d382e1a14d20ad3756285332c74051da501 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Wed, 14 Jul 2021 17:30:30 +0200 Subject: [PATCH 03/66] results apart from input data in tabs layout --- cara/apps/calculator/static/css/report.css | 5 + .../templates/base/calculator.report.html.j2 | 544 +++++++++--------- 2 files changed, 278 insertions(+), 271 deletions(-) diff --git a/cara/apps/calculator/static/css/report.css b/cara/apps/calculator/static/css/report.css index f6efde67..2d4951f2 100644 --- a/cara/apps/calculator/static/css/report.css +++ b/cara/apps/calculator/static/css/report.css @@ -84,4 +84,9 @@ p.notes { /* Flexbox layouts */ .flex { display: flex; +} + + +.nav-tabs .nav-item .nav-link.active { + background-color: #F5F5F6; } \ No newline at end of file diff --git a/cara/apps/calculator/templates/base/calculator.report.html.j2 b/cara/apps/calculator/templates/base/calculator.report.html.j2 index cec1e611..90c0472e 100644 --- a/cara/apps/calculator/templates/base/calculator.report.html.j2 +++ b/cara/apps/calculator/templates/base/calculator.report.html.j2 @@ -24,311 +24,313 @@ {% endblock report_header %} - -
    - -
    - {% block report_preamble %} - {% endblock report_preamble %} +
    + - {% block report_results %} -

    Results:

    -

    - {% block report_summary %} - Taking into account the uncertainties tied to the model variables, in this scenario, the probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}[*] and the expected number of new cases is {{ expected_new_cases | float_format }}. - {% endblock report_summary %} -

    [*] The results are based on the parameters and assumptions published in the CERN Open Report CERN-OPEN-2021-004

    -

    - - - -

    Alternative scenarios:

    - - - - {% block report_scenarios_summary_table %} - - - - - - - - - - {% for scenario_name, scenario_stats in alternative_scenarios.stats.items() %} - - - - - - {% endfor %} - -
    ScenarioP(I)Expected new cases
    {{ scenario_name }} {{ scenario_stats.probability_of_infection | non_zero_percentage }}{{ scenario_stats.expected_new_cases | float_format }}
    - {% endblock report_scenarios_summary_table %} +
    + +
    -

    Notes for alternative scenarios:
    -

      -
    1. This graph shows the concentration of infectious quanta in the air. The filtration of Type I and FFP2 masks, if worn, applies not only to the emission rate but also to the individual exposure (i.e. inhalation). - For this reason, scenarios with different types of mask will show the same concentration on the graph but have different absorbed doses and infection probabilities.
    2. -
    3. If you have selected more sophisticated options, such as HEPA filtration or FFP2 masks, this will be indicated in the plot as the "base scenario", representing the inputs inserted in the form.
      - The other alternative scenarios shown for comparison will not include either HEPA filtration or FFP2 masks.
    4. -
    -
    -

    + {% block report_preamble %} + {% endblock report_preamble %} - {% endblock report_results %} + {% block report_results %} +

    Results:

    +

    + {% block report_summary %} + Taking into account the uncertainties tied to the model variables, in this scenario, the probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}[*] and the expected number of new cases is {{ expected_new_cases | float_format }}. + {% endblock report_summary %} +

    [*] The results are based on the parameters and assumptions published in the CERN Open Report CERN-OPEN-2021-004

    +

    - {% block report_footer %} -
    - - -

    - Click the QR code to regenerate the report and get a shareable link.
    Alternatively, scan to regenerate the report.
    Mobile-friendly app coming soon! + + +

    Alternative scenarios:

    + + + + {% block report_scenarios_summary_table %} + + + + + + + + + + {% for scenario_name, scenario_stats in alternative_scenarios.stats.items() %} + + + + + + {% endfor %} + +
    ScenarioP(I)Expected new cases
    {{ scenario_name }} {{ scenario_stats.probability_of_infection | non_zero_percentage }}{{ scenario_stats.expected_new_cases | float_format }}
    + {% endblock report_scenarios_summary_table %} + +

    Notes for alternative scenarios:
    +

      +
    1. This graph shows the concentration of infectious quanta in the air. The filtration of Type I and FFP2 masks, if worn, applies not only to the emission rate but also to the individual exposure (i.e. inhalation). + For this reason, scenarios with different types of mask will show the same concentration on the graph but have different absorbed doses and infection probabilities.
    2. +
    3. If you have selected more sophisticated options, such as HEPA filtration or FFP2 masks, this will be indicated in the plot as the "base scenario", representing the inputs inserted in the form.
      + The other alternative scenarios shown for comparison will not include either HEPA filtration or FFP2 masks.
    4. +
    +

    -
    -
    -
    - {% block disclaimer_container %} -


    -
    - {% block disclaimer %} -

    Disclaimer:

    + {% endblock report_results %} -

    - CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. + {% block report_footer %} +

    + + +

    + Click the QR code to regenerate the report and get a shareable link.
    Alternatively, scan to regenerate the report.
    Mobile-friendly app coming soon!

    -

    - CARA models the concentration profile of potential infectious viruses in enclosed spaces with clear and intuitive graphs. - The user can set a number of parameters, including room volume, exposure time, activity type, mask-wearing and ventilation. - The report generated indicates how to avoid exceeding critical concentrations and chains of airborne transmission in spaces such as individual offices, meeting rooms and labs. -

    -

    - The risk assessment tool simulates the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming a homogenous mixture, and estimates the risk of COVID-19 infection therein. - The results DO NOT include short-range airborne exposure (where the physical distance is a significant factor) nor the other known modes of SARS-CoV-2 transmission. - Hence, the output from this model is only valid when the other recommended public health & safety instructions are observed, such as adequate physical distancing, good hand hygiene and other barrier measures. -

    -

    - The model used is based on scientific publications relating to airborne transmission of infectious diseases, dose-response exposures and aerosol science, as of February 2021. - It can be used to compare the effectiveness of different airborne-related risk mitigation measures. -

    -

    - Note that this model applies a deterministic approach, i.e., it is assumed at least one person is infected and shedding viruses into the simulated volume. - Nonetheless, it is also important to understand that the absolute risk of infection is uncertain, as it will depend on the probability that someone infected attends the event. - The model is most useful for comparing the impact and effectiveness of different mitigation measures such as ventilation, filtration, exposure time, physical activity and - the size of the room, only considering long-range airborne transmission of COVID-19 in indoor settings. -

    -

    - This tool is designed to be informative, allowing the user to adapt different settings and model the relative impact on the estimated infection probabilities. - The objective is to facilitate targeted decision-making and investment through comparisons, rather than a singular determination of absolute risk. - While the SARS-CoV-2 virus is in circulation among the population, the notion of 'zero risk' or 'completely safe scenario' does not exist. - Each event modelled is unique, and the results generated therein are only as accurate as the inputs and assumptions. -

    -

    - CARA has not undergone review, approval or certification by competent authorities, and as a result, it cannot be considered - as a fully endorsed and reliable tool, namely in the assessment of potential viral emissions from infected hosts to be modelled. -

    - - {% endblock disclaimer %} +
    - {% endblock disclaimer_container %} - {% endblock report_footer %} - -
    - -
    - {% block simulation_overview %} -

    Simulation:

    +
    -

    Simulation Name: {{ form.simulation_name }}

    -

    Room Number: {{ form.room_number }}

    + {% block disclaimer_container %} +


    +
    + {% block disclaimer %} +

    Disclaimer:

    -

    Input data:

    -
      -
    • Virus variant: - {% if form.virus_type == "SARS_CoV_2" %} - SARS-CoV-2 (nominal strain) - {% elif form.virus_type == "SARS_CoV_2_B117" %} - SARS-CoV-2 (Alpha VOC) - {% elif form.virus_type == "SARS_CoV_2_P1" %} - SARS-CoV-2 (Gamma VOC) - {% elif form.virus_type == "SARS_CoV_2_B16172" %} - SARS-CoV-2 (Delta VOC) - {% endif %} -

    • -
    • Room Volume: {{ model.concentration_model.room.volume }} m³

    • -
    • Room Central Heating: {{ "On" if form.room_heating_option else "Off" }}

    • -
    +

    + CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. +

    +

    + CARA models the concentration profile of potential infectious viruses in enclosed spaces with clear and intuitive graphs. + The user can set a number of parameters, including room volume, exposure time, activity type, mask-wearing and ventilation. + The report generated indicates how to avoid exceeding critical concentrations and chains of airborne transmission in spaces such as individual offices, meeting rooms and labs. +

    +

    + The risk assessment tool simulates the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming a homogenous mixture, and estimates the risk of COVID-19 infection therein. + The results DO NOT include short-range airborne exposure (where the physical distance is a significant factor) nor the other known modes of SARS-CoV-2 transmission. + Hence, the output from this model is only valid when the other recommended public health & safety instructions are observed, such as adequate physical distancing, good hand hygiene and other barrier measures. +

    +

    + The model used is based on scientific publications relating to airborne transmission of infectious diseases, dose-response exposures and aerosol science, as of February 2021. + It can be used to compare the effectiveness of different airborne-related risk mitigation measures. +

    +

    + Note that this model applies a deterministic approach, i.e., it is assumed at least one person is infected and shedding viruses into the simulated volume. + Nonetheless, it is also important to understand that the absolute risk of infection is uncertain, as it will depend on the probability that someone infected attends the event. + The model is most useful for comparing the impact and effectiveness of different mitigation measures such as ventilation, filtration, exposure time, physical activity and + the size of the room, only considering long-range airborne transmission of COVID-19 in indoor settings. +

    +

    + This tool is designed to be informative, allowing the user to adapt different settings and model the relative impact on the estimated infection probabilities. + The objective is to facilitate targeted decision-making and investment through comparisons, rather than a singular determination of absolute risk. + While the SARS-CoV-2 virus is in circulation among the population, the notion of 'zero risk' or 'completely safe scenario' does not exist. + Each event modelled is unique, and the results generated therein are only as accurate as the inputs and assumptions. +

    +

    + CARA has not undergone review, approval or certification by competent authorities, and as a result, it cannot be considered + as a fully endorsed and reliable tool, namely in the assessment of potential viral emissions from infected hosts to be modelled. +

    -

    Ventilation data:

    -
      -
    • Mechanical ventilation: - {% if form.ventilation_type == "mechanical_ventilation" %} - Yes

    • + {% endblock disclaimer %} +
    + {% endblock disclaimer_container %} + {% endblock report_footer %} + +
    + +
    + {% block simulation_overview %} +

    Simulation:

    + +

    Simulation Name: {{ form.simulation_name }}

    +

    Room Number: {{ form.room_number }}

    + +

    Input data:

      -
    • - {% if form.mechanical_ventilation_type == "mech_type_air_supply"%} - Air supply flow rate: {{ form.air_supply }} m³ / hour - {% elif form.mechanical_ventilation_type == "mech_type_air_changes"%} - Air changes per hour: {{ form.air_changes }} h⁻¹ +

    • Virus variant: + {% if form.virus_type == "SARS_CoV_2" %} + SARS-CoV-2 (nominal strain) + {% elif form.virus_type == "SARS_CoV_2_B117" %} + SARS-CoV-2 (Alpha VOC) + {% elif form.virus_type == "SARS_CoV_2_P1" %} + SARS-CoV-2 (Gamma VOC) + {% elif form.virus_type == "SARS_CoV_2_B16172" %} + SARS-CoV-2 (Delta VOC) {% endif %}

    • +
    • Room Volume: {{ model.concentration_model.room.volume }} m³

    • +
    • Room Central Heating: {{ "On" if form.room_heating_option else "Off" }}

    - {% else %} - No - {% endif %} -
  • Natural ventilation: - {% if form.ventilation_type == "natural_ventilation"%} - Yes

  • -
      -
    • Number of windows: {{ form.windows_number }}

    • -
    • Height of window: {{ form.window_height }} m

    • -
    • Window type: - {% if form.window_type == "window_hinged" %} - Top- or Bottom-Hung

    • -
    • Width of window: {{ form.window_width }} m

    • - {% elif form.window_type == "window_sliding" %} - Sliding / Side-Hung

      - {% endif %} -
    • Opening distance: {{ form.opening_distance }} m

    • -
    • Windows open: - {% if form.window_opening_regime == "windows_open_periodically" %} - Periodically for {{ form.windows_duration | readable_minutes}} - every {{ form.windows_frequency | readable_minutes}} - {% elif form.window_opening_regime == "windows_open_permanently" %} - Permanently - {% endif %} -

    • -
    -

    When using the natural ventilation option, air flows are calculated using averaged hourly temperatures for the Geneva region, based on historical data for the month selected.

    - {% else %} - No

    - {% endif %} -
  • HEPA Filtration: {{ 'Yes' if form.hepa_option else 'No' }}

  • - {% if form.hepa_option %} -
      -
    • HEPA amount: {{ form.hepa_amount }} m³ / hour

    • -
    - {% endif %} - -

    Event data:

    -
      -
    • Number of attendees and infected people: {{ form.total_people }} in attendance, of whom {{ form.infected_people }} - {{ "is" if form.infected_people == 1 else "are" }} - infected.

    • -
    • - Activity type: - {% if form.activity_type == "office" %} - Office – typical scenario with all persons seated, talking occasionally (talking assumed for 1/3rd of the time). - {% elif form.activity_type == "meeting" %} - Meeting – typical scenario with all persons seated, one person talking at a time. - {% elif form.activity_type == "callcentre" %} - Call Centre = typical office-like scenario with all persons seated, all talking continuously. - {% elif form.activity_type == "controlroom-day" %} - Control Room (Day Shift) = specific control room scenario, all persons seated, all talking 50% of the time. - {% elif form.activity_type == "controlroom-night" %} - Control Room (Night Shift) = specific control room scenario with all persons seated, all talking for 10% of the time. - {% elif form.activity_type == "library" %} - Library = Library scenario with all persons seated, breathing and not talking. - {% elif form.activity_type == "workshop" %} - Workshop = assembly workshop environment, all persons doing moderate physical activity, talking 50% of the time. - {% elif form.activity_type == "training" %} - Training – one person (the trainer) standing, talking, all others seated, talking quietly (whispering). It is assumed the trainer is the infected person, for the worst case scenario. - {% elif form.activity_type == "lab" %} - Laboratory = Lab or technical environment, all persons doing light physical activity, talking 50% of the time. - {% elif form.activity_type == "gym" %} - Gym = For comparison only, all persons doing heavy physical exercise, breathing and not talking. - {% endif %} -

    • -
    • Exposed occupant(s) activity time:

    • +

      Ventilation data:

      +
        +
      • Mechanical ventilation: + {% if form.ventilation_type == "mechanical_ventilation" %} + Yes

        • -
        • Start time: {{ form.exposed_start | minutes_to_time }}    End time: {{ form.exposed_finish | minutes_to_time }}

        • +
        • + {% if form.mechanical_ventilation_type == "mech_type_air_supply"%} + Air supply flow rate: {{ form.air_supply }} m³ / hour + {% elif form.mechanical_ventilation_type == "mech_type_air_changes"%} + Air changes per hour: {{ form.air_changes }} h⁻¹ + {% endif %} +

        -
      • Infected occupant(s) activity time:

      • -
          -
        • Start time: {{ form.infected_start | minutes_to_time }}    End time: {{ form.infected_finish | minutes_to_time }}

        • + {% else %} + No + {% endif %} +
        • Natural ventilation: + {% if form.ventilation_type == "natural_ventilation"%} + Yes

        • +
            +
          • Number of windows: {{ form.windows_number }}

          • +
          • Height of window: {{ form.window_height }} m

          • +
          • Window type: + {% if form.window_type == "window_hinged" %} + Top- or Bottom-Hung

          • +
          • Width of window: {{ form.window_width }} m

          • + {% elif form.window_type == "window_sliding" %} + Sliding / Side-Hung

            + {% endif %} +
          • Opening distance: {{ form.opening_distance }} m

          • +
          • Windows open: + {% if form.window_opening_regime == "windows_open_periodically" %} + Periodically for {{ form.windows_duration | readable_minutes}} + every {{ form.windows_frequency | readable_minutes}} + {% elif form.window_opening_regime == "windows_open_permanently" %} + Permanently + {% endif %} +

          • +
          +

          When using the natural ventilation option, air flows are calculated using averaged hourly temperatures for the Geneva region, based on historical data for the month selected.

          + {% else %} + No

          + {% endif %} +
        • HEPA Filtration: {{ 'Yes' if form.hepa_option else 'No' }}

        • + {% if form.hepa_option %} +
            +
          • HEPA amount: {{ form.hepa_amount }} m³ / hour

          • +
          + {% endif %}
        -
      • Event for the month of {{ form.event_month }}

      • -
      -

      Break data:

      - {% if form.infected_dont_have_breaks_with_exposed %} -

      Exposed occupant(s):

      - {% endif %} -
        -
      • Lunch break: - {% if form.exposed_lunch_option%} - Yes

      • +

        Event data:

          -
        • Start time: {{ form.exposed_lunch_start | minutes_to_time }}    End time: {{ form.exposed_lunch_finish | minutes_to_time }}

        • +
        • Number of attendees and infected people: {{ form.total_people }} in attendance, of whom {{ form.infected_people }} + {{ "is" if form.infected_people == 1 else "are" }} + infected.

        • +
        • + Activity type: + {% if form.activity_type == "office" %} + Office – typical scenario with all persons seated, talking occasionally (talking assumed for 1/3rd of the time). + {% elif form.activity_type == "meeting" %} + Meeting – typical scenario with all persons seated, one person talking at a time. + {% elif form.activity_type == "callcentre" %} + Call Centre = typical office-like scenario with all persons seated, all talking continuously. + {% elif form.activity_type == "controlroom-day" %} + Control Room (Day Shift) = specific control room scenario, all persons seated, all talking 50% of the time. + {% elif form.activity_type == "controlroom-night" %} + Control Room (Night Shift) = specific control room scenario with all persons seated, all talking for 10% of the time. + {% elif form.activity_type == "library" %} + Library = Library scenario with all persons seated, breathing and not talking. + {% elif form.activity_type == "workshop" %} + Workshop = assembly workshop environment, all persons doing moderate physical activity, talking 50% of the time. + {% elif form.activity_type == "training" %} + Training – one person (the trainer) standing, talking, all others seated, talking quietly (whispering). It is assumed the trainer is the infected person, for the worst case scenario. + {% elif form.activity_type == "lab" %} + Laboratory = Lab or technical environment, all persons doing light physical activity, talking 50% of the time. + {% elif form.activity_type == "gym" %} + Gym = For comparison only, all persons doing heavy physical exercise, breathing and not talking. + {% endif %} +

        • +
        • Exposed occupant(s) activity time:

        • +
            +
          • Start time: {{ form.exposed_start | minutes_to_time }}    End time: {{ form.exposed_finish | minutes_to_time }}

          • +
          +
        • Infected occupant(s) activity time:

        • +
            +
          • Start time: {{ form.infected_start | minutes_to_time }}    End time: {{ form.infected_finish | minutes_to_time }}

          • +
          +
        • Event for the month of {{ form.event_month }}

        - {% else%} - No + +

        Break data:

        + {% if form.infected_dont_have_breaks_with_exposed %} +

        Exposed occupant(s):

        {% endif %} -

        -
      • Coffee breaks: {{ form.exposed_number_of_coffee_breaks() }} - {% if form.exposed_number_of_coffee_breaks() > 0 %} - each of {{ form.exposed_coffee_duration }} minutes duration -

        • - {%- for start_time, end_time in form.exposed_coffee_break_times() %} -
        • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

        • - {%- endfor %} +
        • Lunch break: + {% if form.exposed_lunch_option%} + Yes

        • +
            +
          • Start time: {{ form.exposed_lunch_start | minutes_to_time }}    End time: {{ form.exposed_lunch_finish | minutes_to_time }}

          • +
          + {% else%} + No + {% endif %} +

          +
        • Coffee breaks: {{ form.exposed_number_of_coffee_breaks() }} + {% if form.exposed_number_of_coffee_breaks() > 0 %} + each of {{ form.exposed_coffee_duration }} minutes duration +

        • +
            + {%- for start_time, end_time in form.exposed_coffee_break_times() %} +
          • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

          • + {%- endfor %} +
          + {% endif %} +
        + + {% if form.infected_dont_have_breaks_with_exposed %} +

        Infected occupant(s):

        +
          +
        • Lunch break: + {% if form.infected_lunch_option%} + Yes

        • +
            +
          • Start time: {{ form.infected_lunch_start | minutes_to_time }}    End time: {{ form.infected_lunch_finish | minutes_to_time }}

          • +
          + {% else%} + No + {% endif %} +

          +
        • Coffee breaks: {{ form.infected_number_of_coffee_breaks() }} + {% if form.infected_number_of_coffee_breaks() > 0 %} + each of {{ form.infected_coffee_duration }} minutes duration +

        • +
            + {%- for start_time, end_time in form.infected_coffee_break_times() %} +
          • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

          • + {%- endfor %} +
          + {% endif %}
        {% endif %} -
      - {% if form.infected_dont_have_breaks_with_exposed %} -

      Infected occupant(s):

      -
        -
      • Lunch break: - {% if form.infected_lunch_option%} - Yes

      • +

        Mask wearing:

          -
        • Start time: {{ form.infected_lunch_start | minutes_to_time }}    End time: {{ form.infected_lunch_finish | minutes_to_time }}

        • +
        • Masks worn at workstations? {{ 'Yes' if form.mask_wearing_option == "mask_on" else 'No' }}

        • + {% if form.mask_wearing_option == "mask_on" %} +
        • Mask type: {{ form.mask_type }}

        • + {% endif %} +
        - {% else%} - No - {% endif %} -

        -
      • Coffee breaks: {{ form.infected_number_of_coffee_breaks() }} - {% if form.infected_number_of_coffee_breaks() > 0 %} - each of {{ form.infected_coffee_duration }} minutes duration -

      • -
          - {%- for start_time, end_time in form.infected_coffee_break_times() %} -
        • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

        • - {%- endfor %} -
        - {% endif %} -
      - {% endif %} -

      Mask wearing:

      -
        -
      • Masks worn at workstations? {{ 'Yes' if form.mask_wearing_option == "mask_on" else 'No' }}

      • - {% if form.mask_wearing_option == "mask_on" %} -
      • Mask type: {{ form.mask_type }}

      • - {% endif %} - -
      - - {% endblock simulation_overview %} - -
    + {% endblock simulation_overview %} +
    +
    - From 6656da768b3f44714c28e3bdc81f2054729463df Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Thu, 15 Jul 2021 10:08:40 +0200 Subject: [PATCH 04/66] Printable version image dimensions fix --- cara/apps/calculator/static/css/report.css | 6 ------ .../templates/base/calculator.report.html.j2 | 2 +- .../themes/cern/templates/calculator.report.html.j2 | 10 +++++----- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/cara/apps/calculator/static/css/report.css b/cara/apps/calculator/static/css/report.css index 2d4951f2..ce2e3790 100644 --- a/cara/apps/calculator/static/css/report.css +++ b/cara/apps/calculator/static/css/report.css @@ -81,12 +81,6 @@ p.notes { margin-left: 5% } -/* Flexbox layouts */ -.flex { - display: flex; -} - - .nav-tabs .nav-item .nav-link.active { background-color: #F5F5F6; } \ No newline at end of file diff --git a/cara/apps/calculator/templates/base/calculator.report.html.j2 b/cara/apps/calculator/templates/base/calculator.report.html.j2 index 90c0472e..d48b85d2 100644 --- a/cara/apps/calculator/templates/base/calculator.report.html.j2 +++ b/cara/apps/calculator/templates/base/calculator.report.html.j2 @@ -15,7 +15,7 @@ {% block report_header %}
    - +

    CARA - CALCULATOR REPORT

    Created {{ creation_date }} using CARA calculator version v{{ form.calculator_version }}

    diff --git a/cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 b/cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 index 4a5689d3..cd5fbcda 100644 --- a/cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 +++ b/cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 @@ -27,25 +27,25 @@ {{ super() }} {% if (prob_inf > 5) %} -
    +
    {% if scale_warning.level == "Green - 1" %} -