FHIR Chat · Location 'near' search results - show distance · implementers

Stream: implementers

Topic: Location 'near' search results - show distance


view this post on Zulip Kate Dech (Aug 02 2021 at 21:14):

Curious if anyone has implemented a search on Location using near (for geo-based searches)? And if so, did anyone account for 'distance' in the search results?

In our legacy provider search tools that used geo-based searching, the results would include the matching providers distance from the starting search point. With the current structure definition, we can return a provider's lat and long and let the client perform a calculation. But if we want to return a distance, I am curious how this would done. Would this be an extension of the provider of the search-set Bundle (perhaps saying 'match' and '2 miles away').

Any implementer experience would be useful, thanks!

view this post on Zulip Lloyd McKenzie (Aug 03 2021 at 02:20):

@Brian Postlethwaite

view this post on Zulip Elliot Silver (Aug 03 2021 at 14:11):

@Luke Duncan I think you were looking at this at one point.

view this post on Zulip John Moehrke (Aug 03 2021 at 15:45):

I think that CareQuality has something like this. @David Pyke @Joe Lamy @Eric Heflin

view this post on Zulip Kate Dech (Aug 20 2021 at 16:53):

I did find information in the base spec about this. https://www.hl7.org/fhir/location.html#positional
Thanks.

view this post on Zulip Brian Postlethwaite (Aug 21 2021 at 08:40):

This is implemented in our server.
And the details are in the spec in this section
http://hl7.org/fhir/2018Sep/location.html#positional
Note the extension in the bundle search component with the distance you're talking about.

view this post on Zulip Brian Postlethwaite (Aug 21 2021 at 08:40):

Of course the distance we return is a crow flies distance, and routing could have that longer...

view this post on Zulip Kate Dech (Sep 15 2021 at 16:17):

When performing a near search, is it assumed that server will sort the results smallest distance to largest? If not, what would the mechanism be for requesting a _sort=near? Just curious if it's different because the distance is part of the bundle and not the actual location resources. Thanks.

view this post on Zulip Kate Dech (Sep 15 2021 at 16:23):

To add more context: the use case is to limit the result of a provider search to the 10 nearest matches near me (where lat and long of 'me' is passed in). There might 100 matching results in the search radius. If a consumer wants to limit to just 10...they may wish to supply _count=10 but the want the closest 10.

Does the near search parameter require that the server sort by distance or would that be client controlled by requesting _sort?

view this post on Zulip Lloyd McKenzie (Sep 15 2021 at 18:55):

@Brian Postlethwaite

view this post on Zulip Brian Postlethwaite (Sep 15 2021 at 21:19):

There is nothing currently documented for that. But it makes sense - you could suggest a tracker for that.

view this post on Zulip John Moehrke (Sep 15 2021 at 22:45):

@Eric Heflin and @Joe Lamy is there something the CareQuality can offer?

view this post on Zulip Kate Dech (Sep 21 2021 at 00:51):

Logged as https://jira.hl7.org/browse/FHIR-33976 requesting additional guidance. Thanks!


Last updated: Apr 12 2022 at 19:14 UTC