Announcement

Collapse

NextGen Connect 3.10.1 Released!

NextGen (Mirth) Connect 3.10.1 is now available as an appliance update and on our GitHub page. This release contains bug fixes. See the release notes for the list of fixes.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

add the start block, end block and carriage return

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

  • add the start block, end block and carriage return

    Does anyone know how to add hexa characters such as the start block - 0B, end block - 1C, carriage return - 0D on the output HL7 message in a channel that reads an Oracle db reader to TCP Sender. How can I be able to define these blocks on the HL7message?

    Thank u in advance for any help..
    Tonet

  • #2
    Re:add the start block, end block and carriage return

    In a JS step, simply add the unicode characters to the beginning and end of the HL7 string.
    Brendan Haverlock | Mirth Software Engineer | Mirth Corporation

    Comment


    • #3
      Re:add the start block, end block and carriage ret

      Hi Folks,

      I had this problem licked in 1.5, and now I have upgraded to 1.71 and I can't solve it the same way.

      The previous solution to restore the message blocks in the output using v1.5 was, as you said, to add unique transformer steps with a variable name, and include for each in the default value field the actual hex characters within quotes, as in "<rawChar>" (this editor won't display the block character) ,since you don't show any way to map the text-ified hex (like 0x1c) into the field. You could then apply the new Destination Variables to the Template field and get the desired output.

      Since upgrading to 1.7.1, I cannot deploy the Channel with this (or any) defined Transformer configurations included. On attempting deployment, I get the following error in the logs, followed by two others. With no Transformer steps at all, it deploys and runs fine, but won't give me the right output. Any ideas? Thanks in advance-- JB

      [2008-05-23 14:18:03,375] ERROR (com.webreach.mirth.server.mule.transformers.JavaS criptTransformer:248): ERROR-300: Transformer error
      com.webreach.mirth.server.MirthJavascriptTransform erException:
      CHANNEL:
      localhostMLLPTest
      CONNECTOR:
      sourceConnector
      SCRIPT SOURCE:
      Filter/Transformer
      LINE NUMBER:
      2
      LINE SOURCE:
      function doFilter() { phase = 'filter'; return true; }function doTransform() { phase = 'transformer'; logger = Packages.org.apache.log4j.Logger.getLogger(phase); var mapping;try { mapping = ; }catch (e) { logger.error(e); mapping = '';}channelMap.put('sblock', validate( mapping , " ", new Array()));
      DETAILS:
      syntax error
      at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.initialise(JavaScriptTransformer.j ava:245)
      at org.mule.MuleManager.registerTransformer(MuleManag er.java:564)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.commons.beanutils.MethodUtils.invokeMet hod(MethodUtils.java:216)
      at org.apache.commons.digester.SetRootRule.end(SetRoo tRule.java:209)
      at org.apache.commons.digester.Rule.end(Rule.java:230 )
      at org.apache.commons.digester.Digester.endElement(Di gester.java:1130)
      at org.apache.xerces.parsers.AbstractSAXParser.endEle ment(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser .parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digeste r.java:1685)
      at org.mule.config.builders.AbstractDigesterConfigura tion.process(AbstractDigesterConfiguration.java:11 9)
      at org.mule.config.builders.MuleXmlConfigurationBuild er.configure(MuleXmlConfigurationBuilder.java:202)
      at org.mule.config.builders.MuleXmlConfigurationBuild er.configure(MuleXmlConfigurationBuilder.java:194)
      at com.webreach.mirth.server.Mirth.startMule(Mirth.ja va:236)
      at com.webreach.mirth.server.Mirth.restartMule(Mirth. java:193)
      at com.webreach.mirth.server.Mirth.run(Mirth.java:121 )

      Comment


      • #4
        Re:add the start block, end block and carriage ret

        I don't have time to confirm this for sure, but could you use an LLP Sender instead of a TCP Sender?

        The LLP sender lets you choose those sequences the same way the LLP listener does.
        Jon Bartels

        Zen is hiring!!!!
        http://consultzen.com/careers/
        Talented healthcare IT professionals wanted. Engineers to sales to management.
        Good benefits, great working environment, genuinely interesting work.

        Comment


        • #5
          Re:add the start block, end block and carriage ret

          If you want to add the SOM and EOM characters to TCP, you should be using LLP, as jbartels said.

          As far as that error goes, it looks like you don't have a mapping value...try putting it in quotes? I'd have to see the channel to know for sure what is wrong.
          Jacob Brauer
          Director, Software Development
          NextGen Healthcare

          sigpic

          Comment


          • #6
            Re:add the start block, end block and carriage ret

            Thanks for the quick replies!

            That's what I was doing-- putting it in quotes, using v1.5. That used to work.
            Where I indicated <rawChar) in the post above, that was the actual 0xb and 0x1c characters placed in the Transformer step as a default value for that variable (called "sblock" and "eblock", respectively).

            The problem seems to be if I define ANY steps in the Transformer under 1.7.1, it won't deploy the Channel, and throws that error. I've tried a bunch of variations on the Default Value field; all generate the same problems.

            We intend to go MLLP for all eventually, but the legacy system to which we connect requires Files that include the start and end blocks... gotta try to solve this for the immediate use.

            Thanks again,
            JB

            Comment


            • #7
              Re:add the start block, end block and carriage ret

              Could you attach your channel? I don't see why a default value would stop working for you in 1.7.1.
              Jacob Brauer
              Director, Software Development
              NextGen Healthcare

              sigpic

              Comment


              • #8
                Re:add the start block, end block and carriage ret

                Attached is the Channel's XML. It seems to be adding this line:

                <script>var mapping;try { mapping = ; }catch (e) { logger.error(e); mapping = &apos;&apos;;}channelMap.put(&apos;startBlock&apos ;, validate( mapping , &quot; &quot;, new Array()));</script>

                under the step definitions; I tried commenting it and Mirth won't reimport the Channel. localtest2.xml (6993 bytes)

                Comment


                • #9
                  Re:add the start block, end block and carriage ret

                  I've still been trying to work this:

                  I tried exporting the old Channel (that used to work) from a server that was still running 1.5. The Channel imported and converted, but it created the same problem.

                  In the old file, I found this:
                  <script>channelMap.put(&apos;sblock&apos;, validate(&apos;&apos;, &quot; &quot;, new Array()));</script>

                  which differs from the new (v1.7.1) version like so:
                  <script>var mapping;try { mapping = ; }catch (e) { logger.error(e); mapping = &apos;&apos;;}channelMap.put(&apos;sblock&apos; , validate( mapping , &quot; &quot;, new Array()));</script>

                  regardless of whether you import/convert it or make it from scratch. Something is different with the way v1.7.1 parses the Transformer XML.

                  I have tried editing the Channel and Transformer XML directly, and tried using XML-friendly variables therein, like: "&amp;#xb;" and "&amp;#x1c;". That didn't work either.

                  Running out of ideas-- I may have to regress to v1.5 if I can't figure this out.

                  As always, your assistance is appreciated,
                  JB

                  Comment


                  • #10
                    Re:add the start block, end block and carriage ret

                    You need to put a value in your mapping value box. It can just be the same thing as the default value if you want. The mapper step is meant to map from a message, and then the default value is used if that mapping doesn't exist. If you want it to be a static value, you don't need a default value, and you can just put " " as the mapping.

                    Also keep in mind, you don't have to use a mapper step here. You could just use a javascript step and put channelMap.put("sblock", " ");

                    That should fix your problem, though.
                    Jacob Brauer
                    Director, Software Development
                    NextGen Healthcare

                    sigpic

                    Comment


                    • #11
                      Re:add the start block, end block and carriage ret

                      I bow to the Guru. That solved it.

                      v1.5 worked without a value in that field. Go Figure.

                      THANK YOU VERY MUCH!!! :cheer:
                      JB

                      Comment


                      • #12
                        Re:add the start block, end block and carriage ret

                        All the mapper step does is generate that javascript for you in the background. 1.7 generates it a different way than 1.5 did. It now allows more features, but it doesn't forgive that error like 1.5 did.

                        Glad it works now!
                        Jacob Brauer
                        Director, Software Development
                        NextGen Healthcare

                        sigpic

                        Comment

                        Working...
                        X