From 0e1f8c1087406f70b583407c1ae8c9360e2107a1 Mon Sep 17 00:00:00 2001 From: Gauri Bapat Date: Fri, 17 Apr 2020 16:01:17 -0400 Subject: [PATCH] Issue 336 --- src/penn_chime/model/parameters.py | 10 ++++++++-- src/penn_chime/view/st_display.py | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/penn_chime/model/parameters.py b/src/penn_chime/model/parameters.py index 4bc59f0c..a7ac4e97 100644 --- a/src/penn_chime/model/parameters.py +++ b/src/penn_chime/model/parameters.py @@ -348,17 +348,23 @@ def create( Rate(key='icu_rate', value=a.icu_rate) Rate(key='ventilated_rate', value=a.ventilated_rate) + # ICU % Total infections = Hosp %(total infections) * ICU (% total hosp) + # Vent % Total infections = ICU % Total infections * Vent (% critical care) + + icu_of_total_inf = a.hospitalized_rate * a.icu_rate + vent_of_total_inf = icu_of_total_inf * a.ventilated_rate + hospitalized = Disposition.create( days=a.hospitalized_days, rate=a.hospitalized_rate, ) icu = Disposition.create( days=a.icu_days, - rate=a.icu_rate, + rate=icu_of_total_inf, ) ventilated = Disposition.create( days=a.ventilated_days, - rate=a.ventilated_rate, + rate=vent_of_total_inf, ) del a.hospitalized_days diff --git a/src/penn_chime/view/st_display.py b/src/penn_chime/view/st_display.py index 46ec9942..625e1827 100644 --- a/src/penn_chime/view/st_display.py +++ b/src/penn_chime/view/st_display.py @@ -234,13 +234,13 @@ def display_sidebar(st, d: Parameters) -> Parameters: ) icu_pct_input = PercentInput( st_obj, - "ICU %(total infections)", + "ICU %(total hospitalized)", min_value=0.0, value=d.icu.rate, step=0.05 ) ventilated_pct_input = PercentInput( - st_obj, "Ventilated %(total infections)", value=d.ventilated.rate, + st_obj, "Ventilated %(critical care)", value=d.ventilated.rate, ) hospitalized_days_input = NumberInput( st_obj,