Skip to main content
Previous sectionNext section

Performing PIX and PDQ Queries Against an EMPI

InterSystems can perform both probabilistic and deterministic queries against an external EMPI (Enterprise Master Patient Index).

Perform a Deterministic Query Against an EMPI (PIXv3)

InterSystems products support deterministic queries against an EMPI via the IHE “PIXv3” profile. A PIX query provides an MRN (Medical Record Number) and assigning authority and receives back the name and MPI ID of a single patient.

This section includes:

PIX Query Message Trace

The following diagram is an annotated PIX query message trace.

The test service shown in the diagram is a simple message router. Trace operations is a utility that makes intermediate processing steps visible. The numbers in the diagram match the steps in the procedure below.

PIX Query Procedure

  1. You provide a Patient Search Request message containing an MRN and assigning authority to the InterSystems PIX Consumer operation.

  2. The InterSystems PIX Consumer operation transforms the message into an IHE “PIXv3_QueryRequest” using the transformation specified in the TransformPatientSearchToPIX setting.

  3. The InterSystems PIX Consumer operation then forwards the PIX request to the service named in the ServiceName setting. This setting is typically PIXv3.Manager, and it refers to a Service Registry entry pointing to the location of the PIX manager actor endpoint in another system.

  4. The PIX manager on the other system returns a PIX response message that contains the name and MPI ID for a single patient if there is a match.

  5. The InterSystems PIX Consumer operation transforms the response into a Patient Search Response message using the transformation specified in TransformPIXToPatientSearch.

  6. The InterSystems PIX Consumer returns the Patient Search Response message, which contains the name and MPI ID of the patient, if found. If no patient is found, the response message indicates a <ResultsCount> of zero. If there is an error, the PIX Consumer returns null.

PIX Query Components and Settings

Components and Settings Used in a PIX Query
Component Setting
Business Hosts PIX Consumer: HS.IHE.PIXv3.Consumer.Operations
Production Settings TransformPatientSearchToPIX in the PIX Consumer operation
Production Settings ServiceName in the PIX Consumer operation
Production Settings TransformPIXToPatientSearch in the PIX Consumer operation
Production Messages HS.Message.PatientSearchRequest
Production Messages HS.Message.PatientSearchResponse
XSL Transformations IHE/PIX/Version1/PatientSearchToPRPAIN201309UV.xsl
XSL Transformations IHE/PIX/Version1/PRPAIN201310UVToPatientSearchResponse.xsl
Service Registry Entries PIXv3.Manager
External IHE Actor Endpoint PIX manager

PIX Query Example

The method below generates a PIX query:

 ClassMethod PIXQuery()
  {
     /// Create Patient Search Request message 
     Set obj=##class(HS.Message.PatientSearchRequest).%New()

     //Provide the Patient MRN
     Set obj.AssigningAuthority="EXTERNAL" //refers to an Assigning Authority entry in the OID Registry
     Set obj.MRN="1111222"

     // Send to the routing service (or directly to HS.IHE.PIXv3.Consumer.Operations)
     Do ##class(HS.Test.Service).SendSync(obj,.pr)

     quit
  }
Copy code to clipboard

Perform a Probabilistic Query Against an EMPI (PDQv3)

InterSystems products support probabilistic queries against an EMPI via the IHE “PDQv3” profile. A PDQ query provides a partial set of patient demographics and receives back full demographics for one or more MPI IDs (patients) that match the provided demographics.

This section includes:

PDQ Query Message Trace

The following diagram is an annotated PDQ query message trace.

The test service shown in the diagram is a simple message router. Trace operations is a utility that makes intermediate processing steps visible in the trace. The numbers in the diagram match the steps in the procedure below.

PDQ Query Procedure

  1. You provide a Patient Search Request message containing partial demographics to the InterSystems PDQ Consumer.

  2. The InterSystems PDQ Consumer transforms the message into an IHE “PDQv3_QueryRequest” using the transformation specified in the TransformPatientSearchToPDQ setting.

  3. The InterSystems PDQ Consumer then forwards the PDQ request to the PDQ supplier endpoint on another system that is named in the ServiceName setting.

  4. The PDQ supplier on the other system returns a PDQ response message that contains the complete demographics for all patients that match the supplied partial demographics.

  5. The InterSystems PDQ Consumer transforms the response into a Patient Search Response message using the transformation specified in the TransformPDQToPatientSearch setting.

  6. The InterSystems PDQ Consumer returns the Patient Search Response message, which contains the full demographics and MPI IDs of the matching patients. If no patient is found, the response message indicates a <ResultsCount> of zero. If there is an error, the PDQ Consumer returns null.

PDQ Query Components and Settings

Components and Settings Used in a PDQ Query
Component Setting
Business Hosts PDQ Consumer: HS.IHE.PDQv3.Consumer.Operations
Production Settings TransformPatientSearchToPDQ in the PDQ Consumer
Production Settings ServiceName in the PDQ Consumer
Production Settings TransformPDQToPatientSearch in the PDQ Consumer
Production Messages HS.Message.PatientSearchRequest
Production Messages HS.Message.PatientSearchResponse
XSL Transformations IHE/PDQ/Version1/PatientSearchToPRPAIN201305UV.xsl
XSL Transformations IHE/PDQ/Version1/PRPAIN201306UVToPatientSearchResponse.xsl
Service Registry Entries PDQv3.Supplier
External IHE Actor Endpoint PDQ Supplier

PDQ Query Example

The method below generates a PDQ query:

 ClassMethod PDQQuery()
  {
     // Create Patient Search Request message 
     Set obj=##class(HS.Message.PatientSearchRequest).%New()
 
     // Provide patient demographics
     Set obj.FirstName="James"
     Set obj.LastName="Smith"
 
     // Required only for HS.Test.Service to distinguish between PIX/PDQ
     Do obj.AdditionalInfo.SetAt(1,"PDQ")
 
     // Send to the routing service (or directly to HS.IHE.PDQv3.Consumer.Operations)
     Do ##class(HS.Test.Service).SendSync(obj,.sr)
 
     quit
  }
Copy code to clipboard