Announcement

Collapse
No announcement yet.

Simple Transformer - Learning Mirth

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

  • Simple Transformer - Learning Mirth

    I'm trying a few things out to see if I can replace our Proprietary HL7 message transformation app with Mirth. So, my goal was to create a channel that :

    1) Takes in a HL7 2.x file
    2) Outputs a custom XML file

    I just wanted to map a single HL7 field into an xml element attribute. So I have one step in the transformer of my Channel.

    Step 1 : Message Builder
    Message Segment: msg['EVN']['EVN.1']
    Mapping : tmp['test']['@value']

    The destination is a file and it writes to the file ok, but the EVN.1 value is not being "transformed", meaning the "value" attribute of the Temp element is empty. I tried various other mappings.

    What am I missing?

    ================================================== ==
    Here is the HL7 inbound sample/template
    ================================================== ==

    MSH|^~\&|Mirth|1|||2006044535||ADT^A04|603340|D|2. 3.1
    EVN|A04|20060404090742
    PID|1|800888^^^Mirth^PN|999945682^^^AccMgr^MR^1||T EST^PATIENT MF||19570414|M||W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000^^M|31|||E|M||6635130^^^Mirth ^VN^1|000987655|||2|||||NOT A VETERAN|||N
    PD1||||1335^ALCOTT^KAREN^^^^^^AccMgr^^^^CI|||I
    NK1|1|TEST^MARGARET|W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||Y
    PV1|1|E|ED^^^1|1|||1281^MARKHAM^JOSEPH^^^^^^AccMgr ^^^^CI|1281^LANG^JOE^^^^^^Mirth^^^^CI||ED||||7|S|| |62|6635130^^^AccMgr^VN^1|865^SP KOPP|||||||||||||||||||1||A|||20060404090500
    PV2||^NO||||||20060404090500|||||||||||||||||||||| ||||||||S
    DG1|1||^HEADACHE|HEADACHE||A|||||||||0
    GT1|1|382582|TEST^PATIENT MF||21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||19570414|M|||000987655|||| ||||11
    IN1|1|SELF PAY NYS|734|SELF PAY NYS|||||||||||5|TEST^PATIENT MF|1|19570414|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||||||||||||||||||||||11|M|| ||||382582
    IN1|2|SELF PAY|705|SELFPAY|||||||||||5||1
    IN2|1||000987655

    =================================================
    Here is the XML template
    ==================================================

    <Give>
    <test value=""></test>
    </Give>

  • #2
    Re:Simple Transformer - Learning Mirth

    You can try using a Transformer step (mapper) that gets the value of EVN.1, and if a file writer destination, configure it to write files using the template:


    <Give>
    <test value="${evn_}"></test>
    </Give>

    Comment

    Working...
    X