We use FHIR, but we've had a few customer accidentally create a new Patient instead of finding and adding data to an existing patient creating duplicate entries for the same real-life patient.
I'd like to search for patients with same DOB and similar names and then offer them UI in the app to merge their records.
My questions are:
Thanks in advance.
Your solution here is ultimately going to depend upon the FHIR server and/or EHR that you are connecting to.
In terms of being able to search for patients with similar demographics, in an ideal world, you would make a patient search API call with the demographics and the FHIR server would return not only patients with matching demographics but also patients with a similar set of demographics. (E.g., returning John Smith with DOB 4/3/1921 in addition to Johnathan Smith with DOB 4/3/1921). Epic does this and uses a point-based system to essentially assign a weight to a potential patient match.
In terms of merging, doing this over FHIR would require the server to support something like a $merge operation. I personally am not aware of any major EHRs that support this. Usually merges are handled via HL7 ADT interface messages (there are a few message types, like A18 and A34, that would fit the bill and again, it'll depend on the server's capabilities).