Skip to content

Commit 5744eef

Browse files
committed
revert parts of #192 changes and added Obsolete attributes to ensure its not a breaking change
1 parent d7f2af5 commit 5744eef

File tree

2 files changed

+370
-4
lines changed

2 files changed

+370
-4
lines changed

src/NHapi.Model.V23/Segment/IN1.cs

Lines changed: 226 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,30 @@ public CE InsurancePlanID
176176
}
177177
}
178178

179+
///<summary>
180+
/// Returns Insurance Company ID(IN1-3).
181+
///</summary>
182+
[Obsolete("Use 'GetInsuranceCompanyID(int rep)' instead.")]
183+
public CX InsuranceCompanyID
184+
{
185+
get{
186+
CX ret = null;
187+
try
188+
{
189+
IType t = this.GetField(3, 0);
190+
ret = (CX)t;
191+
}
192+
catch (HL7Exception he) {
193+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he);
194+
throw new System.Exception("An unexpected error ocurred", he);
195+
} catch (System.Exception ex) {
196+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex);
197+
throw new System.Exception("An unexpected error ocurred", ex);
198+
}
199+
return ret;
200+
}
201+
}
202+
179203
///<summary>
180204
/// Returns a single repetition of Insurance Company ID(IN1-3).
181205
/// throws HL7Exception if the repetition number is invalid.
@@ -250,6 +274,31 @@ public int InsuranceCompanyIDRepetitionsUsed
250274
}
251275
}
252276
}
277+
278+
///<summary>
279+
/// Returns Insurance Company Name(IN1-4).
280+
///</summary>
281+
[Obsolete("Use 'GetInsuranceCompanyName(int rep)' instead.")]
282+
public XON InsuranceCompanyName
283+
{
284+
get{
285+
XON ret = null;
286+
try
287+
{
288+
IType t = this.GetField(4, 0);
289+
ret = (XON)t;
290+
}
291+
catch (HL7Exception he) {
292+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he);
293+
throw new System.Exception("An unexpected error ocurred", he);
294+
} catch (System.Exception ex) {
295+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex);
296+
throw new System.Exception("An unexpected error ocurred", ex);
297+
}
298+
return ret;
299+
}
300+
}
301+
253302
///<summary>
254303
/// Returns a single repetition of Insurance Company Name(IN1-4).
255304
/// throws HL7Exception if the repetition number is invalid.
@@ -324,6 +373,31 @@ public int InsuranceCompanyNameRepetitionsUsed
324373
}
325374
}
326375
}
376+
377+
///<summary>
378+
/// Returns Insurance Company Address(IN1-5).
379+
///</summary>
380+
[Obsolete("Use 'GetInsuranceCompanyAddress(int rep)' instead.")]
381+
public XAD InsuranceCompanyAddress
382+
{
383+
get{
384+
XAD ret = null;
385+
try
386+
{
387+
IType t = this.GetField(5, 0);
388+
ret = (XAD)t;
389+
}
390+
catch (HL7Exception he) {
391+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he);
392+
throw new System.Exception("An unexpected error ocurred", he);
393+
} catch (System.Exception ex) {
394+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex);
395+
throw new System.Exception("An unexpected error ocurred", ex);
396+
}
397+
return ret;
398+
}
399+
}
400+
327401
///<summary>
328402
/// Returns a single repetition of Insurance Company Address(IN1-5).
329403
/// throws HL7Exception if the repetition number is invalid.
@@ -398,6 +472,31 @@ public int InsuranceCompanyAddressRepetitionsUsed
398472
}
399473
}
400474
}
475+
476+
///<summary>
477+
/// Returns Insurance Co. Contact Ppers(IN1-6).
478+
///</summary>
479+
[Obsolete("Use 'GetInsuranceCoContactPpers(int rep)' instead.")]
480+
public XPN InsuranceCoContactPpers
481+
{
482+
get{
483+
XPN ret = null;
484+
try
485+
{
486+
IType t = this.GetField(6, 0);
487+
ret = (XPN)t;
488+
}
489+
catch (HL7Exception he) {
490+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he);
491+
throw new System.Exception("An unexpected error ocurred", he);
492+
} catch (System.Exception ex) {
493+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex);
494+
throw new System.Exception("An unexpected error ocurred", ex);
495+
}
496+
return ret;
497+
}
498+
}
499+
401500
///<summary>
402501
/// Returns a single repetition of Insurance Co. Contact Person(IN1-6).
403502
/// throws HL7Exception if the repetition number is invalid.
@@ -546,10 +645,10 @@ public int InsuranceCoPhoneNumberRepetitionsUsed
546645
}
547646
}
548647

549-
///<summary>
550-
/// Returns Group Number(IN1-8).
551-
///</summary>
552-
public ST GroupNumber
648+
///<summary>
649+
/// Returns Group Number(IN1-8).
650+
///</summary>
651+
public ST GroupNumber
553652
{
554653
get{
555654
ST ret = null;
@@ -569,6 +668,30 @@ public ST GroupNumber
569668
}
570669
}
571670

