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

ca.uhn.hl7v2.model.v23.segment.ORC 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.v23.segment;

// import ca.uhn.hl7v2.model.v23.group.*;
import ca.uhn.hl7v2.model.v23.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 ORC message segment (Common order segment). * This segment has the following fields:

*
    *
  • ORC-1: Order Control (ID) *
  • ORC-2: Placer Order Number (EI) optional repeating *
  • ORC-3: Filler Order Number (EI) optional *
  • ORC-4: Placer Group Number (EI) optional *
  • ORC-5: Order Status (ID) optional *
  • ORC-6: Response Flag (ID) optional *
  • ORC-7: Quantity/Timing (TQ) *
  • ORC-8: Parent Order (CM_EIP) optional *
  • ORC-9: Date/Time of Transaction (TS) optional *
  • ORC-10: Entered By (XCN) optional *
  • ORC-11: Verified By (XCN) optional *
  • ORC-12: Ordering Provider (XCN) optional repeating *
  • ORC-13: Enterer's Location (PL) optional *
  • ORC-14: Call Back Phone Number (TN) optional repeating *
  • ORC-15: Order Effective Date/Time (TS) optional *
  • ORC-16: Order Control Code Reason (CE) optional *
  • ORC-17: Entering Organization (CE) optional *
  • ORC-18: Entering Device (CE) optional *
  • ORC-19: Action By (XCN) optional *
