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

ca.uhn.hl7v2.model.v25.segment.OM7 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 OM7 message segment (Additional Basic Attributes). * This segment has the following fields:

*
    *
  • OM7-1: Sequence Number - Test/Observation Master File (NM) *
  • OM7-2: Universal Service Identifier (CE) *
  • OM7-3: Category Identifier (CE) optional repeating *
  • OM7-4: Category Description (TX) optional *
  • OM7-5: Category Synonym (ST) optional repeating *
  • OM7-6: Effective Test/Service Start Date/Time (TS) optional *
  • OM7-7: Effective Test/Service End Date/Time (TS) optional *
  • OM7-8: Test/Service Default Duration Quantity (NM) optional *
  • OM7-9: Test/Service Default Duration Units (CE) optional *
  • OM7-10: Test/Service Default Frequency (IS) optional *
  • OM7-11: Consent Indicator (ID) optional *
  • OM7-12: Consent Identifier (CE) optional *
  • OM7-13: Consent Effective Start Date/Time (TS) optional *
  • OM7-14: Consent Effective End Date/Time (TS) optional *
  • OM7-15: Consent Interval Quantity (NM) optional *
  • OM7-16: Consent Interval Units (CE) optional *
  • OM7-17: Consent Waiting Period Quantity (NM) optional *
  • OM7-18: Consent Waiting Period Units (CE) optional *
  • OM7-19: Effective Date/Time of Change (TS) optional *
  • OM7-20: Entered By (XCN) optional *
  • OM7-21: Orderable-at Location (PL) optional repeating *
  • OM7-22: Formulary Status (IS) optional *
  • OM7-23: Special Order Indicator (ID) optional *
  • OM7-24: Primary Key Value - CDM (CE) optional repeating *
