Announcement

Collapse
No announcement yet.

database reader xml to hl7 transformation issue

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

  • database reader xml to hl7 transformation issue

    Hi,

    I cant seem to map my incoming XML from a dbreader on 1.6.1 (I believe in the past I was successful reading directly from file but never got a db read to work).

    Here is my channel xml
    I have a database reader with SQL

    select interface_message_id as id, message from interface_messages where...

    The message field is an XML, (sample found here) which I pasted into the destination transformer incoming data.

    I am not sure if I paste and replace everything, or paste and replace the 'message' value.

    Trying either of those doesnt help with my mapping actual data - I tried a couple of ways:

    Code:
    ////////////////////         PID         //////////////////////////////////
    tmp['PID']['PID.5']['XPN.1']['FN.1'] = msg['message']['InterfaceMessage']['PatientModel']['lastName'].toString();
    tmp['PID']['PID.5']['XPN.2'] = msg['InterfaceMessage']['PatientModel']['firstName'].toString();
    tmp['PID']['PID.5']['XPN.3'] = msg['message']['InterfaceMessage'].toString();
    tmp['PID']['PID.5']['XPN.5'] = "mr";
    tmp['PID']['PID.5']['XPN.4'] = msg['message']['InterfaceMessage']['PatientModel'].toString();
    
    hl7_xml = tmp;
    but the output as no xml fields - just my hardcoded mr

    Code:
    MSH|^~&|POS_ADT|POS|||||ADT^A08||P|2.5
    SFT|x|||x
    EVN|A08|||x
    PID|||||^^^^mr
    Am I missing something obvious?

    Post edited by: caultonpos, at: 10/08/2007 20:47

  • #2
    Re:database reader xml to hl7 transformation issue

    Never mind I need:

    msg = new XML(msg['message'].toString());

    Comment

    Working...
    X