Announcement

Collapse
No announcement yet.

newbie: master detail from mysql database to hl7

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • newbie: master detail from mysql database to hl7

    Dear people,
    mirth newbie here.

    I think I have looked at all relevant documents etc.
    but, since I'm a newbie, I can't guarantee that I did.
    If not: please turn me in the right direction.

    My problem:
    I have a patient table and another table activities. (just an example)
    table patient:
    rec_id int(20)
    name varchar(50)

    table activities:
    rec_id int(20)
    patient_rec_id int(20)
    activity varchar(50)

    per patient there are multiple activities.

    I must now create a jhl7 message to communicate to an organization that validates the activities for payment.

    How do I start?

    I have seen examples doing the opposite: read from hl7 with multiple details (for example: http://www.leakymllp.com/blog/hl7topdfexample.html)

    but how do I create an incoming channel that can deliver header / details to one outgoing message?

    Thanks for your help in advance.

    Jurjan

  • #2
    I could be totally wrong, but ...hey..its worth a shot!

    1. Create new channel
    2. Source = Database Reader
    Drive = MySQL
    Use SQL or Javascript in source to return your data
    Use Edit Transformer for Source
    On the right-hand side, select Message Templates and paste in a sample HL7 message
    in the Outbound Template section.
    Select the Message Tree tab
    Manually map the values/sections in the Outbound Message tree to the values sent
    from your Source, which would look something like this:
    tmp['PID']['PID.3']['PID.3.1'] = msg['patient_id'].toString()

    Comment

    Working...
    X