diff --git a/cara/apps/calculator/report_generator.py b/cara/apps/calculator/report_generator.py index b47dd0d3..d0a3f7e6 100644 --- a/cara/apps/calculator/report_generator.py +++ b/cara/apps/calculator/report_generator.py @@ -92,14 +92,8 @@ def build_report(model: models.Model, form: FormData): 'simulation_name': form.simulation_name, 'room_number': form.room_number, 'room_volume': form.room_volume, - 'ventilation_type': form.ventilation_type, 'air_supply': form.air_supply, 'air_changes': form.air_changes, - 'windows_number': form.windows_number, - 'window_height': form.window_height, - 'window_width': form.window_width, - 'opening_distance': form.opening_distance, - 'windows_open': form.windows_open, 'total_people': form.total_people, 'infected_people': form.infected_people, 'activity_type': form.activity_type, diff --git a/cara/apps/calculator/templates/report.html.j2 b/cara/apps/calculator/templates/report.html.j2 index 607781c8..9628a92d 100644 --- a/cara/apps/calculator/templates/report.html.j2 +++ b/cara/apps/calculator/templates/report.html.j2 @@ -24,24 +24,29 @@
Ventilation data:
Mechanical ventilation: - {% if ventilation_type == "mechanical"%} + {% if form.ventilation_type == "mechanical"%} Yes
Air supply flow rate: {{ air_supply }}
Air changes per hour: {{ air_changes }}
+ {% if form.mechanical_ventilation_type == "air_supply"%} + Air supply flow rate: {{ air_supply }} + {% elif form.mechanical_ventilation_type == "air_changes"%} + Air changes per hour: {{ air_changes }} + {% endif %} +
Natural ventilation: - {% if ventilation_type == "natural"%} + {% if form.ventilation_type == "natural"%} Yes
Number of windows: {{ windows_number }}
Height of window: {{ window_height }}
Width of window: {{ window_width }}
Opening distance: {{ opening_distance }}
Windows open: {{ windows_open }}
Number of windows: {{ form.windows_number }}
Height of window: {{ form.window_height }}
Width of window: {{ form.window_width }}
Opening distance: {{ form.opening_distance }}
Windows open: {{ form.windows_open }}
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 %} @@ -54,11 +59,7 @@Event data:
Number of attendees and infected people: {{ total_people }} in attendance, of whom {{ infected_people }} - {% if infected_people == 1 %} - is - {% else %} - are - {% endif %} + {{ "is" if infected_people == 1 else "are" }} infected.
Activity type: {% if activity_type == "office" %} @@ -82,7 +83,6 @@ {% if event_type == "recurrent_event"%}
Recurrent event for the month of {{ recurrent_event_month }}
Break data:
@@ -110,19 +110,15 @@Mask wearing:
Masks worn at workstations? - {% if mask_wearing == "removed" %} - No - {% else %} - Yes - {% endif %} +
Masks worn at workstations? + {{ "No" if mask_wearing == "removed" else "Yes" }}
Mask type: Type 1
Results:
- In this scenario, the estimated probability of one exposed occupant getting infected P(i) is {{ "{:#.2g}".format(prob_inf) }}% and the estimated basic reproduction rate (R0) is {{ "{:#.2g}".format(R0) }}. + In this scenario, the estimated probability of one exposed occupant getting infected P(i) is {{ "{0:.2f}".format(prob_inf) }}% and the estimated basic reproduction rate (R0) is {{ "{0:.2f}".format(R0) }}.
Exposure graph: