Announcement

Collapse
No announcement yet.

XML data type issue Mirth 3.0.1

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

  • XML data type issue Mirth 3.0.1

    I'm having trouble getting an XML to HL7 2.x channel working.

    I had a channel archived from Mirth 2.2. I imported it, reviewed and deployed, but my HL7 messages are coming out empty.

    In looking at it there appears to be a problem with how the RAW message is serialized.

    My XML file looks like this in the Source Connector RAW format:

    Code:
    <Root>
        <Patient>
            <FileType>XML</FileType>
            <ActNo>10191</ActNo>
            <PatientFullName>Smith, John</PatientFullName>
            <MemFirstName>John</MemFirstName>
    ...
    In the Source Connector encoded format it's this:

    Code:
    Root|Patient|FileType|XMLActNo|10191PatientFullName|Smith, JohnMemFirstName|John...
    So essentially it outputs a serialized version. As far as I can tell then, the problem is that the Destination transformer mappings don't deserialize so the end HL7 message is blank. The destination inbound message looks exactly like the source connector encoded. I pulled some sample messages from development on v2.2 channel and the format samples looked like this: (i.e. deserialized)

    Code:
    Root|Patient|FileType|XML
    ActNo|10191
    PatientFullName|Smith, John
    MemFirstName|John
    ...
    When I look at the sample inbound message template, it's expecting the fields to have the new line delimeter. I've got the data type settings segment delimiter set to the default "\r" with should give me the correct result. (See attached screenshots). Do I have something set wrong? I've changed and tested about every setting in the data types, but can't get anything to affect the output.

    I even tried recreating the channel from scratch, but still end up with the same problem. The internal raw message format is serialized so I can't select fields from it in my inbound message template.

    At this point I'll lay blame on myself in maybe I'm going about my development the wrong way. I usually start by creating a "raw" destination, running some sample XML files through it to get the raw message template. I then use that template on the inbound message tree for mapping purposes. At least that how I did it pre 3.0. Should I be doing it a different way?

    Thanks in advance for the help!
    -Nate
    Attached Files

  • #2
    Not exactly the way I wanted to fix it, but here's what I found works. Instead of using HL7 as the source outbound / destination inbound data types I switched it to XML. That switched the internal raw format to XML which works in the message template.

    I still not sure how/why the other worked in v2.2 and not in v3.

    Now I've just got a bunch of transformer steps to remap...

    -Nate
    Attached Files

    Comment


    • #3
      Can you post the 2.x channel you used?
      Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

      Nicholas Rupley
      Work: 949-237-6069
      Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


      - How do I foo?
      - You just bar.

      Comment


      • #4
        Here it is. I had to scrub the data in the message templates so no PHI was present. (And I had to do that in V3 since I no longer have an active v2.2 system)

        Thanks,
        -Nate
        Attached Files
        Last edited by -nth-; 02-14-2014, 12:01 PM.

        Comment


        • #5
          Originally posted by -nth- View Post
          Here it is. I had to scrub the data in the message templates so no PHI was present. (And I had to do that in V3 since I no longer have an active v2.2 system)

          Thanks,
          -Nate
          Did you forget to attach it?
          Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

          Nicholas Rupley
          Work: 949-237-6069
          Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


          - How do I foo?
          - You just bar.

          Comment


          • #6
            Didn't read the attachment window close enough... my xml file was too big... had to zip it...

            Comment


            • #7
              If you post the original 2.x channel, maybe I could see why it worked in one version and not the other.

              As you found out, you were getting that weird encoded data because your source inbound was XML, but your source outbound was HL7 v2.x. This is incorrect, unless you actually do some transformation in your transformer, to map values between the inbound XML structure and the outbound serialized HL7 v2.x XML structure. So I would expect the same channel configuration error to occur in both 2.x and 3.x.
              Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

              Nicholas Rupley
              Work: 949-237-6069
              Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


              - How do I foo?
              - You just bar.

              Comment


              • #8
                Thanks. Since my 2.x channel contains PHI in the message templates (yeah I've noted not to do this in the future...) I don't want to post it as is.

                I'm ok with just crediting it to a learning experience on my part to use the XML data type for inbound and outbound templates until the very last output. It's actually easier and faster (once I've converting my transformer steps).

                Comment

                Working...
                X