FHIR Chat · Using the ‘near’ search parameter. · implementers

Stream: implementers

Topic: Using the ‘near’ search parameter.


view this post on Zulip Tushar Nair (Oct 15 2021 at 00:16):

We are using HAPI FHIR Server version: 5.4.1.1 and fhirVersion:4.0.1
I am trying to implement the ‘near’ search parameter for looking up Location resources.
Currently, when I look up the Location directly, example: [base]/ Location?near=-77.043167|38.904011|3|mi , it returns the results accurately.
But if I try to look up the same resource as a reference within ‘HealthcareService’ it doesn’t return the result. To be clear I have posted the ‘HealthcareService’ resource where the said ‘Location’ resource is referenced in HealthcareService.location.

The queries I used:
[base]/Healthcare?location.near=-77.043167|38.904011|2.5|mi
{
"resourceType": "Bundle",
"id": "e6f11de6-5687-44a4-b60e-ec292704551b",
"meta": {
"lastUpdated": "2021-10-14T17:06:39.596-07:00"
},
"type": "searchset",
"total": 0,
"link": [
{
"relation": "self",

[base]/HealthcareService?location:near=-77.043167|38.904011|2.5|mi
{
"resourceType": "Bundle",
"id": "8385e848-52f4-4ecb-81f5-3980417187f3",
"meta": {
"lastUpdated": "2021-10-14T17:12:28.276-07:00"
},
"type": "searchset",
"total": 0,
"link": [
{
"relation": "self",

[base]/ Location?_has:HealthcareService:location:_has:near=38.904011|-77.043167|5|mi
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Invalid _has parameter syntax: :near"
}
]
}

So is this a case where there is no parameter available to support this query in such a scenario? Or is it a HAPI FHIR Server limitation? Or is this a case of using poor syntax?
Can you please shed light on this and suggest the right way to execute this query?
@Lloyd McKenzie @Brian Postlethwaite

view this post on Zulip Brian Postlethwaite (Oct 15 2021 at 00:21):

Sounds like a question for the HAPI folks, I'd suggest asking over in the HAPI stream. Maybe they aren't supporting near via chaining.

view this post on Zulip Tushar Nair (Oct 15 2021 at 00:28):

@Brian Postlethwaite thank you! I will post it in HAPI stream. So fundamentally the query [base]/Healthcare?location.near=-77.043167|38.904011|2.5|mi is ok?


view this post on Zulip Brian Postlethwaite (Oct 15 2021 at 00:29):

I believe so

view this post on Zulip Tushar Nair (Oct 15 2021 at 00:34):

@Brian Postlethwaite thank you!!!


Last updated: Apr 12 2022 at 19:14 UTC