web stats
Mirth Community - View Single Post - Combining OBX lines into one AND inserting 80 character limit ~ tilde
View Single Post
  #3  
Old 10-09-2013, 07:54 AM
Jaypell22 Jaypell22 is offline
OBX.1 Kenobi
 
Join Date: Jul 2011
Location: Upstate NY
Posts: 33
Jaypell22 is on a distinguished road
Default

Thanks for your Help! I am hitting a snag right now however. Maybe you can understand the error. That is the first OBX Line that it gets stuck on. Let me know if you have any ideas - also if you are going to test or use the code there is just an extra space in this line in the word length which I highlighted below

obx5 = obx5.toString().subString(80,obx5.toString().lengt h()); this was fixed so not causing problems, just an FYI.

ERROR-300: Transformer error
ERROR MESSAGE: Error evaluating transformer
com.mirth.connect.server.MirthJavascriptTransforme rException:
CHANNEL: TEST CHANNEL
CONNECTOR: Test to Channel
SCRIPT SOURCE:
SOURCE CODE:
193: for each (obx in msg.OBX)
194: {
195: var obxArray = new Array();
196: for each (obx5 in obx['OBX.5'])
197: {
198: while(obx5.toString().length() > 80)
199: {
200: var tmpOBX = obx.toString().substring(0,80);
201: var obxIndex = tmpObx.lastIndexOf(' ');
202: obxArray.push(tmpOBX.substring(0,obxIndex));
LINE NUMBER: 198
DETAILS: TypeError: Cannot call property length in object <OBX.5><OBX.5.1>Referring Physician: FIRSTNAME, LASTNAME, PA</OBX.5.1></OBX.5>. It is not a function, it is "number".
at com.mirth.connect.server.mule.transformers.JavaScr iptTransformer.evaluateScript(JavaScriptTransforme r.java:398)

Last edited by Jaypell22; 10-09-2013 at 09:12 AM.
Reply With Quote