*/ public class ORC extends AbstractSegment { /** * Creates a new ORC segment */ public ORC(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(ID.class, true, 1, 2, new Object[]{ getMessage() }, "Order Control"); this.add(EI.class, false, 0, 22, new Object[]{ getMessage(), new Integer(0) }, "Placer Order Number"); this.add(EI.class, false, 1, 22, new Object[]{ getMessage(), new Integer(0) }, "Filler Order Number"); this.add(EI.class, false, 1, 22, new Object[]{ getMessage(), new Integer(0) }, "Placer Group Number"); this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Order Status"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Response Flag"); this.add(TQ.class, true, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Quantity/Timing"); this.add(CM_EIP.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Parent Order"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date/Time of Transaction"); this.add(XCN.class, false, 1, 120, new Object[]{ getMessage(), new Integer(0) }, "Entered By"); this.add(XCN.class, false, 1, 120, new Object[]{ getMessage(), new Integer(0) }, "Verified By"); this.add(XCN.class, false, 0, 120, new Object[]{ getMessage(), new Integer(0) }, "Ordering Provider"); this.add(PL.class, false, 1, 80, new Object[]{ getMessage(), new Integer(0) }, "Enterer's Location"); this.add(TN.class, false, 2, 40, new Object[]{ getMessage(), new Integer(0) }, "Call Back Phone Number"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Order Effective Date/Time"); this.add(CE.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Order Control Code Reason"); this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Entering Organization"); this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Entering Device"); this.add(XCN.class, false, 1, 120, new Object[]{ getMessage(), new Integer(0) }, "Action By"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating ORC - this is probably a bug in the source code generator.", e); } } /** * Returns * ORC-1: "Order Control" - creates it if necessary */ public ID getOrderControl() { ID ret = null; try { Type t = this.getField(1, 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 * ORC-1: "Order Control" - creates it if necessary */ public ID getOrc1_OrderControl() { ID ret = null; try { Type t = this.getField(1, 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 Placer Order Number (ORC-2). */ public EI[] getPlacerOrderNumber() { EI[] ret = null; try { Type[] t = this.getField(2); ret = new EI[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (EI)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 Placer Order Number (ORC-2). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPlacerOrderNumberReps() { EI[] 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 * ORC-2: "Placer Order Number" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public EI getPlacerOrderNumber(int rep) { EI ret = null; try { Type t = this.getField(2, rep); ret = (EI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * ORC-2: "Placer Order Number" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public EI getOrc2_PlacerOrderNumber(int rep) { EI ret = null; try { Type t = this.getField(2, rep); ret = (EI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Placer Order Number (ORC-2). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOrc2_PlacerOrderNumberReps() { EI[] 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 * ORC-2: "Placer Order Number" 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 EI insertPlacerOrderNumber(int rep) throws HL7Exception { return (EI) super.insertRepetition(2, rep); } /** * Inserts a repetition of * ORC-2: "Placer Order Number" 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 EI insertOrc2_PlacerOrderNumber(int rep) throws HL7Exception { return (EI) super.insertRepetition(2, rep); } /** * Removes a repetition of * ORC-2: "Placer Order Number" 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 EI removePlacerOrderNumber(int rep) throws HL7Exception { return (EI) super.removeRepetition(2, rep); } /** * Removes a repetition of * ORC-2: "Placer Order Number" 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 EI removeOrc2_PlacerOrderNumber(int rep) throws HL7Exception { return (EI) super.removeRepetition(2, rep); } /** * Returns * ORC-3: "Filler Order Number" - creates it if necessary */ public EI getFillerOrderNumber() { EI ret = null; try { Type t = this.getField(3, 0); ret = (EI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-3: "Filler Order Number" - creates it if necessary */ public EI getOrc3_FillerOrderNumber() { EI ret = null; try { Type t = this.getField(3, 0); ret = (EI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-4: "Placer Group Number" - creates it if necessary */ public EI getPlacerGroupNumber() { EI ret = null; try { Type t = this.getField(4, 0); ret = (EI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-4: "Placer Group Number" - creates it if necessary */ public EI getOrc4_PlacerGroupNumber() { EI ret = null; try { Type t = this.getField(4, 0); ret = (EI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-5: "Order Status" - creates it if necessary */ public ID getOrderStatus() { ID ret = null; try { Type t = this.getField(5, 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 * ORC-5: "Order Status" - creates it if necessary */ public ID getOrc5_OrderStatus() { ID ret = null; try { Type t = this.getField(5, 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 * ORC-6: "Response Flag" - creates it if necessary */ public ID getResponseFlag() { ID ret = null; try { Type t = this.getField(6, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-6: "Response Flag" - creates it if necessary */ public ID getOrc6_ResponseFlag() { ID ret = null; try { Type t = this.getField(6, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-7: "Quantity/Timing" - creates it if necessary */ public TQ getQuantityTiming() { TQ ret = null; try { Type t = this.getField(7, 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 * ORC-7: "Quantity/Timing" - creates it if necessary */ public TQ getOrc7_QuantityTiming() { TQ ret = null; try { Type t = this.getField(7, 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 * ORC-8: "Parent Order" - creates it if necessary */ public CM_EIP getParentOrder() { CM_EIP ret = null; try { Type t = this.getField(8, 0); ret = (CM_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 * ORC-8: "Parent Order" - creates it if necessary */ public CM_EIP getOrc8_ParentOrder() { CM_EIP ret = null; try { Type t = this.getField(8, 0); ret = (CM_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 * ORC-9: "Date/Time of Transaction" - creates it if necessary */ public TS getDateTimeOfTransaction() { TS ret = null; try { Type t = this.getField(9, 0); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-9: "Date/Time of Transaction" - creates it if necessary */ public TS getOrc9_DateTimeOfTransaction() { TS ret = null; try { Type t = this.getField(9, 0); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-10: "Entered By" - creates it if necessary */ public XCN getEnteredBy() { XCN ret = null; try { Type t = this.getField(10, 0); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-10: "Entered By" - creates it if necessary */ public XCN getOrc10_EnteredBy() { XCN ret = null; try { Type t = this.getField(10, 0); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-11: "Verified By" - creates it if necessary */ public XCN getVerifiedBy() { XCN ret = null; try { Type t = this.getField(11, 0); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-11: "Verified By" - creates it if necessary */ public XCN getOrc11_VerifiedBy() { XCN ret = null; try { Type t = this.getField(11, 0); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Ordering Provider (ORC-12). */ public XCN[] getOrderingProvider() { XCN[] ret = null; try { Type[] t = this.getField(12); ret = new XCN[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XCN)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Ordering Provider (ORC-12). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOrderingProviderReps() { XCN[] ret = null; try { Type[] t = this.getField(12); 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 * ORC-12: "Ordering Provider" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getOrderingProvider(int rep) { XCN ret = null; try { Type t = this.getField(12, rep); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * ORC-12: "Ordering Provider" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getOrc12_OrderingProvider(int rep) { XCN ret = null; try { Type t = this.getField(12, rep); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Ordering Provider (ORC-12). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOrc12_OrderingProviderReps() { XCN[] ret = null; try { Type[] t = this.getField(12); 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 * ORC-12: "Ordering Provider" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN insertOrderingProvider(int rep) throws HL7Exception { return (XCN) super.insertRepetition(12, rep); } /** * Inserts a repetition of * ORC-12: "Ordering Provider" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN insertOrc12_OrderingProvider(int rep) throws HL7Exception { return (XCN) super.insertRepetition(12, rep); } /** * Removes a repetition of * ORC-12: "Ordering Provider" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN removeOrderingProvider(int rep) throws HL7Exception { return (XCN) super.removeRepetition(12, rep); } /** * Removes a repetition of * ORC-12: "Ordering Provider" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN removeOrc12_OrderingProvider(int rep) throws HL7Exception { return (XCN) super.removeRepetition(12, rep); } /** * Returns * ORC-13: "Enterer's Location" - creates it if necessary */ public PL getEntererSLocation() { PL ret = null; try { Type t = this.getField(13, 0); ret = (PL)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 * ORC-13: "Enterer's Location" - creates it if necessary */ public PL getOrc13_EntererSLocation() { PL ret = null; try { Type t = this.getField(13, 0); ret = (PL)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 Call Back Phone Number (ORC-14). */ public TN[] getCallBackPhoneNumber() { TN[] ret = null; try { Type[] t = this.getField(14); ret = new TN[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (TN)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 Call Back Phone Number (ORC-14). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getCallBackPhoneNumberReps() { TN[] 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 * ORC-14: "Call Back Phone Number" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public TN getCallBackPhoneNumber(int rep) { TN ret = null; try { Type t = this.getField(14, rep); ret = (TN)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 * ORC-14: "Call Back Phone Number" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public TN getOrc14_CallBackPhoneNumber(int rep) { TN ret = null; try { Type t = this.getField(14, rep); ret = (TN)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 Call Back Phone Number (ORC-14). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOrc14_CallBackPhoneNumberReps() { TN[] 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 * ORC-14: "Call Back Phone Number" 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 TN insertCallBackPhoneNumber(int rep) throws HL7Exception { return (TN) super.insertRepetition(14, rep); } /** * Inserts a repetition of * ORC-14: "Call Back Phone Number" 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 TN insertOrc14_CallBackPhoneNumber(int rep) throws HL7Exception { return (TN) super.insertRepetition(14, rep); } /** * Removes a repetition of * ORC-14: "Call Back Phone Number" 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 TN removeCallBackPhoneNumber(int rep) throws HL7Exception { return (TN) super.removeRepetition(14, rep); } /** * Removes a repetition of * ORC-14: "Call Back Phone Number" 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 TN removeOrc14_CallBackPhoneNumber(int rep) throws HL7Exception { return (TN) super.removeRepetition(14, rep); } /** * Returns * ORC-15: "Order Effective Date/Time" - creates it if necessary */ public TS getOrderEffectiveDateTime() { TS ret = null; try { Type t = this.getField(15, 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 * ORC-15: "Order Effective Date/Time" - creates it if necessary */ public TS getOrc15_OrderEffectiveDateTime() { TS ret = null; try { Type t = this.getField(15, 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 * ORC-16: "Order Control Code Reason" - creates it if necessary */ public CE getOrderControlCodeReason() { CE ret = null; try { Type t = this.getField(16, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-16: "Order Control Code Reason" - creates it if necessary */ public CE getOrc16_OrderControlCodeReason() { CE ret = null; try { Type t = this.getField(16, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-17: "Entering Organization" - creates it if necessary */ public CE getEnteringOrganization() { CE ret = null; try { Type t = this.getField(17, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-17: "Entering Organization" - creates it if necessary */ public CE getOrc17_EnteringOrganization() { CE ret = null; try { Type t = this.getField(17, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-18: "Entering Device" - creates it if necessary */ public CE getEnteringDevice() { CE ret = null; try { Type t = this.getField(18, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-18: "Entering Device" - creates it if necessary */ public CE getOrc18_EnteringDevice() { CE ret = null; try { Type t = this.getField(18, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-19: "Action By" - creates it if necessary */ public XCN getActionBy() { XCN ret = null; try { Type t = this.getField(19, 0); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * ORC-19: "Action By" - creates it if necessary */ public XCN getOrc19_ActionBy() { XCN ret = null; try { Type t = this.getField(19, 0); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new ID(getMessage(), new Integer( 119 )); case 1: return new EI(getMessage()); case 2: return new EI(getMessage()); case 3: return new EI(getMessage()); case 4: return new ID(getMessage(), new Integer( 38 )); case 5: return new ID(getMessage(), new Integer( 121 )); case 6: return new TQ(getMessage()); case 7: return new CM_EIP(getMessage()); case 8: return new TS(getMessage()); case 9: return new XCN(getMessage()); case 10: return new XCN(getMessage()); case 11: return new XCN(getMessage()); case 12: return new PL(getMessage()); case 13: return new TN(getMessage()); case 14: return new TS(getMessage()); case 15: return new CE(getMessage()); case 16: return new CE(getMessage()); case 17: return new CE(getMessage()); case 18: return new XCN(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy