Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safely catch HSIs with different officers required for actual_appt_footprint in mode_appt_constraints = 2 #1091

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

marghe-molaro
Copy link
Collaborator

@marghe-molaro marghe-molaro commented Sep 5, 2023

Fixes #1089

The HSI likely to have caused issue #1089 has been identified in issue #1090, and this is currently being addressed. However more HSIs - whether already in the code or introduced in the future by new modules - may similarly clash with mode_appt_constraints = 2 and lead to a KeyError if their actual_appt_footprint requires different medical officers than their expected one. Because this clash will only manifest itself under specific and random circumstances (i.e. all officers required for the expected_footprint still have capabilities but those for the actual_footprint do not), some such HSIs may go undetected for a long time. It would therefore be preferable to ensure that these can be safely identified in future runs in mode_appt_constraints = 2 without leading to error, but flagging the issue as a warning, as done in this PR. As the incidence of this error at present appears to be very low, this is unlikely to significantly affect results relying on this warning.

… officers are flagged and do not lead to error in mode_appt_constraints = 2.
@tbhallett
Copy link
Collaborator

Have we confirmed that this fixes #1089 and #1090....?

@tbhallett tbhallett merged commit 7128c6c into master Sep 12, 2023
55 checks passed
@tbhallett tbhallett deleted the molaro/add-safety-around-officer-removal branch September 12, 2023 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] update_call assigns work to officers with no time available
3 participants