ca.uhn.hl7v2.model.v22.segment.FT1 Maven / Gradle / Ivy
/*
* This class is an auto-generated source file for a HAPI
* HL7 v2.x standard structure class.
*
* For more information, visit: http://hl7api.sourceforge.net/
*/
package ca.uhn.hl7v2.model.v22.segment;
// import ca.uhn.hl7v2.model.v22.group.*;
import ca.uhn.hl7v2.model.v22.datatype.*;
import ca.uhn.log.HapiLogFactory;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
import ca.uhn.hl7v2.model.AbstractMessage;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Varies;
/**
*Represents an HL7 FT1 message segment (FINANCIAL TRANSACTION).
* This segment has the following fields:
*
* - FT1-1: Set ID - financial transaction (SI) optional
*
- FT1-2: Transaction ID (ST) optional
*
- FT1-3: Transaction batch ID (ST) optional
*
- FT1-4: Transaction date (DT)
*
- FT1-5: Transaction posting date (DT) optional
*
- FT1-6: Transaction type (ID)
*
- FT1-7: Transaction code (CE)
*
- FT1-8: Transaction description (ST) optional
*
- FT1-9: Transaction description - alternate (ST) optional
*
- FT1-10: Transaction quantity (NM) optional
*
- FT1-11: Transaction amount - extended (NM) optional
*
- FT1-12: Transaction amount - unit (NM) optional
*
- FT1-13: Department code (CE) optional
*
- FT1-14: Insurance plan ID (ID)
*
- FT1-15: Insurance amount (NM) optional
*
- FT1-16: Assigned Patient Location (CM_INTERNAL_LOCATION) optional
*
- FT1-17: Fee schedule (ID) optional
*
- FT1-18: Patient type (ID) optional
*
- FT1-19: Diagnosis code (CE) optional repeating
*
- FT1-20: Performed by code (CN) optional
*
- FT1-21: Ordered by code (CN) optional
*
- FT1-22: Unit cost (NM) optional
*
- FT1-23: Filler Order Number (CM_FILLER) optional
*
*/
public class FT1 extends AbstractSegment {
/**
* Creates a new FT1 segment
*/
public FT1(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(SI.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID - financial transaction");
this.add(ST.class, false, 1, 12, new Object[]{ getMessage(), new Integer(0) }, "Transaction ID");
this.add(ST.class, false, 1, 10, new Object[]{ getMessage(), new Integer(0) }, "Transaction batch ID");
this.add(DT.class, true, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Transaction date");
this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Transaction posting date");
this.add(ID.class, true, 1, 8, new Object[]{ getMessage() }, "Transaction type");
this.add(CE.class, true, 1, 20, new Object[]{ getMessage(), new Integer(132) }, "Transaction code");
this.add(ST.class, false, 1, 40, new Object[]{ getMessage(), new Integer(0) }, "Transaction description");
this.add(ST.class, false, 1, 40, new Object[]{ getMessage(), new Integer(0) }, "Transaction description - alternate");
this.add(NM.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Transaction quantity");
this.add(NM.class, false, 1, 12, new Object[]{ getMessage(), new Integer(0) }, "Transaction amount - extended");
this.add(NM.class, false, 1, 12, new Object[]{ getMessage(), new Integer(0) }, "Transaction amount - unit");
this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(49) }, "Department code");
this.add(ID.class, true, 1, 8, new Object[]{ getMessage() }, "Insurance plan ID");
this.add(NM.class, false, 1, 12, new Object[]{ getMessage(), new Integer(0) }, "Insurance amount");
this.add(CM_INTERNAL_LOCATION.class, false, 1, 12, new Object[]{ getMessage(), new Integer(79) }, "Assigned Patient Location");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Fee schedule");
this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Patient type");
this.add(CE.class, false, 0, 8, new Object[]{ getMessage(), new Integer(51) }, "Diagnosis code");
this.add(CN.class, false, 1, 60, new Object[]{ getMessage(), new Integer(84) }, "Performed by code");
this.add(CN.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Ordered by code");
this.add(NM.class, false, 1, 12, new Object[]{ getMessage(), new Integer(0) }, "Unit cost");
this.add(CM_FILLER.class, false, 1, 75, new Object[]{ getMessage(), new Integer(0) }, "Filler Order Number");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating FT1 - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* FT1-1: "Set ID - financial transaction" - creates it if necessary
*/
public SI getSetIDFinancialTransaction() {
SI ret = null;
try {
Type t = this.getField(1, 0);
ret = (SI)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-1: "Set ID - financial transaction" - creates it if necessary
*/
public SI getFt11_SetIDFinancialTransaction() {
SI ret = null;
try {
Type t = this.getField(1, 0);
ret = (SI)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-2: "Transaction ID" - creates it if necessary
*/
public ST getTransactionID() {
ST ret = null;
try {
Type t = this.getField(2, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-2: "Transaction ID" - creates it if necessary
*/
public ST getFt12_TransactionID() {
ST ret = null;
try {
Type t = this.getField(2, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-3: "Transaction batch ID" - creates it if necessary
*/
public ST getTransactionBatchID() {
ST ret = null;
try {
Type t = this.getField(3, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-3: "Transaction batch ID" - creates it if necessary
*/
public ST getFt13_TransactionBatchID() {
ST ret = null;
try {
Type t = this.getField(3, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-4: "Transaction date" - creates it if necessary
*/
public DT getTransactionDate() {
DT ret = null;
try {
Type t = this.getField(4, 0);
ret = (DT)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-4: "Transaction date" - creates it if necessary
*/
public DT getFt14_TransactionDate() {
DT ret = null;
try {
Type t = this.getField(4, 0);
ret = (DT)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-5: "Transaction posting date" - creates it if necessary
*/
public DT getTransactionPostingDate() {
DT ret = null;
try {
Type t = this.getField(5, 0);
ret = (DT)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-5: "Transaction posting date" - creates it if necessary
*/
public DT getFt15_TransactionPostingDate() {
DT ret = null;
try {
Type t = this.getField(5, 0);
ret = (DT)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-6: "Transaction type" - creates it if necessary
*/
public ID getTransactionType() {
ID ret = null;
try {
Type t = this.getField(6, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-6: "Transaction type" - creates it if necessary
*/
public ID getFt16_TransactionType() {
ID ret = null;
try {
Type t = this.getField(6, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-7: "Transaction code" - creates it if necessary
*/
public CE getTransactionCode() {
CE ret = null;
try {
Type t = this.getField(7, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-7: "Transaction code" - creates it if necessary
*/
public CE getFt17_TransactionCode() {
CE ret = null;
try {
Type t = this.getField(7, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-8: "Transaction description" - creates it if necessary
*/
public ST getTransactionDescription() {
ST ret = null;
try {
Type t = this.getField(8, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-8: "Transaction description" - creates it if necessary
*/
public ST getFt18_TransactionDescription() {
ST ret = null;
try {
Type t = this.getField(8, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-9: "Transaction description - alternate" - creates it if necessary
*/
public ST getTransactionDescriptionAlternate() {
ST ret = null;
try {
Type t = this.getField(9, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-9: "Transaction description - alternate" - creates it if necessary
*/
public ST getFt19_TransactionDescriptionAlternate() {
ST ret = null;
try {
Type t = this.getField(9, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-10: "Transaction quantity" - creates it if necessary
*/
public NM getTransactionQuantity() {
NM ret = null;
try {
Type t = this.getField(10, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-10: "Transaction quantity" - creates it if necessary
*/
public NM getFt110_TransactionQuantity() {
NM ret = null;
try {
Type t = this.getField(10, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-11: "Transaction amount - extended" - creates it if necessary
*/
public NM getTransactionAmountExtended() {
NM ret = null;
try {
Type t = this.getField(11, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-11: "Transaction amount - extended" - creates it if necessary
*/
public NM getFt111_TransactionAmountExtended() {
NM ret = null;
try {
Type t = this.getField(11, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-12: "Transaction amount - unit" - creates it if necessary
*/
public NM getTransactionAmountUnit() {
NM ret = null;
try {
Type t = this.getField(12, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-12: "Transaction amount - unit" - creates it if necessary
*/
public NM getFt112_TransactionAmountUnit() {
NM ret = null;
try {
Type t = this.getField(12, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-13: "Department code" - creates it if necessary
*/
public CE getDepartmentCode() {
CE ret = null;
try {
Type t = this.getField(13, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-13: "Department code" - creates it if necessary
*/
public CE getFt113_DepartmentCode() {
CE ret = null;
try {
Type t = this.getField(13, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-14: "Insurance plan ID" - creates it if necessary
*/
public ID getInsurancePlanID() {
ID ret = null;
try {
Type t = this.getField(14, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-14: "Insurance plan ID" - creates it if necessary
*/
public ID getFt114_InsurancePlanID() {
ID ret = null;
try {
Type t = this.getField(14, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-15: "Insurance amount" - creates it if necessary
*/
public NM getInsuranceAmount() {
NM ret = null;
try {
Type t = this.getField(15, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-15: "Insurance amount" - creates it if necessary
*/
public NM getFt115_InsuranceAmount() {
NM ret = null;
try {
Type t = this.getField(15, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-16: "Assigned Patient Location" - creates it if necessary
*/
public CM_INTERNAL_LOCATION getAssignedPatientLocation() {
CM_INTERNAL_LOCATION ret = null;
try {
Type t = this.getField(16, 0);
ret = (CM_INTERNAL_LOCATION)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-16: "Assigned Patient Location" - creates it if necessary
*/
public CM_INTERNAL_LOCATION getFt116_AssignedPatientLocation() {
CM_INTERNAL_LOCATION ret = null;
try {
Type t = this.getField(16, 0);
ret = (CM_INTERNAL_LOCATION)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-17: "Fee schedule" - creates it if necessary
*/
public ID getFeeSchedule() {
ID ret = null;
try {
Type t = this.getField(17, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-17: "Fee schedule" - creates it if necessary
*/
public ID getFt117_FeeSchedule() {
ID ret = null;
try {
Type t = this.getField(17, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-18: "Patient type" - creates it if necessary
*/
public ID getPatientType() {
ID ret = null;
try {
Type t = this.getField(18, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-18: "Patient type" - creates it if necessary
*/
public ID getFt118_PatientType() {
ID ret = null;
try {
Type t = this.getField(18, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Diagnosis code (FT1-19).
*/
public CE[] getDiagnosisCode() {
CE[] ret = null;
try {
Type[] t = this.getField(19);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Diagnosis code (FT1-19).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getDiagnosisCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(19);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* FT1-19: "Diagnosis code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getDiagnosisCode(int rep) {
CE ret = null;
try {
Type t = this.getField(19, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* FT1-19: "Diagnosis code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getFt119_DiagnosisCode(int rep) {
CE ret = null;
try {
Type t = this.getField(19, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Diagnosis code (FT1-19).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getFt119_DiagnosisCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(19);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* FT1-19: "Diagnosis code" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE insertDiagnosisCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(19, rep);
}
/**
* Inserts a repetition of
* FT1-19: "Diagnosis code" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE insertFt119_DiagnosisCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(19, rep);
}
/**
* Removes a repetition of
* FT1-19: "Diagnosis code" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE removeDiagnosisCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(19, rep);
}
/**
* Removes a repetition of
* FT1-19: "Diagnosis code" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE removeFt119_DiagnosisCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(19, rep);
}
/**
* Returns
* FT1-20: "Performed by code" - creates it if necessary
*/
public CN getPerformedByCode() {
CN ret = null;
try {
Type t = this.getField(20, 0);
ret = (CN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-20: "Performed by code" - creates it if necessary
*/
public CN getFt120_PerformedByCode() {
CN ret = null;
try {
Type t = this.getField(20, 0);
ret = (CN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-21: "Ordered by code" - creates it if necessary
*/
public CN getOrderedByCode() {
CN ret = null;
try {
Type t = this.getField(21, 0);
ret = (CN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-21: "Ordered by code" - creates it if necessary
*/
public CN getFt121_OrderedByCode() {
CN ret = null;
try {
Type t = this.getField(21, 0);
ret = (CN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-22: "Unit cost" - creates it if necessary
*/
public NM getUnitCost() {
NM ret = null;
try {
Type t = this.getField(22, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-22: "Unit cost" - creates it if necessary
*/
public NM getFt122_UnitCost() {
NM ret = null;
try {
Type t = this.getField(22, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-23: "Filler Order Number" - creates it if necessary
*/
public CM_FILLER getFillerOrderNumber() {
CM_FILLER ret = null;
try {
Type t = this.getField(23, 0);
ret = (CM_FILLER)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* FT1-23: "Filler Order Number" - creates it if necessary
*/
public CM_FILLER getFt123_FillerOrderNumber() {
CM_FILLER ret = null;
try {
Type t = this.getField(23, 0);
ret = (CM_FILLER)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new SI(getMessage());
case 1: return new ST(getMessage());
case 2: return new ST(getMessage());
case 3: return new DT(getMessage());
case 4: return new DT(getMessage());
case 5: return new ID(getMessage(), new Integer( 17 ));
case 6: return new CE(getMessage());
case 7: return new ST(getMessage());
case 8: return new ST(getMessage());
case 9: return new NM(getMessage());
case 10: return new NM(getMessage());
case 11: return new NM(getMessage());
case 12: return new CE(getMessage());
case 13: return new ID(getMessage(), new Integer( 72 ));
case 14: return new NM(getMessage());
case 15: return new CM_INTERNAL_LOCATION(getMessage());
case 16: return new ID(getMessage(), new Integer( 24 ));
case 17: return new ID(getMessage(), new Integer( 18 ));
case 18: return new CE(getMessage());
case 19: return new CN(getMessage());
case 20: return new CN(getMessage());
case 21: return new NM(getMessage());
case 22: return new CM_FILLER(getMessage());
default: return null;
}
}
}