Skip to content

Commit

Permalink
Updated documentation with an example of creating a 270 eligibility r…
Browse files Browse the repository at this point in the history
…equest document from scratch (matches the test case). Bumped package version.
  • Loading branch information
MartinJSoles committed Jul 12, 2021
1 parent 0112db3 commit e8f5203
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Madjic.Edi.Dom/Madjic.Edi.Dom.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<PackageReleaseNotes>This is an initial release of a class library that supports reading and writing HIPAA compliant ANSI X12 EDI documents. There are issues (but work for my immediate needs right now).</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Version>1.0.5</Version>
<AssemblyVersion>1.0.3.0</AssemblyVersion>
<Version>1.0.6</Version>
<AssemblyVersion>1.0.6.0</AssemblyVersion>
</PropertyGroup>
<PropertyGroup>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageProjectUrl>https://github.com/MartinJSoles/Madjic.Edi</PackageProjectUrl>
<FileVersion>1.0.4.0</FileVersion>
<FileVersion>1.0.6.0</FileVersion>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<ItemGroup>
Expand Down
128 changes: 126 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,133 @@ Functional Groups, and Transaction Sets.
When creating, you would use the static methods on the desired transaction sets in the `Madjic.Edi.Dom.Factory.*` namespaces. You will notice that these methods all return
objects that implement the specific interface.

### TODO: Examples of creating a file (when passing tests are created)
### Example of creating a file

#### Visual Basic.NET Example
Async Function CreateFile(ByVal path As String) As Task
Dim Doc = BuildDocument(True, "00", "", ":"c, "*"c, "^"c, "~"c, 1, #12/31/2020 12:50:00 AM#, "ZZ", "123456789", "ZZ", "12345678", False, "00", "", 222222222, "SUBMITTERID", "CMS", #3/8/2019 7:34:00#)
Dim Ts = Factory.Transaction270_B1.TransactionSetFactory.CreateTransaction270_B1("1234")

Doc.Envelopes(0).FunctionalGroups(0).AddTransactionSet(Ts)

Ts.BHT = Factory.Transaction270_B1.TransactionSetFactory.CreateBHT
Ts.Loop2000A.Add(Factory.Transaction270_B1.TransactionSetFactory.CreateLoop2000A)

With Ts.BHT
.BHT01 = "0022"
.BHT02 = "13"
.BHT03 = "10001234"
.BHT04 = #5/1/2006#
.BHT05 = New TimeSpan(13, 19, 0)
End With

With Ts.Loop2000A(0)
.HL = Factory.Transaction270_B1.Loop2000AFactory.CreateHL
.HL.HL01 = "1"
.HL.HL03 = "20"
.HL.HL04 = "1"

.Loop2100A = Factory.Transaction270_B1.TransactionSetFactory.CreateLoop2100A()

.Loop2100A.NM1 = Factory.Transaction270_B1.Loop2100AFactory.CreateNM1

With .Loop2100A.NM1
.NM101 = "PR"
.NM102 = "2"
.NM103 = "ABC COMPANY"
.NM108 = "PI"
.NM109 = "842610001"
End With
End With

Ts.Loop2000B.Add(Factory.Transaction270_B1.TransactionSetFactory.CreateLoop2000B)

With Ts.Loop2000B(0)
.HL = Factory.Transaction270_B1.Loop2000BFactory.CreateHL

With .HL
.HL01 = "2"
.HL02 = "1"
.HL03 = "21"
.HL04 = "1"
End With

.Loop2100B = Factory.Transaction270_B1.TransactionSetFactory.CreateLoop2100B()

.Loop2100B.NM1 = Factory.Transaction270_B1.Loop2100BFactory.CreateNM1()

With .Loop2100B.NM1
.NM101 = "1P"
.NM102 = "2"
.NM103 = "BONE AND JOINT CLINIC"
.NM108 = "SV"
.NM109 = "2000035"
End With
End With

Ts.Loop2000C.Add(Factory.Transaction270_B1.TransactionSetFactory.CreateLoop2000C())

With Ts.Loop2000C(0)
.HL = Factory.Transaction270_B1.Loop2000CFactory.CreateHL()

With .HL
.HL01 = "3"
.HL02 = "2"
.HL03 = "22"
.HL04 = "0"
End With

.TRN.Add(Factory.Transaction270_B1.Loop2000CFactory.CreateTRN())

With .TRN(0)
.TRN01 = "1"
.TRN02 = "93175-012547"
.TRN03 = "9877281234"
End With

.Loop2100C = Factory.Transaction270_B1.TransactionSetFactory.CreateLoop2100C()

With .Loop2100C
.NM1 = Factory.Transaction270_B1.Loop2100CFactory.CreateNM1()
.DMG = Factory.Transaction270_B1.Loop2100CFactory.CreateDMG()
.DTP.Add(Factory.Transaction270_B1.Loop2100CFactory.CreateDTP())

With .NM1
.NM101 = "IL"
.NM102 = "1"
.NM103 = "SMITH"
.NM104 = "ROBERT"
.NM108 = "MI"
.NM109 = "11122333301"
End With

With .DMG
.DMG01 = "D8"
.DMG02 = "19430519"
End With

With .DTP(0)
.DTP01 = "291"
.DTP02 = "D8"
.DTP03 = "20060501"
End With

.Loop2110C.Add(Factory.Transaction270_B1.TransactionSetFactory.CreateLoop2110C())

With .Loop2110C(0)
.EQ = Factory.Transaction270_B1.Loop2110CFactory.CreateEQ()
.EQ.EQ01 = "30"
End With
End With
End With

Using stream As New IO.FileStream(path, IO.FileMode.Create, IO.FileAccess.Write, IO.FileShare.None)
Await Doc.ToStreamAsync(stream)
End Using
End Using
End Function

#### C# Example
#### C# Example (TODO)
async Task CreateFile(string path)
{
}
Expand All @@ -72,6 +192,10 @@ by a single class definition).

## History

#### V1.0.6
* This release includes a test case for writing a file from scratch.
* A bug has been fixed for adding segments that can repeat as well as child loops that can repeat

#### V1.0.4, V1.0.5
* This release includes the generated XML Documentation file for all supported platforms.
* Removed debugging statements (the file readers were dumping incoming characters to the debugger output when looking for the envelope information).
Expand Down

0 comments on commit e8f5203

Please sign in to comment.