Skip to content

Commit

Permalink
Update to latest NHapi and bug fixes with that newest version
Browse files Browse the repository at this point in the history
  • Loading branch information
dib0 committed Apr 12, 2015
1 parent bc9300d commit 078fdf3
Show file tree
Hide file tree
Showing 24 changed files with 56 additions and 196 deletions.
6 changes: 5 additions & 1 deletion Base/IO/HL7InputStreamMessageEnumerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ public IMessage Current
{
get
{
return parser.Parse(enumerator.Current);
string curr = enumerator.Current;
if (string.IsNullOrEmpty(curr))
return null;

return parser.Parse(curr);
}
}

Expand Down
2 changes: 0 additions & 2 deletions Base/NHapiTools.Base.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@
<Compile Include="Model\GenericMessageWrapper.cs" />
<Compile Include="Net\SimpleMLLPClient.cs" />
<Compile Include="Parser\EnhancedModelClassFactory.cs" />
<Compile Include="Parser\HL7Package.cs" />
<Compile Include="Parser\PackageManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Util\Ack.cs" />
<Compile Include="IO\HL7InputStreamMessageStringEnumerator.cs" />
Expand Down
8 changes: 8 additions & 0 deletions Base/Parser/EnhancedModelClassFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ public override Type GetMessageClass(string theName, string theVersion, bool isE

return typeof(NHapiTools.Base.Model.GenericMessageWrapper);
}

public override Type GetSegmentClass(string theName, string theVersion)
{
List<string> l = DefaultModelClassFactory.PackageList("2.3");

Type t = base.GetSegmentClass(theName, theVersion);
return t;
}
#endregion

#region Public properties
Expand Down
44 changes: 0 additions & 44 deletions Base/Parser/HL7Package.cs

This file was deleted.

112 changes: 0 additions & 112 deletions Base/Parser/PackageManager.cs

This file was deleted.

6 changes: 3 additions & 3 deletions Base/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NHapiTools.Base")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2014 - 2014")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
Binary file modified BuildResult/NHapiTools.Model.V21.dll
Binary file not shown.
Binary file modified BuildResult/NHapiTools.Model.V22.dll
Binary file not shown.
Binary file modified BuildResult/NHapiTools.Model.V251.dll
Binary file not shown.
5 changes: 4 additions & 1 deletion BuildResult/Release notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ curve and not everything works as easy as it should. NHapiTools aims to improve
- Two sets of context implementation to easily add all or configurable validation rules.

3. Changelog
- V1.6 Release (April 2015)
Updated to work with NuGet. Updated to the latest version of NHapi and fixed some bugs.

- V1.5 Release (April 2015)
Fixzed bug in ERR segment. Added custom ACK message classes for HL7 V2.2 and V2.1 since these seem to be missing from NHapi.
Fixed bug in ERR segment. Added custom ACK message classes for HL7 V2.2 and V2.1 since these seem to be missing from NHapi.

- V1.4 Release (December 2014)
Added more HL7 versions. Finished documentation.
Expand Down
6 changes: 3 additions & 3 deletions Model.V21/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NHapiTools.Model.V23")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2014")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
6 changes: 3 additions & 3 deletions Model.V22/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NHapiTools.Model.V23")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2014")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
6 changes: 3 additions & 3 deletions Model.V23/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NHapiTools.Model.V23")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2014")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
4 changes: 2 additions & 2 deletions Model.V231/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
6 changes: 3 additions & 3 deletions Model.V24/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NHapiTools.Model.V24")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2014")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
4 changes: 2 additions & 2 deletions Model.V25/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
4 changes: 2 additions & 2 deletions Model.V251/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
2 changes: 1 addition & 1 deletion NuGet/NHapiTools.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>NHapiTools</id>
<version>1.5.0.0</version>
<version>1.6.0.0</version>
<authors>Division by Zero</authors>
<owners>Division by Zero</owners>
<licenseUrl>https://github.com/dib0/NHapiTools/blob/master/LICENSE</licenseUrl>
Expand Down
4 changes: 2 additions & 2 deletions TestApp.CustomImplementation.V23/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
14 changes: 8 additions & 6 deletions TestApp/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
<configuration>
<configSections>
<!-- This is the package collection used to add custom implementations to NHapi -->
<section name="Hl7PackageCollection" type="NHapi.Base.Model.Configuration.HL7PackageConfigurationSection, NHapi.Base"/>
<section name="HL7PackageConfiguration" type="NHapi.Base.Model.Configuration.HL7PackageConfigurationSection, NHapi.Base"/>
<!-- Use this section group to add rules to add specific validation rule implementations -->
<sectionGroup name="hl7ValidationRulesGroup">
<section name="hl7ValidationRules" type="NHapiTools.Base.Configuration.ValidationSection, NHapiTools.Base, version=1.0.0.0"/>
<section name="hl7ValidationRules" type="NHapiTools.Base.Configuration.ValidationSection, NHapiTools.Base"/>
</sectionGroup>
<!-- Use this section group to add configuration to some provided validation rules -->
<sectionGroup name="SpecificRulesGroup">
<section name="SpecificRules" type="NHapiTools.Base.Configuration.MessageRulesSection, NHapiTools.Base, version=1.0.0.0"/>
<section name="SpecificRules" type="NHapiTools.Base.Configuration.MessageRulesSection, NHapiTools.Base"/>
</sectionGroup>
</configSections>
<Hl7PackageCollection>
<HL7Package name="TestApp.CustomImplementation.V23." version="2.3"/>
</Hl7PackageCollection>
<HL7PackageConfiguration>
<HL7PackageCollection>
<HL7Package name="TestApp.CustomImplementation.V23." version="2.3"/>
</HL7PackageCollection>
</HL7PackageConfiguration>
<hl7ValidationRulesGroup>
<hl7ValidationRules>
<EncodingRules>
Expand Down
2 changes: 1 addition & 1 deletion TestApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ private static void TestGenericMessageWrapper()
EnhancedModelClassFactory emch = new EnhancedModelClassFactory();
PipeParser parser = new PipeParser(emch);
emch.ValidationContext = parser.ValidationContext;
IMessage im=parser.Parse(txtMessage);

IMessage im = parser.Parse(txtMessage);
GenericMessageWrapper gcw = im as GenericMessageWrapper;
if (gcw != null)
{
Expand Down
6 changes: 3 additions & 3 deletions TestApp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TestApp")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2014")]
[assembly: AssemblyCopyright("Copyright Division by Zero © 2013 - 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
1 change: 1 addition & 0 deletions TestApp/TestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
Loading

0 comments on commit 078fdf3

Please sign in to comment.