Stream: implementers
Topic: patient name search string
Lital Inghel (Dec 06 2021 at 14:04):
if we will suggest the user to have an order in the search by name string he will use-for example use this order in your search:
Family, First Middle
so that we will be able to identify the name part we need to search in our system (I mean this way we'll know that "Danny, Mem" for example means that we need to search by Family=Danny, Given=Mem in our internal system) will this be some kind of FHIR 'violation'?
Daniel Venton (Dec 06 2021 at 14:13):
I think FHIR has it pretty well spelled out.
?name=X - Any name field with X
?given=Y - Any given name field with Y
?family=Z - family name field with Z
When you try to compound with one hand and separate with the other you are just going to end up with a mess. There is no need to specify all the different names in one field and try to parse it in the FHIR server. (What a client app does could be different.)
As evidence of a mess, in your example you state "Danny, Mem" with the pattern Family, First Middle. But then you say Given=Danny when following your pattern it should have been Family=Danny
Lital Inghel (Dec 06 2021 at 14:36):
it is- Family=Danny, Given=Mem
Lital Inghel (Dec 06 2021 at 15:28):
and supporting the 'name' query is a 'Shall' so even if the user will rather use search by given or by family queries, we still need to support the name search and I'm trying to understand if asking the consumer to use it with a specific order is ok
Daniel Venton (Dec 06 2021 at 15:40):
Users that have never spoken to you, never read your documentation will end up using your api (for some use cases, patient access, payer 2 payer). Thus doing things in a manner not specified by HL7 will not be known. If you are doing a custom interface where all users buy in to your implementation, then do whatever but they might ask, why aren't you doing it in standard HL7 manner?
Your best bet is to follow the rules of how name (a string) search works according to HL7.
?name=abc -> any name attribute starts with abc
?name=abc,def -> any name attribute that starts with abc OR def
?name=abc&name=def -> any name attribute that starts with abc AND any name attribute that starts with def
If you change the definition to:
?name=Danny, Mem -> family name = (starts with? contains?) Danny AND any given name attribute that starts with (contains? starts with) Mem
its custom and only consumers in the know will know how it works and they'll likely have to implement a custom interface with you, which is harder with less benefit than implementing a standard based interface. If you are trying to avoid implementing the "given"/"family" search parameters because they are not required, then I think you're making yourself a bigger challenge by trying to implement the feature in a new custom manner.
Last updated: Apr 12 2022 at 19:14 UTC