Hi everyone, please check out our new discussion forum located in our GitHub site: https://github.com/nextgenhealthcare/connect/discussions. Let us know your feedback as we try out this new part of GitHub! Don't worry, the content in these forums won't be going away and will at a minimum be preserved for historical reference.
Announcement
Collapse
No announcement yet.
add the start block, end block and carriage return
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?
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 )
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.
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
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.
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('sblock', validate('', "", 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 = '';}channelMap.put('sblock' , validate( mapping , "", 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: "&#xb;" and "&#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.
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
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
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment