From 9cb29eb16ea6af3975486eb042d8952984d738e9 Mon Sep 17 00:00:00 2001
From: gaazzopa
Date: Fri, 6 Nov 2020 09:32:52 +0100
Subject: [PATCH 1/3] Updated form UI to enable event data always
---
cara/apps/calculator/static/form.html | 18 ++++++++--------
cara/apps/calculator/static/js/form.js | 29 +-------------------------
2 files changed, 10 insertions(+), 37 deletions(-)
diff --git a/cara/apps/calculator/static/form.html b/cara/apps/calculator/static/form.html
index b3944bc1..bd4c9df8 100644
--- a/cara/apps/calculator/static/form.html
+++ b/cara/apps/calculator/static/form.html
@@ -42,7 +42,7 @@ Beta v1.0.0 Please send feedback to
- Air supply flow rate
+ Air supply flow rate
Air changes per hour
@@ -89,14 +89,14 @@ Beta v1.0.0 Please send feedback to
Finish:
- When is the event?
-
-
-
-
-
-
-
{% endif %}
@@ -52,8 +53,22 @@
Event data:
-
Number of attendees and infected people: {{ total_people }} in attendance, of whom {{ infected_people }} are infected.
-
Activity type: {{ activity_type }}
+
Number of attendees and infected people: {{ total_people }} in attendance, of whom {{ infected_people }}
+ {% if infected_people == 1 %}
+ is
+ {% else %}
+ are
+ {% endif %}
+ infected.
+
Activity type:
+ {% if activity_type == "office work" %}
+ Office work – typical scenario with all persons seated, talking.
+ {% elif activity_type == "workshop" %}
+ Workshop = assembly workshop environment, all persons doing light exercise, talking.
+ {% elif 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.
+ {% endif %}
+
Masks worn at workstations?
+ {% if mask_wearing == "removed" %}
+ No
+ {% else %}
+ Yes
+ {% endif %}
+
+
Mask type: Type 1
Results:
-
In this scenario, the estimated probability of one exposed occupant getting infected P(i) is {{ infection_probability }} % and the estimated basic reproduction rate (R0) rate is {{ reproduction_rate }}. This probability estimate is per simulated time period, i.e. if you have simulated a working day, which will be repeated n times per week, the cumulative probability of infection per person is n x P(i).
+
In this scenario, the estimated probability of one exposed occupant getting infected P(i) is {{ infection_probability }} % and the estimated basic reproduction rate (R0) is {{ reproduction_rate }}.
Exposure graph:
From ffbe29232955710109c94adbc47a9a1422d1b8c5 Mon Sep 17 00:00:00 2001
From: gaazzopa
Date: Fri, 6 Nov 2020 10:33:38 +0100
Subject: [PATCH 3/3] Minor changes
---
cara/apps/calculator/report_generator.py | 1 -
cara/apps/calculator/templates/report.html.j2 | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/cara/apps/calculator/report_generator.py b/cara/apps/calculator/report_generator.py
index db6db86b..e0904dd4 100644
--- a/cara/apps/calculator/report_generator.py
+++ b/cara/apps/calculator/report_generator.py
@@ -27,7 +27,6 @@ def calculate_report_data(model: models.Model):
"R0": r0,
}
-
def build_report(model: models.Model, form: FormData):
now = datetime.now()
time = now.strftime("%d/%m/%Y %H:%M:%S")
diff --git a/cara/apps/calculator/templates/report.html.j2 b/cara/apps/calculator/templates/report.html.j2
index 3dea8cd5..86a7af7e 100644
--- a/cara/apps/calculator/templates/report.html.j2
+++ b/cara/apps/calculator/templates/report.html.j2
@@ -69,7 +69,7 @@
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.
{% endif %}