ca.uhn.hl7v2.model.v26.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.v26.segment;
// import ca.uhn.hl7v2.model.v26.group.*;
import ca.uhn.hl7v2.model.v26.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 (CWE)
*
- INV-2: Substance Status (CWE) repeating
*
- INV-3: Substance Type (CWE) optional
*
- INV-4: Inventory Container Identifier (CWE) optional
*
- INV-5: Container Carrier Identifier (CWE) optional
*
- INV-6: Position on Carrier (CWE) 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 (CWE) optional
*
- INV-12: Expiration Date/Time (DTM) optional
*
- INV-13: First Used Date/Time (DTM) optional
*
- INV-14: On Board Stability Duration (TQ) optional
*
- INV-15: Test/Fluid Identifier(s) (CWE) optional repeating
*
- INV-16: Manufacturer Lot Number (ST) optional
*
- INV-17: Manufacturer Identifier (CWE) optional
*
- INV-18: Supplier Identifier (CWE) 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(CWE.class, true, 1, 705, new Object[]{ getMessage(), new Integer(451) }, "Substance Identifier");
this.add(CWE.class, true, 0, 705, new Object[]{ getMessage(), new Integer(383) }, "Substance Status");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(384) }, "Substance Type");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(9999) }, "Inventory Container Identifier");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(9999) }, "Container Carrier Identifier");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(9999) }, "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(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(9999) }, "Quantity Units");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Expiration Date/Time");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "First Used Date/Time");
this.add(TQ.class, false, 1, 0, new Object[]{ getMessage(), new Integer(0) }, "On Board Stability Duration");
this.add(CWE.class, false, 0, 705, new Object[]{ getMessage(), new Integer(9999) }, "Test/Fluid Identifier(s)");
this.add(ST.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Manufacturer Lot Number");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(385) }, "Manufacturer Identifier");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(386) }, "Supplier Identifier");
this.add(CQ.class, false, 1, 722, new Object[]{ getMessage(), new Integer(0) }, "On Board Stability Time");
this.add(CQ.class, false, 1, 722, 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 CWE getSubstanceIdentifier() {
CWE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CWE)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 CWE getInv1_SubstanceIdentifier() {
CWE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CWE)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 CWE[] getSubstanceStatus() {
CWE[] ret = null;
try {
Type[] t = this.getField(2);
ret = new CWE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CWE)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() {
CWE[] 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 CWE getSubstanceStatus(int rep) {
CWE ret = null;
try {
Type t = this.getField(2, rep);
ret = (CWE)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 CWE getInv2_SubstanceStatus(int rep) {
CWE ret = null;
try {
Type t = this.getField(2, rep);
ret = (CWE)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() {
CWE[] 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 CWE insertSubstanceStatus(int rep) throws HL7Exception {
return (CWE) 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 CWE insertInv2_SubstanceStatus(int rep) throws HL7Exception {
return (CWE) 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 CWE removeSubstanceStatus(int rep) throws HL7Exception {
return (CWE) 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 CWE removeInv2_SubstanceStatus(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(2, rep);
}
/**
* Returns
* INV-3: "Substance Type" - creates it if necessary
*/
public CWE getSubstanceType() {
CWE ret = null;
try {
Type t = this.getField(3, 0);
ret = (CWE)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 CWE getInv3_SubstanceType() {
CWE ret = null;
try {
Type t = this.getField(3, 0);
ret = (CWE)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 CWE getInventoryContainerIdentifier() {
CWE ret = null;
try {
Type t = this.getField(4, 0);
ret = (CWE)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 CWE getInv4_InventoryContainerIdentifier() {
CWE ret = null;
try {
Type t = this.getField(4, 0);
ret = (CWE)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 CWE getContainerCarrierIdentifier() {
CWE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CWE)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 CWE getInv5_ContainerCarrierIdentifier() {
CWE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CWE)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 CWE getPositionOnCarrier() {
CWE ret = null;
try {
Type t = this.getField(6, 0);
ret = (CWE)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 CWE getInv6_PositionOnCarrier() {
CWE ret = null;
try {
Type t = this.getField(6, 0);
ret = (CWE)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 CWE getQuantityUnits() {
CWE ret = null;
try {
Type t = this.getField(11, 0);
ret = (CWE)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 CWE getInv11_QuantityUnits() {
CWE ret = null;
try {
Type t = this.getField(11, 0);
ret = (CWE)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 DTM getExpirationDateTime() {
DTM ret = null;
try {
Type t = this.getField(12, 0);
ret = (DTM)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 DTM getInv12_ExpirationDateTime() {
DTM ret = null;
try {
Type t = this.getField(12, 0);
ret = (DTM)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 DTM getFirstUsedDateTime() {
DTM ret = null;
try {
Type t = this.getField(13, 0);
ret = (DTM)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 DTM getInv13_FirstUsedDateTime() {
DTM ret = null;
try {
Type t = this.getField(13, 0);
ret = (DTM)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 CWE[] getTestFluidIdentifierS() {
CWE[] ret = null;
try {
Type[] t = this.getField(15);
ret = new CWE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CWE)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() {
CWE[] 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 CWE getTestFluidIdentifierS(int rep) {
CWE ret = null;
try {
Type t = this.getField(15, rep);
ret = (CWE)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 CWE getInv15_TestFluidIdentifierS(int rep) {
CWE ret = null;
try {
Type t = this.getField(15, rep);
ret = (CWE)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() {
CWE[] 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 CWE insertTestFluidIdentifierS(int rep) throws HL7Exception {
return (CWE) 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 CWE insertInv15_TestFluidIdentifierS(int rep) throws HL7Exception {
return (CWE) 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 CWE removeTestFluidIdentifierS(int rep) throws HL7Exception {
return (CWE) 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 CWE removeInv15_TestFluidIdentifierS(int rep) throws HL7Exception {
return (CWE) 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 CWE getManufacturerIdentifier() {
CWE ret = null;
try {
Type t = this.getField(17, 0);
ret = (CWE)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 CWE getInv17_ManufacturerIdentifier() {
CWE ret = null;
try {
Type t = this.getField(17, 0);
ret = (CWE)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 CWE getSupplierIdentifier() {
CWE ret = null;
try {
Type t = this.getField(18, 0);
ret = (CWE)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 CWE getInv18_SupplierIdentifier() {
CWE ret = null;
try {
Type t = this.getField(18, 0);
ret = (CWE)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 CWE(getMessage());
case 1: return new CWE(getMessage());
case 2: return new CWE(getMessage());
case 3: return new CWE(getMessage());
case 4: return new CWE(getMessage());
case 5: return new CWE(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 CWE(getMessage());
case 11: return new DTM(getMessage());
case 12: return new DTM(getMessage());
case 13: return new TQ(getMessage());
case 14: return new CWE(getMessage());
case 15: return new ST(getMessage());
case 16: return new CWE(getMessage());
case 17: return new CWE(getMessage());
case 18: return new CQ(getMessage());
case 19: return new CQ(getMessage());
default: return null;
}
}
}