From 73c6c1aa7473e50bcd7c22f7a18a64efc26d66ab Mon Sep 17 00:00:00 2001 From: willGraham01 Date: Thu, 6 Jun 2024 11:58:22 +0100 Subject: [PATCH] Revert erroneous change to kwargs in set capabilities monitor --- src/tlo/methods/bed_days.py | 11 ++++------- src/tlo/methods/healthsystem.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/tlo/methods/bed_days.py b/src/tlo/methods/bed_days.py index 1f3a27ce1a..be64b98b9c 100644 --- a/src/tlo/methods/bed_days.py +++ b/src/tlo/methods/bed_days.py @@ -600,13 +600,10 @@ def resolve_overlapping_occupancies( # since these are always "non_bed_space", IE not beds. # In such cases, the occupancies should not have been scheduled in # anyway, so throw an error. - assert (bed_on_each_day < len(self.bed_types) - 1).all(), ( - "Patient is scheduled to have at least one day in a non-bed-space " - "when resolving conflicting bed day occupancies. " - "This implies that at least one occupancy in the two sets of " - "occupancies does not conflict with the others. " - "Such non-conflicting occupancies should be removed before " - "calling this method." + if not (bed_on_each_day < len(self.bed_types) - 1).all(): + self._logger.warning( + f"Patient {patient_id} is scheduled to have at least one day " + "in a non-bed-space when resolving conflicting bed day occupancies." ) # We now know the bed allocation for this person. diff --git a/src/tlo/methods/healthsystem.py b/src/tlo/methods/healthsystem.py index e00936bd10..aa3cf5be2f 100644 --- a/src/tlo/methods/healthsystem.py +++ b/src/tlo/methods/healthsystem.py @@ -1028,7 +1028,7 @@ def _rescale_capabilities_to_capture_effective_capability(self): # Only rescale if rescaling factor is greater than 1 (i.e. don't reduce # available capabilities if these were under-used the previous year). rescaling_factor = self._summary_counter.frac_time_used_by_officer_type_and_level( - officer_type, level + officer_type=officer_type, level=level ) if rescaling_factor > 1 and rescaling_factor != float("inf"): self._daily_capabilities[officer] *= rescaling_factor