Skip to content

Commit e544c06

Browse files
authored
Merge pull request #136 from nHapiNET/OBX5-Fix
The datatype for OBX-5 is specified in OBX-2, the first commit fixes an issue when the specified datatype from OBX-2 could not be constructed for OBX-5 because the required constructors were missing. fixes #62, fixes #85, fixes #133 XAD, XON, XTN datatypes for hl7 v2.7.1 up to 2.8.1 have incorrect recursive datatypes leading to StackOverflowException. The second commit fixes this by correcting those datatypes. fixes #86, fixes #109 The OBX-5 datatype for hl7 v2.1 is incorrectly set to ST when it should be Varies. The last commit fixes this. fixes #45
2 parents 0f2ef32 + 56a897d commit e544c06

File tree

86 files changed

+3275
-2251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+3275
-2251
lines changed

Hl7Models.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ EndProject
4040
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{14D20F5F-87E7-41BD-BE24-991081E0DE60}"
4141
ProjectSection(SolutionItems) = preProject
4242
.editorconfig = .editorconfig
43+
global.json = global.json
4344
NHapi.snk = NHapi.snk
4445
README.md = README.md
4546
EndProjectSection

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "3.1.301",
4+
"rollForward": "latestFeature"
5+
},
6+
"projects": []
7+
}

nHapi.sln

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ EndProject
1616
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F462762A-D1DC-42AE-8E52-4BD3CC4590E4}"
1717
ProjectSection(SolutionItems) = preProject
1818
.editorconfig = .editorconfig
19+
global.json = global.json
1920
NHapi.snk = NHapi.snk
2021
README.md = README.md
2122
EndProjectSection
2223
EndProject
23-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHapi.SourceGeneration", "src\NHapi.SourceGeneration\NHapi.SourceGeneration.csproj", "{D9A637CE-C1B6-499C-B81B-82AE30580394}"
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHapi.SourceGeneration", "src\NHapi.SourceGeneration\NHapi.SourceGeneration.csproj", "{D9A637CE-C1B6-499C-B81B-82AE30580394}"
2425
EndProject
2526
Global
2627
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/NHapi.Base/Model/GenericComposite.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,19 @@ public override String TypeName
3535
private ArrayList components;
3636
private IMessage message;
3737

38-
/// <summary>Creates a new instance of GenericComposite </summary>
39-
public GenericComposite(IMessage message)
40-
: base(message)
38+
/// <summary>Creates a new instance of GenericComposite</summary>
39+
/// <param name="theMessage">message to which this Type belongs</param>
40+
public GenericComposite(IMessage theMessage)
41+
: this(theMessage, null)
42+
{
43+
}
44+
45+
/// <summary>Creates a new instance of GenericComposite</summary>
46+
/// <param name="theMessage">message to which this Type belongs</param>
47+
/// <param name="description">The description of this type</param>
48+
public GenericComposite(IMessage theMessage, string description)
49+
: base(theMessage, description)
4150
{
42-
this.message = message;
4351
components = new ArrayList(20);
4452
}
4553