671+
///<summary>
672+
/// Returns Group Name(IN1-9).
673+
///</summary>
674+
[Obsolete("Use 'GetGroupName(int rep)' instead.")]
675+
public XON GroupName
676+
{
677+
get{
678+
XON ret = null;
679+
try
680+
{
681+
IType t = this.GetField(9, 0);
682+
ret = (XON)t;
683+
}
684+
catch (HL7Exception he) {
685+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he);
686+
throw new System.Exception("An unexpected error ocurred", he);
687+
} catch (System.Exception ex) {
688+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex);
689+
throw new System.Exception("An unexpected error ocurred", ex);
690+
}
691+
return ret;
692+
}
693+
}
694+
572695
///<summary>
573696
/// Returns a single repetition of Group Name(IN1-9).
574697
/// throws HL7Exception if the repetition number is invalid.
@@ -643,6 +766,31 @@ public int GroupNameRepetitionsUsed
643766
}
644767
}
645768
}
769+
770+
///<summary>
771+
/// Returns Insured's group employer ID(IN1-10).
772+
///</summary>
773+
[Obsolete("Use 'GetInsuredSGroupEmployerID(int rep)' instead.")]
774+
public CX InsuredSGroupEmployerID
775+
{
776+
get{
777+
CX ret = null;
778+
try
779+
{
780+
IType t = this.GetField(10, 0);
781+
ret = (CX)t;
782+
}
783+
catch (HL7Exception he) {
784+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he);
785+
throw new System.Exception("An unexpected error ocurred", he);
786+
} catch (System.Exception ex) {
787+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex);
788+
throw new System.Exception("An unexpected error ocurred", ex);
789+
}
790+
return ret;
791+
}
792+
}
793+
646794
///<summary>
647795
/// Returns a single repetition of Insured's group employer ID(IN1-10).
648796
/// throws HL7Exception if the repetition number is invalid.
@@ -717,6 +865,31 @@ public int InsuredSGroupEmployerIDRepetitionsUsed
717865
}
718866
}
719867
}
868+
869+
///<summary>
870+
/// Returns Insured's Group Emp Name(IN1-11).
871+
///</summary>
872+
[Obsolete("Use 'GetInsuredSGroupEmpName(int rep)' instead.")]
873+
public XON InsuredSGroupEmpName
874+
{
875+
get{
876+
XON ret = null;
877+
try
878+
{
879+
IType t = this.GetField(11, 0);
880+
ret = (XON)t;
881+
}
882+
catch (HL7Exception he) {
883+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he);
884+
throw new System.Exception("An unexpected error ocurred", he);
885+
} catch (System.Exception ex) {
886+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex);
887+
throw new System.Exception("An unexpected error ocurred", ex);
888+
}
889+
return ret;
890+
}
891+
}
892+
720893
///<summary>
721894
/// Returns a single repetition of Insured's Group Emp Name(IN1-11).
722895
/// throws HL7Exception if the repetition number is invalid.
@@ -791,6 +964,7 @@ public int InsuredSGroupEmpNameRepetitionsUsed
791964
}
792965
}
793966
}
967+
794968
///<summary>
795969
/// Returns Plan Effective Date(IN1-12).
796970
///</summary>
@@ -883,6 +1057,30 @@ public IS PlanType
8831057
}
8841058
}
8851059

1060+
///<summary>
1061+
/// Returns Name of Insured(IN1-16).
1062+
///</summary>
1063+
[Obsolete("Use 'GetNameOfInsured(int rep)' instead.")]
1064+
public XPN NameOfInsured
1065+
{
1066+
get{
1067+
XPN ret = null;
1068+
try
1069+
{
1070+
IType t = this.GetField(16, 0);
1071+
ret = (XPN)t;
1072+
}
1073+
catch (HL7Exception he) {
1074+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he);
1075+
throw new System.Exception("An unexpected error ocurred", he);
1076+
} catch (System.Exception ex) {
1077+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex);
1078+
throw new System.Exception("An unexpected error ocurred", ex);
1079+
}
1080+
return ret;
1081+
}
1082+
}
1083+
8861084
///<summary>
8871085
/// Returns a single repetition of Name of Insured(IN1-16).
8881086
/// throws HL7Exception if the repetition number is invalid.
@@ -1004,6 +1202,30 @@ public TS InsuredSDateOfBirth
10041202
}
10051203
}
10061204

1205+
///<summary>
1206+
/// Returns Insured's Address(IN1-19).
1207+
///</summary>
1208+
[Obsolete("Use 'GetInsuredSAddress(int rep)' instead.")]
1209+
public XAD InsuredSAddress
1210+
{
1211+
get{
1212+
XAD ret = null;
1213+
try
1214+
{
1215+
IType t = this.GetField(19, 0);
1216+
ret = (XAD)t;
1217+
}
1218+
catch (HL7Exception he) {
1219+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he);
1220+
throw new System.Exception("An unexpected error ocurred", he);
1221+
} catch (System.Exception ex) {
1222+
HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex);
1223+
throw new System.Exception("An unexpected error ocurred", ex);
1224+
}
1225+
return ret;
1226+
}
1227+
}
1228+
10071229
///<summary>
10081230
/// Returns a single repetition of Insured's Address(IN1-19).
10091231
/// throws HL7Exception if the repetition number is invalid.

0 commit comments

Comments
 (0)