Stream: implementers
Topic: name in RelatedPerson
redixint (Nov 09 2017 at 12:50):
According to FHIR STU3, "name" in the search parameters of RelatedPerson is defined as: "A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text". I am wondering what the correct syntax is if we are going to query the RelatedPerson with a name "Allen Smith Park". Should it be:
http://myFHIRServer/RelatedPerson?name=allen%20smith%20park (Allen Smith Park)
or
http://myFHIRServer/RelatedPerson?name=allen%2Csmith%2Cpark (name separated by a comma, i.e., Allen,Smith,Park)
Thanks.
Lloyd McKenzie (Nov 09 2017 at 13:17):
There's no comma-separation
redixint (Nov 09 2017 at 13:50):
We also thought that there should be no comma between the names. However, it does not work on a number of FHIR servers, e.g., HAPI, Furore, sqlonfhir, etc.
Simone Heckmann (Nov 09 2017 at 14:34):
Did you try http://myFHIRServer/RelatedPerson?name=allen&name=smith&name=park ?
redixint (Nov 09 2017 at 14:45):
Did you try http://myFHIRServer/RelatedPerson?name=allen&name=smith&name=park ?
I tried and this will return all of the RelatedPersons with a name (first/given/middle) in "Allen", "Smith" and "Park". This is not what we want. We would hope to have an unique search on a name with family=Park&first=Allen.
Eric Haas (Nov 09 2017 at 17:00):
make a gforge to add family and given search params for RelatedPerson. Meanwhile you can create your own.
Lloyd McKenzie (Nov 09 2017 at 17:20):
It really comes down to whether a server should "infer" the value of name.text if one isn't set - and handle search against that. If they did, then the "Allen Smith Park" search would have worked. Perhaps a change request for us to clarify?
Eric Haas (Nov 09 2017 at 17:25):
assuming the space is merely a separator, but that is not clear.
Eric Haas (Nov 09 2017 at 17:25):
and you still would get Allen Park Smith or Park Allen Smith etc...
Jenni Syed (Nov 09 2017 at 19:28):
Would that inference be an exact match? Otherwise, you're starting to get into some fun formatting and "what is the proper order of a name" logic with that type of search
Jenni Syed (Nov 09 2017 at 19:29):
usually the default is "starts with" so, if we use that and searched on Allen Smith Park, then it would only match if name.text is formatted the same way (vs Park, Allen Smith, MD ...)
Jenni Syed (Nov 09 2017 at 19:30):
And it wouldn't match both Allen Park Smith or Park Allen Smith, but the app would also need to understand how the underlying name is formatted for display
Jenni Syed (Nov 09 2017 at 19:31):
... it seems easier to just specify the separate fields, especially once you start exploring names like "Jane Mary Doe de Smith"
Grahame Grieve (Nov 09 2017 at 22:07):
separate fields has the consquence that you are searching for matches to either the family or the given. if you want to search both the family and the given, you need the _filter parameter, but hardly any servers support that
Jenni Syed (Nov 09 2017 at 22:27):
So, to sanity check my understanding: family=Smith&given=John should match "John Smith" but not John Doe - right? Because & is intersection and , is "or" - and anything more complicated is supposed to be filter?
Jenni Syed (Nov 09 2017 at 22:28):
And family=Smith&family=Doe would be nothing, based on the intersection there being an empty set?
Grahame Grieve (Nov 09 2017 at 22:30):
oh yes. sorry, what I wrote above was wrong
Jenni Syed (Nov 09 2017 at 22:31):
phew.
Jenni Syed (Nov 09 2017 at 22:32):
I would have had a lot of code to fix :)
Grahame Grieve (Nov 09 2017 at 22:33):
so would I
Christiaan Knaap (Nov 22 2017 at 18:22):
Unless you're in DSTU2, where HumanName.family is 0-*, so a person could have the two family names 'Smith' and 'Doe' and match your search :-)
In both HAPI (I think) and Vonk you can add custom searchparameters, also composite ones - that would allow you to specify the proposed search exactly.
Last updated: Apr 12 2022 at 19:14 UTC