web stats
Issue setting delimiters for text file reader channel - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2018, 07:55 AM
jmcollins jmcollins is offline
What's HL7?
 
Join Date: May 2018
Posts: 3
jmcollins is on a distinguished road
Default Issue setting delimiters for text file reader channel

Iím testing/using Mirth version 3.6.0 for a file reader channel and attempting to set the record delimiter and batch delimiter to a comma preceded by 48 spaces. I have been successful reading and mapping the data from the body of the text file into the source connector transformer. (then output to a file in XML format).

My problem is setting the record and batch delimiter to key off the below sequence in line 4. (the spaces and the comma: see body of text attachment)

I do have process batch turned on. (see process batch attachment)

I have tried to set the 48 spaces then comma within quotes and without the quotes. I get multiple records in a text file with each one starting with the spaces/comma sequence. (see delimiter settings attachment)

I am stumped on what might work to allow me to set the delimiters (record and batch) to get the text file to read in as a batch of these records and split them out into unique records. The source transformer and destination file writer is working.

Any help would be great. Thank you.
Attached Images
File Type: png process batch.png (3.4 KB, 2 views)
File Type: png body of text.png (6.7 KB, 5 views)
File Type: png delimiter settings.png (21.2 KB, 7 views)
Reply With Quote
  #2  
Old 06-12-2018, 10:31 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 435
agermano is on a distinguished road
Default

You shouldn't need the quotes since they aren't part of the text.

You have the default of Ignore Carriage Returns checked, which doesn't process the \rs in the file. So, either uncheck that box or change your delimiter to <48 spaces>,\n.
Reply With Quote
  #3  
Old 06-13-2018, 07:35 AM
jmcollins jmcollins is offline
What's HL7?
 
Join Date: May 2018
Posts: 3
jmcollins is on a distinguished road
Default still not quite right, but closer to setting delimiters for text file reader channel

So we are getting closer... the delimiters table is as now set up as suggested with <48 spaces>,\n (see delimiter settings#2 below)

When I run the text document I get the below delimiter in transformed for the first record... but it still can not read the next record. (as if it's not seeing this as the delimiter.)

<delimited>
<row>
<column1/>
<column2/>
<column3/>
<column4/>
<column5/>
<column6/>
<column7/>
<column8/>
<column9/>
<column10/>
<column11/>
<column12/>
<column13/>
<column14/>
<column15/>
<column16/>
<column17/>
<column18/>
<column19/>
<column20/>
<column21/>
<column22/>
<column23/>
<column24/>
<column25/>
<column26/>
<column27/>
<column28/>
<column29/>
<column30/>
<column31/>
<column32/>
<column33/>
<column34/>
<column35/>
<column36/>
<column37/>
<column38/>
<column39/>
<column40/>
<column41/>
<column42/>
<column43/>
<column44/>
<column45/>
<column46/>
<column47/>
<column48/>
<column49>,

As a note: To get the above delimiter, I set the column delimiter to a space so I can map the unique xml segment fields to the data elements I need. If I change it to \r\n or \n the columns had many data elements in them and I couldn't parse them (pick the data elements) I need.

In any case even if I set the column delimiter to \r\n or \n it had no effect on the record or batch delimiter.
Attached Images
File Type: png delimiter settings#2.png (16.6 KB, 3 views)
Reply With Quote
  #4  
Old 06-13-2018, 11:30 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 435
agermano is on a distinguished road
Default

Sorry, <48 spaces> was shorthand because I didn't know how to clearly represent 48 spaces on the forum. Replace that with 48 actual spaces.

Do you have a spec for your data layout? It doesn't make any sense to me, but I'm guessing you probably want to use fixed width columns instead of delimited.
Reply With Quote
  #5  
Old 06-22-2018, 07:39 AM
jmcollins jmcollins is offline
What's HL7?
 
Join Date: May 2018
Posts: 3
jmcollins is on a distinguished road
Default

Quote:
Originally Posted by agermano View Post
Sorry, <48 spaces> was shorthand because I didn't know how to clearly represent 48 spaces on the forum. Replace that with 48 actual spaces.

Do you have a spec for your data layout? It doesn't make any sense to me, but I'm guessing you probably want to use fixed width columns instead of delimited.
I’m closing this thread as I went back to the customer to get a different extract format. Issue is no longer relevant. Thank you for the help.
Reply With Quote
Reply

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 02:13 AM.


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