david clifte · Sep 27, 2016

List Medical Records of an Patient

How to identify a patient of an encounter?

Doing the following query in Edge we are able to list the records of all patients.

I want select all records of a particular patient.


SELECT  top 10 * FROM HS_SDA3_Streamlet.Encounter 



1 0 13 547
Log in or sign up to continue

Hi David,

We don't support direct queries to the HealthShare tables. We do have some APIs available that might work for what you need. I suggest opening a WRC issue so we can better understand your unique needs and get you the best solution. 


edit: I now understand what you meant by "We don't support".  I was thinking you meant it wasn't possible, but now I see you meant it literally.

I'd still like a link to the API documentation you mentioned if possible.

Try this:

SELECT  * FROM HS_SDA3_Streamlet.Encounter WHERE SourceMRN = '12345'

(Replace 12345 with the MRN of the patient you want to list the records of)

But as Robert mentioned, Intersystems does not recommend querying the tables directly. Do you know if you have a separate query environment set up by using the healthshare Mirror funtionality?

The reason they don't recommend querying the live data directly is due to potential performance impact.  But ultimately, that decision is up to you.  

Hi all,

Mirroring is not yet supported for Information Exchange.  We also do not support that type of direct access in any reporting environment.  It isn't due to performance reasons, it is because we make no guarantees that those tables stay the same.  We expose public APIs for these purposes as Robert said.  Typically these are the SearchAndFetch type APIs - if you search the documentation for "supported APIs", a list will come up.


-- Alex

I didn't know he had "Information Exchange".  Are you sure he does?

I've always been told performance was the reason for using my query environment and now you're saying it's because the data might be different or out of date??

Also, I couldn't find the APIs you mentioned, can I get a link?  Are these available in Healthshare or just this new "Information Exchange" sub-product?

Hi, Scott.

"HealthShare" is no longer a particular product. Now it describes a family of products. What used to be called "HealthShare" is now called "Information Exchange". David said he has an Edge, so he has Information Exchange. We don't support querying tables for several reasons. Tables are internal to the product (unless explicitly documented otherwise). The APIs are documented in Roadmap to Implementing an Information Exchange> Supported APIs.

I don't know if the documentation search sucks or if I'm an idiot but I still can't find the API docs you are talking about... There is literally one Google result for "Roadmap to Implementing an Information Exchange" and it is

I've tried both and the help link on my instance.

"No matches were found for roadmap information exchange (.004001s)

Please try searching for related terms. "

The HealthShare documentation is not on, so you can't use Google. In HS Core 15, open the documentation, then click on "Roadmap to Implementing an Information Exchange", then click on Chapter 6, "Supported APIs". Before the name change, the book was called "Roadmap to Implementing a HealthShare Regional Solution" and the supported APIs were in Section 5.5. Searching for "Supported APIs" should also work.

"Roadmap to Implementing a HealthShare Regional Solution"


That was the piece I was missing. I was looking for "Information Exchange".


After rereading this I'm even more confused.  You are saying that you shouldn't query the data directly because those tables might not "stay the same"?

Sorry, I meant to say we might change the storage structure.  As David mentioned there are other reasons for this, you are only querying a specific edge, without aggregating data, you are avoiding consent policies, etc. etc.  Those tables should only be populated as part of HealthShare Information Exchange.

When you say aggregate data,  I assume you are referring to the ATNA log?  What if it is 600 million rows and takes 24+ hours to query?  Is there another option?