I'm not familiar this specific problem. Health Insight issues involving custom SDA extensions can be tricky, and your set up might need to be reviewed by a support advisor as part of a WRC issue if no one here knows the answer. Also, since various known bugs have been fixed in recent HI versions, could you provide the full version strings of both the Health Insight and Information Exchange system you are working with? After an MPI link, an update should be sent to HI for the non-surviving AnalyticsID that has no patient data, indicating it should all be removed. You could see if these are actually being sent, and if so, why the system isn't deleting at that point.

You don't need to create a special Trak login to access the clinical viewer editor (which is still labelled "TrakCare" in many places even though this is the name of a different product). You can use a normal HealthShare/Cache login plus a default Trak login and password:

  1. Go to http://localhost:57772/csp/healthshare/hsaccess/web/default.htm.
    You will need to change the hostname and port to match your system, and may need to change "hsaccess" if your access gateway namespace has a different name. Use Internet Explorer if you will need to access the Layout Editor as well.

  2. Click the "Login" Button.

  3. Enter a HealthShare/Cache username and password (e.g., _SYSTEM or the user that installed the instance).

  4. On the next login screen that says, "InterSystems TrakCare" enter hs for the username and demo for the password.

There usually isn't a need to customize this Trak login/password, since the viewer is secured with the first login screen.

Querying through HS.Message.PatientSearchRequest is also a way to accomplish this, but with a few caveats:

1) As you brought up in your other question, there are may be more than one HS.Message.PatientSearchRequest per actual search. There may PatientSearchRequest for events that are you aren't interested in that you have to filter out.

2) Ensemble messages will be purged more frequently than audit logs, and are easier for users to delete.

Whether you use messages or audit logs, you'll have to check what kind of messages or audit events the kind of search traffic you are interested in generates, and make sure your query captures only that.

I wasn't able to reproduce this result on my system so I can't be sure, but here are some thoughts:

1) It could be that incoming PatientSearchRequest on your system are immediately forward to another component that also forwards them with little or no change, creating two very similar PatientSearchRequest objects. Try going to Ensemble > Message Viewer and looking through the trace diagrams of PatientSearchRequest coming in through HS.Hub.HSWS.WebServices to see if a pattern like this exists.

2) Check the HS_Message.PatientSearchRequest_AdditionalInfo table for more information about each patientsearchrequest

I don't think external EHR systems will generate an ViewRecord event. Further down in the documentation, the IHE audit event types are also listed, including ones for PIX and PDQ queries. Just substitute one of those event types in the above query.

To develop a query for your EHR system, try querying:

SELECT TOP 20 *
FROM HS_IHE_ATNA_Repository.Aggregation
ORDER BY LocalDateTime DESC

and then do a patient search of the type you are trying to audit, and then run the query again to see which audit events it created. If these events have the UserName property set to distinct usernames rather than just HS_Services, you may be able to filter out PIX searches before a document registry with something like:

WHERE UserName != 'HS_Services'

If you need assistance developing a query that specific to your system's setup, it might be better to open a WRC issue.

I don't think external EHR systems will generate an ViewRecord event. Further down in the documentation, the IHE audit event types are also listed, including ones for PIX and PDQ queries. Just substitute one of those event types in the above query.

To develop a query for your EHR system, try querying:

SELECT TOP 20 *
FROM HS_IHE_ATNA_Repository.Aggregation
ORDER BY LocalDateTime DESC

and then do a patient search of the type you are trying to audit, and then run the query again to see which audit events it created. If these events have the UserName property set to distinct usernames rather than just HS_Services, you may be able to filter out PIX searches before a document registry with something like:

WHERE UserName != 'HS_Services'

If you need assistance developing a query that specific to your system's setup, it might be better to open a WRC issue.

Here is an example of a SQL query to do this:

SELECT LocalDateTime, MPILIST
FROM HS_IHE_ATNA_Repository.Aggregation
WHERE EventType = 'ViewRecords'
AND MPILIST in (SELECT MPIID FROM HS_Registry.Patient)

Replace the sub-query in parentheses above with one that returns your list of MPIIDs.

I limited my query to the "ViewRecords" audit event type, which is defined as, "The Access Gateway received clinical data from one or more Edge Gateways in response to a patient fetch request. The combined results are about to be loaded into the clinical viewer.". There are several other audit events related to accessing patient data that you may want to read about in the documentation to see if they match what you are checking better. Their descriptions can be found at:

http://localhost:57772/csp/docbook/DocBook.UI.Page.cls?KEY=HESEC_ch_audit#HESEC_audit_events_other

Or by navigating to:

 [ Documentation Home ]  >  [ Running a HealthShare Information Exchange ]  >  [ Information Exchange Security Guide ]  >  [ Auditing Information Exchange Events ]  > Information Exchange Application Events