Skip to main content

Adding or Updating Demographic Data Held in an EMPI (PIX Add)

InterSystems products can add a patient or update the demographic data held for a patient in an external EMPI via an IHE “PIXv3_PatientAddRequest” transaction.

PIX Add Message Trace

The following diagram is an annotated PIX add message trace that returns the MPIID.

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.

PIX Add Procedure

  1. You provide an Add Update Hub RequestOpens in a new tab message that contains the necessary demographic data to the InterSystems PIX Source.

  2. The InterSystems PIX Source transforms the message into an IHE “PIXv3_PatientAddRequest” using the transformation specified in the TransformAddUpdateHubToPIX setting.

  3. The InterSystems PIX Source then forwards the PIX request to the PIX manager endpoint on another system that is named in the ServiceName setting.

  4. The PIX manager on the other system returns an acknowledgement or error.

  5. If the OperationToLocateMPIID setting in the InterSystems PIX Source contains a value (typically HS.IHE.PIXv3.Consumer.OperationsOpens in a new tab), then it sends a patient search request to the named operation, and that operation performs a PIX query to get the MPIID of the patient.

  6. The InterSystems PIX Source returns an Add Update Hub ResponseOpens in a new tab message. Depending on the setting in step 5, this response message may contain the MPIID. If there is an error, the InterSystems PIX Source returns null.

PIX Add Components and Settings

Components and Settings Used in a PIX Add
Component Setting
Business Hosts PIX Source: HS.IHE.PIXv3.Source.OperationsOpens in a new tab
Business Hosts PIX Consumer: HS.IHE.PIXv3.Consumer.OperationsOpens in a new tab
  • if returning the MPI ID

Production Settings TransformAddUpdateHubToPIX in PIX Source
Production Settings ServiceName in PIX Source
Production Settings OperationToLocateMPIID in PIX Source
Production Messages HS.Message.AddUpdateHubRequestOpens in a new tab
Production Messages HS.Message.AddUpdateHubResponseOpens in a new tab
Production Messages HS.Message.PatientSearchRequestOpens in a new tab (if PIX)
Production Messages HS.Message.PatientSearchResponseOpens in a new tab (if PIX)
XSL Transformations IHE/PIX/Version1/AddUpdateHubRequestToPRPAIN201301UV.xsl
Service Registry Entries PIXv3.Manager
External IHE Actor Endpoint PIX manager

PIX Add Example

The method below generates a PIX add:

 ClassMethod PIXADD()
  {
    // Create AddUpdateHub Message    
    Set obj=##class(HS.Message.AddUpdateHubRequest).%New()

    // Name, sex, DOB
    Set obj.FirstName="James"
    Set obj.LastName="Smith"
    Set obj.Sex="M"
    Set obj.DOB=obj.DOBDisplayToLogical("2000-09-30")

    // Inserts full birth name information for the patient
    Set tName = ##class(HS.Types.PersonName).%New()
    Set tName.Prefix = "Mr."
    Set tName.Given = "James"
    Set tName.Middle = "Henry"
    Set tName.Family = "Smith"
    Set tName.Suffix = "IV"
    Set tName.Type="Birth"
    Do obj.Names.Insert(tName)

    // Inserts name of patient's spouse
    Set tName = ##class(HS.Types.PersonName).%New()
    Set tName.Prefix = "Mx."
    Set tName.Given = "Pat"
    Set tName.Middle = "A."
    Set tName.Family = "Henderson"
    Set tName.Suffix = ""
    Set obj.SpousesName=tName

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

    // Address 1
    Set addr=##class(HS.Types.Address).%New()
    Set addr.City="Somewhere"
    Set addr.State="SW"
    Set addr.StreetLine="123 Money Street"
    Set addr.Use="HP"   // Primary Home address
    Do obj.Addresses.Insert(addr)

    // Address 2
    Set addr=##class(HS.Types.Address).%New()
    Set addr.City="Anywhere"
    Set addr.StreetLine="456 Any Street"
    Set addr.Use="WP"   // Work Place address
    Do obj.Addresses.Insert(addr)

    //Telephone
    Set tel=##class(HS.Types.Telecom).%New()
    Set tel.PhoneCountryCode="1"
    Set tel.PhoneAreaCode=705
    Set tel.PhoneNumber=5551212
    Set tel.Use="HP"   // Primary Home phone
    Set tel.Type="L"   // Landline
    Do obj.Telecoms.Insert(tel)

    // Alternate ID
    Set tIdent=##class(HS.Types.Identifier).%New()
    Set tIdent.Root="Other.AA"   // refers to an Assigning Authority entry in the OID Registry
    Set tIdent.Extension="98754321"
    Do obj.Identifiers.Insert(tIdent)
    
    // Send to the routing service (or directly to HS.IHE.PIXv3.Source.Operations)
    Do ##class(HS.Test.Service).SendSync(obj,.r) 
    Quit
  }
FeedbackOpens in a new tab