EDIdEv - Electronic Data Interchange Development    EDIdEv


 
Sample VB .NET source code using FREDI-NET

  EDI Tool for Developers

Sample HIPAA EDI Acknowledgment program

	[Run Program]     [Download program]
   'This EDI acknowledgment program has two main parts.  The first part is to load all SEF files (implementation
   ' guidelines in Standard Exchange Format) for the EDI file types you will be translating.  The second part is
   ' to simply enable the Framework EDI acknowledgment property, and then load the EDI file.  Framework EDI does
   ' all the rest!  It compares the EDI file against the corresponding SEF file, and any discrepancies are written
   ' into the Interchange Acknowledgment (TA1) and Functional Acknowledgment (997) EDI file.
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        'Instantiate edi document object
        oEdiDoc.Set(oEdiDoc, New ediDocument)   
        'Load edi document as readonly
        oEdiDoc.Option(DocumentOptionIDConstants.OptDocument_ReadOnlyMode) = 1
        'disable internal standard reference library
        oSchemas.Set(oSchemas, oEdiDoc.GetSchemas)  
        oSchemas.EnableStandardReference = False
        'load sef file when needed
        oSchemas.Option(SchemasOptionIDConstants.OptSchemas_SetOnDemand) = 1
        oEdiDoc.LoadSchema("D:\Sef\997_4010.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\270_X092.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\271_X092.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\276_X093.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\277_X093.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\820_X061.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\834_X095.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\835_X091.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\837_X096.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\837_X097.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
        oEdiDoc.LoadSchema("D:\Sef\837_X098.SEF", SchemaTypeIDConstants.Schema_Standard_Exchange_Format)
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim sEdiString As String
        Dim sAckString As String
        'instantiate acknowledgment document
        oAck.Set(oAck, oEdiDoc.GetAcknowledgment)   
        'enable 997 and TA1 acknowledgment
        oAck.EnableFunctionalAcknowledgment = True
        oAck.EnableInterchangeAcknowledgment = True
        sEdiString = Trim(txtEdiString.Text)
        If Len(Trim(sEdiString)) > 0 And Len(Trim(sEdiString)) < 10000 Then
            'load edi string
            oEdiDoc.LoadEdiString(sEdiString)
            'save acknowledgment to a string variable
            sAckString = oAck.GetEdiString
            txtAckEdiFile.Text = sAckString
        Else
            lblMessage.Text = "Program only accepts short HIPAA EDI files (less than 10K characters)"
        End If
    End Sub

 

  Home

  Evaluate Framework EDI

  Download Samples

  Purchase

  Support

  About EDIdEv LLC

EDIdEv - EDI Development
www.edidev.com