nextgenhealthcare / connect

The swiss army knife of healthcare integration.
Other
915 stars 275 forks source link

Error parsing a delimited text message with given length properties #3690

Closed rbeckman-nextgen closed 4 years ago

rbeckman-nextgen commented 4 years ago

The inbound data type is set to delimited text with a column withs of 3,4,200. No column delimitter. The setup is working with mirth connect 3.2 and lower versions. The inbound message, and received messages are not parsed correct. While the first row is correct, the second tis jumped over and for all others the column1 is empty.

Imported Issue. Original Details: Jira Issue Key: MIRTH-3807 Reporter: phist Created: 2015-09-29T22:38:50.000-0700

rbeckman-nextgen commented 4 years ago

Verified this is a bug. Tested using column widths "4,5,4", and passing in the following message:

val1val2 val3 val4val5 val6

The first row is fine, but all subsequent rows are messed up:

`

val1 val2 val3
<row>
    <column1/>
    <column2>val4v</column2>
    <column3>al5</column3>
</row>

`

Imported Comment. Original Details: Author: narupley Created: 2015-09-30T07:37:41.000-0700

rbeckman-nextgen commented 4 years ago

Record delimiters are now properly consumed/skipped for messages with set column widths.

Imported Comment. Original Details: Author: leilanim Created: 2015-10-12T12:51:48.000-0700

rbeckman-nextgen commented 4 years ago

Found unexpected behavior at 3.3.1 using the following raw message and column widths of 6,14,12 johnd (714)123-4567 111-11-1111 janed (714)987-6543 222-22-2222 mikeh (714)456-7894 333-33-3333 petem (714)123-4567 444-44-4444

Transformed msg at mirthconnect-3.2.2.7680.b56-unix `

johnd (714)123-4567 111-11-1111
<row>
    <column1>janed</column1>
    <column2>(714)987-6543</column2>
    <column3>222-22-2222</column3>
</row>
<row>
    <column1>mikeh</column1>
    <column2>(714)456-7894</column2>
    <column3>333-33-3333</column3>
</row>
<row>
    <column1>petem</column1>
    <column2>(714)123-4567</column2>
    <column3>444-44-4444</column3>
</row>

`

Transformed msg at mirthconnect-3.3.0.7801.b1804-unix => missing 2nd message + column width is off `

johnd (714)123-4567 111-11-1111
<row>
    <column1/>
    <column2>mikeh (714)456</column2>
    <column3>-7894 333-33</column3>
</row>
<row>
    <column1/>
    <column2>petem (714)123</column2>
    <column3>-4567 444-44</column3>
</row>

`

Transformed msg at mirthconnect-3.3.1.7844.b85-unix => missing 2nd & 4th message `

johnd (714)123-4567 111-11-1111
<row>
    <column1>mikeh</column1>
    <column2>(714)456-7894</column2>
    <column3>333-33-3333</column3>
</row>

`

Imported Comment. Original Details: Author: minht Created: 2015-10-13T15:05:18.000-0700

rbeckman-nextgen commented 4 years ago

Nick's comment: The other two rows just disappear for some reason. I think it's because your final column width is 12 but in the data you're sending the last column does not have a width of 12, it has a width of 11. So the parser is counting the line feed as part of the third column snd the rest gets cut off. That seems like a bug, since it {color:red}should prioritize the record delimiter before the column widths{color}

Imported Comment. Original Details: Author: minht Created: 2015-10-13T15:21:09.000-0700

rbeckman-nextgen commented 4 years ago

attached test channel from MC322

Imported Comment. Original Details: Author: minht Created: 2015-10-13T15:24:52.000-0700

rbeckman-nextgen commented 4 years ago

Records are no longer getting skipped if the column value is shorter than the specified width.

Imported Comment. Original Details: Author: leilanim Created: 2015-10-14T12:07:46.000-0700

rbeckman-nextgen commented 4 years ago

Server(s) and URLs Used: Run Mirth Connect on local OSX Yosemite 10.10 Version(s)/Build(s) to reproduce failure: mirthconnect-3.3.0.7801.b1804 Version(s)/Build(s) to verify fixes: mirthconnect-3.3.1.7854.b90-unix How Tested (list tests run):

Verified Fixed:

Imported Comment. Original Details: Author: minht Created: 2015-10-15T14:58:13.000-0700

rbeckman-nextgen commented 4 years ago

Output result: INFO 2015-10-15 14:36:38,100 [pool-4-thread-2] js-connector: Batch processing raw data = johnd,(714)123-4567,111-11-1111 INFO 2015-10-15 14:36:38,119 [pool-4-thread-2] js-connector: Batch processing raw data = janed,(714)987-6543,222-22-2222 INFO 2015-10-15 14:36:38,131 [pool-4-thread-2] js-connector: Batch processing raw data = mikeh,(714)456-7894,333-33-3333 INFO 2015-10-15 14:36:38,150 [pool-4-thread-2] js-connector: Batch processing raw data = petem,(714)123-4567,444-44-4444

Imported Comment. Original Details: Author: minht Created: 2015-10-15T15:04:30.000-0700

rbeckman-nextgen commented 4 years ago

Verified Fixed in mirthconnect-3.3.1.7854.b90

Imported Comment. Original Details: Author: minht Created: 2015-10-15T15:08:24.000-0700