src/NHapi.Base/Model/Primitive/DT.cs

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
/*
2-
The contents of this file are subject to the Mozilla Public License Version 1.1
3-
(the "License"); you may not use this file except in compliance with the License.
4-
You may obtain a copy of the License at http://www.mozilla.org/MPL/
5-
Software distributed under the License is distributed on an "AS IS" basis,
6-
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
7-
specific language governing rights and limitations under the License.
8-
9-
The Original Code is "DT.java". Description:
10-
"Note: The class description below has been excerpted from the Hl7 2.3.0 documentation"
11-
12-
The Initial Developer of the Original Code is University Health Network. Copyright (C)
13-
2005. All Rights Reserved.
14-
15-
Contributor(s): ______________________________________.
16-
17-
Alternatively, the contents of this file may be used under the terms of the
18-
GNU General Public License (the "GPL"), in which case the provisions of the GPL are
19-
applicable instead of those above. If you wish to allow use of your version of this
20-
file only under the terms of the GPL and not to allow others to use your version
21-
of this file under the MPL, indicate your decision by deleting the provisions above
22-
and replace them with the notice and other provisions required by the GPL License.
23-
If you do not delete the provisions above, a recipient may use your version of
24-
this file under either the MPL or the GPL.
2+
The contents of this file are subject to the Mozilla Public License Version 1.1
3+
(the "License"); you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at http://www.mozilla.org/MPL/
5+
Software distributed under the License is distributed on an "AS IS" basis,
6+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
7+
specific language governing rights and limitations under the License.
8+
9+
The Original Code is "DT.java". Description:
10+
"Note: The class description below has been excerpted from the Hl7 2.3.0 documentation"
11+
12+
The Initial Developer of the Original Code is University Health Network. Copyright (C)
13+
2005. All Rights Reserved.
14+
15+
Contributor(s): ______________________________________.
16+
17+
Alternatively, the contents of this file may be used under the terms of the
18+
GNU General Public License (the "GPL"), in which case the provisions of the GPL are
19+
applicable instead of those above. If you wish to allow use of your version of this
20+
file only under the terms of the GPL and not to allow others to use your version
21+
of this file under the MPL, indicate your decision by deleting the provisions above
22+
and replace them with the notice and other provisions required by the GPL License.
23+
If you do not delete the provisions above, a recipient may use your version of
24+
this file under either the MPL or the GPL.
2525
*/
2626

2727
using System;
2828

2929
namespace NHapi.Base.Model.Primitive
3030
{
31-
/// <summary> Represents an HL7 DT (date) datatype.
32-
///
33-
/// </summary>
34-
/// <author> <a href="mailto:[email protected]">Neal Acharya</a>
35-
/// </author>
36-
/// <author> <a href="mailto:[email protected]">Bryan Tripp</a>
37-
/// </author>
38-
/// <version> $Revision: 1.3 $ updated on $Date: 2005/06/08 00:28:25 $ by $Author: bryan_tripp $
39-
/// </version>
40-
public abstract class DT : AbstractPrimitive
31+
/// <summary>
32+
/// Represents an HL7 DT (date) datatype.
33+
/// </summary>
34+
/// <author> <a href="mailto:[email protected]">Neal Acharya</a>
35+
/// </author>
36+
/// <author> <a href="mailto:[email protected]">Bryan Tripp</a>
37+
/// </author>
38+
/// <version> $Revision: 1.3 $ updated on $Date: 2005/06/08 00:28:25 $ by $Author: bryan_tripp $
39+
/// </version>
40+
public abstract class DT : AbstractPrimitive
4141
{
4242
private CommonDT Detail
4343
{
@@ -51,10 +51,12 @@ private CommonDT Detail
5151
}
5252
}
5353

54-
/// <throws> DataTypeException if the value is incorrectly formatted and either validation is </throws>
55-
/// <summary> enabled for this primitive or detail setters / getters have been called, forcing further
56-
/// parsing.
57-
/// </summary>
54+
55+
/// <value>
56+
/// enabled for this primitive or detail setters / getters have been
57+
/// called, forcing further parsing.
58+
/// </value>
59+
/// <throws ref="DataTypeException"/>if the value is incorrectly formatted and either validation is</throws>
5860
public override String Value
5961
{
6062
get
@@ -121,20 +123,17 @@ public virtual int Day
121123

122124
private CommonDT myDetail;
123125

124-
/// <param name="theMessage">message to which this Type belongs
125-
/// </param>
126-
public DT(IMessage theMessage)
126+
/// <summary>Construct the type</summary>
127+
/// <param name="theMessage">message to which this Type belongs</param>
128+
protected DT(IMessage theMessage)
127129
: base(theMessage)
128130
{
129131
}
130132

131-
132-
/// <summary>
133-
/// DT class
134-
/// </summary>
135-
/// <param name="theMessage"></param>
136-
/// <param name="description"></param>
137-
public DT(IMessage theMessage, string description)
133+
///<summary>Construct the type</summary>
134+
///<param name="theMessage">message to which this Type belongs</param>
135+
///<param name="description">The description of this type</param>
136+
protected DT(IMessage theMessage, string description)
138137
: base(theMessage, description)
139138
{
140139
}

src/NHapi.Base/Model/Primitive/ID.cs

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
/*
2-
The contents of this file are subject to the Mozilla Public License Version 1.1
3-
(the "License"); you may not use this file except in compliance with the License.
4-
You may obtain a copy of the License at http://www.mozilla.org/MPL/
5-
Software distributed under the License is distributed on an "AS IS" basis,
6-
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
7-
specific language governing rights and limitations under the License.
8-
9-
The Original Code is "ID.java". Description:
10-
"This class contains functionality used by the ID class
11-
in the version 2.3.0, 2.3.1, 2.4, and 2.5 packages"
12-
13-
The Initial Developer of the Original Code is University Health Network. Copyright (C)
14-
2005. All Rights Reserved.
15-
16-
Contributor(s): ______________________________________.
17-
18-
Alternatively, the contents of this file may be used under the terms of the
19-
GNU General Public License (the "GPL"), in which case the provisions of the GPL are
20-
applicable instead of those above. If you wish to allow use of your version of this
21-
file only under the terms of the GPL and not to allow others to use your version
22-
of this file under the MPL, indicate your decision by deleting the provisions above
23-
and replace them with the notice and other provisions required by the GPL License.
24-
If you do not delete the provisions above, a recipient may use your version of
25-
this file under either the MPL or the GPL.
2+
The contents of this file are subject to the Mozilla Public License Version 1.1
3+
(the "License"); you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at http://www.mozilla.org/MPL/
5+
Software distributed under the License is distributed on an "AS IS" basis,
6+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
7+
specific language governing rights and limitations under the License.
8+
9+
The Original Code is "ID.java". Description:
10+
"This class contains functionality used by the ID class
11+
in the version 2.3.0, 2.3.1, 2.4, and 2.5 packages"
12+
13+
The Initial Developer of the Original Code is University Health Network. Copyright (C)
14+
2005. All Rights Reserved.
15+
16+
Contributor(s): ______________________________________.
17+
18+
Alternatively, the contents of this file may be used under the terms of the
19+
GNU General Public License (the "GPL"), in which case the provisions of the GPL are
20+
applicable instead of those above. If you wish to allow use of your version of this
21+
file only under the terms of the GPL and not to allow others to use your version
22+
of this file under the MPL, indicate your decision by deleting the provisions above
23+
and replace them with the notice and other provisions required by the GPL License.
24+
If you do not delete the provisions above, a recipient may use your version of
25+
this file under either the MPL or the GPL.
2626
*/
2727

2828
namespace NHapi.Base.Model.Primitive
@@ -60,34 +60,32 @@ public virtual int Table
6060

6161
private int myTable = 0;
6262

63-
/// <param name="theMessage">message to which this Type belongs
64-
/// </param>
65-
public ID(IMessage theMessage)
63+
/// <summary>Construct the type</summary>
64+
/// <param name="theMessage">message to which this Type belongs</param>
65+
protected ID(IMessage theMessage)
6666
: base(theMessage)
6767
{
6868
}
6969

70-
71-
public ID(IMessage theMessage, string description)
70+
///<summary>Construct the type</summary>
71+
///<param name="theMessage">message to which this Type belongs</param>
72+
///<param name="description">The description of this type</param>
73+
protected ID(IMessage theMessage, string description)
7274
: base(theMessage, description)
7375
{
7476
}
7577

76-
/// <param name="theMessage">message to which this Type belongs
77-
/// </param>
78-
/// <param name="theTable">HL7 table from which values are to be drawn
79-
/// </param>
80-
public ID(IMessage theMessage, int theTable)
78+
/// <param name="theMessage">message to which this Type belongs</param>
79+
/// <param name="theTable">HL7 table from which values are to be drawn</param>
80+
protected ID(IMessage theMessage, int theTable)
8181
: base(theMessage)
8282
{
8383
myTable = theTable;
8484
}
8585

86-
/// <param name="theMessage">message to which this Type belongs
87-
/// </param>
88-
/// <param name="theTable">HL7 table from which values are to be drawn
89-
/// </param>
90-
public ID(IMessage message, int theTable, string description)
86+
/// <param name="theMessage">message to which this Type belongs</param>
87+
/// <param name="theTable">HL7 table from which values are to be drawn</param>
88+
protected ID(IMessage message, int theTable, string description)
9189
: base(message, description)
9290
{
9391
myTable = theTable;

src/NHapi.Base/Model/Primitive/IS.cs

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
/*
2-
The contents of this file are subject to the Mozilla Public License Version 1.1
3-
(the "License"); you may not use this file except in compliance with the License.
4-
You may obtain a copy of the License at http://www.mozilla.org/MPL/
5-
Software distributed under the License is distributed on an "AS IS" basis,
6-
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
7-
specific language governing rights and limitations under the License.
8-
9-
The Original Code is "IS.java". Description:
10-
"This class contains functionality used by the ID class
11-
in the version 2.3.0, 2.3.1, 2.4, and 2.5 packages"
12-
13-
The Initial Developer of the Original Code is University Health Network. Copyright (C)
14-
2005. All Rights Reserved.
15-
16-
Contributor(s): ______________________________________.
17-
18-
Alternatively, the contents of this file may be used under the terms of the
19-
GNU General Public License (the "GPL"), in which case the provisions of the GPL are
20-
applicable instead of those above. If you wish to allow use of your version of this
21-
file only under the terms of the GPL and not to allow others to use your version
22-
of this file under the MPL, indicate your decision by deleting the provisions above
23-
and replace them with the notice and other provisions required by the GPL License.
24-
If you do not delete the provisions above, a recipient may use your version of
25-
this file under either the MPL or the GPL.
2+
The contents of this file are subject to the Mozilla Public License Version 1.1
3+
(the "License"); you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at http://www.mozilla.org/MPL/
5+
Software distributed under the License is distributed on an "AS IS" basis,
6+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
7+
specific language governing rights and limitations under the License.
8+
9+
The Original Code is "IS.java". Description:
10+
"This class contains functionality used by the ID class
11+
in the version 2.3.0, 2.3.1, 2.4, and 2.5 packages"
12+
13+
The Initial Developer of the Original Code is University Health Network. Copyright (C)
14+
2005. All Rights Reserved.
15+
16+
Contributor(s): ______________________________________.
17+
18+
Alternatively, the contents of this file may be used under the terms of the
19+
GNU General Public License (the "GPL"), in which case the provisions of the GPL are
20+
applicable instead of those above. If you wish to allow use of your version of this
21+
file only under the terms of the GPL and not to allow others to use your version
22+
of this file under the MPL, indicate your decision by deleting the provisions above
23+
and replace them with the notice and other provisions required by the GPL License.
24+
If you do not delete the provisions above, a recipient may use your version of
25+
this file under either the MPL or the GPL.
2626
*/
2727

2828
namespace NHapi.Base.Model.Primitive
@@ -62,15 +62,17 @@ public virtual int Table
6262

6363
private int myTable = 0;
6464

65-
/// <param name="theMessage">message to which this Type belongs
66-
/// </param>
67-
public IS(IMessage theMessage)
65+
/// <summary>Construct the type</summary>
66+
/// <param name="theMessage">message to which this Type belongs</param>
67+
protected IS(IMessage theMessage)
6868
: base(theMessage)
6969
{
7070
}
7171

72-
73-
public IS(IMessage theMessage, string description)
72+
/// <summary>Construct the type</summary>
73+
/// <param name="theMessage">message to which this Type belongs</param>
74+
/// <param name="description">The description of this type</param>
75+
protected IS(IMessage theMessage, string description)
7476
: base(theMessage, description)
7577
{
7678
}
@@ -79,7 +81,7 @@ public IS(IMessage theMessage, string description)
7981
/// </param>
8082
/// <param name="theTable">HL7 table from which values are to be drawn
8183
/// </param>
82-
public IS(IMessage theMessage, int theTable)
84+
protected IS(IMessage theMessage, int theTable)
8385
: base(theMessage)
8486
{
8587
myTable = theTable;
@@ -89,7 +91,7 @@ public IS(IMessage theMessage, int theTable)
8991
/// </param>
9092
/// <param name="theTable">HL7 table from which values are to be drawn
9193
/// </param>
92-
public IS(IMessage theMessage, int theTable, string description)
94+
protected IS(IMessage theMessage, int theTable, string description)
9395
: base(theMessage, description)
9496
{
9597
myTable = theTable;

0 commit comments

Comments
 (0)