web stats
Comma Delimited File - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2014, 12:11 PM
AlexCameron1 AlexCameron1 is offline
What's HL7?
 
Join Date: Mar 2012
Posts: 5
AlexCameron1 is on a distinguished road
Default Comma Delimited File

Hi new to Mirth Trying something that I think should be simple.
I am attempting to read a CSV file and write The single Numerical value from each record to a new file.

The Test Channel below is testing writing to a File. My end goal is grabbing each value placing it in a variable and calling a web service with that variable


Source : File Reader Reading in a file type
- Process Batch Files Turned on
- Record Delimiter Set to Comma
I have attached Channel, screenshot, and test file
All Help would be welcome...Please!!!
Attached Images
File Type: jpg Alex.jpg (170.2 KB, 44 views)
Attached Files
File Type: txt CDA Test Files.txt (25.6 KB, 51 views)
File Type: xml TestChartmessage.xml (16.1 KB, 52 views)
Reply With Quote
  #2  
Old 03-09-2014, 04:45 PM
glenn71 glenn71 is offline
OBX.3 Kenobi
 
Join Date: Nov 2010
Location: Sydney Australia
Posts: 129
glenn71 is on a distinguished road
Default

The CDA file is one record not many.. I cant see any carriage returns?!
Reply With Quote
  #3  
Old 03-10-2014, 02:33 PM
kgrevemberg kgrevemberg is offline
What's HL7?
 
Join Date: Oct 2007
Location: New Orleans
Posts: 1
kgrevemberg
Default

New to Mirth!
trying to read a pipe delimited .txt file and write HL7 to a file.
Do you have a sample file I can look at and, hopefully lear from?
Thanks,
Ken
864-903-2877
Reply With Quote
  #4  
Old 03-13-2014, 09:24 AM
AlexCameron1 AlexCameron1 is offline
What's HL7?
 
Join Date: Mar 2012
Posts: 5
AlexCameron1 is on a distinguished road
Default Clarify Please

glenn71 Not following. Do you mean that it is 1 Row with many columns instead of 1 column many rows?
Reply With Quote
  #5  
Old 03-13-2014, 09:25 AM
AlexCameron1 AlexCameron1 is offline
What's HL7?
 
Join Date: Mar 2012
Posts: 5
AlexCameron1 is on a distinguished road
Default

The file is actually generated from a Web Service. I can Post the full results of that Webservice if that would be helpful...
Reply With Quote
  #6  
Old 03-13-2014, 09:40 AM
AlexCameron1 AlexCameron1 is offline
What's HL7?
 
Join Date: Mar 2012
Posts: 5
AlexCameron1 is on a distinguished road
Smile

Here is the full File. All I really want to do is take this result, then send each number to another "destination" or Channel that has another web service that process it with that number...I can't seem to get it to parse correctly..
Attached Files
File Type: txt CDA Test File.txt (26.0 KB, 39 views)
Reply With Quote
  #7  
Old 03-13-2014, 09:58 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

The problem is your delimited text data type properties are configured incorrectly.

First, you have your record delimiter and your column delimiter set to exact same character. That's incorrect, as there would be no way to distinguish a new column from a new record.

Second, you have Split Batch by Grouping Column enabled, but instead of a column name, you just have a comma in there. Even if you did have a name, you aren't specifying column names in the serialization settings so it wouldn't have worked anyway.

You also have Split Batch by Delimiter enabled, even though as previously mentioned you have "by Grouping Column" enabled already. That doesn't make sense either. You can only split the batch one way (unless you're using JavaScript to do it), so you need to pick one. However here again, you've just placed a comma in there, which is the same as your column and record delimiters. So it's just going to ignore the delimiter because the record parsing will take precedence.

The one thing you should have had enabled, Split Batch by Record, is disabled. If you want to indicate that the record delimiter is a comma, but you're disabling splitting the batch by record, then obviously the batch won't be split (or at least, not correctly).

Go ahead and reset all your data type properties to the defaults. Then set your record delimiter to a comma, and set your column delimiter to something else (like a semicolon or something).
__________________
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.

Last edited by narupley; 03-14-2014 at 03:41 PM.
Reply With Quote
  #8  
Old 03-14-2014, 08:22 AM
AlexCameron1 AlexCameron1 is offline
What's HL7?
 
Join Date: Mar 2012
Posts: 5
AlexCameron1 is on a distinguished road
Smile

I had to many uncontrolled changes...
Started over with clean slate applied changes that narupley suggested...Worked like a charm.

Simplicity at its best....!!!!

Thank You
Reply With Quote
Reply

Tags
comma, delimited

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 01:06 AM.


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