Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Help Getting Database Values Into HL7 Message

  • Filter
  • Time
  • Show
Clear All
new posts

  • Help Getting Database Values Into HL7 Message


    I am attempting to take Data from a SQL Server 2005 database (source) and insert it into a HL7 message that is sent to a FileWriter connector (destination). I am having a problem getting the data from the database into the message. I have sample message which I have pasted into a transformer in several places. I believe that I have tried every combination and cannot get this to work. I followed the advice someone gave on a previous post and used a "message builder" to map the values from the database. However, this only appends the value. Here is an example of what should happen:

    This is my select statement:

    Select patientLastName FROM tbl_patients
    WHERE updateDateTime > (GETDATE()-5)

    This is the raw data output:

    <?xml version="1.0" encoding="UTF-8"?>

    I should have this in one of my HL7 message "segments":

    PID|1||2^||PatientName^CHRISTINE^^||19400110|F||4|234 RT 2 BOX 270^APT#292^MARKS^MS^28643^^^^||5893165873|8471259 148|||||698593453||||||||||||

    Instead, I am just getting the original value where PatientName is. Is there a way to insert the database value into the HL7 message using a transformer? Can someone tell me how?



  • #2
    Re:Help Getting Database Values Into HL7 Message

    Yes. At the transformer, use a messageBuild and link the input data with the desired position at the output template.

    I think this is fine explained in the webminar.


    • #3
      Re:Help Getting Database Values Into HL7 Message

      Yes. That is correct. I had screwed up The mapping vs message segment. It was backwards. I was originally getting an error when they were mapped correctly because my pasted message had repeating segments.inch: It is working now. Thanks for responding.

      Post edited by: larryw, at: 02/14/2008 09:53


      • #4
        Re:Help Getting Database Values Into HL7 Message


        Would it be possible to post the definition of your steps?
        I'm trying to do the same thing, but I'm terribly stuck...



        • #5
          Re:Help Getting Database Values Into HL7 Message

          Same here... there are no docs on doing this on the Mirth site and I can no longer find the Webminar.