EDI raw data creation

Feb 11, 2014 at 11:48 AM
Hi Al,
   I am trying to create a edi raw data for X12(270 format). How can I create the raw data text and is there any way so that I can map my DB(Sql) columns or objects to the edifabric INTERCHANGE object??
Coordinator
Feb 12, 2014 at 9:32 PM
You should do this manually, no bespoke maps I'm afraid.
Feb 17, 2014 at 9:46 AM
After adding manually the data I am getting is like below(in xml view)


<G_HL>
<S_HL>
  <D_628_1>1</D_628_1>
  <D_735_3>20</D_735_3>
  <D_736_4>1</D_736_4>
</S_HL>
<G_NM1>
  <S_NM1>
    <D_98_1>PR</D_98_1>
    <D_1065_2>2</D_1065_2>
    <D_1035_3>FLORIDA BLUE</D_1035_3>
    <D_66_8>PI</D_66_8>
    <D_67_9>BCBSF</D_67_9>
  </S_NM1>
  <S_PRV>
    <C_C035 />
  </S_PRV>
  <S_DMG />
  <S_INS>
    <C_C052 />
  </S_INS>
  <S_HI>
    <C_C022 />
    <C_C022_2 />
    <C_C022_3 />
    <C_C022_4 />
    <C_C022_5 />
    <C_C022_6 />
    <C_C022_7 />
    <C_C022_8 />
    <C_C022_9 />
    <C_C022_10 />
    <C_C022_11 />
    <C_C022_12 />
  </S_HI>
</G_NM1>
</G_HL>

so how can I skip the blank segments while getting the edi message.
Feb 17, 2014 at 11:47 AM
While setting Interchage Control Standards Ident to "^" am not getting anything in edi message.
Currently I am using
var m270edi = ediParser.ToEdi(interchange, null, null);

But When I am using U , I am getting U in EDI raw Message. So if I want "^" as the required output what I should do??
Coordinator
Apr 7, 2014 at 6:22 PM
As far as I remember blank elements were automatically omitted. don't know why are you getting these - perhaps your edi message has got blanks in it ?
Coordinator
Apr 7, 2014 at 6:29 PM
You need to supply a segment terminator, please have a look at unit test TestToEdiWithSegmentsComparisonAndNonDefaultSeparators() and call it like this:

var interchangeContext = new Entities.InterchangeContext();
        interchangeContext.SegmentTerminator = "^";
        var parsedEdi = ediParser.ToEdi(XElement.Load(Assembly.GetExecutingAssembly().GetManifestResourceStream(Sample)), null, interchangeContext);
Apr 16, 2014 at 5:58 PM
sumit002 ,
I was facing the same issue . I resolved it by first create object and then assign all unnecessary child objects to null this will avoid empty elements creation in xml
   clm.S_SV1 = new S_SV1();
                
                clm.S_SV1.C_C003 = null;
                clm.S_SV1.C_C004 = null;
               
Coordinator
Apr 30, 2014 at 8:15 AM
This has now been resolved in Release 2.0