All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.hl7v2.model.v25.segment.SPM Maven / Gradle / Ivy

There is a newer version: 2.3
Show newest version
/*
 * 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 SPM message segment (Specimen). * This segment has the following fields:

*
    *
  • SPM-1: Set ID _ SPM (SI) optional *
  • SPM-2: Specimen ID (EIP) optional *
  • SPM-3: Specimen Parent IDs (EIP) optional repeating *
  • SPM-4: Specimen Type (CWE) *
  • SPM-5: Specimen Type Modifier (CWE) optional repeating *
  • SPM-6: Specimen Additives (CWE) optional repeating *
  • SPM-7: Specimen Collection Method (CWE) optional *
  • SPM-8: Specimen Source Site (CWE) optional *
  • SPM-9: Specimen Source Site Modifier (CWE) optional repeating *
  • SPM-10: Specimen Collection Site (CWE) optional *
  • SPM-11: Specimen Role (CWE) optional repeating *
  • SPM-12: Specimen Collection Amount (CQ) optional *
  • SPM-13: Grouped Specimen Count (NM) optional *
  • SPM-14: Specimen Description (ST) optional repeating *
  • SPM-15: Specimen Handling Code (CWE) optional repeating *
  • SPM-16: Specimen Risk Code (CWE) optional repeating *
  • SPM-17: Specimen Collection Date/Time (DR) optional *
  • SPM-18: Specimen Received Date/Time (TS) optional *
  • SPM-19: Specimen Expiration Date/Time (TS) optional *
  • SPM-20: Specimen Availability (ID) optional *
  • SPM-21: Specimen Reject Reason (CWE) optional repeating *
  • SPM-22: Specimen Quality (CWE) optional *
  • SPM-23: Specimen Appropriateness (CWE) optional *
  • SPM-24: Specimen Condition (CWE) optional repeating *
  • SPM-25: Specimen Current Quantity (CQ) optional *
  • SPM-26: Number of Specimen Containers (NM) optional *
  • SPM-27: Container Type (CWE) optional *
  • SPM-28: Container Condition (CWE) optional *
  • SPM-29: Specimen Child Role (CWE) optional *
*/ public class SPM extends AbstractSegment { /** * Creates a new SPM segment */ public SPM(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(SI.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID _ SPM"); this.add(EIP.class, false, 1, 80, new Object[]{ getMessage(), new Integer(0) }, "Specimen ID"); this.add(EIP.class, false, 0, 80, new Object[]{ getMessage(), new Integer(0) }, "Specimen Parent IDs"); this.add(CWE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(487) }, "Specimen Type"); this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(541) }, "Specimen Type Modifier"); this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(371) }, "Specimen Additives"); this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(488) }, "Specimen Collection Method"); this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Specimen Source Site"); this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(542) }, "Specimen Source Site Modifier"); this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(543) }, "Specimen Collection Site"); this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(369) }, "Specimen Role"); this.add(CQ.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Specimen Collection Amount"); this.add(NM.class, false, 1, 6, new Object[]{ getMessage(), new Integer(0) }, "Grouped Specimen Count"); this.add(ST.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Specimen Description"); this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(376) }, "Specimen Handling Code"); this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(489) }, "Specimen Risk Code"); this.add(DR.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Specimen Collection Date/Time"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Specimen Received Date/Time"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Specimen Expiration Date/Time"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Specimen Availability"); this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(490) }, "Specimen Reject Reason"); this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(491) }, "Specimen Quality"); this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(492) }, "Specimen Appropriateness"); this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(493) }, "Specimen Condition"); this.add(CQ.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Specimen Current Quantity"); this.add(NM.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Number of Specimen Containers"); this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Container Type"); this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(544) }, "Container Condition"); this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(494) }, "Specimen Child Role"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating SPM - this is probably a bug in the source code generator.", e); } } /** * Returns * SPM-1: "Set ID _ SPM" - creates it if necessary */ public SI getSetIDSPM() { SI ret = null; try { Type t = this.getField(1, 0); ret = (SI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * SPM-1: "Set ID _ SPM" - creates it if necessary */ public SI getSpm1_SetIDSPM() { SI ret = null; try { Type t = this.getField(1, 0); ret = (SI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * SPM-2: "Specimen ID" - creates it if necessary */ public EIP getSpecimenID() { EIP ret = null; try { Type t = this.getField(2, 0); ret = (EIP)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 * SPM-2: "Specimen ID" - creates it if necessary */ public EIP getSpm2_SpecimenID() { EIP ret = null; try { Type t = this.getField(2, 0); ret = (EIP)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 Specimen Parent IDs (SPM-3). */ public EIP[] getSpecimenParentIDs() { EIP[] ret = null; try { Type[] t = this.getField(3); ret = new EIP[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (EIP)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 Specimen Parent IDs (SPM-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenParentIDsReps() { EIP[] 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 * SPM-3: "Specimen Parent IDs" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public EIP getSpecimenParentIDs(int rep) { EIP ret = null; try { Type t = this.getField(3, rep); ret = (EIP)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 * SPM-3: "Specimen Parent IDs" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public EIP getSpm3_SpecimenParentIDs(int rep) { EIP ret = null; try { Type t = this.getField(3, rep); ret = (EIP)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 Specimen Parent IDs (SPM-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm3_SpecimenParentIDsReps() { EIP[] 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 * SPM-3: "Specimen Parent IDs" 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 EIP insertSpecimenParentIDs(int rep) throws HL7Exception { return (EIP) super.insertRepetition(3, rep); } /** * Inserts a repetition of * SPM-3: "Specimen Parent IDs" 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 EIP insertSpm3_SpecimenParentIDs(int rep) throws HL7Exception { return (EIP) super.insertRepetition(3, rep); } /** * Removes a repetition of * SPM-3: "Specimen Parent IDs" 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 EIP removeSpecimenParentIDs(int rep) throws HL7Exception { return (EIP) super.removeRepetition(3, rep); } /** * Removes a repetition of * SPM-3: "Specimen Parent IDs" 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 EIP removeSpm3_SpecimenParentIDs(int rep) throws HL7Exception { return (EIP) super.removeRepetition(3, rep); } /** * Returns * SPM-4: "Specimen Type" - creates it if necessary */ public CWE getSpecimenType() { 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 * SPM-4: "Specimen Type" - creates it if necessary */ public CWE getSpm4_SpecimenType() { 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 all repetitions of Specimen Type Modifier (SPM-5). */ public CWE[] getSpecimenTypeModifier() { CWE[] ret = null; try { Type[] t = this.getField(5); 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 Specimen Type Modifier (SPM-5). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenTypeModifierReps() { CWE[] ret = null; try { Type[] t = this.getField(5); 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 * SPM-5: "Specimen Type Modifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpecimenTypeModifier(int rep) { CWE ret = null; try { Type t = this.getField(5, 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 * SPM-5: "Specimen Type Modifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpm5_SpecimenTypeModifier(int rep) { CWE ret = null; try { Type t = this.getField(5, 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 Specimen Type Modifier (SPM-5). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm5_SpecimenTypeModifierReps() { CWE[] ret = null; try { Type[] t = this.getField(5); 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 * SPM-5: "Specimen Type Modifier" 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 insertSpecimenTypeModifier(int rep) throws HL7Exception { return (CWE) super.insertRepetition(5, rep); } /** * Inserts a repetition of * SPM-5: "Specimen Type Modifier" 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 insertSpm5_SpecimenTypeModifier(int rep) throws HL7Exception { return (CWE) super.insertRepetition(5, rep); } /** * Removes a repetition of * SPM-5: "Specimen Type Modifier" 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 removeSpecimenTypeModifier(int rep) throws HL7Exception { return (CWE) super.removeRepetition(5, rep); } /** * Removes a repetition of * SPM-5: "Specimen Type Modifier" 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 removeSpm5_SpecimenTypeModifier(int rep) throws HL7Exception { return (CWE) super.removeRepetition(5, rep); } /** * Returns all repetitions of Specimen Additives (SPM-6). */ public CWE[] getSpecimenAdditives() { CWE[] ret = null; try { Type[] t = this.getField(6); 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 Specimen Additives (SPM-6). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenAdditivesReps() { CWE[] ret = null; try { Type[] t = this.getField(6); 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 * SPM-6: "Specimen Additives" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpecimenAdditives(int rep) { CWE ret = null; try { Type t = this.getField(6, 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 * SPM-6: "Specimen Additives" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpm6_SpecimenAdditives(int rep) { CWE ret = null; try { Type t = this.getField(6, 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 Specimen Additives (SPM-6). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm6_SpecimenAdditivesReps() { CWE[] ret = null; try { Type[] t = this.getField(6); 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 * SPM-6: "Specimen Additives" 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 insertSpecimenAdditives(int rep) throws HL7Exception { return (CWE) super.insertRepetition(6, rep); } /** * Inserts a repetition of * SPM-6: "Specimen Additives" 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 insertSpm6_SpecimenAdditives(int rep) throws HL7Exception { return (CWE) super.insertRepetition(6, rep); } /** * Removes a repetition of * SPM-6: "Specimen Additives" 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 removeSpecimenAdditives(int rep) throws HL7Exception { return (CWE) super.removeRepetition(6, rep); } /** * Removes a repetition of * SPM-6: "Specimen Additives" 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 removeSpm6_SpecimenAdditives(int rep) throws HL7Exception { return (CWE) super.removeRepetition(6, rep); } /** * Returns * SPM-7: "Specimen Collection Method" - creates it if necessary */ public CWE getSpecimenCollectionMethod() { CWE ret = null; try { Type t = this.getField(7, 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 * SPM-7: "Specimen Collection Method" - creates it if necessary */ public CWE getSpm7_SpecimenCollectionMethod() { CWE ret = null; try { Type t = this.getField(7, 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 * SPM-8: "Specimen Source Site" - creates it if necessary */ public CWE getSpecimenSourceSite() { CWE ret = null; try { Type t = this.getField(8, 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 * SPM-8: "Specimen Source Site" - creates it if necessary */ public CWE getSpm8_SpecimenSourceSite() { CWE ret = null; try { Type t = this.getField(8, 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 Specimen Source Site Modifier (SPM-9). */ public CWE[] getSpecimenSourceSiteModifier() { CWE[] ret = null; try { Type[] t = this.getField(9); 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 Specimen Source Site Modifier (SPM-9). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenSourceSiteModifierReps() { CWE[] ret = null; try { Type[] t = this.getField(9); 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 * SPM-9: "Specimen Source Site Modifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpecimenSourceSiteModifier(int rep) { CWE ret = null; try { Type t = this.getField(9, 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 * SPM-9: "Specimen Source Site Modifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpm9_SpecimenSourceSiteModifier(int rep) { CWE ret = null; try { Type t = this.getField(9, 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 Specimen Source Site Modifier (SPM-9). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm9_SpecimenSourceSiteModifierReps() { CWE[] ret = null; try { Type[] t = this.getField(9); 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 * SPM-9: "Specimen Source Site Modifier" 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 insertSpecimenSourceSiteModifier(int rep) throws HL7Exception { return (CWE) super.insertRepetition(9, rep); } /** * Inserts a repetition of * SPM-9: "Specimen Source Site Modifier" 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 insertSpm9_SpecimenSourceSiteModifier(int rep) throws HL7Exception { return (CWE) super.insertRepetition(9, rep); } /** * Removes a repetition of * SPM-9: "Specimen Source Site Modifier" 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 removeSpecimenSourceSiteModifier(int rep) throws HL7Exception { return (CWE) super.removeRepetition(9, rep); } /** * Removes a repetition of * SPM-9: "Specimen Source Site Modifier" 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 removeSpm9_SpecimenSourceSiteModifier(int rep) throws HL7Exception { return (CWE) super.removeRepetition(9, rep); } /** * Returns * SPM-10: "Specimen Collection Site" - creates it if necessary */ public CWE getSpecimenCollectionSite() { CWE ret = null; try { Type t = this.getField(10, 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 * SPM-10: "Specimen Collection Site" - creates it if necessary */ public CWE getSpm10_SpecimenCollectionSite() { CWE ret = null; try { Type t = this.getField(10, 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 Specimen Role (SPM-11). */ public CWE[] getSpecimenRole() { CWE[] ret = null; try { Type[] t = this.getField(11); 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 Specimen Role (SPM-11). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenRoleReps() { CWE[] 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 * SPM-11: "Specimen Role" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpecimenRole(int rep) { CWE ret = null; try { Type t = this.getField(11, 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 * SPM-11: "Specimen Role" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpm11_SpecimenRole(int rep) { CWE ret = null; try { Type t = this.getField(11, 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 Specimen Role (SPM-11). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm11_SpecimenRoleReps() { CWE[] 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 * SPM-11: "Specimen Role" 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 insertSpecimenRole(int rep) throws HL7Exception { return (CWE) super.insertRepetition(11, rep); } /** * Inserts a repetition of * SPM-11: "Specimen Role" 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 insertSpm11_SpecimenRole(int rep) throws HL7Exception { return (CWE) super.insertRepetition(11, rep); } /** * Removes a repetition of * SPM-11: "Specimen Role" 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 removeSpecimenRole(int rep) throws HL7Exception { return (CWE) super.removeRepetition(11, rep); } /** * Removes a repetition of * SPM-11: "Specimen Role" 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 removeSpm11_SpecimenRole(int rep) throws HL7Exception { return (CWE) super.removeRepetition(11, rep); } /** * Returns * SPM-12: "Specimen Collection Amount" - creates it if necessary */ public CQ getSpecimenCollectionAmount() { CQ ret = null; try { Type t = this.getField(12, 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 * SPM-12: "Specimen Collection Amount" - creates it if necessary */ public CQ getSpm12_SpecimenCollectionAmount() { CQ ret = null; try { Type t = this.getField(12, 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 * SPM-13: "Grouped Specimen Count" - creates it if necessary */ public NM getGroupedSpecimenCount() { NM ret = null; try { Type t = this.getField(13, 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 * SPM-13: "Grouped Specimen Count" - creates it if necessary */ public NM getSpm13_GroupedSpecimenCount() { NM ret = null; try { Type t = this.getField(13, 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 Specimen Description (SPM-14). */ public ST[] getSpecimenDescription() { ST[] ret = null; try { Type[] t = this.getField(14); ret = new ST[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (ST)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 Specimen Description (SPM-14). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenDescriptionReps() { ST[] ret = null; try { Type[] t = this.getField(14); 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 * SPM-14: "Specimen Description" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getSpecimenDescription(int rep) { ST ret = null; try { Type t = this.getField(14, rep); 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 a specific repetition of * SPM-14: "Specimen Description" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getSpm14_SpecimenDescription(int rep) { ST ret = null; try { Type t = this.getField(14, rep); 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 a count of the current number of repetitions of Specimen Description (SPM-14). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm14_SpecimenDescriptionReps() { ST[] ret = null; try { Type[] t = this.getField(14); 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 * SPM-14: "Specimen 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 ST insertSpecimenDescription(int rep) throws HL7Exception { return (ST) super.insertRepetition(14, rep); } /** * Inserts a repetition of * SPM-14: "Specimen 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 ST insertSpm14_SpecimenDescription(int rep) throws HL7Exception { return (ST) super.insertRepetition(14, rep); } /** * Removes a repetition of * SPM-14: "Specimen 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 ST removeSpecimenDescription(int rep) throws HL7Exception { return (ST) super.removeRepetition(14, rep); } /** * Removes a repetition of * SPM-14: "Specimen 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 ST removeSpm14_SpecimenDescription(int rep) throws HL7Exception { return (ST) super.removeRepetition(14, rep); } /** * Returns all repetitions of Specimen Handling Code (SPM-15). */ public CWE[] getSpecimenHandlingCode() { 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 Specimen Handling Code (SPM-15). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenHandlingCodeReps() { 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 * SPM-15: "Specimen Handling Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpecimenHandlingCode(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 * SPM-15: "Specimen Handling Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpm15_SpecimenHandlingCode(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 Specimen Handling Code (SPM-15). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm15_SpecimenHandlingCodeReps() { 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 * SPM-15: "Specimen Handling Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CWE insertSpecimenHandlingCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(15, rep); } /** * Inserts a repetition of * SPM-15: "Specimen Handling Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CWE insertSpm15_SpecimenHandlingCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(15, rep); } /** * Removes a repetition of * SPM-15: "Specimen Handling Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CWE removeSpecimenHandlingCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(15, rep); } /** * Removes a repetition of * SPM-15: "Specimen Handling Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CWE removeSpm15_SpecimenHandlingCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(15, rep); } /** * Returns all repetitions of Specimen Risk Code (SPM-16). */ public CWE[] getSpecimenRiskCode() { CWE[] ret = null; try { Type[] t = this.getField(16); 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 Specimen Risk Code (SPM-16). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenRiskCodeReps() { CWE[] ret = null; try { Type[] t = this.getField(16); 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 * SPM-16: "Specimen Risk Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpecimenRiskCode(int rep) { CWE ret = null; try { Type t = this.getField(16, 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 * SPM-16: "Specimen Risk Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpm16_SpecimenRiskCode(int rep) { CWE ret = null; try { Type t = this.getField(16, 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 Specimen Risk Code (SPM-16). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm16_SpecimenRiskCodeReps() { CWE[] ret = null; try { Type[] t = this.getField(16); 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 * SPM-16: "Specimen Risk Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CWE insertSpecimenRiskCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(16, rep); } /** * Inserts a repetition of * SPM-16: "Specimen Risk Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CWE insertSpm16_SpecimenRiskCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(16, rep); } /** * Removes a repetition of * SPM-16: "Specimen Risk Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CWE removeSpecimenRiskCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(16, rep); } /** * Removes a repetition of * SPM-16: "Specimen Risk Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CWE removeSpm16_SpecimenRiskCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(16, rep); } /** * Returns * SPM-17: "Specimen Collection Date/Time" - creates it if necessary */ public DR getSpecimenCollectionDateTime() { DR ret = null; try { Type t = this.getField(17, 0); ret = (DR)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 * SPM-17: "Specimen Collection Date/Time" - creates it if necessary */ public DR getSpm17_SpecimenCollectionDateTime() { DR ret = null; try { Type t = this.getField(17, 0); ret = (DR)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 * SPM-18: "Specimen Received Date/Time" - creates it if necessary */ public TS getSpecimenReceivedDateTime() { TS ret = null; try { Type t = this.getField(18, 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 * SPM-18: "Specimen Received Date/Time" - creates it if necessary */ public TS getSpm18_SpecimenReceivedDateTime() { TS ret = null; try { Type t = this.getField(18, 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 * SPM-19: "Specimen Expiration Date/Time" - creates it if necessary */ public TS getSpecimenExpirationDateTime() { TS ret = null; try { Type t = this.getField(19, 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 * SPM-19: "Specimen Expiration Date/Time" - creates it if necessary */ public TS getSpm19_SpecimenExpirationDateTime() { TS ret = null; try { Type t = this.getField(19, 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 * SPM-20: "Specimen Availability" - creates it if necessary */ public ID getSpecimenAvailability() { ID ret = null; try { Type t = this.getField(20, 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 * SPM-20: "Specimen Availability" - creates it if necessary */ public ID getSpm20_SpecimenAvailability() { ID ret = null; try { Type t = this.getField(20, 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 Specimen Reject Reason (SPM-21). */ public CWE[] getSpecimenRejectReason() { CWE[] ret = null; try { Type[] t = this.getField(21); 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 Specimen Reject Reason (SPM-21). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenRejectReasonReps() { CWE[] ret = null; try { Type[] t = this.getField(21); 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 * SPM-21: "Specimen Reject Reason" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpecimenRejectReason(int rep) { CWE ret = null; try { Type t = this.getField(21, 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 * SPM-21: "Specimen Reject Reason" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpm21_SpecimenRejectReason(int rep) { CWE ret = null; try { Type t = this.getField(21, 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 Specimen Reject Reason (SPM-21). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm21_SpecimenRejectReasonReps() { CWE[] ret = null; try { Type[] t = this.getField(21); 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 * SPM-21: "Specimen Reject Reason" 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 insertSpecimenRejectReason(int rep) throws HL7Exception { return (CWE) super.insertRepetition(21, rep); } /** * Inserts a repetition of * SPM-21: "Specimen Reject Reason" 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 insertSpm21_SpecimenRejectReason(int rep) throws HL7Exception { return (CWE) super.insertRepetition(21, rep); } /** * Removes a repetition of * SPM-21: "Specimen Reject Reason" 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 removeSpecimenRejectReason(int rep) throws HL7Exception { return (CWE) super.removeRepetition(21, rep); } /** * Removes a repetition of * SPM-21: "Specimen Reject Reason" 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 removeSpm21_SpecimenRejectReason(int rep) throws HL7Exception { return (CWE) super.removeRepetition(21, rep); } /** * Returns * SPM-22: "Specimen Quality" - creates it if necessary */ public CWE getSpecimenQuality() { CWE ret = null; try { Type t = this.getField(22, 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 * SPM-22: "Specimen Quality" - creates it if necessary */ public CWE getSpm22_SpecimenQuality() { CWE ret = null; try { Type t = this.getField(22, 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 * SPM-23: "Specimen Appropriateness" - creates it if necessary */ public CWE getSpecimenAppropriateness() { CWE ret = null; try { Type t = this.getField(23, 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 * SPM-23: "Specimen Appropriateness" - creates it if necessary */ public CWE getSpm23_SpecimenAppropriateness() { CWE ret = null; try { Type t = this.getField(23, 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 Specimen Condition (SPM-24). */ public CWE[] getSpecimenCondition() { CWE[] ret = null; try { Type[] t = this.getField(24); 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 Specimen Condition (SPM-24). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpecimenConditionReps() { CWE[] ret = null; try { Type[] t = this.getField(24); 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 * SPM-24: "Specimen Condition" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpecimenCondition(int rep) { CWE ret = null; try { Type t = this.getField(24, 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 * SPM-24: "Specimen Condition" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getSpm24_SpecimenCondition(int rep) { CWE ret = null; try { Type t = this.getField(24, 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 Specimen Condition (SPM-24). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSpm24_SpecimenConditionReps() { CWE[] ret = null; try { Type[] t = this.getField(24); 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 * SPM-24: "Specimen Condition" 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 insertSpecimenCondition(int rep) throws HL7Exception { return (CWE) super.insertRepetition(24, rep); } /** * Inserts a repetition of * SPM-24: "Specimen Condition" 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 insertSpm24_SpecimenCondition(int rep) throws HL7Exception { return (CWE) super.insertRepetition(24, rep); } /** * Removes a repetition of * SPM-24: "Specimen Condition" 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 removeSpecimenCondition(int rep) throws HL7Exception { return (CWE) super.removeRepetition(24, rep); } /** * Removes a repetition of * SPM-24: "Specimen Condition" 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 removeSpm24_SpecimenCondition(int rep) throws HL7Exception { return (CWE) super.removeRepetition(24, rep); } /** * Returns * SPM-25: "Specimen Current Quantity" - creates it if necessary */ public CQ getSpecimenCurrentQuantity() { CQ ret = null; try { Type t = this.getField(25, 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 * SPM-25: "Specimen Current Quantity" - creates it if necessary */ public CQ getSpm25_SpecimenCurrentQuantity() { CQ ret = null; try { Type t = this.getField(25, 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 * SPM-26: "Number of Specimen Containers" - creates it if necessary */ public NM getNumberOfSpecimenContainers() { NM ret = null; try { Type t = this.getField(26, 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 * SPM-26: "Number of Specimen Containers" - creates it if necessary */ public NM getSpm26_NumberOfSpecimenContainers() { NM ret = null; try { Type t = this.getField(26, 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 * SPM-27: "Container Type" - creates it if necessary */ public CWE getContainerType() { CWE ret = null; try { Type t = this.getField(27, 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 * SPM-27: "Container Type" - creates it if necessary */ public CWE getSpm27_ContainerType() { CWE ret = null; try { Type t = this.getField(27, 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 * SPM-28: "Container Condition" - creates it if necessary */ public CWE getContainerCondition() { CWE ret = null; try { Type t = this.getField(28, 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 * SPM-28: "Container Condition" - creates it if necessary */ public CWE getSpm28_ContainerCondition() { CWE ret = null; try { Type t = this.getField(28, 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 * SPM-29: "Specimen Child Role" - creates it if necessary */ public CWE getSpecimenChildRole() { CWE ret = null; try { Type t = this.getField(29, 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 * SPM-29: "Specimen Child Role" - creates it if necessary */ public CWE getSpm29_SpecimenChildRole() { CWE ret = null; try { Type t = this.getField(29, 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; } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new SI(getMessage()); case 1: return new EIP(getMessage()); case 2: return new EIP(getMessage()); case 3: return new CWE(getMessage()); case 4: return new CWE(getMessage()); case 5: return new CWE(getMessage()); case 6: return new CWE(getMessage()); case 7: return new CWE(getMessage()); case 8: return new CWE(getMessage()); case 9: return new CWE(getMessage()); case 10: return new CWE(getMessage()); case 11: return new CQ(getMessage()); case 12: return new NM(getMessage()); case 13: return new ST(getMessage()); case 14: return new CWE(getMessage()); case 15: return new CWE(getMessage()); case 16: return new DR(getMessage()); case 17: return new TS(getMessage()); case 18: return new TS(getMessage()); case 19: return new ID(getMessage(), new Integer( 136 )); case 20: return new CWE(getMessage()); case 21: return new CWE(getMessage()); case 22: return new CWE(getMessage()); case 23: return new CWE(getMessage()); case 24: return new CQ(getMessage()); case 25: return new NM(getMessage()); case 26: return new CWE(getMessage()); case 27: return new CWE(getMessage()); case 28: return new CWE(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy