ca.uhn.hl7v2.model.v24.segment.PR1 Maven / Gradle / Ivy
/*
* This class is an auto-generated source file for a HAPI
* HL7 v2.x standard structure class.
*
* For more information, visit: http://hl7api.sourceforge.net/
*/
package ca.uhn.hl7v2.model.v24.segment;
// import ca.uhn.hl7v2.model.v24.group.*;
import ca.uhn.hl7v2.model.v24.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 PR1 message segment (Procedures).
* This segment has the following fields:
*
* - PR1-1: Set ID - PR1 (SI)
*
- PR1-2: Procedure Coding Method (IS) optional
*
- PR1-3: Procedure Code (CE)
*
- PR1-4: Procedure Description (ST) optional
*
- PR1-5: Procedure Date/Time (TS)
*
- PR1-6: Procedure Functional Type (IS) optional
*
- PR1-7: Procedure Minutes (NM) optional
*
- PR1-8: Anesthesiologist (XCN) optional repeating
*
- PR1-9: Anesthesia Code (IS) optional
*
- PR1-10: Anesthesia Minutes (NM) optional
*
- PR1-11: Surgeon (XCN) optional repeating
*
- PR1-12: Procedure Practitioner (XCN) optional repeating
*
- PR1-13: Consent Code (CE) optional
*
- PR1-14: Procedure Priority (ID) optional
*
- PR1-15: Associated Diagnosis Code (CE) optional
*
- PR1-16: Procedure Code Modifier (CE) optional repeating
*
- PR1-17: Procedure DRG Type (IS) optional
*
- PR1-18: Tissue Type Code (CE) optional repeating
*
*/
public class PR1 extends AbstractSegment {
/**
* Creates a new PR1 segment
*/
public PR1(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(SI.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID - PR1");
this.add(IS.class, false, 1, 3, new Object[]{ getMessage() }, "Procedure Coding Method");
this.add(CE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(88) }, "Procedure Code");
this.add(ST.class, false, 1, 40, new Object[]{ getMessage(), new Integer(0) }, "Procedure Description");
this.add(TS.class, true, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Procedure Date/Time");
this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Procedure Functional Type");
this.add(NM.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Procedure Minutes");
this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(10) }, "Anesthesiologist");
this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Anesthesia Code");
this.add(NM.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Anesthesia Minutes");
this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(10) }, "Surgeon");
this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(10) }, "Procedure Practitioner");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(59) }, "Consent Code");
this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Procedure Priority");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(51) }, "Associated Diagnosis Code");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(340) }, "Procedure Code Modifier");
this.add(IS.class, false, 1, 20, new Object[]{ getMessage() }, "Procedure DRG Type");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(417) }, "Tissue Type Code");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating PR1 - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* PR1-1: "Set ID - PR1" - creates it if necessary
*/
public SI getSetIDPR1() {
SI ret = null;
try {
Type t = this.getField(1, 0);
ret = (SI)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* PR1-1: "Set ID - PR1" - creates it if necessary
*/
public SI getPr11_SetIDPR1() {
SI ret = null;
try {
Type t = this.getField(1, 0);
ret = (SI)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* PR1-2: "Procedure Coding Method" - creates it if necessary
*/
public IS getProcedureCodingMethod() {
IS ret = null;
try {
Type t = this.getField(2, 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
* PR1-2: "Procedure Coding Method" - creates it if necessary
*/
public IS getPr12_ProcedureCodingMethod() {
IS ret = null;
try {
Type t = this.getField(2, 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
* PR1-3: "Procedure Code" - creates it if necessary
*/
public CE getProcedureCode() {
CE ret = null;
try {
Type t = this.getField(3, 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
* PR1-3: "Procedure Code" - creates it if necessary
*/
public CE getPr13_ProcedureCode() {
CE ret = null;
try {
Type t = this.getField(3, 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
* PR1-4: "Procedure Description" - creates it if necessary
*/
public ST getProcedureDescription() {
ST ret = null;
try {
Type t = this.getField(4, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* PR1-4: "Procedure Description" - creates it if necessary
*/
public ST getPr14_ProcedureDescription() {
ST ret = null;
try {
Type t = this.getField(4, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* PR1-5: "Procedure Date/Time" - creates it if necessary
*/
public TS getProcedureDateTime() {
TS ret = null;
try {
Type t = this.getField(5, 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
* PR1-5: "Procedure Date/Time" - creates it if necessary
*/
public TS getPr15_ProcedureDateTime() {
TS ret = null;
try {
Type t = this.getField(5, 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
* PR1-6: "Procedure Functional Type" - creates it if necessary
*/
public IS getProcedureFunctionalType() {
IS ret = null;
try {
Type t = this.getField(6, 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
* PR1-6: "Procedure Functional Type" - creates it if necessary
*/
public IS getPr16_ProcedureFunctionalType() {
IS ret = null;
try {
Type t = this.getField(6, 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
* PR1-7: "Procedure Minutes" - creates it if necessary
*/
public NM getProcedureMinutes() {
NM ret = null;
try {
Type t = this.getField(7, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* PR1-7: "Procedure Minutes" - creates it if necessary
*/
public NM getPr17_ProcedureMinutes() {
NM ret = null;
try {
Type t = this.getField(7, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Anesthesiologist (PR1-8).
*/
public XCN[] getAnesthesiologist() {
XCN[] ret = null;
try {
Type[] t = this.getField(8);
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 Anesthesiologist (PR1-8).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getAnesthesiologistReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(8);
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
* PR1-8: "Anesthesiologist" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getAnesthesiologist(int rep) {
XCN ret = null;
try {
Type t = this.getField(8, 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
* PR1-8: "Anesthesiologist" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getPr18_Anesthesiologist(int rep) {
XCN ret = null;
try {
Type t = this.getField(8, 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 Anesthesiologist (PR1-8).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPr18_AnesthesiologistReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(8);
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
* PR1-8: "Anesthesiologist" 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 insertAnesthesiologist(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(8, rep);
}
/**
* Inserts a repetition of
* PR1-8: "Anesthesiologist" 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 insertPr18_Anesthesiologist(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(8, rep);
}
/**
* Removes a repetition of
* PR1-8: "Anesthesiologist" 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 removeAnesthesiologist(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(8, rep);
}
/**
* Removes a repetition of
* PR1-8: "Anesthesiologist" 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 removePr18_Anesthesiologist(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(8, rep);
}
/**
* Returns
* PR1-9: "Anesthesia Code" - creates it if necessary
*/
public IS getAnesthesiaCode() {
IS ret = null;
try {
Type t = this.getField(9, 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
* PR1-9: "Anesthesia Code" - creates it if necessary
*/
public IS getPr19_AnesthesiaCode() {
IS ret = null;
try {
Type t = this.getField(9, 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
* PR1-10: "Anesthesia Minutes" - creates it if necessary
*/
public NM getAnesthesiaMinutes() {
NM ret = null;
try {
Type t = this.getField(10, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* PR1-10: "Anesthesia Minutes" - creates it if necessary
*/
public NM getPr110_AnesthesiaMinutes() {
NM ret = null;
try {
Type t = this.getField(10, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Surgeon (PR1-11).
*/
public XCN[] getSurgeon() {
XCN[] ret = null;
try {
Type[] t = this.getField(11);
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 Surgeon (PR1-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSurgeonReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(11);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* PR1-11: "Surgeon" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getSurgeon(int rep) {
XCN ret = null;
try {
Type t = this.getField(11, 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
* PR1-11: "Surgeon" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getPr111_Surgeon(int rep) {
XCN ret = null;
try {
Type t = this.getField(11, 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 Surgeon (PR1-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPr111_SurgeonReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(11);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* PR1-11: "Surgeon" 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 insertSurgeon(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(11, rep);
}
/**
* Inserts a repetition of
* PR1-11: "Surgeon" 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 insertPr111_Surgeon(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(11, rep);
}
/**
* Removes a repetition of
* PR1-11: "Surgeon" 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 removeSurgeon(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(11, rep);
}
/**
* Removes a repetition of
* PR1-11: "Surgeon" 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 removePr111_Surgeon(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(11, rep);
}
/**
* Returns all repetitions of Procedure Practitioner (PR1-12).
*/
public XCN[] getProcedurePractitioner() {
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 Procedure Practitioner (PR1-12).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getProcedurePractitionerReps() {
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
* PR1-12: "Procedure Practitioner" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getProcedurePractitioner(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
* PR1-12: "Procedure Practitioner" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getPr112_ProcedurePractitioner(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 Procedure Practitioner (PR1-12).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPr112_ProcedurePractitionerReps() {
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
* PR1-12: "Procedure Practitioner" 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 insertProcedurePractitioner(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(12, rep);
}
/**
* Inserts a repetition of
* PR1-12: "Procedure Practitioner" 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 insertPr112_ProcedurePractitioner(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(12, rep);
}
/**
* Removes a repetition of
* PR1-12: "Procedure Practitioner" 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 removeProcedurePractitioner(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(12, rep);
}
/**
* Removes a repetition of
* PR1-12: "Procedure Practitioner" 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 removePr112_ProcedurePractitioner(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(12, rep);
}
/**
* Returns
* PR1-13: "Consent Code" - creates it if necessary
*/
public CE getConsentCode() {
CE ret = null;
try {
Type t = this.getField(13, 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
* PR1-13: "Consent Code" - creates it if necessary
*/
public CE getPr113_ConsentCode() {
CE ret = null;
try {
Type t = this.getField(13, 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
* PR1-14: "Procedure Priority" - creates it if necessary
*/
public ID getProcedurePriority() {
ID ret = null;
try {
Type t = this.getField(14, 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
* PR1-14: "Procedure Priority" - creates it if necessary
*/
public ID getPr114_ProcedurePriority() {
ID ret = null;
try {
Type t = this.getField(14, 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
* PR1-15: "Associated Diagnosis Code" - creates it if necessary
*/
public CE getAssociatedDiagnosisCode() {
CE ret = null;
try {
Type t = this.getField(15, 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
* PR1-15: "Associated Diagnosis Code" - creates it if necessary
*/
public CE getPr115_AssociatedDiagnosisCode() {
CE ret = null;
try {
Type t = this.getField(15, 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 Procedure Code Modifier (PR1-16).
*/
public CE[] getProcedureCodeModifier() {
CE[] ret = null;
try {
Type[] t = this.getField(16);
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 Procedure Code Modifier (PR1-16).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getProcedureCodeModifierReps() {
CE[] ret = null;
try {
Type[] t = this.getField(16);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* PR1-16: "Procedure Code Modifier" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getProcedureCodeModifier(int rep) {
CE ret = null;
try {
Type t = this.getField(16, 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
* PR1-16: "Procedure Code Modifier" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getPr116_ProcedureCodeModifier(int rep) {
CE ret = null;
try {
Type t = this.getField(16, 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 Procedure Code Modifier (PR1-16).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPr116_ProcedureCodeModifierReps() {
CE[] ret = null;
try {
Type[] t = this.getField(16);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* PR1-16: "Procedure Code Modifier" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE insertProcedureCodeModifier(int rep) throws HL7Exception {
return (CE) super.insertRepetition(16, rep);
}
/**
* Inserts a repetition of
* PR1-16: "Procedure Code Modifier" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE insertPr116_ProcedureCodeModifier(int rep) throws HL7Exception {
return (CE) super.insertRepetition(16, rep);
}
/**
* Removes a repetition of
* PR1-16: "Procedure Code Modifier" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE removeProcedureCodeModifier(int rep) throws HL7Exception {
return (CE) super.removeRepetition(16, rep);
}
/**
* Removes a repetition of
* PR1-16: "Procedure Code Modifier" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE removePr116_ProcedureCodeModifier(int rep) throws HL7Exception {
return (CE) super.removeRepetition(16, rep);
}
/**
* Returns
* PR1-17: "Procedure DRG Type" - creates it if necessary
*/
public IS getProcedureDRGType() {
IS ret = null;
try {
Type t = this.getField(17, 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
* PR1-17: "Procedure DRG Type" - creates it if necessary
*/
public IS getPr117_ProcedureDRGType() {
IS ret = null;
try {
Type t = this.getField(17, 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 all repetitions of Tissue Type Code (PR1-18).
*/
public CE[] getTissueTypeCode() {
CE[] ret = null;
try {
Type[] t = this.getField(18);
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 Tissue Type Code (PR1-18).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getTissueTypeCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(18);
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
* PR1-18: "Tissue Type Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getTissueTypeCode(int rep) {
CE ret = null;
try {
Type t = this.getField(18, 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
* PR1-18: "Tissue Type Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getPr118_TissueTypeCode(int rep) {
CE ret = null;
try {
Type t = this.getField(18, 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 Tissue Type Code (PR1-18).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPr118_TissueTypeCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(18);
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
* PR1-18: "Tissue Type 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 insertTissueTypeCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(18, rep);
}
/**
* Inserts a repetition of
* PR1-18: "Tissue Type 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 insertPr118_TissueTypeCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(18, rep);
}
/**
* Removes a repetition of
* PR1-18: "Tissue Type 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 removeTissueTypeCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(18, rep);
}
/**
* Removes a repetition of
* PR1-18: "Tissue Type 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 removePr118_TissueTypeCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(18, rep);
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new SI(getMessage());
case 1: return new IS(getMessage(), new Integer( 89 ));
case 2: return new CE(getMessage());
case 3: return new ST(getMessage());
case 4: return new TS(getMessage());
case 5: return new IS(getMessage(), new Integer( 230 ));
case 6: return new NM(getMessage());
case 7: return new XCN(getMessage());
case 8: return new IS(getMessage(), new Integer( 19 ));
case 9: return new NM(getMessage());
case 10: return new XCN(getMessage());
case 11: return new XCN(getMessage());
case 12: return new CE(getMessage());
case 13: return new ID(getMessage(), new Integer( 418 ));
case 14: return new CE(getMessage());
case 15: return new CE(getMessage());
case 16: return new IS(getMessage(), new Integer( 416 ));
case 17: return new CE(getMessage());
default: return null;
}
}
}