FHIR Chat · Filter Patient by phone number · implementers

Stream: implementers

Topic: Filter Patient by phone number


view this post on Zulip Alexey Elimport (May 19 2020 at 19:36):

Hello Folks, I’m trying to understand the fhir rest api and wanted to find a Patient by a phone number. But It just doesn’t want to work. Can somebody please make an example for an GET query by phone number with a substring of a complete phone number.
Thanks

view this post on Zulip Jean Duteau (May 19 2020 at 19:37):

.../Patient?phone=5556667878

view this post on Zulip Alexey Elimport (May 19 2020 at 19:39):

I tried that one, but it give me all the example patients

view this post on Zulip Alexey Elimport (May 19 2020 at 19:42):

I have the popular James Chalmers with this entry
<telecom>
<system value="phone"/>
<value value="(03) 5555 6473"/>
<use value="work"/>
<rank value="1"/>
</telecom>

view this post on Zulip Alexey Elimport (May 19 2020 at 19:44):

and if I Make [GET]/Patient?phone=(03) 5555 6473
server gives me all the test patients

view this post on Zulip Jean Duteau (May 19 2020 at 19:50):

you should check with your server to see if it supports the phone search parameter then. because that is how to do the query.

view this post on Zulip Alexey Elimport (May 19 2020 at 20:14):

Thank you @Jean Duteau . I'm using Mirth example fhir channel (if it say you smth) and the query for this parameter was not implemented what I did now and it works now.
One last question: If I want to find Patient by a phone number of a contact, how would the query look like? I still don't understand how the structure looks like by this nested parameters

view this post on Zulip Nathan Hall (May 19 2020 at 20:21):

.../Patient/contact.phone=5555555555

if that is supported by your server.

view this post on Zulip Alexey Elimport (May 19 2020 at 20:36):

Unfortunately, no :rolling_eyes:

view this post on Zulip Lloyd McKenzie (May 19 2020 at 21:05):

phone is defined as a 'token' search - that means it's going to look for an exact match (whitespace, punctuation, everything)

view this post on Zulip Jose Costa Teixeira (May 20 2020 at 05:39):

Isn't that going to be an annoyance for many many implementations? (phone as token)

view this post on Zulip Lloyd McKenzie (May 20 2020 at 15:06):

It might well be. We could define custom behavior for the search parameter to strip punctuation and white-space, but I suspect some are still going to want the starts-with or contains ability of a 'text' search parameter. @Brian Postlethwaite ?

view this post on Zulip Brian Postlethwaite (May 20 2020 at 20:42):

From a behaviour perspective, I think this is another of the special cases where the server should probably be expected to handle this more specifically than just a string exact matching.
It would probably be desirable to "normalize" the indexed content and do the same normalization on the searched text.
In this way the imposition of formatting doesn't need to be negotiated with the server.
(all this being said, I haven't done this on our server)

view this post on Zulip Lloyd McKenzie (May 20 2020 at 22:44):

If that's the case, shouldn't the search parameter make that expectation explicit?

view this post on Zulip Grahame Grieve (May 21 2020 at 03:42):

yes we could make it clear that this is allowed/encouraged (though not expected or required)

view this post on Zulip Lloyd McKenzie (May 21 2020 at 04:03):

I'm trying to understand why we'd want to have/allow variability in behavior here...

view this post on Zulip Grahame Grieve (May 21 2020 at 10:54):

because systems already have deeply ingrained behaviour around this, and it's highly variable across jurisdictions


Last updated: Apr 12 2022 at 19:14 UTC