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
Mirth Connect 4.3.0 Released!
Mirth Connect 4.3.0 is now available as an appliance update and on our GitHub page.
This is a major release containing new features like adding new functionality to the Mirth Connect Setup Wizard, adding the ability for resource and channel-specific classloaders to load child-first or parent-first, and added a default implementation of the getObjectsForSwaggerExamples() method in the ServicePlugin class. This release also contains enhancements for the Mirth Connect Administrator Launcher, the Mirth Connect Docker images, and several bug fixes and security improvements.
I just want to make sure I understand correctly here before I move on..
if I have a message that looks like:
Code:
MSH|^~\&|IATRIC|XRAD.EMG|EMAGEON||200811070721||ORU^R01|RPT905325688.01|P|2.3|||
PID|||M0462081||NAME^PATIENT^^CFNP||19201015|F||||||||||N017935297||||
ORC|RE|2169591.003|MMN000388666||S|||||||SOMEDOC^Doctor^Some^J||||
OBR||2169591.003|MMN000388666|RAD.CH1^CHEST 1 VIEW AP 71010|||200811062058|||||||||SOMEDOC^Doctor^Some^J|||RAD|SOMERAD|HIM.PSCRIB|^|20081107^0254|^|S|||200811062107||||SOMERAD^RAD^SOME|SOMERAD|
OBX|1|ST|1:RPT^Radiology Report||MMN000388666 RAD CHEST 1 VIEW AP 71010||||||P|
OBX|2|ST|1:RPT^Radiology Report|| ||||||P|
OBX|3|ST|1:RPT^Radiology Report||Exam: Portable chest.||||||P|
OBX|4|ST|1:RPT^Radiology Report|| ||||||P|
OBX|5|ST|1:RPT^Radiology Report||Comparison: None available.||||||P|
OBX|6|ST|1:RPT^Radiology Report|| ||||||P|
OBX|7|ST|1:RPT^Radiology Report||History: Patient found down.||||||P|
OBX|8|ST|1:RPT^Radiology Report|| ||||||P|
OBX|9|ST|1:RPT^Radiology Report||Findings: The patient is diffusely and severely osteopenic. There is||||||P|
OBX|10|ST|1:RPT^Radiology Report||a transverse fracture through the surgical neck of the right humerus.||||||P|
OBX|11|ST|1:RPT^Radiology Report||Evaluation of the chest is limited secondary to lung hypoexpansion||||||P|
OBX|12|ST|1:RPT^Radiology Report||and kyphotic positioning. The cardiomediastinal silhouette is not||||||P|
OBX|13|ST|1:RPT^Radiology Report||well visualized. There is bibasilar atelectasis, and there is poorly||||||P|
OBX|14|ST|1:RPT^Radiology Report||defined ground glass opacity throughout much of the right lung which||||||P|
OBX|15|ST|1:RPT^Radiology Report||could represent atelectasis, aspiration, or pneumonia. Repeat||||||P|
OBX|16|ST|1:RPT^Radiology Report||radiographs with improved positioning and inspiration would be useful||||||P|
OBX|17|ST|1:RPT^Radiology Report||for better evaluation.||||||P|
OBX|18|ST|1:RPT^Radiology Report|| ||||||P|
OBX|19|ST|1:RPT^Radiology Report|| ||||||P|
OBX|20|ST|1:RPT^Radiology Report||Impression:||||||P|
OBX|21|ST|1:RPT^Radiology Report|| ||||||P|
OBX|22|ST|1:RPT^Radiology Report||1. Transverse fracture of the right humeral surgical neck.||||||P|
OBX|23|ST|1:RPT^Radiology Report|| ||||||P|
OBX|24|ST|1:RPT^Radiology Report||2. Diffuse, severe osteopenia.||||||P|
OBX|25|ST|1:RPT^Radiology Report|| ||||||P|
OBX|26|ST|1:RPT^Radiology Report||3. Marked hypoexpansion with bibasal atelectasis.||||||P|
OBX|27|ST|1:RPT^Radiology Report|| ||||||P|
OBX|28|ST|1:RPT^Radiology Report||3. Groundglass opacity throughout much of the right lung could||||||P|
OBX|29|ST|1:RPT^Radiology Report||represent atelectasis, aspiration, or pneumonia. Repeat radiographs||||||P|
OBX|30|ST|1:RPT^Radiology Report||with improved positioning and inspiration could help better evaluate.||||||P|
would this basicaly write:
Code:
MMN000388666 RAD CHEST 1 VIEW AP 71010
Exam: Portable chest.
Comparison: None available.
History: Patient found down.
Findings: The patient is diffusely and severely osteopenic. There is
a transverse fracture through the surgical neck of the right humerus.
Evaluation of the chest is limited secondary to lung hypoexpansion
and kyphotic positioning. The cardiomediastinal silhouette is not
well visualized. There is bibasilar atelectasis, and there is poorly
.........................
...............................
....................................
.........................................
sorry for my sudden appearance!. jasonlan, depending in how you manage "for each" loop is possible to concatenate all strings in order to generate only one record in database, or generate one record for each text.
If you concatenate al OBX segments in a var called report and when exiting the loop record the data in database, you will obtain one report. Otherwise, if you read all OBX segments and put the INSERT statement inside the loop, you will generate one record for each OBX.
you know, I really don't know what I'm doing, I tried adding the example ChrisL supplied above as a javascript step in my transformer, but it always errors out with "ReferenceError: "output" is not defined."
can anybody help point me in the right direction.. (like I stated, I really don't know what i'm doing, but I can follow directions.. :-)
I have the same problem. I tried using the script that Chris posted higher in this post and get the same output error. No one ever answered, is that code missing something like a variable definition or something? Unfortunatly like the original poster, I'm new to this and don't know any Java.
Adding the output={}; prior to the code seems to have gotten rid of the error, but it didn't actually output anything to my transformer / destination. Could someone tell me how to map a transformer java script step to my FileWriter template?
I tried adding ${output} to my template but that doesn't work. I also tried ${Reportoutput} which is the name of the Transformer step that is assigned to the javascript. Can anyone enlighten me?
Post edited by: bstevens, at: 03/13/2009 09:14
JAVA CODE:
output={};
for each(obx in msg..OBX){
output+=obx['OBX.5'].toString();
}
This is in Step 8 of my Transformer Named "Reportoutput" of type JavaScript.
In my FileWriter Template I have some mapped one to one variables (steps 1 through 7 of the transformer), and I need all these OBX fields after the other steps. Please help.
If you are using version 1.8 as I am, it seems that the code earlier in this thread will not work for you.
you need:
Code:
var output = {}
for(obx in msg..OBX)
{
output+= msg['OBX'][obx]['OBX.5']['OBX.5.1'].toString();
}
for(obx in msg..OBX) does not seem to iterate across the objects. It iterates across their indexes. The type(as much as a js variable can have a type) of obx is integer. A call to obx['OBX.5'].toString() throws an exception for trying to call a method that is undefined.
I am curious to see how I am going to work out mapping multiple OBX segments with multiple OBR segments...
I'm using this code below to create a string from all the OBR.4.1 values but the result of the variable is: [object Object]MG BSE ANNE DIFF KR NAK TSH KR CA. Where does the [object Object] piece is coming from? I want to get rid of this...
var output = {}
for(obr in msg..OBR)
{
output+= msg['OBR'][obr]['OBR.4']['OBR.4.1'].toString() + "\r\n";
channelMap.put('testcodes',output);
}
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