Announcement

Collapse
No announcement yet.

CSV to HL7 MDM w/ multiple OBX segments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Any idea on this..I need to implement exact same thing in future

    Comment


    • #3
      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.

      Comment

      Working...
      X