ca.uhn.hl7v2.model.v25.segment.INV 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 INV message segment (Inventory Detail).
* This segment has the following fields:
*
* - INV-1: Substance Identifier (CE)
*
- INV-2: Substance Status (CE) repeating
*
- INV-3: Substance Type (CE) optional
*
- INV-4: Inventory Container Identifier (CE) optional
*
- INV-5: Container Carrier Identifier (CE) optional
*
- INV-6: Position on Carrier (CE) optional
*
- INV-7: Initial Quantity (NM) optional
*
- INV-8: Current Quantity (NM) optional
*
- INV-9: Available Quantity (NM) optional
*
- INV-10: Consumption Quantity (NM) optional
*
- INV-11: Quantity Units (CE) optional
*
- INV-12: Expiration Date/Time (TS) optional
*
- INV-13: First Used Date/Time (TS) optional
*
- INV-14: On Board Stability Duration (TQ) optional
*
- INV-15: Test/Fluid Identifier(s) (CE) optional repeating
*
- INV-16: Manufacturer Lot Number (ST) optional
*
- INV-17: Manufacturer Identifier (CE) optional
*
- INV-18: Supplier Identifier (CE) optional
*
- INV-19: On Board Stability Time (CQ) optional
*
- INV-20: Target Value (CQ) optional
*
*/
public class INV extends AbstractSegment {
/**
* Creates a new INV segment
*/
public INV(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(CE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(451) }, "Substance Identifier");
this.add(CE.class, true, 0, 250, new Object[]{ getMessage(), new Integer(383) }, "Substance Status");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(384) }, "Substance Type");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Inventory Container Identifier");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Container Carrier Identifier");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Position on Carrier");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Initial Quantity");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Current Quantity");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Available Quantity");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Consumption Quantity");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Quantity Units");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Expiration Date/Time");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "First Used Date/Time");
this.add(TQ.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "On Board Stability Duration");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Test/Fluid Identifier(s)");
this.add(ST.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Manufacturer Lot Number");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(385) }, "Manufacturer Identifier");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(386) }, "Supplier Identifier");
this.add(CQ.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "On Board Stability Time");
this.add(CQ.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Target Value");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating INV - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* INV-1: "Substance Identifier" - creates it if necessary
*/
public CE getSubstanceIdentifier() {
CE ret = null;
try {
Type t = this.getField(1, 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
* INV-1: "Substance Identifier" - creates it if necessary
*/
public CE getInv1_SubstanceIdentifier() {
CE ret = null;
try {
Type t = this.getField(1, 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 all repetitions of Substance Status (INV-2).
*/
public CE[] getSubstanceStatus() {
CE[] ret = null;
try {
Type[] t = this.getField(2);
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 Substance Status (INV-2).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSubstanceStatusReps() {
CE[] 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
* INV-2: "Substance Status" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getSubstanceStatus(int rep) {
CE ret = null;
try {
Type t = this.getField(2, 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
* INV-2: "Substance Status" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getInv2_SubstanceStatus(int rep) {
CE ret = null;
try {
Type t = this.getField(2, 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 Substance Status (INV-2).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getInv2_SubstanceStatusReps() {
CE[] 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
* INV-2: "Substance Status" 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 insertSubstanceStatus(int rep) throws HL7Exception {
return (CE) super.insertRepetition(2, rep);
}
/**
* Inserts a repetition of
* INV-2: "Substance Status" 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 insertInv2_SubstanceStatus(int rep) throws HL7Exception {
return (CE) super.insertRepetition(2, rep);
}
/**
* Removes a repetition of
* INV-2: "Substance Status" 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 removeSubstanceStatus(int rep) throws HL7Exception {
return (CE) super.removeRepetition(2, rep);
}
/**
* Removes a repetition of
* INV-2: "Substance Status" 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 removeInv2_SubstanceStatus(int rep) throws HL7Exception {
return (CE) super.removeRepetition(2, rep);
}
/**
* Returns
* INV-3: "Substance Type" - creates it if necessary
*/
public CE getSubstanceType() {
CE ret = null;
try {
Type t = this.getField(3, 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
* INV-3: "Substance Type" - creates it if necessary
*/
public CE getInv3_SubstanceType() {
CE ret = null;
try {
Type t = this.getField(3, 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
* INV-4: "Inventory Container Identifier" - creates it if necessary
*/
public CE getInventoryContainerIdentifier() {
CE ret = null;
try {
Type t = this.getField(4, 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
* INV-4: "Inventory Container Identifier" - creates it if necessary
*/
public CE getInv4_InventoryContainerIdentifier() {
CE ret = null;
try {
Type t = this.getField(4, 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
* INV-5: "Container Carrier Identifier" - creates it if necessary
*/
public CE getContainerCarrierIdentifier() {
CE ret = null;
try {
Type t = this.getField(5, 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
* INV-5: "Container Carrier Identifier" - creates it if necessary
*/
public CE getInv5_ContainerCarrierIdentifier() {
CE ret = null;
try {
Type t = this.getField(5, 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
* INV-6: "Position on Carrier" - creates it if necessary
*/
public CE getPositionOnCarrier() {
CE ret = null;
try {
Type t = this.getField(6, 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
* INV-6: "Position on Carrier" - creates it if necessary
*/
public CE getInv6_PositionOnCarrier() {
CE ret = null;
try {
Type t = this.getField(6, 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
* INV-7: "Initial Quantity" - creates it if necessary
*/
public NM getInitialQuantity() {
NM ret = null;
try {
Type t = this.getField(7, 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
* INV-7: "Initial Quantity" - creates it if necessary
*/
public NM getInv7_InitialQuantity() {
NM ret = null;
try {
Type t = this.getField(7, 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
* INV-8: "Current Quantity" - creates it if necessary
*/
public NM getCurrentQuantity() {
NM ret = null;
try {
Type t = this.getField(8, 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
* INV-8: "Current Quantity" - creates it if necessary
*/
public NM getInv8_CurrentQuantity() {
NM ret = null;
try {
Type t = this.getField(8, 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
* INV-9: "Available Quantity" - creates it if necessary
*/
public NM getAvailableQuantity() {
NM ret = null;
try {
Type t = this.getField(9, 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
* INV-9: "Available Quantity" - creates it if necessary
*/
public NM getInv9_AvailableQuantity() {
NM ret = null;
try {
Type t = this.getField(9, 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
* INV-10: "Consumption Quantity" - creates it if necessary
*/
public NM getConsumptionQuantity() {
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
* INV-10: "Consumption Quantity" - creates it if necessary
*/
public NM getInv10_ConsumptionQuantity() {
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
* INV-11: "Quantity Units" - creates it if necessary
*/
public CE getQuantityUnits() {
CE ret = null;
try {
Type t = this.getField(11, 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
* INV-11: "Quantity Units" - creates it if necessary
*/
public CE getInv11_QuantityUnits() {
CE ret = null;
try {
Type t = this.getField(11, 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
* INV-12: "Expiration Date/Time" - creates it if necessary
*/
public TS getExpirationDateTime() {
TS ret = null;
try {
Type t = this.getField(12, 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
* INV-12: "Expiration Date/Time" - creates it if necessary
*/
public TS getInv12_ExpirationDateTime() {
TS ret = null;
try {
Type t = this.getField(12, 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
* INV-13: "First Used Date/Time" - creates it if necessary
*/
public TS getFirstUsedDateTime() {
TS ret = null;
try {
Type t = this.getField(13, 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
* INV-13: "First Used Date/Time" - creates it if necessary
*/
public TS getInv13_FirstUsedDateTime() {
TS ret = null;
try {
Type t = this.getField(13, 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
* INV-14: "On Board Stability Duration" - creates it if necessary
*/
public TQ getOnBoardStabilityDuration() {
TQ ret = null;
try {
Type t = this.getField(14, 0);
ret = (TQ)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
* INV-14: "On Board Stability Duration" - creates it if necessary
*/
public TQ getInv14_OnBoardStabilityDuration() {
TQ ret = null;
try {
Type t = this.getField(14, 0);
ret = (TQ)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 Test/Fluid Identifier(s) (INV-15).
*/
public CE[] getTestFluidIdentifierS() {
CE[] ret = null;
try {
Type[] t = this.getField(15);
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 Test/Fluid Identifier(s) (INV-15).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getTestFluidIdentifierSReps() {
CE[] ret = null;
try {
Type[] t = this.getField(15);
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
* INV-15: "Test/Fluid Identifier(s)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getTestFluidIdentifierS(int rep) {
CE ret = null;
try {
Type t = this.getField(15, 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
* INV-15: "Test/Fluid Identifier(s)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getInv15_TestFluidIdentifierS(int rep) {
CE ret = null;
try {
Type t = this.getField(15, 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 Test/Fluid Identifier(s) (INV-15).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getInv15_TestFluidIdentifierSReps() {
CE[] ret = null;
try {
Type[] t = this.getField(15);
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
* INV-15: "Test/Fluid Identifier(s)" 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 insertTestFluidIdentifierS(int rep) throws HL7Exception {
return (CE) super.insertRepetition(15, rep);
}
/**
* Inserts a repetition of
* INV-15: "Test/Fluid Identifier(s)" 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 insertInv15_TestFluidIdentifierS(int rep) throws HL7Exception {
return (CE) super.insertRepetition(15, rep);
}
/**
* Removes a repetition of
* INV-15: "Test/Fluid Identifier(s)" 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 removeTestFluidIdentifierS(int rep) throws HL7Exception {
return (CE) super.removeRepetition(15, rep);
}
/**
* Removes a repetition of
* INV-15: "Test/Fluid Identifier(s)" 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 removeInv15_TestFluidIdentifierS(int rep) throws HL7Exception {
return (CE) super.removeRepetition(15, rep);
}
/**
* Returns
* INV-16: "Manufacturer Lot Number" - creates it if necessary
*/
public ST getManufacturerLotNumber() {
ST ret = null;
try {
Type t = this.getField(16, 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
* INV-16: "Manufacturer Lot Number" - creates it if necessary
*/
public ST getInv16_ManufacturerLotNumber() {
ST ret = null;
try {
Type t = this.getField(16, 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
* INV-17: "Manufacturer Identifier" - creates it if necessary
*/
public CE getManufacturerIdentifier() {
CE ret = null;
try {
Type t = this.getField(17, 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
* INV-17: "Manufacturer Identifier" - creates it if necessary
*/
public CE getInv17_ManufacturerIdentifier() {
CE ret = null;
try {
Type t = this.getField(17, 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
* INV-18: "Supplier Identifier" - creates it if necessary
*/
public CE getSupplierIdentifier() {
CE ret = null;
try {
Type t = this.getField(18, 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
* INV-18: "Supplier Identifier" - creates it if necessary
*/
public CE getInv18_SupplierIdentifier() {
CE ret = null;
try {
Type t = this.getField(18, 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
* INV-19: "On Board Stability Time" - creates it if necessary
*/
public CQ getOnBoardStabilityTime() {
CQ ret = null;
try {
Type t = this.getField(19, 0);
ret = (CQ)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
* INV-19: "On Board Stability Time" - creates it if necessary
*/
public CQ getInv19_OnBoardStabilityTime() {
CQ ret = null;
try {
Type t = this.getField(19, 0);
ret = (CQ)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
* INV-20: "Target Value" - creates it if necessary
*/
public CQ getTargetValue() {
CQ ret = null;
try {
Type t = this.getField(20, 0);
ret = (CQ)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
* INV-20: "Target Value" - creates it if necessary
*/
public CQ getInv20_TargetValue() {
CQ ret = null;
try {
Type t = this.getField(20, 0);
ret = (CQ)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 CE(getMessage());
case 1: return new CE(getMessage());
case 2: return new CE(getMessage());
case 3: return new CE(getMessage());
case 4: return new CE(getMessage());
case 5: return new CE(getMessage());
case 6: return new NM(getMessage());
case 7: return new NM(getMessage());
case 8: return new NM(getMessage());
case 9: return new NM(getMessage());
case 10: return new CE(getMessage());
case 11: return new TS(getMessage());
case 12: return new TS(getMessage());
case 13: return new TQ(getMessage());
case 14: return new CE(getMessage());
case 15: return new ST(getMessage());
case 16: return new CE(getMessage());
case 17: return new CE(getMessage());
case 18: return new CQ(getMessage());
case 19: return new CQ(getMessage());
default: return null;
}
}
}