Searching Patient with Epic Server

748 views
Skip to first unread message

patel...@gmail.com

unread,
May 13, 2016, 10:46:58 AM5/13/16
to FHIR DOTNET
Hello,

I'm quite new to FHIR and fhir-api-net both. Trying to get grasp of 'Search' operation. I have following code to look for patient with respective ID

FhirClient m_client = new FhirClient( new Uri( "https://open-ic.epic.com/FHIR/api/FHIR/DSTU2/" ) );
m_client.UseFormatParam = true;
m_client.PreferredFormat = ResourceFormat.Json;
var pat = m_client.Read<Patient>( string.Format( "Patient/Tbt3KuCY0B5PSrJvCu2j-PlK.aiHsu2xUjUM8bWpetXoB" ) );
Console.WriteLine( string.Format( "{0} {1}", pat.Name.First().Given.First(), pat.Name.First().Family.First() ) );

This returns a patient named 'Jason Argonaut'. But when I try to search with following code, returns 0 for result.Entry.Count !

Bundle result = m_client.Search( "Patient", new string[] { "name=Jason" } );

Any help is appreciated, been stuck here for 2 days now! :-(


danmihai...@gmail.com

unread,
May 16, 2016, 6:09:20 AM5/16/16
to FHIR DOTNET
Hi,
After testing out the examples, it seems that Epic server doesn't use usual filters like name. In exchange, they use: _id, identifier, family, given... and more, they work only in certain combination:

Note: Epic's patient search implementation only returns patients with strong demographics matches. Most query parameters will return no results unless used in concert with more specific demographic information. Consult the Examples section below for suggestion on combining query parameters.

So, you'll have to change your search method into something like this:
Bundle result = m_client.Search( "Patient", new string[] { "family=Argonaut", "given=Jason" } );

Kunal Patel

unread,
May 18, 2016, 5:33:47 AM5/18/16
to FHIR DOTNET
Hi Dan,

Thank you for your reply! That really helps understanding how different FHIR servers treat queries.

But then how do I find all 'Argonauts' from the server?

Also wanted to know if FHIR have any support for the continuous monitoring i.e. sending vitals informations to the listeners?

Dan-Mihai Patrascu

unread,
May 19, 2016, 10:43:04 AM5/19/16
to FHIR DOTNET
You're welcome!

It seems that in Epic is impossible to query patients only by Family Name; maybe you could try other server for testing: http://wiki.hl7.org/index.php?title=Publicly_Available_FHIR_Servers_for_testing
familyStringSearch for Patient resources using a last name or family name.  This parameter is used to find patients with matching family names, and supports both exact and “sounds like” matches. Query responses return matching patients in order of closest match, with the strongest match first. You must use this parameter with the given name parameter, but do not need any other additional parameters. 
givenStringSearch for Patient resources using a first name or given name. This parameter is used to find patients with matching given names, and supports both exact and “sounds like” matches. Query responses return matching patients in order of closest match, with the strongest match first. You must use this parameter with the family parameter, but do not need any additional parameters.

I don't know the answer to the second question; you could try opening a new tread.

Brian Postlethwaite

unread,
Jun 17, 2016, 1:39:49 AM6/17/16
to FHIR DOTNET
As far as I am aware the search in the Epic server is about finding a specific patient, not about searching for collections of patients, thus their search engine is not implemented as the simple filtering, and performs a wider MPI Query style of search based of the properties that you provided.

Hence a specific set of search fields must be used, and it may return results that could be considered matches (based on fuzzy stuff).

This is not an official answer as I'm not associated with Epic, but hope it helps.
Reply all
Reply to author
Forward
0 new messages