web stats
CSV to HL7 MDM w/ multiple OBX segments - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-10-2011, 03:43 PM
courtnes courtnes is offline
What's HL7?
 
Join Date: Apr 2011
Posts: 1
courtnes is on a distinguished road
Cool CSV to HL7 MDM w/ multiple OBX segments

I have an CSV extract from a legacy EMR that I am trying to write to an HL7 MDM message with multiple OBX segments. I've been able to take the flat file and map the CSV fields to HL7 fields. However, I haven't figured out how to handle multiple lines in my extract that need to go to multiple OBX segments. Any ideas or Help? The flat file looks like below:

Name1, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine1
Name1, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine2
Name1, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine3
Name1, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine4
Name1, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine5
Name2, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine1
Name2, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine2
Name2, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine3
Name2, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine4
Name2, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine5
Name2, DOB, MRN, SSN, Sex, Document Type, Line#, TextofLine6
Reply With Quote
  #2  
Old 11-05-2012, 09:02 AM
rav rav is offline
Mirth Guru
 
Join Date: Oct 2012
Posts: 258
rav is on a distinguished road
Default

Any idea on this..I need to implement exact same thing in future
Reply With Quote
  #3  
Old 11-05-2012, 09:10 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,119
narupley is on a distinguished road
Default

Quote:
Originally Posted by rav View Post
Any idea on this..I need to implement exact same thing in future
If you're reading in the CSV as Delimited Text, the inbound msg object will be parsed into "row" children (each possibly containing "column#" children as well). So if you want to create an OBX per row, you would iterate through the row nodes in msg:

Code:
for each (row in msg.row) {
	var obx = <OBX/>;
	// Add components, etc.
	tmp.appendChild(obx);
}
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
Reply

Tags
conversion, csv, flat file, hl7, multiple

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:14 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation