Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Add place_of_death #728

Merged
merged 1 commit into from
Jan 31, 2022
Merged

Add place_of_death #728

merged 1 commit into from
Jan 31, 2022

Conversation

rebkwok
Copy link
Contributor

@rebkwok rebkwok commented Jan 28, 2022

Fixes #696

From TPP:

ONS deaths have been updated. There is a new Place_of_occurrence column with 6 distinct values:

  • Care home
  • Elsewhere
  • Home
  • Hospice
  • Hospital
  • Other communal establishment

@@ -1804,6 +1804,8 @@ def patients_with_these_codes_on_death_certificate(
column_definition = "MIN(dod)"
elif returning == "underlying_cause_of_death":
column_definition = "MIN(icd10u)"
elif returning == "place_of_death":
column_definition = "MIN(Place_of_occurrence)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This arbitrarily uses MIN to handle possible duplicates with different Place_of_occurrence in the same way as icd10u. This appears to be moot now - I checked the ONS_Deaths table and there are no duplicate Patient IDs. However, just in case that changes, we should probably continue to handle duplicates as we've done before

@rebkwok rebkwok changed the title Add place_of_death returning value Add place_of_death Jan 28, 2022
@rebkwok rebkwok merged commit 9776319 into main Jan 31, 2022
@rebkwok rebkwok deleted the place_of_death branch January 31, 2022 10:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ONS-Mortality - addition of place of death field
2 participants