Problem loading 837

Post author
Leonardo Soto Jacobson

I am loading an 837 file and everything works, except that certain segments load in the wrong order.

For example, in the original file I have the LX segments:

LX*1
SV1*HC:99213*199*UN*1**3*1
DTP*472*D8*20190221
LX*2
SV1*HC:87804:59:QW*39*UN*1**5*1
DTP*472*D8*20190221
LX*3
SV1*HC:87804:QW*39*UN*1**5*1
DTP*472*D8*20190221
LX*4
SV1*HC:87880:QW*39*UN*1**5*1
DTP*472*D8*20190221
LX*5
SV1*HC:71046*118*UN*1**4*1
DTP*472*D8*20190221

But the segments are loading the database in a different order:

17033 5
17036 1
17037 2
17034 3
17035 4

That means that when I want to write a new file, the segments are in the incorrect order.

The same happens for other segment types like NM1 and REF.

How to fix that?

Comments

1 comment

  • Comment author
    Admin

    We'll need a sample project to be able to reproduce your issue. See the example here, which saves/pulls the segments in the correct order. I'd suggest is something with your database structure or Entity Framework that is causing this.

    0

Please sign in to leave a comment.