NHapiTools icon indicating copy to clipboard operation
NHapiTools copied to clipboard

nHapi returns error for valid HL7 files while doing validation concurrently

Open vmsuthar56 opened this issue 3 years ago • 2 comments

We are using nHapitool to validate batch of 1000 HL7 files (want to use it for much more files). We are using Parallel.ForEachAsync loop with degree of parallelism set to 250. For some of the valid HL7 files we receive errors as below:

  1. An item with the same key has already been added. Key: ^~&
  2. Index was outside the bounds of the array.Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array
  3. Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct. Please suggest on this, we are kind of blocked on this.

We are using nhapitool version 2.0.3 and .net 6.0

Thanks

vmsuthar56 avatar Dec 15 '22 16:12 vmsuthar56

Hi,

I'm not the maintainer of NHapi. I can try to help, but I would need more information. For example errors with stack traces and a code example.

Without such details I would be unable to tell you anything useful I'm afraid...

dib0 avatar Dec 16 '22 16:12 dib0

FYI this was also referenced here:

https://github.com/nHapiNET/nHapi/issues/393

milkshakeuk avatar Mar 02 '23 21:03 milkshakeuk