Announcement

Collapse
No announcement yet.

Processing HL7 failed

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

  • Processing HL7 failed

    [HL7ServerService] Processing HL7 failed:

    HL7Exception: Missing required PID-5: Patient Name


    I am trying to build an HL7 message from mysql database using outbound channel. I am sucessfull in creating an HL7 message, but I get the above error and while analysing the HL7 message last name is not created in the HL7 message along with the first name.

    MSH|^~\&|Mirth|1|||2006044535||ADT^A04|b88d3e9a-ac2d-480e-af7e-921f2020e6f6|D|2.3.1
    EVN|A04|20060404090742
    PID|1|2000^^^Mirth^PN|999945682^^^AccMgr^MR^1||^Sa thish||1978-06-07|M||W|Chennai^^EAST SYRACUSE^NY^130570000^^M|31|25594003|9444244300|E| ||6635130^^^Mirth^VN^1|29203029329|||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




    From
    Ganesh Kumar.K

  • #2
    Re: Processing HL7 failed

    Can you post your message template and transformer?

    Comment


    • #3
      Re: Processing HL7 failed

      Message 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


      Transformer

      <transformer>
      <steps>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>0</sequenceNumber>
      <name>tmp[&apos;MSH&apos;][&apos;MSH.10&apos;]</name>
      <script>tmp[&apos;MSH&apos;][&apos;MSH.10&apos;] = UUIDGenerator.getUUID();;</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>UUIDGenerator.getUUID();</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;MSH&apos;][&apos;MSH.10&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>1</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.2&apos;][&apos;CX.1&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.2&apos;][&apos;CX.1&apos;] = msg[&apos;pid&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;pid&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.2&apos;][&apos;CX.1&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>2</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.5&apos;][&apos;XPN.1&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.5&apos;][&apos;XPN.1&apos;] = msg[&apos;name_last&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;name_last&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.5&apos;][&apos;XPN.1&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>3</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.5&apos;][&apos;XPN.2&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.5&apos;][&apos;XPN.2&apos;] = msg[&apos;name_first&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;name_first&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.5&apos;][&apos;XPN.2&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>4</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.7&apos;][&apos;TS.1&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.7&apos;][&apos;TS.1&apos;] = msg[&apos;date_birth&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;date_birth&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.7&apos;][&apos;TS.1&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>5</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.8&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.8&apos;] = msg[&apos;sex&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;sex&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.8&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>6</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.1&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.1&apos;] = msg[&apos;addr_str&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;addr_str&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.1&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>7</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.13&apos;][&apos;XTN.1&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.13&apos;][&apos;XTN.1&apos;] = msg[&apos;phone_1_nr&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;phone_1_nr&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.13&apos;][&apos;XTN.1&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>8</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.14&apos;][&apos;XTN.1&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.14&apos;][&apos;XTN.1&apos;] = msg[&apos;phone_2_nr&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;phone_2_nr&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.14&apos;][&apos;XTN.1&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>9</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.16&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.16&apos;] = msg[&apos;civil_status&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;civil_status&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.16&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      <com.webreach.mirth.model.Step>
      <sequenceNumber>10</sequenceNumber>
      <name>tmp[&apos;PID&apos;][&apos;PID.19&apos;]</name>
      <script>tmp[&apos;PID&apos;][&apos;PID.19&apos;] = msg[&apos;sss_nr&apos;].toString();</script>
      <type>HL7 Message Builder</type>
      <data class="map">
      <entry>
      <string>Mapping</string>
      <string>msg[&apos;sss_nr&apos;].toString()</string>
      </entry>
      <entry>
      <string>Variable</string>
      <string>tmp[&apos;PID&apos;][&apos;PID.19&apos;]</string>
      </entry>
      </data>
      </com.webreach.mirth.model.Step>
      </steps>
      <template>MSH|^~\&amp;|Mirth|1|||2006044535||ADT^A 04|603340|D|2.3.1&#x0D;EVN|A04|20060404090742&#x0D ;PID|1|800888^^^Mirth^PN|999945682^^^AccMgr^MR^1|| TEST^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&#x0D;PD1||||1335^ALCOTT^KAREN^^^^^^Acc Mgr^^^^CI|||I&#x0D;NK1|1|TEST^MARGARET|W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||Y&#x0D;PV1|1|E|ED^^^1|1||| 1281^MARKHAM^JOSEPH^^^^^^AccMgr^^^^CI|1281^LANG^JO E^^^^^^Mirth^^^^CI||ED||||7|S|||62|6635130^^^AccMg r^VN^1|865^SP KOPP|||||||||||||||||||1||A|||20060404090500&#x0D; PV2||^NO||||||20060404090500|||||||||||||||||||||| ||||||||S&#x0D;DG1|1||^HEADACHE|HEADACHE||A||||||| ||0&#x0D;GT1|1|382582|TEST^PATIENT MF||21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||19570414|M|||000987655|||| ||||11&#x0D;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&#x0D;IN1|2|SELF PAY|705|SELFPAY|||||||||||5||1&#x0D;IN2|1||0009876 55&#x0D;</template>
      </transformer>
      <filter>
      <rules/>
      <template>MSH|^~\&amp;|AccMgr|1|||20060404090746|| ADT^A04|6035910|D|2.3.1
      EVN|A04|20060404090742
      PID|1|800888^^^AccMgr^PN|999945682^^^AccMgr^MR^1|| TEST^PATIENT MF||19570414|M||W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000^^M|31|||E|M||6635130^^^AccMg r^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^MARKHAM^JOSEPH^^^^^^AccMgr^^^^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</template>

      Comment


      • #4
        Re: Processing HL7 failed

        I changed the message template adding explicit fields for patient last name, first name, and middle name.

        Try pasting the modified template and re-do the trasformer steps (delete the HL7 message segment and drag-and-drop again).

        Modified Template:
        =============
        MSH|^~\&|Mirth|1|||2006044535||ADT^A04|603340|D|2. 3.1
        EVN|A04|20060404090742
        PID|1|800888^^^Mirth^PN|999945682^^^AccMgr^MR^1||P atientLastName^PatientFirstName^PatientMiddleName| |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

        ==============

        Transformer Step 2 (for last/family name):
        tmp[&#039;PID&#039;][&#039;PID.5&#039;][&#039;XPN.1&#039;][&#039;FN.1&#039;]

        mapping:

        msg[&#039;name_last&#039;].toString()

        ==============
        Transformer Step 3 (for given name):

        tmp[&#039;PID&#039;][&#039;PID.5&#039;][&#039;XPN.2&#039;]

        mapping:

        msg[&#039;name_first&#039;].toString()
        =============

        Add a new step for patient middle name and move up to step 4:

        tmp[&#039;PID&#039;][&#039;PID.5&#039;][&#039;XPN.3&#039;]

        mapping
        msg[&#039;name_middle&#039;].toString()

        ===========

        Hope it works!

        Comment


        • #5
          Re: Processing HL7 failed

          Hi nshaik,

          Thanks for your feedback. It&#039;s really working good.

          Now I have some other doubts,

          1. Inbound and Outbound channels are running uninterruptedly and repetitively. My point is i have only two records in my db, but mirth outbound channel keeps on creating the hl7 message continuously i.e more than two hl7 messages are created.

          Repetitively hl7 messages are created for the same records .

          how to stop that ?

          2. Now I am testing order filler from HIS to RIS. If you have an xml related to order filler please provide to me for testing .


          Thanks once again

          From

          kgk_007

          Comment


          • #6
            Re: Processing HL7 failed

            I&#039;m glad it is working.

            As regards your first question, please refer the following posts:
            [hr]
            [orange]
            Results with repeated values
            http://www.mirthproject.org/index.ph...=323&Itemid=63
            [/orange]
            [orange]
            Send outbound msg only once and update database column after sending?

            http://www.mirthproject.org/index.ph...=239&Itemid=63
            [/orange]
            [hr]

            If I come across a test xml file for order filler, I&#039;ll pass it on.

            Comment


            • #7
              Re: Processing HL7 failed

              Thanks nshaik

              Comment

              Working...
              X