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

no-location-data #1151

Merged
merged 1 commit into from
Jan 6, 2025
Merged

no-location-data #1151

merged 1 commit into from
Jan 6, 2025

Conversation

eatyourpeas
Copy link
Member

Fixes #1150

Overview

A recent 500 error was reported when a patient with a valid postcode was saved without creating a value in the location_wgs84 field. It is not clear how this happened, but likely occured when the postcodes api was down at some point. This meant no location data was available for the child and the dataframe that calculates distances from the lead centre threw an error.

This PR filters out those children where there is no location data prior to creating the dataframe and running the distance calculations.

In addition, an incidental finding that the max distance returned was actually the min distance, so this has been fixed.

A test for this function has been added

closes #1150

…in to max, adds tests for no location data

Fixes #1150
@eatyourpeas eatyourpeas merged commit 62f23a6 into live Jan 6, 2025
2 checks passed
@eatyourpeas eatyourpeas deleted the eatyourpeas/issue1150 branch January 6, 2025 21:30
@mbarton
Copy link
Member

mbarton commented Jan 6, 2025

Seen on STAGING (merged by @eatyourpeas 29 minutes and 35 seconds ago) Please check your changes!

@mbarton
Copy link
Member

mbarton commented Jan 6, 2025

Seen on LIVE (merged by @eatyourpeas 29 minutes and 41 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

patient coordinates none causes scatterplot to fail
2 participants