I'm simply fumbling around in my never ending quest to find holistic queries that answer basic questions.  Right now I'm querying the registry.  I don't have SQL access to the buses or hsaccess and we have dozens of edges so that isn't convenient  Since the ATNA log is 600+ million rows and takes hours and hours to query (and decypher), HSREG is really my only option.

*wish I could post an answer*

 

I found the following in HS.Message.PatientSearchRequest.cls:

 /// Search modes user - regular patient lookup, admin - mpi patient lookup no consent applied,
/// clinician -- mpi patient lookup, no consent applied, limited to patients with a pre-existing relationship with the clinician
Property SearchMode As %String(DISPLAYLIST = ",User,Admin,Clinician,Participation,AuditReport,PIXPDQ", VALUELIST = ",user,admin,clinician,participation,AuditReport,PIXPDQ") [ InitialExpression = "user" ];

Still not sure what PIXPDQ means but I assume it's for non-clinicalviewer searches.

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 https://learning.intersystems.com/course/view.php?id=102

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

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

Please try searching for related terms. "

We are an HIE so I cannot simulate a search from within an EHR system.

Can you think of anything I could query on the Registry to do this?  Something endpoint-agnostic?  For instance, I've discovered this seems to work pretty well for searches without having to worry about ATNA event types and the performance issues related to the size:

 

SELECT TimeProcessed, LastName, FirstName, DOB, AssigningAuthority, MPIID, MRN, SearchMode, RequestingUser, SAMLData_Organization, SessionId
FROM Ens.MessageHeader h LEFT JOIN HS_Message.PatientSearchRequest m
ON h.MessageBodyId = m.id
WHERE h.Invocation = 1
AND h.MessageBodyClassName = 'HS.Message.PatientSearchRequest'
ORDER BY SessionId DESC

I appreciate your input so far.

"The combined results are about to be loaded into the clinical viewer."

What about searches from directly within participant EHR systems?   Users that are not using the clinical viewer? ie "on demand" customers.  Or other protocols, XDSb, XCA, etc.  Also would this exclude patient searches like a PIX query before a document registration?