ca.uhn.hl7v2.model.v25.segment.PES 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.v25.segment;
// import ca.uhn.hl7v2.model.v25.group.*;
import ca.uhn.hl7v2.model.v25.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 PES message segment (Product Experience Sender).
* This segment has the following fields:
*
* - PES-1: Sender Organization Name (XON) optional repeating
*
- PES-2: Sender Individual Name (XCN) optional repeating
*
- PES-3: Sender Address (XAD) optional repeating
*
- PES-4: Sender Telephone (XTN) optional repeating
*
- PES-5: Sender Event Identifier (EI) optional
*
- PES-6: Sender Sequence Number (NM) optional
*
- PES-7: Sender Event Description (FT) optional repeating
*
- PES-8: Sender Comment (FT) optional
*
- PES-9: Sender Aware Date/Time (TS) optional
*
- PES-10: Event Report Date (TS)
*
- PES-11: Event Report Timing/Type (ID) optional repeating
*
- PES-12: Event Report Source (ID) optional
*
- PES-13: Event Reported To (ID) optional repeating
*
*/
public class PES extends AbstractSegment {
/**
* Creates a new PES segment
*/
public PES(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(XON.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Sender Organization Name");
this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Sender Individual Name");
this.add(XAD.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Sender Address");
this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Sender Telephone");
this.add(EI.class, false, 1, 75, new Object[]{ getMessage(), new Integer(0) }, "Sender Event Identifier");
this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Sender Sequence Number");
this.add(FT.class, false, 0, 600, new Object[]{ getMessage(), new Integer(0) }, "Sender Event Description");
this.add(FT.class, false, 1, 600, new Object[]{ getMessage(), new Integer(0) }, "Sender Comment");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Sender Aware Date/Time");
this.add(TS.class, true, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Event Report Date");
this.add(ID.class, false, 0, 3, new Object[]{ getMessage() }, "Event Report Timing/Type");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Event Report Source");
this.add(ID.class, false, 0, 1, new Object[]{ getMessage() }, "Event Reported To");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating PES - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns all repetitions of Sender Organization Name (PES-1).
*/
public XON[] getSenderOrganizationName() {
XON[] ret = null;
try {
Type[] t = this.getField(1);
ret = new XON[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (XON)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 Sender Organization Name (PES-1).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSenderOrganizationNameReps() {
XON[] ret = null;
try {
Type[] t = this.getField(1);
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
* PES-1: "Sender Organization Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XON getSenderOrganizationName(int rep) {
XON ret = null;
try {
Type t = this.getField(1, rep);
ret = (XON)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
* PES-1: "Sender Organization Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XON getPes1_SenderOrganizationName(int rep) {
XON ret = null;
try {
Type t = this.getField(1, rep);
ret = (XON)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 Sender Organization Name (PES-1).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPes1_SenderOrganizationNameReps() {
XON[] ret = null;
try {
Type[] t = this.getField(1);
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
* PES-1: "Sender Organization Name" 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 XON insertSenderOrganizationName(int rep) throws HL7Exception {
return (XON) super.insertRepetition(1, rep);
}
/**
* Inserts a repetition of
* PES-1: "Sender Organization Name" 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 XON insertPes1_SenderOrganizationName(int rep) throws HL7Exception {
return (XON) super.insertRepetition(1, rep);
}
/**
* Removes a repetition of
* PES-1: "Sender Organization Name" 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 XON removeSenderOrganizationName(int rep) throws HL7Exception {
return (XON) super.removeRepetition(1, rep);
}
/**
* Removes a repetition of
* PES-1: "Sender Organization Name" 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 XON removePes1_SenderOrganizationName(int rep) throws HL7Exception {
return (XON) super.removeRepetition(1, rep);
}
/**
* Returns all repetitions of Sender Individual Name (PES-2).
*/
public XCN[] getSenderIndividualName() {
XCN[] ret = null;
try {
Type[] t = this.getField(2);
ret = new XCN[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (XCN)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 Sender Individual Name (PES-2).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSenderIndividualNameReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(2);
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
* PES-2: "Sender Individual Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getSenderIndividualName(int rep) {
XCN ret = null;
try {
Type t = this.getField(2, rep);
ret = (XCN)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
* PES-2: "Sender Individual Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getPes2_SenderIndividualName(int rep) {
XCN ret = null;
try {
Type t = this.getField(2, rep);
ret = (XCN)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 Sender Individual Name (PES-2).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPes2_SenderIndividualNameReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(2);
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
* PES-2: "Sender Individual Name" 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 XCN insertSenderIndividualName(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(2, rep);
}
/**
* Inserts a repetition of
* PES-2: "Sender Individual Name" 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 XCN insertPes2_SenderIndividualName(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(2, rep);
}
/**
* Removes a repetition of
* PES-2: "Sender Individual Name" 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 XCN removeSenderIndividualName(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(2, rep);
}
/**
* Removes a repetition of
* PES-2: "Sender Individual Name" 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 XCN removePes2_SenderIndividualName(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(2, rep);
}
/**
* Returns all repetitions of Sender Address (PES-3).
*/
public XAD[] getSenderAddress() {
XAD[] ret = null;
try {
Type[] t = this.getField(3);
ret = new XAD[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (XAD)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 Sender Address (PES-3).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSenderAddressReps() {
XAD[] ret = null;
try {
Type[] t = this.getField(3);
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
* PES-3: "Sender Address" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XAD getSenderAddress(int rep) {
XAD ret = null;
try {
Type t = this.getField(3, rep);
ret = (XAD)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
* PES-3: "Sender Address" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XAD getPes3_SenderAddress(int rep) {
XAD ret = null;
try {
Type t = this.getField(3, rep);
ret = (XAD)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 Sender Address (PES-3).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPes3_SenderAddressReps() {
XAD[] ret = null;
try {
Type[] t = this.getField(3);
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
* PES-3: "Sender Address" 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 XAD insertSenderAddress(int rep) throws HL7Exception {
return (XAD) super.insertRepetition(3, rep);
}
/**
* Inserts a repetition of
* PES-3: "Sender Address" 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 XAD insertPes3_SenderAddress(int rep) throws HL7Exception {
return (XAD) super.insertRepetition(3, rep);
}
/**
* Removes a repetition of
* PES-3: "Sender Address" 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 XAD removeSenderAddress(int rep) throws HL7Exception {
return (XAD) super.removeRepetition(3, rep);
}
/**
* Removes a repetition of
* PES-3: "Sender Address" 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 XAD removePes3_SenderAddress(int rep) throws HL7Exception {
return (XAD) super.removeRepetition(3, rep);
}
/**
* Returns all repetitions of Sender Telephone (PES-4).
*/
public XTN[] getSenderTelephone() {
XTN[] ret = null;
try {
Type[] t = this.getField(4);
ret = new XTN[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (XTN)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 Sender Telephone (PES-4).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSenderTelephoneReps() {
XTN[] ret = null;
try {
Type[] t = this.getField(4);
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
* PES-4: "Sender Telephone" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XTN getSenderTelephone(int rep) {
XTN ret = null;
try {
Type t = this.getField(4, rep);
ret = (XTN)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
* PES-4: "Sender Telephone" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XTN getPes4_SenderTelephone(int rep) {
XTN ret = null;
try {
Type t = this.getField(4, rep);
ret = (XTN)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 Sender Telephone (PES-4).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPes4_SenderTelephoneReps() {
XTN[] ret = null;
try {
Type[] t = this.getField(4);
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
* PES-4: "Sender Telephone" 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 XTN insertSenderTelephone(int rep) throws HL7Exception {
return (XTN) super.insertRepetition(4, rep);
}
/**
* Inserts a repetition of
* PES-4: "Sender Telephone" 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 XTN insertPes4_SenderTelephone(int rep) throws HL7Exception {
return (XTN) super.insertRepetition(4, rep);
}
/**
* Removes a repetition of
* PES-4: "Sender Telephone" 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 XTN removeSenderTelephone(int rep) throws HL7Exception {
return (XTN) super.removeRepetition(4, rep);
}
/**
* Removes a repetition of
* PES-4: "Sender Telephone" 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 XTN removePes4_SenderTelephone(int rep) throws HL7Exception {
return (XTN) super.removeRepetition(4, rep);
}
/**
* Returns
* PES-5: "Sender Event Identifier" - creates it if necessary
*/
public EI getSenderEventIdentifier() {
EI ret = null;
try {
Type t = this.getField(5, 0);
ret = (EI)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
* PES-5: "Sender Event Identifier" - creates it if necessary
*/
public EI getPes5_SenderEventIdentifier() {
EI ret = null;
try {
Type t = this.getField(5, 0);
ret = (EI)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
* PES-6: "Sender Sequence Number" - creates it if necessary
*/
public NM getSenderSequenceNumber() {
NM ret = null;
try {
Type t = this.getField(6, 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
* PES-6: "Sender Sequence Number" - creates it if necessary
*/
public NM getPes6_SenderSequenceNumber() {
NM ret = null;
try {
Type t = this.getField(6, 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 all repetitions of Sender Event Description (PES-7).
*/
public FT[] getSenderEventDescription() {
FT[] ret = null;
try {
Type[] t = this.getField(7);
ret = new FT[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (FT)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 Sender Event Description (PES-7).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSenderEventDescriptionReps() {
FT[] ret = null;
try {
Type[] t = this.getField(7);
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
* PES-7: "Sender Event Description" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public FT getSenderEventDescription(int rep) {
FT ret = null;
try {
Type t = this.getField(7, rep);
ret = (FT)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
* PES-7: "Sender Event Description" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public FT getPes7_SenderEventDescription(int rep) {
FT ret = null;
try {
Type t = this.getField(7, rep);
ret = (FT)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 Sender Event Description (PES-7).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPes7_SenderEventDescriptionReps() {
FT[] ret = null;
try {
Type[] t = this.getField(7);
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
* PES-7: "Sender Event Description" 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 FT insertSenderEventDescription(int rep) throws HL7Exception {
return (FT) super.insertRepetition(7, rep);
}
/**
* Inserts a repetition of
* PES-7: "Sender Event Description" 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 FT insertPes7_SenderEventDescription(int rep) throws HL7Exception {
return (FT) super.insertRepetition(7, rep);
}
/**
* Removes a repetition of
* PES-7: "Sender Event Description" 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 FT removeSenderEventDescription(int rep) throws HL7Exception {
return (FT) super.removeRepetition(7, rep);
}
/**
* Removes a repetition of
* PES-7: "Sender Event Description" 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 FT removePes7_SenderEventDescription(int rep) throws HL7Exception {
return (FT) super.removeRepetition(7, rep);
}
/**
* Returns
* PES-8: "Sender Comment" - creates it if necessary
*/
public FT getSenderComment() {
FT ret = null;
try {
Type t = this.getField(8, 0);
ret = (FT)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
* PES-8: "Sender Comment" - creates it if necessary
*/
public FT getPes8_SenderComment() {
FT ret = null;
try {
Type t = this.getField(8, 0);
ret = (FT)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
* PES-9: "Sender Aware Date/Time" - creates it if necessary
*/
public TS getSenderAwareDateTime() {
TS ret = null;
try {
Type t = this.getField(9, 0);
ret = (TS)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
* PES-9: "Sender Aware Date/Time" - creates it if necessary
*/
public TS getPes9_SenderAwareDateTime() {
TS ret = null;
try {
Type t = this.getField(9, 0);
ret = (TS)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
* PES-10: "Event Report Date" - creates it if necessary
*/
public TS getEventReportDate() {
TS ret = null;
try {
Type t = this.getField(10, 0);
ret = (TS)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
* PES-10: "Event Report Date" - creates it if necessary
*/
public TS getPes10_EventReportDate() {
TS ret = null;
try {
Type t = this.getField(10, 0);
ret = (TS)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 Event Report Timing/Type (PES-11).
*/
public ID[] getEventReportTimingType() {
ID[] ret = null;
try {
Type[] t = this.getField(11);
ret = new ID[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ID)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 Event Report Timing/Type (PES-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getEventReportTimingTypeReps() {
ID[] ret = null;
try {
Type[] t = this.getField(11);
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
* PES-11: "Event Report Timing/Type" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ID getEventReportTimingType(int rep) {
ID ret = null;
try {
Type t = this.getField(11, rep);
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 a specific repetition of
* PES-11: "Event Report Timing/Type" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ID getPes11_EventReportTimingType(int rep) {
ID ret = null;
try {
Type t = this.getField(11, rep);
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 a count of the current number of repetitions of Event Report Timing/Type (PES-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPes11_EventReportTimingTypeReps() {
ID[] ret = null;
try {
Type[] t = this.getField(11);
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
* PES-11: "Event Report Timing/Type" 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 ID insertEventReportTimingType(int rep) throws HL7Exception {
return (ID) super.insertRepetition(11, rep);
}
/**
* Inserts a repetition of
* PES-11: "Event Report Timing/Type" 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 ID insertPes11_EventReportTimingType(int rep) throws HL7Exception {
return (ID) super.insertRepetition(11, rep);
}
/**
* Removes a repetition of
* PES-11: "Event Report Timing/Type" 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 ID removeEventReportTimingType(int rep) throws HL7Exception {
return (ID) super.removeRepetition(11, rep);
}
/**
* Removes a repetition of
* PES-11: "Event Report Timing/Type" 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 ID removePes11_EventReportTimingType(int rep) throws HL7Exception {
return (ID) super.removeRepetition(11, rep);
}
/**
* Returns
* PES-12: "Event Report Source" - creates it if necessary
*/
public ID getEventReportSource() {
ID ret = null;
try {
Type t = this.getField(12, 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
* PES-12: "Event Report Source" - creates it if necessary
*/
public ID getPes12_EventReportSource() {
ID ret = null;
try {
Type t = this.getField(12, 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 Event Reported To (PES-13).
*/
public ID[] getEventReportedTo() {
ID[] ret = null;
try {
Type[] t = this.getField(13);
ret = new ID[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ID)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 Event Reported To (PES-13).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getEventReportedToReps() {
ID[] ret = null;
try {
Type[] t = this.getField(13);
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
* PES-13: "Event Reported To" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ID getEventReportedTo(int rep) {
ID ret = null;
try {
Type t = this.getField(13, rep);
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 a specific repetition of
* PES-13: "Event Reported To" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ID getPes13_EventReportedTo(int rep) {
ID ret = null;
try {
Type t = this.getField(13, rep);
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 a count of the current number of repetitions of Event Reported To (PES-13).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPes13_EventReportedToReps() {
ID[] ret = null;
try {
Type[] t = this.getField(13);
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
* PES-13: "Event Reported To" 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 ID insertEventReportedTo(int rep) throws HL7Exception {
return (ID) super.insertRepetition(13, rep);
}
/**
* Inserts a repetition of
* PES-13: "Event Reported To" 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 ID insertPes13_EventReportedTo(int rep) throws HL7Exception {
return (ID) super.insertRepetition(13, rep);
}
/**
* Removes a repetition of
* PES-13: "Event Reported To" 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 ID removeEventReportedTo(int rep) throws HL7Exception {
return (ID) super.removeRepetition(13, rep);
}
/**
* Removes a repetition of
* PES-13: "Event Reported To" 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 ID removePes13_EventReportedTo(int rep) throws HL7Exception {
return (ID) super.removeRepetition(13, rep);
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new XON(getMessage());
case 1: return new XCN(getMessage());
case 2: return new XAD(getMessage());
case 3: return new XTN(getMessage());
case 4: return new EI(getMessage());
case 5: return new NM(getMessage());
case 6: return new FT(getMessage());
case 7: return new FT(getMessage());
case 8: return new TS(getMessage());
case 9: return new TS(getMessage());
case 10: return new ID(getMessage(), new Integer( 234 ));
case 11: return new ID(getMessage(), new Integer( 235 ));
case 12: return new ID(getMessage(), new Integer( 236 ));
default: return null;
}
}
}