*/ public class OM7 extends AbstractSegment { /** * Creates a new OM7 segment */ public OM7(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(NM.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Sequence Number - Test/Observation Master File"); this.add(CE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Universal Service Identifier"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(412) }, "Category Identifier"); this.add(TX.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Category Description"); this.add(ST.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Category Synonym"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Effective Test/Service Start Date/Time"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Effective Test/Service End Date/Time"); this.add(NM.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Test/Service Default Duration Quantity"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Test/Service Default Duration Units"); this.add(IS.class, false, 1, 60, new Object[]{ getMessage() }, "Test/Service Default Frequency"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Consent Indicator"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(413) }, "Consent Identifier"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Consent Effective Start Date/Time"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Consent Effective End Date/Time"); this.add(NM.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Consent Interval Quantity"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(414) }, "Consent Interval Units"); this.add(NM.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Consent Waiting Period Quantity"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(414) }, "Consent Waiting Period Units"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Effective Date/Time of Change"); this.add(XCN.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Entered By"); this.add(PL.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Orderable-at Location"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Formulary Status"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Special Order Indicator"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(132) }, "Primary Key Value - CDM"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating OM7 - this is probably a bug in the source code generator.", e); } } /** * Returns * OM7-1: "Sequence Number - Test/Observation Master File" - creates it if necessary */ public NM getSequenceNumberTestObservationMasterFile() { NM ret = null; try { Type t = this.getField(1, 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 * OM7-1: "Sequence Number - Test/Observation Master File" - creates it if necessary */ public NM getOm71_SequenceNumberTestObservationMasterFile() { NM ret = null; try { Type t = this.getField(1, 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 * OM7-2: "Universal Service Identifier" - creates it if necessary */ public CE getUniversalServiceIdentifier() { CE ret = null; try { Type t = this.getField(2, 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 * OM7-2: "Universal Service Identifier" - creates it if necessary */ public CE getOm72_UniversalServiceIdentifier() { CE ret = null; try { Type t = this.getField(2, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Category Identifier (OM7-3). */ public CE[] getCategoryIdentifier() { CE[] ret = null; try { Type[] t = this.getField(3); ret = new CE[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CE)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Category Identifier (OM7-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getCategoryIdentifierReps() { CE[] 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 * OM7-3: "Category Identifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getCategoryIdentifier(int rep) { CE ret = null; try { Type t = this.getField(3, rep); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * OM7-3: "Category Identifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getOm73_CategoryIdentifier(int rep) { CE ret = null; try { Type t = this.getField(3, rep); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Category Identifier (OM7-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOm73_CategoryIdentifierReps() { CE[] 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 * OM7-3: "Category Identifier" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertCategoryIdentifier(int rep) throws HL7Exception { return (CE) super.insertRepetition(3, rep); } /** * Inserts a repetition of * OM7-3: "Category Identifier" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertOm73_CategoryIdentifier(int rep) throws HL7Exception { return (CE) super.insertRepetition(3, rep); } /** * Removes a repetition of * OM7-3: "Category Identifier" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeCategoryIdentifier(int rep) throws HL7Exception { return (CE) super.removeRepetition(3, rep); } /** * Removes a repetition of * OM7-3: "Category Identifier" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeOm73_CategoryIdentifier(int rep) throws HL7Exception { return (CE) super.removeRepetition(3, rep); } /** * Returns * OM7-4: "Category Description" - creates it if necessary */ public TX getCategoryDescription() { TX ret = null; try { Type t = this.getField(4, 0); ret = (TX)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 * OM7-4: "Category Description" - creates it if necessary */ public TX getOm74_CategoryDescription() { TX ret = null; try { Type t = this.getField(4, 0); ret = (TX)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 Category Synonym (OM7-5). */ public ST[] getCategorySynonym() { ST[] ret = null; try { Type[] t = this.getField(5); 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 Category Synonym (OM7-5). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getCategorySynonymReps() { ST[] 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 * OM7-5: "Category Synonym" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getCategorySynonym(int rep) { ST ret = null; try { Type t = this.getField(5, 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 * OM7-5: "Category Synonym" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getOm75_CategorySynonym(int rep) { ST ret = null; try { Type t = this.getField(5, 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 Category Synonym (OM7-5). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOm75_CategorySynonymReps() { ST[] 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 * OM7-5: "Category Synonym" 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 insertCategorySynonym(int rep) throws HL7Exception { return (ST) super.insertRepetition(5, rep); } /** * Inserts a repetition of * OM7-5: "Category Synonym" 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 insertOm75_CategorySynonym(int rep) throws HL7Exception { return (ST) super.insertRepetition(5, rep); } /** * Removes a repetition of * OM7-5: "Category Synonym" 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 removeCategorySynonym(int rep) throws HL7Exception { return (ST) super.removeRepetition(5, rep); } /** * Removes a repetition of * OM7-5: "Category Synonym" 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 removeOm75_CategorySynonym(int rep) throws HL7Exception { return (ST) super.removeRepetition(5, rep); } /** * Returns * OM7-6: "Effective Test/Service Start Date/Time" - creates it if necessary */ public TS getEffectiveTestServiceStartDateTime() { TS ret = null; try { Type t = this.getField(6, 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 * OM7-6: "Effective Test/Service Start Date/Time" - creates it if necessary */ public TS getOm76_EffectiveTestServiceStartDateTime() { TS ret = null; try { Type t = this.getField(6, 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 * OM7-7: "Effective Test/Service End Date/Time" - creates it if necessary */ public TS getEffectiveTestServiceEndDateTime() { TS ret = null; try { Type t = this.getField(7, 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 * OM7-7: "Effective Test/Service End Date/Time" - creates it if necessary */ public TS getOm77_EffectiveTestServiceEndDateTime() { TS ret = null; try { Type t = this.getField(7, 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 * OM7-8: "Test/Service Default Duration Quantity" - creates it if necessary */ public NM getTestServiceDefaultDurationQuantity() { NM ret = null; try { Type t = this.getField(8, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * OM7-8: "Test/Service Default Duration Quantity" - creates it if necessary */ public NM getOm78_TestServiceDefaultDurationQuantity() { NM ret = null; try { Type t = this.getField(8, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * OM7-9: "Test/Service Default Duration Units" - creates it if necessary */ public CE getTestServiceDefaultDurationUnits() { CE ret = null; try { Type t = this.getField(9, 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 * OM7-9: "Test/Service Default Duration Units" - creates it if necessary */ public CE getOm79_TestServiceDefaultDurationUnits() { CE ret = null; try { Type t = this.getField(9, 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 * OM7-10: "Test/Service Default Frequency" - creates it if necessary */ public IS getTestServiceDefaultFrequency() { IS ret = null; try { Type t = this.getField(10, 0); ret = (IS)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 * OM7-10: "Test/Service Default Frequency" - creates it if necessary */ public IS getOm710_TestServiceDefaultFrequency() { IS ret = null; try { Type t = this.getField(10, 0); ret = (IS)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 * OM7-11: "Consent Indicator" - creates it if necessary */ public ID getConsentIndicator() { ID ret = null; try { Type t = this.getField(11, 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 * OM7-11: "Consent Indicator" - creates it if necessary */ public ID getOm711_ConsentIndicator() { ID ret = null; try { Type t = this.getField(11, 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 * OM7-12: "Consent Identifier" - creates it if necessary */ public CE getConsentIdentifier() { CE ret = null; try { Type t = this.getField(12, 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 * OM7-12: "Consent Identifier" - creates it if necessary */ public CE getOm712_ConsentIdentifier() { CE ret = null; try { Type t = this.getField(12, 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 * OM7-13: "Consent Effective Start Date/Time" - creates it if necessary */ public TS getConsentEffectiveStartDateTime() { TS ret = null; try { Type t = this.getField(13, 0); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * OM7-13: "Consent Effective Start Date/Time" - creates it if necessary */ public TS getOm713_ConsentEffectiveStartDateTime() { TS ret = null; try { Type t = this.getField(13, 0); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * OM7-14: "Consent Effective End Date/Time" - creates it if necessary */ public TS getConsentEffectiveEndDateTime() { TS ret = null; try { Type t = this.getField(14, 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 * OM7-14: "Consent Effective End Date/Time" - creates it if necessary */ public TS getOm714_ConsentEffectiveEndDateTime() { TS ret = null; try { Type t = this.getField(14, 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 * OM7-15: "Consent Interval Quantity" - creates it if necessary */ public NM getConsentIntervalQuantity() { NM ret = null; try { Type t = this.getField(15, 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 * OM7-15: "Consent Interval Quantity" - creates it if necessary */ public NM getOm715_ConsentIntervalQuantity() { NM ret = null; try { Type t = this.getField(15, 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 * OM7-16: "Consent Interval Units" - creates it if necessary */ public CE getConsentIntervalUnits() { 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 * OM7-16: "Consent Interval Units" - creates it if necessary */ public CE getOm716_ConsentIntervalUnits() { 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 * OM7-17: "Consent Waiting Period Quantity" - creates it if necessary */ public NM getConsentWaitingPeriodQuantity() { NM ret = null; try { Type t = this.getField(17, 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 * OM7-17: "Consent Waiting Period Quantity" - creates it if necessary */ public NM getOm717_ConsentWaitingPeriodQuantity() { NM ret = null; try { Type t = this.getField(17, 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 * OM7-18: "Consent Waiting Period Units" - creates it if necessary */ public CE getConsentWaitingPeriodUnits() { 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 * OM7-18: "Consent Waiting Period Units" - creates it if necessary */ public CE getOm718_ConsentWaitingPeriodUnits() { 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 * OM7-19: "Effective Date/Time of Change" - creates it if necessary */ public TS getEffectiveDateTimeOfChange() { 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 * OM7-19: "Effective Date/Time of Change" - creates it if necessary */ public TS getOm719_EffectiveDateTimeOfChange() { 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 * OM7-20: "Entered By" - creates it if necessary */ public XCN getEnteredBy() { XCN ret = null; try { Type t = this.getField(20, 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 * OM7-20: "Entered By" - creates it if necessary */ public XCN getOm720_EnteredBy() { XCN ret = null; try { Type t = this.getField(20, 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 Orderable-at Location (OM7-21). */ public PL[] getOrderableAtLocation() { PL[] ret = null; try { Type[] t = this.getField(21); ret = new PL[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (PL)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 Orderable-at Location (OM7-21). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOrderableAtLocationReps() { PL[] 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 * OM7-21: "Orderable-at Location" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public PL getOrderableAtLocation(int rep) { PL ret = null; try { Type t = this.getField(21, rep); 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 a specific repetition of * OM7-21: "Orderable-at Location" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public PL getOm721_OrderableAtLocation(int rep) { PL ret = null; try { Type t = this.getField(21, rep); 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 a count of the current number of repetitions of Orderable-at Location (OM7-21). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOm721_OrderableAtLocationReps() { PL[] 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 * OM7-21: "Orderable-at Location" 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 PL insertOrderableAtLocation(int rep) throws HL7Exception { return (PL) super.insertRepetition(21, rep); } /** * Inserts a repetition of * OM7-21: "Orderable-at Location" 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 PL insertOm721_OrderableAtLocation(int rep) throws HL7Exception { return (PL) super.insertRepetition(21, rep); } /** * Removes a repetition of * OM7-21: "Orderable-at Location" 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 PL removeOrderableAtLocation(int rep) throws HL7Exception { return (PL) super.removeRepetition(21, rep); } /** * Removes a repetition of * OM7-21: "Orderable-at Location" 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 PL removeOm721_OrderableAtLocation(int rep) throws HL7Exception { return (PL) super.removeRepetition(21, rep); } /** * Returns * OM7-22: "Formulary Status" - creates it if necessary */ public IS getFormularyStatus() { IS ret = null; try { Type t = this.getField(22, 0); ret = (IS)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 * OM7-22: "Formulary Status" - creates it if necessary */ public IS getOm722_FormularyStatus() { IS ret = null; try { Type t = this.getField(22, 0); ret = (IS)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 * OM7-23: "Special Order Indicator" - creates it if necessary */ public ID getSpecialOrderIndicator() { ID ret = null; try { Type t = this.getField(23, 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 * OM7-23: "Special Order Indicator" - creates it if necessary */ public ID getOm723_SpecialOrderIndicator() { ID ret = null; try { Type t = this.getField(23, 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 Primary Key Value - CDM (OM7-24). */ public CE[] getPrimaryKeyValueCDM() { CE[] ret = null; try { Type[] t = this.getField(24); ret = new CE[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CE)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Primary Key Value - CDM (OM7-24). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPrimaryKeyValueCDMReps() { CE[] 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 * OM7-24: "Primary Key Value - CDM" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getPrimaryKeyValueCDM(int rep) { CE ret = null; try { Type t = this.getField(24, rep); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * OM7-24: "Primary Key Value - CDM" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getOm724_PrimaryKeyValueCDM(int rep) { CE ret = null; try { Type t = this.getField(24, rep); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Primary Key Value - CDM (OM7-24). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOm724_PrimaryKeyValueCDMReps() { CE[] 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 * OM7-24: "Primary Key Value - CDM" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertPrimaryKeyValueCDM(int rep) throws HL7Exception { return (CE) super.insertRepetition(24, rep); } /** * Inserts a repetition of * OM7-24: "Primary Key Value - CDM" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertOm724_PrimaryKeyValueCDM(int rep) throws HL7Exception { return (CE) super.insertRepetition(24, rep); } /** * Removes a repetition of * OM7-24: "Primary Key Value - CDM" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removePrimaryKeyValueCDM(int rep) throws HL7Exception { return (CE) super.removeRepetition(24, rep); } /** * Removes a repetition of * OM7-24: "Primary Key Value - CDM" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeOm724_PrimaryKeyValueCDM(int rep) throws HL7Exception { return (CE) super.removeRepetition(24, rep); } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new NM(getMessage()); case 1: return new CE(getMessage()); case 2: return new CE(getMessage()); case 3: return new TX(getMessage()); case 4: return new ST(getMessage()); case 5: return new TS(getMessage()); case 6: return new TS(getMessage()); case 7: return new NM(getMessage()); case 8: return new CE(getMessage()); case 9: return new IS(getMessage(), new Integer( 335 )); case 10: return new ID(getMessage(), new Integer( 136 )); case 11: return new CE(getMessage()); case 12: return new TS(getMessage()); case 13: return new TS(getMessage()); case 14: return new NM(getMessage()); case 15: return new CE(getMessage()); case 16: return new NM(getMessage()); case 17: return new CE(getMessage()); case 18: return new TS(getMessage()); case 19: return new XCN(getMessage()); case 20: return new PL(getMessage()); case 21: return new IS(getMessage(), new Integer( 473 )); case 22: return new ID(getMessage(), new Integer( 136 )); case 23: return new CE(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy