ca.uhn.hl7v2.model.v24.segment.CDM Maven / Gradle / Ivy
/*
* This class is an auto-generated source file for a HAPI
* HL7 v2.x standard structure class.
*
* For more information, visit: http://hl7api.sourceforge.net/
*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.mozilla.org/MPL/
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
* specific language governing rights and limitations under the License.
*
* The Original Code is "[file_name]". Description:
* "[one_line_description]"
*
* The Initial Developer of the Original Code is University Health Network. Copyright (C)
* 2002. All Rights Reserved.
*
* Contributor(s): ______________________________________.
*
* Alternatively, the contents of this file may be used under the terms of the
* GNU General Public License (the "GPL"), in which case the provisions of the GPL are
* applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of the GPL and not to allow others to use your version
* of this file under the MPL, indicate your decision by deleting the provisions above
* and replace them with the notice and other provisions required by the GPL License.
* If you do not delete the provisions above, a recipient may use your version of
* this file under either the MPL or the GPL.
*
*/
package ca.uhn.hl7v2.model.v24.segment;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// import ca.uhn.hl7v2.model.v24.group.*;
import ca.uhn.hl7v2.model.v24.datatype.*;
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 CDM message segment (Charge Description Master).
* This segment has the following fields:
*
* - CDM-1: Primary Key Value - CDM (CE)
*
- CDM-2: Charge Code Alias (CE) optional repeating
*
- CDM-3: Charge Description Short (ST)
*
- CDM-4: Charge Description Long (ST) optional
*
- CDM-5: Description Override Indicator (IS) optional
*
- CDM-6: Exploding Charges (CE) optional repeating
*
- CDM-7: Procedure Code (CE) optional repeating
*
- CDM-8: Active/Inactive Flag (ID) optional
*
- CDM-9: Inventory Number (CE) optional repeating
*
- CDM-10: Resource Load (NM) optional
*
- CDM-11: Contract Number (CK) optional repeating
*
- CDM-12: Contract Organization (XON) optional repeating
*
- CDM-13: Room Fee Indicator (ID) optional
*
*/
@SuppressWarnings("unused")
public class CDM extends AbstractSegment {
/**
* Creates a new CDM segment
*/
public CDM(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Primary Key Value - CDM");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Charge Code Alias");
this.add(ST.class, true, 1, 20, new Object[]{ getMessage() }, "Charge Description Short");
this.add(ST.class, false, 1, 250, new Object[]{ getMessage() }, "Charge Description Long");
this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(268) }, "Description Override Indicator");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Exploding Charges");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Procedure Code");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(183) }, "Active/Inactive Flag");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Inventory Number");
this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "Resource Load");
this.add(CK.class, false, 0, 250, new Object[]{ getMessage() }, "Contract Number");
this.add(XON.class, false, 0, 250, new Object[]{ getMessage() }, "Contract Organization");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Room Fee Indicator");
} catch(HL7Exception e) {
LoggerFactory.getLogger(getClass()).error("Unexpected error creating CDM - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* CDM-1: "Primary Key Value - CDM" - creates it if necessary
*/
public CE getPrimaryKeyValueCDM() {
CE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* CDM-1: "Primary Key Value - CDM" - creates it if necessary
*/
public CE getCdm1_PrimaryKeyValueCDM() {
CE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Charge Code Alias (CDM-2).
*/
public CE[] getChargeCodeAlias() {
CE[] ret = null;
try {
Type[] t = this.getField(2);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Charge Code Alias (CDM-2).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getChargeCodeAliasReps() {
CE[] ret = null;
try {
Type[] t = this.getField(2);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* CDM-2: "Charge Code Alias" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getChargeCodeAlias(int rep) {
CE ret = null;
try {
Type t = this.getField(2, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* CDM-2: "Charge Code Alias" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getCdm2_ChargeCodeAlias(int rep) {
CE ret = null;
try {
Type t = this.getField(2, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Charge Code Alias (CDM-2).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getCdm2_ChargeCodeAliasReps() {
CE[] ret = null;
try {
Type[] t = this.getField(2);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* CDM-2: "Charge Code Alias" 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 insertChargeCodeAlias(int rep) throws HL7Exception {
return (CE) super.insertRepetition(2, rep);
}
/**
* Inserts a repetition of
* CDM-2: "Charge Code Alias" 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 insertCdm2_ChargeCodeAlias(int rep) throws HL7Exception {
return (CE) super.insertRepetition(2, rep);
}
/**
* Removes a repetition of
* CDM-2: "Charge Code Alias" 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 removeChargeCodeAlias(int rep) throws HL7Exception {
return (CE) super.removeRepetition(2, rep);
}
/**
* Removes a repetition of
* CDM-2: "Charge Code Alias" 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 removeCdm2_ChargeCodeAlias(int rep) throws HL7Exception {
return (CE) super.removeRepetition(2, rep);
}
/**
* Returns
* CDM-3: "Charge Description Short" - creates it if necessary
*/
public ST getChargeDescriptionShort() {
ST ret = null;
try {
Type t = this.getField(3, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* CDM-3: "Charge Description Short" - creates it if necessary
*/
public ST getCdm3_ChargeDescriptionShort() {
ST ret = null;
try {
Type t = this.getField(3, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* CDM-4: "Charge Description Long" - creates it if necessary
*/
public ST getChargeDescriptionLong() {
ST ret = null;
try {
Type t = this.getField(4, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* CDM-4: "Charge Description Long" - creates it if necessary
*/
public ST getCdm4_ChargeDescriptionLong() {
ST ret = null;
try {
Type t = this.getField(4, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* CDM-5: "Description Override Indicator" - creates it if necessary
*/
public IS getDescriptionOverrideIndicator() {
IS ret = null;
try {
Type t = this.getField(5, 0);
ret = (IS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* CDM-5: "Description Override Indicator" - creates it if necessary
*/
public IS getCdm5_DescriptionOverrideIndicator() {
IS ret = null;
try {
Type t = this.getField(5, 0);
ret = (IS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Exploding Charges (CDM-6).
*/
public CE[] getExplodingCharges() {
CE[] ret = null;
try {
Type[] t = this.getField(6);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Exploding Charges (CDM-6).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getExplodingChargesReps() {
CE[] ret = null;
try {
Type[] t = this.getField(6);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* CDM-6: "Exploding Charges" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getExplodingCharges(int rep) {
CE ret = null;
try {
Type t = this.getField(6, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* CDM-6: "Exploding Charges" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getCdm6_ExplodingCharges(int rep) {
CE ret = null;
try {
Type t = this.getField(6, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Exploding Charges (CDM-6).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getCdm6_ExplodingChargesReps() {
CE[] ret = null;
try {
Type[] t = this.getField(6);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* CDM-6: "Exploding Charges" 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 insertExplodingCharges(int rep) throws HL7Exception {
return (CE) super.insertRepetition(6, rep);
}
/**
* Inserts a repetition of
* CDM-6: "Exploding Charges" 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 insertCdm6_ExplodingCharges(int rep) throws HL7Exception {
return (CE) super.insertRepetition(6, rep);
}
/**
* Removes a repetition of
* CDM-6: "Exploding Charges" 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 removeExplodingCharges(int rep) throws HL7Exception {
return (CE) super.removeRepetition(6, rep);
}
/**
* Removes a repetition of
* CDM-6: "Exploding Charges" 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 removeCdm6_ExplodingCharges(int rep) throws HL7Exception {
return (CE) super.removeRepetition(6, rep);
}
/**
* Returns all repetitions of Procedure Code (CDM-7).
*/
public CE[] getProcedureCode() {
CE[] ret = null;
try {
Type[] t = this.getField(7);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Procedure Code (CDM-7).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getProcedureCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(7);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* CDM-7: "Procedure Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getProcedureCode(int rep) {
CE ret = null;
try {
Type t = this.getField(7, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* CDM-7: "Procedure Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getCdm7_ProcedureCode(int rep) {
CE ret = null;
try {
Type t = this.getField(7, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Procedure Code (CDM-7).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getCdm7_ProcedureCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(7);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* CDM-7: "Procedure 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 CE insertProcedureCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(7, rep);
}
/**
* Inserts a repetition of
* CDM-7: "Procedure 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 CE insertCdm7_ProcedureCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(7, rep);
}
/**
* Removes a repetition of
* CDM-7: "Procedure 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 CE removeProcedureCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(7, rep);
}
/**
* Removes a repetition of
* CDM-7: "Procedure 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 CE removeCdm7_ProcedureCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(7, rep);
}
/**
* Returns
* CDM-8: "Active/Inactive Flag" - creates it if necessary
*/
public ID getActiveInactiveFlag() {
ID ret = null;
try {
Type t = this.getField(8, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* CDM-8: "Active/Inactive Flag" - creates it if necessary
*/
public ID getCdm8_ActiveInactiveFlag() {
ID ret = null;
try {
Type t = this.getField(8, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Inventory Number (CDM-9).
*/
public CE[] getInventoryNumber() {
CE[] ret = null;
try {
Type[] t = this.getField(9);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Inventory Number (CDM-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getInventoryNumberReps() {
CE[] ret = null;
try {
Type[] t = this.getField(9);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* CDM-9: "Inventory Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getInventoryNumber(int rep) {
CE ret = null;
try {
Type t = this.getField(9, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* CDM-9: "Inventory Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getCdm9_InventoryNumber(int rep) {
CE ret = null;
try {
Type t = this.getField(9, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Inventory Number (CDM-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getCdm9_InventoryNumberReps() {
CE[] ret = null;
try {
Type[] t = this.getField(9);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* CDM-9: "Inventory 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 CE insertInventoryNumber(int rep) throws HL7Exception {
return (CE) super.insertRepetition(9, rep);
}
/**
* Inserts a repetition of
* CDM-9: "Inventory 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 CE insertCdm9_InventoryNumber(int rep) throws HL7Exception {
return (CE) super.insertRepetition(9, rep);
}
/**
* Removes a repetition of
* CDM-9: "Inventory 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 CE removeInventoryNumber(int rep) throws HL7Exception {
return (CE) super.removeRepetition(9, rep);
}
/**
* Removes a repetition of
* CDM-9: "Inventory 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 CE removeCdm9_InventoryNumber(int rep) throws HL7Exception {
return (CE) super.removeRepetition(9, rep);
}
/**
* Returns
* CDM-10: "Resource Load" - creates it if necessary
*/
public NM getResourceLoad() {
NM ret = null;
try {
Type t = this.getField(10, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* CDM-10: "Resource Load" - creates it if necessary
*/
public NM getCdm10_ResourceLoad() {
NM ret = null;
try {
Type t = this.getField(10, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Contract Number (CDM-11).
*/
public CK[] getContractNumber() {
CK[] ret = null;
try {
Type[] t = this.getField(11);
ret = new CK[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CK)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Contract Number (CDM-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getContractNumberReps() {
CK[] ret = null;
try {
Type[] t = this.getField(11);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* CDM-11: "Contract Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CK getContractNumber(int rep) {
CK ret = null;
try {
Type t = this.getField(11, rep);
ret = (CK)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* CDM-11: "Contract Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CK getCdm11_ContractNumber(int rep) {
CK ret = null;
try {
Type t = this.getField(11, rep);
ret = (CK)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Contract Number (CDM-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getCdm11_ContractNumberReps() {
CK[] ret = null;
try {
Type[] t = this.getField(11);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* CDM-11: "Contract 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 CK insertContractNumber(int rep) throws HL7Exception {
return (CK) super.insertRepetition(11, rep);
}
/**
* Inserts a repetition of
* CDM-11: "Contract 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 CK insertCdm11_ContractNumber(int rep) throws HL7Exception {
return (CK) super.insertRepetition(11, rep);
}
/**
* Removes a repetition of
* CDM-11: "Contract 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 CK removeContractNumber(int rep) throws HL7Exception {
return (CK) super.removeRepetition(11, rep);
}
/**
* Removes a repetition of
* CDM-11: "Contract 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 CK removeCdm11_ContractNumber(int rep) throws HL7Exception {
return (CK) super.removeRepetition(11, rep);
}
/**
* Returns all repetitions of Contract Organization (CDM-12).
*/
public XON[] getContractOrganization() {
XON[] ret = null;
try {
Type[] t = this.getField(12);
ret = new XON[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (XON)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Contract Organization (CDM-12).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getContractOrganizationReps() {
XON[] ret = null;
try {
Type[] t = this.getField(12);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* CDM-12: "Contract Organization" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XON getContractOrganization(int rep) {
XON ret = null;
try {
Type t = this.getField(12, rep);
ret = (XON)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* CDM-12: "Contract Organization" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XON getCdm12_ContractOrganization(int rep) {
XON ret = null;
try {
Type t = this.getField(12, rep);
ret = (XON)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Contract Organization (CDM-12).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getCdm12_ContractOrganizationReps() {
XON[] ret = null;
try {
Type[] t = this.getField(12);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* CDM-12: "Contract Organization" 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 XON insertContractOrganization(int rep) throws HL7Exception {
return (XON) super.insertRepetition(12, rep);
}
/**
* Inserts a repetition of
* CDM-12: "Contract Organization" 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 XON insertCdm12_ContractOrganization(int rep) throws HL7Exception {
return (XON) super.insertRepetition(12, rep);
}
/**
* Removes a repetition of
* CDM-12: "Contract Organization" 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 XON removeContractOrganization(int rep) throws HL7Exception {
return (XON) super.removeRepetition(12, rep);
}
/**
* Removes a repetition of
* CDM-12: "Contract Organization" 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 XON removeCdm12_ContractOrganization(int rep) throws HL7Exception {
return (XON) super.removeRepetition(12, rep);
}
/**
* Returns
* CDM-13: "Room Fee Indicator" - creates it if necessary
*/
public ID getRoomFeeIndicator() {
ID ret = null;
try {
Type t = this.getField(13, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* CDM-13: "Room Fee Indicator" - creates it if necessary
*/
public ID getCdm13_RoomFeeIndicator() {
ID ret = null;
try {
Type t = this.getField(13, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new CE(getMessage());
case 1: return new CE(getMessage());
case 2: return new ST(getMessage());
case 3: return new ST(getMessage());
case 4: return new IS(getMessage(), new Integer( 268 ));
case 5: return new CE(getMessage());
case 6: return new CE(getMessage());
case 7: return new ID(getMessage(), new Integer( 183 ));
case 8: return new CE(getMessage());
case 9: return new NM(getMessage());
case 10: return new CK(getMessage());
case 11: return new XON(getMessage());
case 12: return new ID(getMessage(), new Integer( 136 ));
default: return null;
}
}
}