ca.uhn.hl7v2.model.v26.segment.GOL 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.v26.segment;
// import ca.uhn.hl7v2.model.v26.group.*;
import ca.uhn.hl7v2.model.v26.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 GOL message segment (Goal Detail).
* This segment has the following fields:
*
* - GOL-1: Action Code (ID)
*
- GOL-2: Action Date/Time (DTM)
*
- GOL-3: Goal ID (CWE)
*
- GOL-4: Goal Instance ID (EI)
*
- GOL-5: Episode of Care ID (EI) optional
*
- GOL-6: Goal List Priority (NM) optional
*
- GOL-7: Goal Established Date/Time (DTM) optional
*
- GOL-8: Expected Goal Achieve Date/Time (DTM) optional
*
- GOL-9: Goal Classification (CWE) optional
*
- GOL-10: Goal Management Discipline (CWE) optional
*
- GOL-11: Current Goal Review Status (CWE) optional
*
- GOL-12: Current Goal Review Date/Time (DTM) optional
*
- GOL-13: Next Goal Review Date/Time (DTM) optional
*
- GOL-14: Previous Goal Review Date/Time (DTM) optional
*
- GOL-15: Goal Review Interval (TQ) optional
*
- GOL-16: Goal Evaluation (CWE) optional
*
- GOL-17: Goal Evaluation Comment (ST) optional repeating
*
- GOL-18: Goal Life Cycle Status (CWE) optional
*
- GOL-19: Goal Life Cycle Status Date/Time (DTM) optional
*
- GOL-20: Goal Target Type (CWE) optional repeating
*
- GOL-21: Goal Target Name (XPN) optional repeating
*
- GOL-22: Mood Code (CNE) optional
*
*/
public class GOL extends AbstractSegment {
/**
* Creates a new GOL segment
*/
public GOL(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(ID.class, true, 1, 2, new Object[]{ getMessage() }, "Action Code");
this.add(DTM.class, true, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Action Date/Time");
this.add(CWE.class, true, 1, 705, new Object[]{ getMessage(), new Integer(0) }, "Goal ID");
this.add(EI.class, true, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Goal Instance ID");
this.add(EI.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Episode of Care ID");
this.add(NM.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Goal List Priority");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Goal Established Date/Time");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Expected Goal Achieve Date/Time");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(0) }, "Goal Classification");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(0) }, "Goal Management Discipline");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(0) }, "Current Goal Review Status");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Current Goal Review Date/Time");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Next Goal Review Date/Time");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Previous Goal Review Date/Time");
this.add(TQ.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Goal Review Interval");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(0) }, "Goal Evaluation");
this.add(ST.class, false, 0, 300, new Object[]{ getMessage(), new Integer(0) }, "Goal Evaluation Comment");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(0) }, "Goal Life Cycle Status");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Goal Life Cycle Status Date/Time");
this.add(CWE.class, false, 0, 705, new Object[]{ getMessage(), new Integer(0) }, "Goal Target Type");
this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Goal Target Name");
this.add(CNE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(725) }, "Mood Code");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating GOL - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* GOL-1: "Action Code" - creates it if necessary
*/
public ID getActionCode() {
ID ret = null;
try {
Type t = this.getField(1, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-1: "Action Code" - creates it if necessary
*/
public ID getGol1_ActionCode() {
ID ret = null;
try {
Type t = this.getField(1, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-2: "Action Date/Time" - creates it if necessary
*/
public DTM getActionDateTime() {
DTM ret = null;
try {
Type t = this.getField(2, 0);
ret = (DTM)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
* GOL-2: "Action Date/Time" - creates it if necessary
*/
public DTM getGol2_ActionDateTime() {
DTM ret = null;
try {
Type t = this.getField(2, 0);
ret = (DTM)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
* GOL-3: "Goal ID" - creates it if necessary
*/
public CWE getGoalID() {
CWE ret = null;
try {
Type t = this.getField(3, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-3: "Goal ID" - creates it if necessary
*/
public CWE getGol3_GoalID() {
CWE ret = null;
try {
Type t = this.getField(3, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-4: "Goal Instance ID" - creates it if necessary
*/
public EI getGoalInstanceID() {
EI ret = null;
try {
Type t = this.getField(4, 0);
ret = (EI)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-4: "Goal Instance ID" - creates it if necessary
*/
public EI getGol4_GoalInstanceID() {
EI ret = null;
try {
Type t = this.getField(4, 0);
ret = (EI)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-5: "Episode of Care ID" - creates it if necessary
*/
public EI getEpisodeOfCareID() {
EI ret = null;
try {
Type t = this.getField(5, 0);
ret = (EI)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-5: "Episode of Care ID" - creates it if necessary
*/
public EI getGol5_EpisodeOfCareID() {
EI ret = null;
try {
Type t = this.getField(5, 0);
ret = (EI)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-6: "Goal List Priority" - creates it if necessary
*/
public NM getGoalListPriority() {
NM ret = null;
try {
Type t = this.getField(6, 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
* GOL-6: "Goal List Priority" - creates it if necessary
*/
public NM getGol6_GoalListPriority() {
NM ret = null;
try {
Type t = this.getField(6, 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
* GOL-7: "Goal Established Date/Time" - creates it if necessary
*/
public DTM getGoalEstablishedDateTime() {
DTM ret = null;
try {
Type t = this.getField(7, 0);
ret = (DTM)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
* GOL-7: "Goal Established Date/Time" - creates it if necessary
*/
public DTM getGol7_GoalEstablishedDateTime() {
DTM ret = null;
try {
Type t = this.getField(7, 0);
ret = (DTM)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
* GOL-8: "Expected Goal Achieve Date/Time" - creates it if necessary
*/
public DTM getExpectedGoalAchieveDateTime() {
DTM ret = null;
try {
Type t = this.getField(8, 0);
ret = (DTM)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
* GOL-8: "Expected Goal Achieve Date/Time" - creates it if necessary
*/
public DTM getGol8_ExpectedGoalAchieveDateTime() {
DTM ret = null;
try {
Type t = this.getField(8, 0);
ret = (DTM)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
* GOL-9: "Goal Classification" - creates it if necessary
*/
public CWE getGoalClassification() {
CWE ret = null;
try {
Type t = this.getField(9, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-9: "Goal Classification" - creates it if necessary
*/
public CWE getGol9_GoalClassification() {
CWE ret = null;
try {
Type t = this.getField(9, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-10: "Goal Management Discipline" - creates it if necessary
*/
public CWE getGoalManagementDiscipline() {
CWE ret = null;
try {
Type t = this.getField(10, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-10: "Goal Management Discipline" - creates it if necessary
*/
public CWE getGol10_GoalManagementDiscipline() {
CWE ret = null;
try {
Type t = this.getField(10, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-11: "Current Goal Review Status" - creates it if necessary
*/
public CWE getCurrentGoalReviewStatus() {
CWE ret = null;
try {
Type t = this.getField(11, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-11: "Current Goal Review Status" - creates it if necessary
*/
public CWE getGol11_CurrentGoalReviewStatus() {
CWE ret = null;
try {
Type t = this.getField(11, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-12: "Current Goal Review Date/Time" - creates it if necessary
*/
public DTM getCurrentGoalReviewDateTime() {
DTM ret = null;
try {
Type t = this.getField(12, 0);
ret = (DTM)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
* GOL-12: "Current Goal Review Date/Time" - creates it if necessary
*/
public DTM getGol12_CurrentGoalReviewDateTime() {
DTM ret = null;
try {
Type t = this.getField(12, 0);
ret = (DTM)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
* GOL-13: "Next Goal Review Date/Time" - creates it if necessary
*/
public DTM getNextGoalReviewDateTime() {
DTM ret = null;
try {
Type t = this.getField(13, 0);
ret = (DTM)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
* GOL-13: "Next Goal Review Date/Time" - creates it if necessary
*/
public DTM getGol13_NextGoalReviewDateTime() {
DTM ret = null;
try {
Type t = this.getField(13, 0);
ret = (DTM)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
* GOL-14: "Previous Goal Review Date/Time" - creates it if necessary
*/
public DTM getPreviousGoalReviewDateTime() {
DTM ret = null;
try {
Type t = this.getField(14, 0);
ret = (DTM)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
* GOL-14: "Previous Goal Review Date/Time" - creates it if necessary
*/
public DTM getGol14_PreviousGoalReviewDateTime() {
DTM ret = null;
try {
Type t = this.getField(14, 0);
ret = (DTM)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
* GOL-15: "Goal Review Interval" - creates it if necessary
*/
public TQ getGoalReviewInterval() {
TQ ret = null;
try {
Type t = this.getField(15, 0);
ret = (TQ)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-15: "Goal Review Interval" - creates it if necessary
*/
public TQ getGol15_GoalReviewInterval() {
TQ ret = null;
try {
Type t = this.getField(15, 0);
ret = (TQ)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-16: "Goal Evaluation" - creates it if necessary
*/
public CWE getGoalEvaluation() {
CWE ret = null;
try {
Type t = this.getField(16, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-16: "Goal Evaluation" - creates it if necessary
*/
public CWE getGol16_GoalEvaluation() {
CWE ret = null;
try {
Type t = this.getField(16, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Goal Evaluation Comment (GOL-17).
*/
public ST[] getGoalEvaluationComment() {
ST[] ret = null;
try {
Type[] t = this.getField(17);
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 Goal Evaluation Comment (GOL-17).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getGoalEvaluationCommentReps() {
ST[] ret = null;
try {
Type[] t = this.getField(17);
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
* GOL-17: "Goal Evaluation Comment" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getGoalEvaluationComment(int rep) {
ST ret = null;
try {
Type t = this.getField(17, 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
* GOL-17: "Goal Evaluation Comment" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getGol17_GoalEvaluationComment(int rep) {
ST ret = null;
try {
Type t = this.getField(17, 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 Goal Evaluation Comment (GOL-17).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getGol17_GoalEvaluationCommentReps() {
ST[] ret = null;
try {
Type[] t = this.getField(17);
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
* GOL-17: "Goal Evaluation Comment" 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 insertGoalEvaluationComment(int rep) throws HL7Exception {
return (ST) super.insertRepetition(17, rep);
}
/**
* Inserts a repetition of
* GOL-17: "Goal Evaluation Comment" 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 insertGol17_GoalEvaluationComment(int rep) throws HL7Exception {
return (ST) super.insertRepetition(17, rep);
}
/**
* Removes a repetition of
* GOL-17: "Goal Evaluation Comment" 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 removeGoalEvaluationComment(int rep) throws HL7Exception {
return (ST) super.removeRepetition(17, rep);
}
/**
* Removes a repetition of
* GOL-17: "Goal Evaluation Comment" 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 removeGol17_GoalEvaluationComment(int rep) throws HL7Exception {
return (ST) super.removeRepetition(17, rep);
}
/**
* Returns
* GOL-18: "Goal Life Cycle Status" - creates it if necessary
*/
public CWE getGoalLifeCycleStatus() {
CWE ret = null;
try {
Type t = this.getField(18, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-18: "Goal Life Cycle Status" - creates it if necessary
*/
public CWE getGol18_GoalLifeCycleStatus() {
CWE ret = null;
try {
Type t = this.getField(18, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* GOL-19: "Goal Life Cycle Status Date/Time" - creates it if necessary
*/
public DTM getGoalLifeCycleStatusDateTime() {
DTM ret = null;
try {
Type t = this.getField(19, 0);
ret = (DTM)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
* GOL-19: "Goal Life Cycle Status Date/Time" - creates it if necessary
*/
public DTM getGol19_GoalLifeCycleStatusDateTime() {
DTM ret = null;
try {
Type t = this.getField(19, 0);
ret = (DTM)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 Goal Target Type (GOL-20).
*/
public CWE[] getGoalTargetType() {
CWE[] ret = null;
try {
Type[] t = this.getField(20);
ret = new CWE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CWE)t[i];
}
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Goal Target Type (GOL-20).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getGoalTargetTypeReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(20);
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
* GOL-20: "Goal Target Type" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getGoalTargetType(int rep) {
CWE ret = null;
try {
Type t = this.getField(20, rep);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* GOL-20: "Goal Target Type" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getGol20_GoalTargetType(int rep) {
CWE ret = null;
try {
Type t = this.getField(20, rep);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Goal Target Type (GOL-20).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getGol20_GoalTargetTypeReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(20);
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
* GOL-20: "Goal Target Type" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE insertGoalTargetType(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(20, rep);
}
/**
* Inserts a repetition of
* GOL-20: "Goal Target Type" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE insertGol20_GoalTargetType(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(20, rep);
}
/**
* Removes a repetition of
* GOL-20: "Goal Target Type" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE removeGoalTargetType(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(20, rep);
}
/**
* Removes a repetition of
* GOL-20: "Goal Target Type" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE removeGol20_GoalTargetType(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(20, rep);
}
/**
* Returns all repetitions of Goal Target Name (GOL-21).
*/
public XPN[] getGoalTargetName() {
XPN[] ret = null;
try {
Type[] t = this.getField(21);
ret = new XPN[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (XPN)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 Goal Target Name (GOL-21).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getGoalTargetNameReps() {
XPN[] 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
* GOL-21: "Goal Target Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XPN getGoalTargetName(int rep) {
XPN ret = null;
try {
Type t = this.getField(21, rep);
ret = (XPN)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
* GOL-21: "Goal Target Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XPN getGol21_GoalTargetName(int rep) {
XPN ret = null;
try {
Type t = this.getField(21, rep);
ret = (XPN)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 Goal Target Name (GOL-21).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getGol21_GoalTargetNameReps() {
XPN[] 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
* GOL-21: "Goal Target Name" 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 XPN insertGoalTargetName(int rep) throws HL7Exception {
return (XPN) super.insertRepetition(21, rep);
}
/**
* Inserts a repetition of
* GOL-21: "Goal Target Name" 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 XPN insertGol21_GoalTargetName(int rep) throws HL7Exception {
return (XPN) super.insertRepetition(21, rep);
}
/**
* Removes a repetition of
* GOL-21: "Goal Target Name" 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 XPN removeGoalTargetName(int rep) throws HL7Exception {
return (XPN) super.removeRepetition(21, rep);
}
/**
* Removes a repetition of
* GOL-21: "Goal Target Name" 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 XPN removeGol21_GoalTargetName(int rep) throws HL7Exception {
return (XPN) super.removeRepetition(21, rep);
}
/**
* Returns
* GOL-22: "Mood Code" - creates it if necessary
*/
public CNE getMoodCode() {
CNE ret = null;
try {
Type t = this.getField(22, 0);
ret = (CNE)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
* GOL-22: "Mood Code" - creates it if necessary
*/
public CNE getGol22_MoodCode() {
CNE ret = null;
try {
Type t = this.getField(22, 0);
ret = (CNE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new ID(getMessage(), new Integer( 287 ));
case 1: return new DTM(getMessage());
case 2: return new CWE(getMessage());
case 3: return new EI(getMessage());
case 4: return new EI(getMessage());
case 5: return new NM(getMessage());
case 6: return new DTM(getMessage());
case 7: return new DTM(getMessage());
case 8: return new CWE(getMessage());
case 9: return new CWE(getMessage());
case 10: return new CWE(getMessage());
case 11: return new DTM(getMessage());
case 12: return new DTM(getMessage());
case 13: return new DTM(getMessage());
case 14: return new TQ(getMessage());
case 15: return new CWE(getMessage());
case 16: return new ST(getMessage());
case 17: return new CWE(getMessage());
case 18: return new DTM(getMessage());
case 19: return new CWE(getMessage());
case 20: return new XPN(getMessage());
case 21: return new CNE(getMessage());
default: return null;
}
}
}