diff --git a/src/NHapi.Model.V23/Segment/IN1.cs b/src/NHapi.Model.V23/Segment/IN1.cs index a6606a11a..894171d73 100644 --- a/src/NHapi.Model.V23/Segment/IN1.cs +++ b/src/NHapi.Model.V23/Segment/IN1.cs @@ -77,7 +77,7 @@ public IN1(IGroup parent, IModelClassFactory factory) : base(parent,factory) { IMessage message = Message; try { this.add(typeof(SI), true, 1, 4, new System.Object[]{message}, "Set ID - Insurance"); - this.add(typeof(CE), false, 1, 8, new System.Object[]{message}, "Insurance Plan ID"); + this.add(typeof(CE), true, 1, 8, new System.Object[]{message}, "Insurance Plan ID"); this.add(typeof(CX), true, 0, 59, new System.Object[]{message}, "Insurance Company ID"); this.add(typeof(XON), false, 0, 130, new System.Object[]{message}, "Insurance Company Name"); this.add(typeof(XAD), false, 0, 106, new System.Object[]{message}, "Insurance Company Address"); diff --git a/src/NHapi.Model.V23/Segment/IN2.cs b/src/NHapi.Model.V23/Segment/IN2.cs index 7312ba3b1..667ebe8b7 100644 --- a/src/NHapi.Model.V23/Segment/IN2.cs +++ b/src/NHapi.Model.V23/Segment/IN2.cs @@ -123,8 +123,8 @@ public IN2(IGroup parent, IModelClassFactory factory) : base(parent,factory) { this.add(typeof(XPN), false, 0, 48, new System.Object[]{message}, "Special Coverage Approval Name"); this.add(typeof(ST), false, 1, 30, new System.Object[]{message}, "Special Coverage Approval Title"); this.add(typeof(IS), false, 0, 8, new System.Object[]{message}, "Non-Covered Insurance Code"); - this.add(typeof(CX), false, 1, 59, new System.Object[]{message}, "Payor ID"); - this.add(typeof(CX), false, 1, 59, new System.Object[]{message}, "Payor Subscriber ID"); + this.add(typeof(CX), false, 0, 59, new System.Object[]{message}, "Payor ID"); + this.add(typeof(CX), false, 0, 59, new System.Object[]{message}, "Payor Subscriber ID"); this.add(typeof(IS), false, 1, 1, new System.Object[]{message, 144}, "Eligibility Source"); this.add(typeof(CM_RMC), false, 0, 25, new System.Object[]{message}, "Room Coverage Type/Amount"); this.add(typeof(CM_PTA), false, 0, 25, new System.Object[]{message}, "Policy Type/Amount"); @@ -1240,6 +1240,7 @@ public int NonCoveredInsuranceCodeRepetitionsUsed /// /// Returns Payor ID(IN2-25). /// + [Obsolete("Use 'GetPayorID(int rep)' instead.")] public CX PayorID { get{ @@ -1259,10 +1260,68 @@ public CX PayorID return ret; } } + /// + /// Returns a single repetition of Payor ID(IN2-25). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) + /// + public CX GetPayorID(int rep) + { + CX ret = null; + try + { + IType t = this.GetField(25, rep); + ret = (CX)t; + } catch (System.Exception ex) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); + throw new System.Exception("An unexpected error occurred", ex); + } + return ret; + } + + /// + /// Returns all repetitions of Payor ID (IN2-25). + /// + public CX[] GetPayorID() { + CX[] ret = null; + try { + IType[] t = this.GetField(25); + ret = new CX[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (CX)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + /// + /// Returns the total repetitions of Payor ID (IN2-25). + /// + public int PayorIDRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(25); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Payor Subscriber ID(IN2-26). /// + [Obsolete("Use 'GetPayorSubscriberID(int rep)' instead.")] public CX PayorSubscriberID { get{ @@ -1282,7 +1341,64 @@ public CX PayorSubscriberID return ret; } } + /// + /// Returns a single repetition of Payor Subscriber ID(IN2-26). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) + /// + public CX GetPayorSubscriberID(int rep) + { + CX ret = null; + try + { + IType t = this.GetField(26, rep); + ret = (CX)t; + } catch (System.Exception ex) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); + throw new System.Exception("An unexpected error occurred", ex); + } + return ret; + } + + /// + /// Returns all repetitions of Payor Subscriber ID (IN2-26). + /// + public CX[] GetPayorSubscriberID() { + CX[] ret = null; + try { + IType[] t = this.GetField(26); + ret = new CX[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (CX)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + /// + /// Returns the total repetitions of Payor Subscriber ID (IN2-26). + /// + public int PayorSubscriberIDRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(26); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Eligibility Source(IN2-27). /// diff --git a/src/NHapi.Model.V24/Segment/OBX.cs b/src/NHapi.Model.V24/Segment/OBX.cs index 06cb0b422..57c208a62 100644 --- a/src/NHapi.Model.V24/Segment/OBX.cs +++ b/src/NHapi.Model.V24/Segment/OBX.cs @@ -53,15 +53,15 @@ public OBX(IGroup parent, IModelClassFactory factory) : base(parent,factory) { this.add(typeof(Varies), false, 0, 65536, new System.Object[]{message}, "Observation Value"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Units"); this.add(typeof(ST), false, 1, 60, new System.Object[]{message}, "References Range"); - this.add(typeof(IS), false, 1, 5, new System.Object[]{message, 78}, "Abnormal Flags"); - this.add(typeof(NM), false, 5, 5, new System.Object[]{message}, "Probability"); - this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 80}, "Nature of Abnormal Test"); + this.add(typeof(IS), false, 5, 5, new System.Object[]{message, 78}, "Abnormal Flags"); + this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Probability"); + this.add(typeof(ID), false, 0, 2, new System.Object[]{message, 80}, "Nature of Abnormal Test"); this.add(typeof(ID), true, 1, 1, new System.Object[]{message, 85}, "Observation Result Status"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date Last Observation Normal Value"); this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "User Defined Access Checks"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date/Time of the Observation"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Producer's ID"); - this.add(typeof(XCN), false, 1, 250, new System.Object[]{message}, "Responsible Observer"); + this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Responsible Observer"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Observation Method"); this.add(typeof(EI), false, 0, 22, new System.Object[]{message}, "Equipment Instance Identifier"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date/Time of the Analysis"); @@ -269,6 +269,7 @@ public ST ReferencesRange /// /// Returns Abnormal Flags(OBX-8). /// + [Obsolete("Use 'GetAbnormalFlags(int rep)' instead.")] public IS AbnormalFlags { get{ @@ -289,11 +290,71 @@ public IS AbnormalFlags } } + /// + /// Returns a single repetition of Abnormal Flags(OBX-8). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) + /// + public IS GetAbnormalFlags(int rep) + { + IS ret = null; + try + { + IType t = this.GetField(8, rep); + ret = (IS)t; + } catch (System.Exception ex) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); + throw new System.Exception("An unexpected error occurred", ex); + } + return ret; + } + + /// + /// Returns all repetitions of Abnormal Flags (OBX-8). + /// + public IS[] GetAbnormalFlags() { + IS[] ret = null; + try { + IType[] t = this.GetField(8); + ret = new IS[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (IS)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; + } + + /// + /// Returns the total repetitions of Abnormal Flags (OBX-8). + /// + public int AbnormalFlagsRepetitionsUsed + { + get{ + try { + return GetTotalFieldRepetitionsUsed(8); + } + catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + } + } + /// /// Returns a single repetition of Probability(OBX-9). /// throws HL7Exception if the repetition number is invalid. /// The repetition number (this is a repeating field) /// + [Obsolete("Use 'Probability' instead.")] public NM GetProbability(int rep) { NM ret = null; @@ -311,6 +372,7 @@ public NM GetProbability(int rep) /// /// Returns all repetitions of Probability (OBX-9). /// + [Obsolete("Use 'Probability' instead.")] public NM[] GetProbability() { NM[] ret = null; try { @@ -332,6 +394,7 @@ public NM[] GetProbability() { /// /// Returns the total repetitions of Probability (OBX-9). /// + [Obsolete("'Probability' should only have 1 repetition.")] public int ProbabilityRepetitionsUsed { get{ @@ -346,10 +409,93 @@ public int ProbabilityRepetitionsUsed throw new System.Exception("An unexpected error ocurred", cce); } } +} + + /// + /// Returns Probability(OBX-9). + /// + public NM Probability + { + get{ + NM ret = null; + try + { + IType t = this.GetField(9, 0); + ret = (NM)t; + } + catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception ex) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); + throw new System.Exception("An unexpected error occurred", ex); + } + return ret; + } + } + + /// + /// Returns a single repetition of Nature of Abnormal Test(OBX-10). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) + /// + public ID GetNatureOfAbnormalTest(int rep) + { + ID ret = null; + try + { + IType t = this.GetField(10, rep); + ret = (ID)t; + } catch (System.Exception ex) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); + throw new System.Exception("An unexpected error occurred", ex); + } + return ret; + } + + /// + /// Returns all repetitions of Nature of Abnormal Test (OBX-10). + /// + public ID[] GetNatureOfAbnormalTest() { + ID[] ret = null; + try { + IType[] t = this.GetField(10); + ret = new ID[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (ID)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Nature of Abnormal Test (OBX-10). + /// + public int NatureOfAbnormalTestRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(10); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} } /// /// Returns Nature of Abnormal Test(OBX-10). /// + [Obsolete("Use 'GetNatureOfAbnormalTest(int rep)' instead.")] public ID NatureOfAbnormalTest { get{ @@ -485,29 +631,89 @@ public CE ProducerSID } } + /// + /// Returns Responsible Observer(OBX-16). + /// + [Obsolete("Use 'GetResponsibleObserver(int rep)' instead.")] + public XCN ResponsibleObserver + { + get{ + XCN ret = null; + try + { + IType t = this.GetField(16, 0); + ret = (XCN)t; + } + catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error ocurred", he); + } catch (System.Exception ex) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); + throw new System.Exception("An unexpected error ocurred", ex); + } + return ret; + } + } + /// - /// Returns Responsible Observer(OBX-16). + /// Returns a single repetition of Responsible Observer(OBX-16). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XCN ResponsibleObserver + public XCN GetResponsibleObserver(int rep) { - get{ XCN ret = null; try { - IType t = this.GetField(16, 0); + IType t = this.GetField(16, rep); ret = (XCN)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error ocurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); - throw new System.Exception("An unexpected error ocurred", ex); + throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Responsible Observer (OBX-16). + /// + public XCN[] GetResponsibleObserver() { + XCN[] ret = null; + try { + IType[] t = this.GetField(16); + ret = new XCN[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XCN)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Responsible Observer (OBX-16). + /// + public int ResponsibleObserverRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(16); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} + /// /// Returns a single repetition of Observation Method(OBX-17). /// throws HL7Exception if the repetition number is invalid. diff --git a/tests/NHapi.NUnit.SourceGeneration/SourceGenerationTests.Test_Generate_Versions_version=2.3.verified.txt b/tests/NHapi.NUnit.SourceGeneration/SourceGenerationTests.Test_Generate_Versions_version=2.3.verified.txt index a040e69e0..e8b21d6eb 100644 --- a/tests/NHapi.NUnit.SourceGeneration/SourceGenerationTests.Test_Generate_Versions_version=2.3.verified.txt +++ b/tests/NHapi.NUnit.SourceGeneration/SourceGenerationTests.Test_Generate_Versions_version=2.3.verified.txt @@ -242388,24 +242388,24 @@ public class IN1 : AbstractSegment { IMessage message = Message; try { this.add(typeof(SI), true, 1, 4, new System.Object[]{message}, "Set ID - Insurance"); - this.add(typeof(CE), false, 1, 8, new System.Object[]{message}, "Insurance Plan ID"); - this.add(typeof(CX), true, 1, 59, new System.Object[]{message}, "Insurance Company ID"); - this.add(typeof(XON), false, 1, 130, new System.Object[]{message}, "Insurance Company Name"); - this.add(typeof(XAD), false, 1, 106, new System.Object[]{message}, "Insurance Company Address"); - this.add(typeof(XPN), false, 1, 48, new System.Object[]{message}, "Insurance Co. Contact Ppers"); + this.add(typeof(CE), true, 1, 8, new System.Object[]{message}, "Insurance Plan ID"); + this.add(typeof(CX), true, 0, 59, new System.Object[]{message}, "Insurance Company ID"); + this.add(typeof(XON), false, 0, 130, new System.Object[]{message}, "Insurance Company Name"); + this.add(typeof(XAD), false, 0, 106, new System.Object[]{message}, "Insurance Company Address"); + this.add(typeof(XPN), false, 0, 48, new System.Object[]{message}, "Insurance Co. Contact Ppers"); this.add(typeof(XTN), false, 3, 40, new System.Object[]{message}, "Insurance Co Phone Number"); this.add(typeof(ST), false, 1, 12, new System.Object[]{message}, "Group Number"); - this.add(typeof(XON), false, 1, 130, new System.Object[]{message}, "Group Name"); - this.add(typeof(CX), false, 1, 12, new System.Object[]{message}, "Insured's group employer ID"); - this.add(typeof(XON), false, 1, 130, new System.Object[]{message}, "Insured's Group Emp Name"); + this.add(typeof(XON), false, 0, 130, new System.Object[]{message}, "Group Name"); + this.add(typeof(CX), false, 0, 12, new System.Object[]{message}, "Insured's group employer ID"); + this.add(typeof(XON), false, 0, 130, new System.Object[]{message}, "Insured's Group Emp Name"); this.add(typeof(DT), false, 1, 8, new System.Object[]{message}, "Plan Effective Date"); this.add(typeof(DT), false, 1, 8, new System.Object[]{message}, "Plan Expiration Date"); this.add(typeof(CM_AUI), false, 1, 55, new System.Object[]{message}, "Authorization Information"); this.add(typeof(IS), false, 1, 3, new System.Object[]{message, 86}, "Plan Type"); - this.add(typeof(XPN), false, 1, 48, new System.Object[]{message}, "Name of Insured"); + this.add(typeof(XPN), false, 0, 48, new System.Object[]{message}, "Name of Insured"); this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 63}, "Insured's Relationship to Patient"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Insured's Date of Birth"); - this.add(typeof(XAD), false, 1, 106, new System.Object[]{message}, "Insured's Address"); + this.add(typeof(XAD), false, 0, 106, new System.Object[]{message}, "Insured's Address"); this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 135}, "Assignment of Benefits"); this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 173}, "Coordination of Benefits"); this.add(typeof(ST), false, 1, 2, new System.Object[]{message}, "Coord of Ben. Priority"); @@ -242430,12 +242430,12 @@ public class IN1 : AbstractSegment { this.add(typeof(CP), false, 1, 12, new System.Object[]{message}, "Room Rate - Private"); this.add(typeof(CE), false, 1, 60, new System.Object[]{message}, "Insured's Employment Status"); this.add(typeof(IS), false, 1, 1, new System.Object[]{message, 1}, "Insured's Sex"); - this.add(typeof(XAD), false, 1, 106, new System.Object[]{message}, "Insured's Employer Address"); + this.add(typeof(XAD), false, 0, 106, new System.Object[]{message}, "Insured's Employer Address"); this.add(typeof(ST), false, 1, 2, new System.Object[]{message}, "Verification Status"); this.add(typeof(IS), false, 1, 8, new System.Object[]{message, 72}, "Prior Insurance Plan ID"); this.add(typeof(IS), false, 1, 3, new System.Object[]{message, 309}, "Coverage Type"); this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 295}, "Handicap"); - this.add(typeof(CX), false, 1, 12, new System.Object[]{message}, "Insured's ID Number"); + this.add(typeof(CX), false, 0, 12, new System.Object[]{message}, "Insured's ID Number"); } catch (HL7Exception he) { HapiLogFactory.GetHapiLog(GetType()).Error("Can't instantiate " + GetType().Name, he); } @@ -242488,97 +242488,237 @@ public class IN1 : AbstractSegment { } /// - /// Returns Insurance Company ID(IN1-3). + /// Returns a single repetition of Insurance Company ID(IN1-3). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public CX InsuranceCompanyID + public CX GetInsuranceCompanyID(int rep) { - get{ CX ret = null; try { - IType t = this.GetField(3, 0); + IType t = this.GetField(3, rep); ret = (CX)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insurance Company ID (IN1-3). + /// + public CX[] GetInsuranceCompanyID() { + CX[] ret = null; + try { + IType[] t = this.GetField(3); + ret = new CX[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (CX)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insurance Company ID (IN1-3). + /// + public int InsuranceCompanyIDRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(3); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// - /// Returns Insurance Company Name(IN1-4). + /// Returns a single repetition of Insurance Company Name(IN1-4). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XON InsuranceCompanyName + public XON GetInsuranceCompanyName(int rep) { - get{ XON ret = null; try { - IType t = this.GetField(4, 0); + IType t = this.GetField(4, rep); ret = (XON)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insurance Company Name (IN1-4). + /// + public XON[] GetInsuranceCompanyName() { + XON[] ret = null; + try { + IType[] t = this.GetField(4); + ret = new XON[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XON)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insurance Company Name (IN1-4). + /// + public int InsuranceCompanyNameRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(4); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// - /// Returns Insurance Company Address(IN1-5). + /// Returns a single repetition of Insurance Company Address(IN1-5). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XAD InsuranceCompanyAddress + public XAD GetInsuranceCompanyAddress(int rep) { - get{ XAD ret = null; try { - IType t = this.GetField(5, 0); + IType t = this.GetField(5, rep); ret = (XAD)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insurance Company Address (IN1-5). + /// + public XAD[] GetInsuranceCompanyAddress() { + XAD[] ret = null; + try { + IType[] t = this.GetField(5); + ret = new XAD[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XAD)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insurance Company Address (IN1-5). + /// + public int InsuranceCompanyAddressRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(5); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// - /// Returns Insurance Co. Contact Ppers(IN1-6). + /// Returns a single repetition of Insurance Co. Contact Ppers(IN1-6). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XPN InsuranceCoContactPpers + public XPN GetInsuranceCoContactPpers(int rep) { - get{ XPN ret = null; try { - IType t = this.GetField(6, 0); + IType t = this.GetField(6, rep); ret = (XPN)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insurance Co. Contact Ppers (IN1-6). + /// + public XPN[] GetInsuranceCoContactPpers() { + XPN[] ret = null; + try { + IType[] t = this.GetField(6); + ret = new XPN[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XPN)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insurance Co. Contact Ppers (IN1-6). + /// + public int InsuranceCoContactPpersRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(6); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns a single repetition of Insurance Co Phone Number(IN1-7). /// throws HL7Exception if the repetition number is invalid. @@ -242661,74 +242801,179 @@ catch (HL7Exception he) { } /// - /// Returns Group Name(IN1-9). + /// Returns a single repetition of Group Name(IN1-9). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XON GroupName + public XON GetGroupName(int rep) { - get{ XON ret = null; try { - IType t = this.GetField(9, 0); + IType t = this.GetField(9, rep); ret = (XON)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Group Name (IN1-9). + /// + public XON[] GetGroupName() { + XON[] ret = null; + try { + IType[] t = this.GetField(9); + ret = new XON[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XON)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Group Name (IN1-9). + /// + public int GroupNameRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(9); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// - /// Returns Insured's group employer ID(IN1-10). + /// Returns a single repetition of Insured's group employer ID(IN1-10). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public CX InsuredSGroupEmployerID + public CX GetInsuredSGroupEmployerID(int rep) { - get{ CX ret = null; try { - IType t = this.GetField(10, 0); + IType t = this.GetField(10, rep); ret = (CX)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insured's group employer ID (IN1-10). + /// + public CX[] GetInsuredSGroupEmployerID() { + CX[] ret = null; + try { + IType[] t = this.GetField(10); + ret = new CX[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (CX)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insured's group employer ID (IN1-10). + /// + public int InsuredSGroupEmployerIDRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(10); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// - /// Returns Insured's Group Emp Name(IN1-11). + /// Returns a single repetition of Insured's Group Emp Name(IN1-11). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XON InsuredSGroupEmpName + public XON GetInsuredSGroupEmpName(int rep) { - get{ XON ret = null; try { - IType t = this.GetField(11, 0); + IType t = this.GetField(11, rep); ret = (XON)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insured's Group Emp Name (IN1-11). + /// + public XON[] GetInsuredSGroupEmpName() { + XON[] ret = null; + try { + IType[] t = this.GetField(11); + ret = new XON[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XON)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insured's Group Emp Name (IN1-11). + /// + public int InsuredSGroupEmpNameRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(11); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Plan Effective Date(IN1-12). /// @@ -242822,28 +243067,63 @@ catch (HL7Exception he) { } /// - /// Returns Name of Insured(IN1-16). + /// Returns a single repetition of Name of Insured(IN1-16). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XPN NameOfInsured + public XPN GetNameOfInsured(int rep) { - get{ XPN ret = null; try { - IType t = this.GetField(16, 0); + IType t = this.GetField(16, rep); ret = (XPN)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Name of Insured (IN1-16). + /// + public XPN[] GetNameOfInsured() { + XPN[] ret = null; + try { + IType[] t = this.GetField(16); + ret = new XPN[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XPN)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Name of Insured (IN1-16). + /// + public int NameOfInsuredRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(16); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Insured's Relationship to Patient(IN1-17). /// @@ -242891,28 +243171,63 @@ catch (HL7Exception he) { } /// - /// Returns Insured's Address(IN1-19). + /// Returns a single repetition of Insured's Address(IN1-19). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XAD InsuredSAddress + public XAD GetInsuredSAddress(int rep) { - get{ XAD ret = null; try { - IType t = this.GetField(19, 0); + IType t = this.GetField(19, rep); ret = (XAD)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insured's Address (IN1-19). + /// + public XAD[] GetInsuredSAddress() { + XAD[] ret = null; + try { + IType[] t = this.GetField(19); + ret = new XAD[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XAD)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insured's Address (IN1-19). + /// + public int InsuredSAddressRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(19); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Assignment of Benefits(IN1-20). /// @@ -243466,28 +243781,63 @@ catch (HL7Exception he) { } /// - /// Returns Insured's Employer Address(IN1-44). + /// Returns a single repetition of Insured's Employer Address(IN1-44). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XAD InsuredSEmployerAddress + public XAD GetInsuredSEmployerAddress(int rep) { - get{ XAD ret = null; try { - IType t = this.GetField(44, 0); + IType t = this.GetField(44, rep); ret = (XAD)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insured's Employer Address (IN1-44). + /// + public XAD[] GetInsuredSEmployerAddress() { + XAD[] ret = null; + try { + IType[] t = this.GetField(44); + ret = new XAD[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XAD)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insured's Employer Address (IN1-44). + /// + public int InsuredSEmployerAddressRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(44); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Verification Status(IN1-45). /// @@ -243581,28 +243931,63 @@ catch (HL7Exception he) { } /// - /// Returns Insured's ID Number(IN1-49). + /// Returns a single repetition of Insured's ID Number(IN1-49). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public CX InsuredSIDNumber + public CX GetInsuredSIDNumber(int rep) { - get{ CX ret = null; try { - IType t = this.GetField(49, 0); + IType t = this.GetField(49, rep); ret = (CX)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insured's ID Number (IN1-49). + /// + public CX[] GetInsuredSIDNumber() { + CX[] ret = null; + try { + IType[] t = this.GetField(49); + ret = new CX[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (CX)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insured's ID Number (IN1-49). + /// + public int InsuredSIDNumberRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(49); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} }}, C:\DEV\nHapi\tests\NHapi.NUnit.SourceGeneration\bin\Debug\net6.0\out\NHapi.Model.V23\Segment\IN2.cs: @@ -243707,15 +244092,15 @@ public class IN2 : AbstractSegment { public IN2(IGroup parent, IModelClassFactory factory) : base(parent,factory) { IMessage message = Message; try { - this.add(typeof(CX), false, 1, 59, new System.Object[]{message}, "Insured's Employee ID"); + this.add(typeof(CX), false, 0, 59, new System.Object[]{message}, "Insured's Employee ID"); this.add(typeof(ST), false, 1, 11, new System.Object[]{message}, "Insured's Social Security Number"); - this.add(typeof(XCN), false, 1, 130, new System.Object[]{message}, "Insured's Employer Name"); + this.add(typeof(XCN), false, 0, 130, new System.Object[]{message}, "Insured's Employer Name"); this.add(typeof(IS), false, 1, 1, new System.Object[]{message, 139}, "Employer Information Data"); - this.add(typeof(IS), false, 1, 1, new System.Object[]{message, 137}, "Mail Claim Party"); + this.add(typeof(IS), false, 0, 1, new System.Object[]{message, 137}, "Mail Claim Party"); this.add(typeof(ST), false, 1, 15, new System.Object[]{message}, "Medicare Health Ins Card Number"); - this.add(typeof(XPN), false, 1, 48, new System.Object[]{message}, "Medicaid Case Name"); + this.add(typeof(XPN), false, 0, 48, new System.Object[]{message}, "Medicaid Case Name"); this.add(typeof(ST), false, 1, 15, new System.Object[]{message}, "Medicaid Case Number"); - this.add(typeof(XPN), false, 1, 48, new System.Object[]{message}, "Champus Sponsor Name"); + this.add(typeof(XPN), false, 0, 48, new System.Object[]{message}, "Champus Sponsor Name"); this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "Champus ID Number"); this.add(typeof(CE), false, 1, 80, new System.Object[]{message}, "Dependent of Champus Recipient"); this.add(typeof(ST), false, 1, 25, new System.Object[]{message}, "Champus Organization"); @@ -243728,11 +244113,11 @@ public class IN2 : AbstractSegment { this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 136}, "Baby Coverage"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 136}, "Combine Baby Bill"); this.add(typeof(ST), false, 1, 1, new System.Object[]{message}, "Blood Deductible"); - this.add(typeof(XPN), false, 1, 48, new System.Object[]{message}, "Special Coverage Approval Name"); + this.add(typeof(XPN), false, 0, 48, new System.Object[]{message}, "Special Coverage Approval Name"); this.add(typeof(ST), false, 1, 30, new System.Object[]{message}, "Special Coverage Approval Title"); this.add(typeof(ST), false, 0, 8, new System.Object[]{message}, "Non-Covered Insurance Code"); - this.add(typeof(CX), false, 1, 59, new System.Object[]{message}, "Payor ID"); - this.add(typeof(CX), false, 1, 59, new System.Object[]{message}, "Payor Subscriber ID"); + this.add(typeof(CX), false, 0, 59, new System.Object[]{message}, "Payor ID"); + this.add(typeof(CX), false, 0, 59, new System.Object[]{message}, "Payor Subscriber ID"); this.add(typeof(IS), false, 1, 1, new System.Object[]{message, 144}, "Eligibility Source"); this.add(typeof(CM_RMC), false, 0, 25, new System.Object[]{message}, "Room Coverage Type/Amount"); this.add(typeof(CM_PTA), false, 0, 25, new System.Object[]{message}, "Policy Type/Amount"); @@ -243785,28 +244170,63 @@ public class IN2 : AbstractSegment { } /// - /// Returns Insured's Employee ID(IN2-1). + /// Returns a single repetition of Insured's Employee ID(IN2-1). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public CX InsuredSEmployeeID + public CX GetInsuredSEmployeeID(int rep) { - get{ CX ret = null; try { - IType t = this.GetField(1, 0); + IType t = this.GetField(1, rep); ret = (CX)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insured's Employee ID (IN2-1). + /// + public CX[] GetInsuredSEmployeeID() { + CX[] ret = null; + try { + IType[] t = this.GetField(1); + ret = new CX[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (CX)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insured's Employee ID (IN2-1). + /// + public int InsuredSEmployeeIDRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(1); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Insured's Social Security Number(IN2-2). /// @@ -243831,28 +244251,63 @@ public class IN2 : AbstractSegment { } /// - /// Returns Insured's Employer Name(IN2-3). + /// Returns a single repetition of Insured's Employer Name(IN2-3). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XCN InsuredSEmployerName + public XCN GetInsuredSEmployerName(int rep) { - get{ XCN ret = null; try { - IType t = this.GetField(3, 0); + IType t = this.GetField(3, rep); ret = (XCN)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Insured's Employer Name (IN2-3). + /// + public XCN[] GetInsuredSEmployerName() { + XCN[] ret = null; + try { + IType[] t = this.GetField(3); + ret = new XCN[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XCN)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Insured's Employer Name (IN2-3). + /// + public int InsuredSEmployerNameRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(3); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Employer Information Data(IN2-4). /// @@ -243877,28 +244332,63 @@ public class IN2 : AbstractSegment { } /// - /// Returns Mail Claim Party(IN2-5). + /// Returns a single repetition of Mail Claim Party(IN2-5). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public IS MailClaimParty + public IS GetMailClaimParty(int rep) { - get{ IS ret = null; try { - IType t = this.GetField(5, 0); + IType t = this.GetField(5, rep); ret = (IS)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Mail Claim Party (IN2-5). + /// + public IS[] GetMailClaimParty() { + IS[] ret = null; + try { + IType[] t = this.GetField(5); + ret = new IS[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (IS)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Mail Claim Party (IN2-5). + /// + public int MailClaimPartyRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(5); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Medicare Health Ins Card Number(IN2-6). /// @@ -243923,28 +244413,63 @@ public class IN2 : AbstractSegment { } /// - /// Returns Medicaid Case Name(IN2-7). + /// Returns a single repetition of Medicaid Case Name(IN2-7). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XPN MedicaidCaseName + public XPN GetMedicaidCaseName(int rep) { - get{ XPN ret = null; try { - IType t = this.GetField(7, 0); + IType t = this.GetField(7, rep); ret = (XPN)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Medicaid Case Name (IN2-7). + /// + public XPN[] GetMedicaidCaseName() { + XPN[] ret = null; + try { + IType[] t = this.GetField(7); + ret = new XPN[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XPN)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Medicaid Case Name (IN2-7). + /// + public int MedicaidCaseNameRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(7); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Medicaid Case Number(IN2-8). /// @@ -243969,28 +244494,63 @@ public class IN2 : AbstractSegment { } /// - /// Returns Champus Sponsor Name(IN2-9). + /// Returns a single repetition of Champus Sponsor Name(IN2-9). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XPN ChampusSponsorName + public XPN GetChampusSponsorName(int rep) { - get{ XPN ret = null; try { - IType t = this.GetField(9, 0); + IType t = this.GetField(9, rep); ret = (XPN)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Champus Sponsor Name (IN2-9). + /// + public XPN[] GetChampusSponsorName() { + XPN[] ret = null; + try { + IType[] t = this.GetField(9); + ret = new XPN[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XPN)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Champus Sponsor Name (IN2-9). + /// + public int ChampusSponsorNameRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(9); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Champus ID Number(IN2-10). /// @@ -244268,28 +244828,63 @@ public class IN2 : AbstractSegment { } /// - /// Returns Special Coverage Approval Name(IN2-22). + /// Returns a single repetition of Special Coverage Approval Name(IN2-22). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XPN SpecialCoverageApprovalName + public XPN GetSpecialCoverageApprovalName(int rep) { - get{ XPN ret = null; try { - IType t = this.GetField(22, 0); + IType t = this.GetField(22, rep); ret = (XPN)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Special Coverage Approval Name (IN2-22). + /// + public XPN[] GetSpecialCoverageApprovalName() { + XPN[] ret = null; + try { + IType[] t = this.GetField(22); + ret = new XPN[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XPN)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Special Coverage Approval Name (IN2-22). + /// + public int SpecialCoverageApprovalNameRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(22); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Special Coverage Approval Title(IN2-23). /// @@ -244372,51 +244967,121 @@ catch (HL7Exception he) { } } /// - /// Returns Payor ID(IN2-25). + /// Returns a single repetition of Payor ID(IN2-25). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public CX PayorID + public CX GetPayorID(int rep) { - get{ CX ret = null; try { - IType t = this.GetField(25, 0); + IType t = this.GetField(25, rep); ret = (CX)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Payor ID (IN2-25). + /// + public CX[] GetPayorID() { + CX[] ret = null; + try { + IType[] t = this.GetField(25); + ret = new CX[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (CX)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Payor ID (IN2-25). + /// + public int PayorIDRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(25); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// - /// Returns Payor Subscriber ID(IN2-26). + /// Returns a single repetition of Payor Subscriber ID(IN2-26). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public CX PayorSubscriberID + public CX GetPayorSubscriberID(int rep) { - get{ CX ret = null; try { - IType t = this.GetField(26, 0); + IType t = this.GetField(26, rep); ret = (CX)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Payor Subscriber ID (IN2-26). + /// + public CX[] GetPayorSubscriberID() { + CX[] ret = null; + try { + IType[] t = this.GetField(26); + ret = new CX[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (CX)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Payor Subscriber ID (IN2-26). + /// + public int PayorSubscriberIDRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(26); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns Eligibility Source(IN2-27). /// diff --git a/tests/NHapi.NUnit.SourceGeneration/SourceGenerationTests.Test_Generate_Versions_version=2.4.verified.txt b/tests/NHapi.NUnit.SourceGeneration/SourceGenerationTests.Test_Generate_Versions_version=2.4.verified.txt index acc85c72a..ef7bb3de3 100644 --- a/tests/NHapi.NUnit.SourceGeneration/SourceGenerationTests.Test_Generate_Versions_version=2.4.verified.txt +++ b/tests/NHapi.NUnit.SourceGeneration/SourceGenerationTests.Test_Generate_Versions_version=2.4.verified.txt @@ -174938,15 +174938,15 @@ public class OBX : AbstractSegment { this.add(typeof(Varies), false, 0, 65536, new System.Object[]{message}, "Observation Value"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Units"); this.add(typeof(ST), false, 1, 60, new System.Object[]{message}, "References Range"); - this.add(typeof(IS), false, 1, 5, new System.Object[]{message, 78}, "Abnormal Flags"); - this.add(typeof(NM), false, 5, 5, new System.Object[]{message}, "Probability"); - this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 80}, "Nature of Abnormal Test"); + this.add(typeof(IS), false, 5, 5, new System.Object[]{message, 78}, "Abnormal Flags"); + this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Probability"); + this.add(typeof(ID), false, 0, 2, new System.Object[]{message, 80}, "Nature of Abnormal Test"); this.add(typeof(ID), true, 1, 1, new System.Object[]{message, 85}, "Observation Result Status"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date Last Observation Normal Value"); this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "User Defined Access Checks"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date/Time of the Observation"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Producer's ID"); - this.add(typeof(XCN), false, 1, 250, new System.Object[]{message}, "Responsible Observer"); + this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Responsible Observer"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Observation Method"); this.add(typeof(EI), false, 0, 22, new System.Object[]{message}, "Equipment Instance Identifier"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date/Time of the Analysis"); @@ -175152,16 +175152,74 @@ catch (HL7Exception he) { } /// - /// Returns Abnormal Flags(OBX-8). + /// Returns a single repetition of Abnormal Flags(OBX-8). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public IS AbnormalFlags + public IS GetAbnormalFlags(int rep) { - get{ IS ret = null; try { - IType t = this.GetField(8, 0); + IType t = this.GetField(8, rep); ret = (IS)t; + } catch (System.Exception ex) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); + throw new System.Exception("An unexpected error occurred", ex); + } + return ret; + } + + /// + /// Returns all repetitions of Abnormal Flags (OBX-8). + /// + public IS[] GetAbnormalFlags() { + IS[] ret = null; + try { + IType[] t = this.GetField(8); + ret = new IS[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (IS)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Abnormal Flags (OBX-8). + /// + public int AbnormalFlagsRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(8); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} + /// + /// Returns Probability(OBX-9). + /// + public NM Probability + { + get{ + NM ret = null; + try + { + IType t = this.GetField(9, 0); + ret = (NM)t; } catch (HL7Exception he) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); @@ -175175,17 +175233,17 @@ catch (HL7Exception he) { } /// - /// Returns a single repetition of Probability(OBX-9). + /// Returns a single repetition of Nature of Abnormal Test(OBX-10). /// throws HL7Exception if the repetition number is invalid. /// The repetition number (this is a repeating field) /// - public NM GetProbability(int rep) + public ID GetNatureOfAbnormalTest(int rep) { - NM ret = null; + ID ret = null; try { - IType t = this.GetField(9, rep); - ret = (NM)t; + IType t = this.GetField(10, rep); + ret = (ID)t; } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); @@ -175194,15 +175252,15 @@ catch (HL7Exception he) { } /// - /// Returns all repetitions of Probability (OBX-9). + /// Returns all repetitions of Nature of Abnormal Test (OBX-10). /// - public NM[] GetProbability() { - NM[] ret = null; + public ID[] GetNatureOfAbnormalTest() { + ID[] ret = null; try { - IType[] t = this.GetField(9); - ret = new NM[t.Length]; + IType[] t = this.GetField(10); + ret = new ID[t.Length]; for (int i = 0; i < ret.Length; i++) { - ret[i] = (NM)t[i]; + ret[i] = (ID)t[i]; } } catch (HL7Exception he) { HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); @@ -175215,13 +175273,13 @@ catch (HL7Exception he) { } /// - /// Returns the total repetitions of Probability (OBX-9). + /// Returns the total repetitions of Nature of Abnormal Test (OBX-10). /// - public int ProbabilityRepetitionsUsed + public int NatureOfAbnormalTestRepetitionsUsed { get{ try { - return GetTotalFieldRepetitionsUsed(9); + return GetTotalFieldRepetitionsUsed(10); } catch (HL7Exception he) { HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); @@ -175232,29 +175290,6 @@ catch (HL7Exception he) { } } } - /// - /// Returns Nature of Abnormal Test(OBX-10). - /// - public ID NatureOfAbnormalTest - { - get{ - ID ret = null; - try - { - IType t = this.GetField(10, 0); - ret = (ID)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); - } catch (System.Exception ex) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); - throw new System.Exception("An unexpected error occurred", ex); - } - return ret; - } - } - /// /// Returns Observation Result Status(OBX-11). /// @@ -175371,28 +175406,63 @@ catch (HL7Exception he) { } /// - /// Returns Responsible Observer(OBX-16). + /// Returns a single repetition of Responsible Observer(OBX-16). + /// throws HL7Exception if the repetition number is invalid. + /// The repetition number (this is a repeating field) /// - public XCN ResponsibleObserver + public XCN GetResponsibleObserver(int rep) { - get{ XCN ret = null; try { - IType t = this.GetField(16, 0); + IType t = this.GetField(16, rep); ret = (XCN)t; - } - catch (HL7Exception he) { - HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); - throw new System.Exception("An unexpected error occurred", he); } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error occurred", ex); } return ret; - } } + /// + /// Returns all repetitions of Responsible Observer (OBX-16). + /// + public XCN[] GetResponsibleObserver() { + XCN[] ret = null; + try { + IType[] t = this.GetField(16); + ret = new XCN[t.Length]; + for (int i = 0; i < ret.Length; i++) { + ret[i] = (XCN)t[i]; + } + } catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); + } catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); + } + return ret; +} + + /// + /// Returns the total repetitions of Responsible Observer (OBX-16). + /// + public int ResponsibleObserverRepetitionsUsed +{ +get{ + try { + return GetTotalFieldRepetitionsUsed(16); + } +catch (HL7Exception he) { + HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value. This is a bug.", he); + throw new System.Exception("An unexpected error occurred", he); +} catch (System.Exception cce) { + HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", cce); + throw new System.Exception("An unexpected error occurred", cce); +} +} +} /// /// Returns a single repetition of Observation Method(OBX-17). /// throws HL7Exception if the repetition number is invalid.