using System;
using NHapi.Base;
using NHapi.Base.Parser;
using NHapi.Base.Model;
using NHapi.Model.V251.Datatype;
using NHapi.Base.Log;
namespace NHapi.Model.V251.Segment{
///<summary>
/// Represents an HL7 FT1 message segment.
/// This segment has the following fields:<ol>
///<li>FT1-1: Set ID - FT1 (SI)</li>
///<li>FT1-2: Transaction ID (ST)</li>
///<li>FT1-3: Transaction Batch ID (ST)</li>
///<li>FT1-4: Transaction Date (DR)</li>
///<li>FT1-5: Transaction Posting Date (TS)</li>
///<li>FT1-6: Transaction Type (IS)</li>
///<li>FT1-7: Transaction Code (CE)</li>
///<li>FT1-8: Transaction Description (ST)</li>
///<li>FT1-9: Transaction Description - Alt (ST)</li>
///<li>FT1-10: Transaction Quantity (NM)</li>
///<li>FT1-11: Transaction Amount - Extended (CP)</li>
///<li>FT1-12: Transaction Amount - Unit (CP)</li>
///<li>FT1-13: Department Code (CE)</li>
///<li>FT1-14: Insurance Plan ID (CE)</li>
///<li>FT1-15: Insurance Amount (CP)</li>
///<li>FT1-16: Assigned Patient Location (PL)</li>
///<li>FT1-17: Fee Schedule (IS)</li>
///<li>FT1-18: Patient Type (IS)</li>
///<li>FT1-19: Diagnosis Code - FT1 (CE)</li>
///<li>FT1-20: Performed By Code (XCN)</li>
///<li>FT1-21: Ordered By Code (XCN)</li>
///<li>FT1-22: Unit Cost (CP)</li>
///<li>FT1-23: Filler Order Number (EI)</li>
///<li>FT1-24: Entered By Code (XCN)</li>
///<li>FT1-25: Procedure Code (CE)</li>
///<li>FT1-26: Procedure Code Modifier (CE)</li>
///<li>FT1-27: Advanced Beneficiary Notice Code (CE)</li>
///<li>FT1-28: Medically Necessary Duplicate Procedure Reason. (CWE)</li>
///<li>FT1-29: NDC Code (CNE)</li>
///<li>FT1-30: Payment Reference ID (CX)</li>
///<li>FT1-31: Transaction Reference Key (SI)</li>
///</ol>
/// The get...() methods return data from individual fields. These methods
/// do not throw exceptions and may therefore have to handle exceptions internally.
/// If an exception is handled internally, it is logged and null is returned.
/// This is not expected to happen - if it does happen this indicates not so much
/// an exceptional circumstance as a bug in the code for this class.
///</summary>
[Serializable]
public class FT1 : AbstractSegment {
/**
* Creates a FT1 (Financial Transaction) segment object that belongs to the given
* message.
*/
public FT1(IGroup parent, IModelClassFactory factory) : base(parent,factory) {
IMessage message = Message;
try {
this.add(typeof(SI), false, 1, 4, new System.Object[]{message}, "Set ID - FT1");
this.add(typeof(ST), false, 1, 12, new System.Object[]{message}, "Transaction ID");
this.add(typeof(ST), false, 1, 10, new System.Object[]{message}, "Transaction Batch ID");
this.add(typeof(DR), true, 1, 53, new System.Object[]{message}, "Transaction Date");
this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Transaction Posting Date");
this.add(typeof(IS), true, 1, 8, new System.Object[]{message, 17}, "Transaction Type");
this.add(typeof(CE), true, 1, 250, new System.Object[]{message}, "Transaction Code");
this.add(typeof(ST), false, 1, 40, new System.Object[]{message}, "Transaction Description");
this.add(typeof(ST), false, 1, 40, new System.Object[]{message}, "Transaction Description - Alt");
this.add(typeof(NM), false, 1, 6, new System.Object[]{message}, "Transaction Quantity");
this.add(typeof(CP), false, 1, 12, new System.Object[]{message}, "Transaction Amount - Extended");
this.add(typeof(CP), false, 1, 12, new System.Object[]{message}, "Transaction Amount - Unit");
this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Department Code");
this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Insurance Plan ID");
this.add(typeof(CP), false, 1, 12, new System.Object[]{message}, "Insurance Amount");
this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "Assigned Patient Location");
this.add(typeof(IS), false, 1, 1, new System.Object[]{message, 24}, "Fee Schedule");
this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 18}, "Patient Type");
this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Diagnosis Code - FT1");
this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Performed By Code");
this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Ordered By Code");
this.add(typeof(CP), false, 1, 12, new System.Object[]{message}, "Unit Cost");
this.add(typeof(EI), false, 1, 22, new System.Object[]{message}, "Filler Order Number");
this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Entered By Code");
this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Procedure Code");
this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Procedure Code Modifier");
this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Advanced Beneficiary Notice Code");
this.add(typeof(CWE), false, 1, 250, new System.Object[]{message}, "Medically Necessary Duplicate Procedure Reason.");
this.add(typeof(CNE), false, 1, 250, new System.Object[]{message}, "NDC Code");
this.add(typeof(CX), false, 1, 250, new System.Object[]{message}, "Payment Reference ID");
this.add(typeof(SI), false, 0, 4, new System.Object[]{message}, "Transaction Reference Key");
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + GetType().Name, he);
}
}
///<summary>
/// Returns Set ID - FT1(FT1-1).
///</summary>
public SI SetIDFT1
{
get{
SI ret = null;
try
{
IType t = this.GetField(1, 0);
ret = (SI)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;
}
}
///<summary>
/// Returns Transaction ID(FT1-2).
///</summary>
public ST TransactionID
{
get{
ST ret = null;
try
{
IType t = this.GetField(2, 0);
ret = (ST)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;
}
}
///<summary>
/// Returns Transaction Batch ID(FT1-3).
///</summary>
public ST TransactionBatchID
{
get{
ST ret = null;
try
{
IType t = this.GetField(3, 0);
ret = (ST)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;
}
}
///<summary>
/// Returns Transaction Date(FT1-4).
///</summary>
public DR TransactionDate
{
get{
DR ret = null;
try
{
IType t = this.GetField(4, 0);
ret = (DR)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;
}
}
///<summary>
/// Returns Transaction Posting Date(FT1-5).
///</summary>
public TS TransactionPostingDate
{
get{
TS ret = null;
try
{
IType t = this.GetField(5, 0);
ret = (TS)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;
}
}
///<summary>
/// Returns Transaction Type(FT1-6).
///</summary>
public IS TransactionType
{
get{
IS ret = null;
try
{
IType t = this.GetField(6, 0);
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 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;
}
}
///<summary>
/// Returns Transaction Code(FT1-7).
///</summary>
public CE TransactionCode
{
get{
CE ret = null;
try
{
IType t = this.GetField(7, 0);
ret = (CE)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;
}
}
///<summary>
/// Returns Transaction Description(FT1-8).
///</summary>
public ST TransactionDescription
{
get{
ST ret = null;
try
{
IType t = this.GetField(8, 0);
ret = (ST)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;
}
}
///<summary>
/// Returns Transaction Description - Alt(FT1-9).
///</summary>
public ST TransactionDescriptionAlt
{
get{
ST ret = null;
try
{
IType t = this.GetField(9, 0);
ret = (ST)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;
}
}
///<summary>
/// Returns Transaction Quantity(FT1-10).
///</summary>
public NM TransactionQuantity
{
get{
NM ret = null;
try
{
IType t = this.GetField(10, 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 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;
}
}
///<summary>
/// Returns Transaction Amount - Extended(FT1-11).
///</summary>
public CP TransactionAmountExtended
{
get{
CP ret = null;
try
{
IType t = this.GetField(11, 0);
ret = (CP)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;
}
}
///<summary>
/// Returns Transaction Amount - Unit(FT1-12).
///</summary>
public CP TransactionAmountUnit
{
get{
CP ret = null;
try
{
IType t = this.GetField(12, 0);
ret = (CP)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;
}
}
///<summary>
/// Returns Department Code(FT1-13).
///</summary>
public CE DepartmentCode
{
get{
CE ret = null;
try
{
IType t = this.GetField(13, 0);
ret = (CE)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;
}
}
///<summary>
/// Returns Insurance Plan ID(FT1-14).
///</summary>
public CE InsurancePlanID
{
get{
CE ret = null;
try
{
IType t = this.GetField(14, 0);
ret = (CE)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;
}
}
///<summary>
/// Returns Insurance Amount(FT1-15).
///</summary>
public CP InsuranceAmount
{
get{
CP ret = null;
try
{
IType t = this.GetField(15, 0);
ret = (CP)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;
}
}
///<summary>
/// Returns Assigned Patient Location(FT1-16).
///</summary>
public PL AssignedPatientLocation
{
get{
PL ret = null;
try
{
IType t = this.GetField(16, 0);
ret = (PL)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;
}
}
///<summary>
/// Returns Fee Schedule(FT1-17).
///</summary>
public IS FeeSchedule
{
get{
IS ret = null;
try
{
IType t = this.GetField(17, 0);
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 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;
}
}
///<summary>
/// Returns Patient Type(FT1-18).
///</summary>
public IS PatientType
{
get{
IS ret = null;
try
{
IType t = this.GetField(18, 0);
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 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;
}
}
///<summary>
/// Returns a single repetition of Diagnosis Code - FT1(FT1-19).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public CE GetDiagnosisCodeFT1(int rep)
{
CE ret = null;
try
{
IType t = this.GetField(19, rep);
ret = (CE)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 ocurred", ex);
}
return ret;
}
///<summary>
/// Returns all repetitions of Diagnosis Code - FT1 (FT1-19).
///</summary>
public CE[] GetDiagnosisCodeFT1() {
CE[] ret = null;
try {
IType[] t = this.GetField(19);
ret = new CE[t.Length];
for (int i = 0; i < ret.Length; i++) {
ret[i] = (CE)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 ocurred", 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 ocurred", cce);
}
return ret;
}
///<summary>
/// Returns the total repetitions of Diagnosis Code - FT1 (FT1-19).
///</summary>
public int DiagnosisCodeFT1RepetitionsUsed
{
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 ocurred", 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 ocurred", cce);
}
}
}
///<summary>
/// Returns a single repetition of Performed By Code(FT1-20).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public XCN GetPerformedByCode(int rep)
{
XCN ret = null;
try
{
IType t = this.GetField(20, rep);
ret = (XCN)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 ocurred", ex);
}
return ret;
}
///<summary>
/// Returns all repetitions of Performed By Code (FT1-20).
///</summary>
public XCN[] GetPerformedByCode() {
XCN[] ret = null;
try {
IType[] t = this.GetField(20);
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 ocurred", 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 ocurred", cce);
}
return ret;
}
///<summary>
/// Returns the total repetitions of Performed By Code (FT1-20).
///</summary>
public int PerformedByCodeRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(20);
}
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 ocurred", 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 ocurred", cce);
}
}
}
///<summary>
/// Returns a single repetition of Ordered By Code(FT1-21).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public XCN GetOrderedByCode(int rep)
{
XCN ret = null;
try
{
IType t = this.GetField(21, rep);
ret = (XCN)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 ocurred", ex);
}
return ret;
}
///<summary>
/// Returns all repetitions of Ordered By Code (FT1-21).
///</summary>
public XCN[] GetOrderedByCode() {
XCN[] ret = null;
try {
IType[] t = this.GetField(21);
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 ocurred", 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 ocurred", cce);
}
return ret;
}
///<summary>
/// Returns the total repetitions of Ordered By Code (FT1-21).
///</summary>
public int OrderedByCodeRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(21);
}
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 ocurred", 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 ocurred", cce);
}
}
}
///<summary>
/// Returns Unit Cost(FT1-22).
///</summary>
public CP UnitCost
{
get{
CP ret = null;
try
{
IType t = this.GetField(22, 0);
ret = (CP)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;
}
}
///<summary>
/// Returns Filler Order Number(FT1-23).
///</summary>
public EI FillerOrderNumber
{
get{
EI ret = null;
try
{
IType t = this.GetField(23, 0);
ret = (EI)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;
}
}
///<summary>
/// Returns a single repetition of Entered By Code(FT1-24).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public XCN GetEnteredByCode(int rep)
{
XCN ret = null;
try
{
IType t = this.GetField(24, rep);
ret = (XCN)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 ocurred", ex);
}
return ret;
}
///<summary>
/// Returns all repetitions of Entered By Code (FT1-24).
///</summary>
public XCN[] GetEnteredByCode() {
XCN[] ret = null;
try {
IType[] t = this.GetField(24);
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 ocurred", 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 ocurred", cce);
}
return ret;
}
///<summary>
/// Returns the total repetitions of Entered By Code (FT1-24).
///</summary>
public int EnteredByCodeRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(24);
}
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 ocurred", 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 ocurred", cce);
}
}
}
///<summary>
/// Returns Procedure Code(FT1-25).
///</summary>
public CE ProcedureCode
{
get{
CE ret = null;
try
{
IType t = this.GetField(25, 0);
ret = (CE)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;
}
}
///<summary>
/// Returns a single repetition of Procedure Code Modifier(FT1-26).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public CE GetProcedureCodeModifier(int rep)
{
CE ret = null;
try
{
IType t = this.GetField(26, rep);
ret = (CE)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 ocurred", ex);
}
return ret;
}
///<summary>
/// Returns all repetitions of Procedure Code Modifier (FT1-26).
///</summary>
public CE[] GetProcedureCodeModifier() {
CE[] ret = null;
try {
IType[] t = this.GetField(26);
ret = new CE[t.Length];
for (int i = 0; i < ret.Length; i++) {
ret[i] = (CE)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 ocurred", 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 ocurred", cce);
}
return ret;
}
///<summary>
/// Returns the total repetitions of Procedure Code Modifier (FT1-26).
///</summary>
public int ProcedureCodeModifierRepetitionsUsed
{
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 ocurred", 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 ocurred", cce);
}
}
}
///<summary>
/// Returns Advanced Beneficiary Notice Code(FT1-27).
///</summary>
public CE AdvancedBeneficiaryNoticeCode
{
get{
CE ret = null;
try
{
IType t = this.GetField(27, 0);
ret = (CE)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;
}
}
///<summary>
/// Returns Medically Necessary Duplicate Procedure Reason.(FT1-28).
///</summary>
public CWE MedicallyNecessaryDuplicateProcedureReason
{
get{
CWE ret = null;
try
{
IType t = this.GetField(28, 0);
ret = (CWE)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;
}
}
///<summary>
/// Returns NDC Code(FT1-29).
///</summary>
public CNE NDCCode
{
get{
CNE ret = null;
try
{
IType t = this.GetField(29, 0);
ret = (CNE)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;
}
}
///<summary>
/// Returns Payment Reference ID(FT1-30).
///</summary>
public CX PaymentReferenceID
{
get{
CX ret = null;
try
{
IType t = this.GetField(30, 0);
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 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;
}
}
///<summary>
/// Returns a single repetition of Transaction Reference Key(FT1-31).
/// throws HL7Exception if the repetition number is invalid.
/// <param name="rep">The repetition number (this is a repeating field)</param>
///</summary>
public SI GetTransactionReferenceKey(int rep)
{
SI ret = null;
try
{
IType t = this.GetField(31, rep);
ret = (SI)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 ocurred", ex);
}
return ret;
}
///<summary>
/// Returns all repetitions of Transaction Reference Key (FT1-31).
///</summary>
public SI[] GetTransactionReferenceKey() {
SI[] ret = null;
try {
IType[] t = this.GetField(31);
ret = new SI[t.Length];
for (int i = 0; i < ret.Length; i++) {
ret[i] = (SI)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 ocurred", 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 ocurred", cce);
}
return ret;
}
///<summary>
/// Returns the total repetitions of Transaction Reference Key (FT1-31).
///</summary>
public int TransactionReferenceKeyRepetitionsUsed
{
get{
try {
return GetTotalFieldRepetitionsUsed(31);
}
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 ocurred", 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 ocurred", cce);
}
}
}
}}
|