I have been reading the forums and the User Guide but still unable to get a simple filter to work.
I only want to accept ADT^A08 or ADT^A31 messages and filter out any other ADT's. Using the Rule Builder I originally tried 'Accept message if MSH9.2 = A08 or A31. When this didn't work I tried again just using A08 (and then A31) same problem, error thrown for any message.
In one attempt I accidently had accept message if MSH9.2 = blank,,,,and this worked/no error, it filtered an A31.....
I also tried unchecking 'strip namespaces' from my inbound Message Template properties based on something I read in another forum post. Didn't help.
The filter is in source filter for a channel that is reading from file inserting to db although I may want to use the same filter in an LLP to File channel.
hoping I can get an answer on how to build a simple filter on a source to filter out certain message triggers using rule builder.
thanks
---------------------------------
Filter error
ERROR MESSAGE: Error evaluating filter
com.mirth.connect.server.MirthJavascriptTransforme rException:
CHANNEL: TEST ADT InsertDB
CONNECTOR: sourceConnector
SCRIPT SOURCE: FILTER
SOURCE CODE:
134: }
135: function doScript() {
136: msg = new XML(connectorMessage.getTransformedData());
137: if (msg.namespace('') != undefined) { default xml namespace = msg.namespace(''); } else { default xml namespace = ''; }
138: function filterRule1() {
139: if(msg['MSH']['MSH.9']['MSH.9.2'].toString() == A08)
140: {
141: return true;
142: }
143: return false;
LINE NUMBER: 139
DETAILS: ReferenceError: "A08" is not defined.
at 109542be-6ef7-4fd4-88dc-fc50484a68bb:139 (filterRule1)
at 109542be-6ef7-4fd4-88dc-fc50484a68bb:144 (doFilter)
at 109542be-6ef7-4fd4-88dc-fc50484a68bb:495 (doScript)
at 109542be-6ef7-4fd4-88dc-fc50484a68bb:497
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:134)
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:100)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
I only want to accept ADT^A08 or ADT^A31 messages and filter out any other ADT's. Using the Rule Builder I originally tried 'Accept message if MSH9.2 = A08 or A31. When this didn't work I tried again just using A08 (and then A31) same problem, error thrown for any message.
In one attempt I accidently had accept message if MSH9.2 = blank,,,,and this worked/no error, it filtered an A31.....
I also tried unchecking 'strip namespaces' from my inbound Message Template properties based on something I read in another forum post. Didn't help.
The filter is in source filter for a channel that is reading from file inserting to db although I may want to use the same filter in an LLP to File channel.
hoping I can get an answer on how to build a simple filter on a source to filter out certain message triggers using rule builder.
thanks
---------------------------------
Filter error
ERROR MESSAGE: Error evaluating filter
com.mirth.connect.server.MirthJavascriptTransforme rException:
CHANNEL: TEST ADT InsertDB
CONNECTOR: sourceConnector
SCRIPT SOURCE: FILTER
SOURCE CODE:
134: }
135: function doScript() {
136: msg = new XML(connectorMessage.getTransformedData());
137: if (msg.namespace('') != undefined) { default xml namespace = msg.namespace(''); } else { default xml namespace = ''; }
138: function filterRule1() {
139: if(msg['MSH']['MSH.9']['MSH.9.2'].toString() == A08)
140: {
141: return true;
142: }
143: return false;
LINE NUMBER: 139
DETAILS: ReferenceError: "A08" is not defined.
at 109542be-6ef7-4fd4-88dc-fc50484a68bb:139 (filterRule1)
at 109542be-6ef7-4fd4-88dc-fc50484a68bb:144 (doFilter)
at 109542be-6ef7-4fd4-88dc-fc50484a68bb:495 (doScript)
at 109542be-6ef7-4fd4-88dc-fc50484a68bb:497
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:134)
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:100)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
Error Evaluating Filter
0 commentaires:
Enregistrer un commentaire