diff --git a/cara/apps/calculator/report_generator.py b/cara/apps/calculator/report_generator.py index c872ccce..b78d5069 100644 --- a/cara/apps/calculator/report_generator.py +++ b/cara/apps/calculator/report_generator.py @@ -119,5 +119,6 @@ def build_report(model: models.ExposureModel, form: FormData): ) env.filters['minutes_to_time'] = minutes_to_time env.filters['float_format'] = "{0:.2f}".format + env.filters['int_format'] = "{:0.0f}".format template = env.get_template("report.html.j2") - return template.render(**context) \ No newline at end of file + return template.render(**context) diff --git a/cara/apps/calculator/templates/report.html.j2 b/cara/apps/calculator/templates/report.html.j2 index f28d8fe6..f7b5bb11 100644 --- a/cara/apps/calculator/templates/report.html.j2 +++ b/cara/apps/calculator/templates/report.html.j2 @@ -125,19 +125,19 @@
Results:
- In this scenario, the estimated probability of one exposed occupant getting infected P(i) is {{ prob_inf | float_format }}% and the estimated basic reproduction rate (R0) is {{ R0 | float_format }}. + In this scenario, the estimated probability of one exposed occupant getting infected P(i) is {{ prob_inf | int_format }}% and the estimated basic reproduction rate (R0) is {{ R0 | float_format }}.
Exposure graph:
Repeated events:
- The P(i) and R0 if repeating this scenario event: + The P(i) and R0 if repeating this scenario event - provided the infected person emits the same amount of viruses each day and the exposed person is subject to the same daily exposure time:
| # of repeats | +# of repeated events | P(i) | R0 |
|---|---|---|---|
| {{ repeat_event.repeats }} | -{{ repeat_event.probability_of_infection | float_format }}% | +{{ repeat_event.probability_of_infection | int_format }}% | {{ repeat_event.R0 | float_format }} |