001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v251.segment;
035
036// import ca.uhn.hl7v2.model.v251.group.*;
037import ca.uhn.hl7v2.model.v251.datatype.*;
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
041import ca.uhn.hl7v2.model.AbstractMessage;
042import ca.uhn.hl7v2.model.Group;
043import ca.uhn.hl7v2.model.Type;
044import ca.uhn.hl7v2.model.AbstractSegment;
045import ca.uhn.hl7v2.model.Varies;
046
047/**
048 *<p>Represents an HL7 GOL message segment (Goal Detail). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>GOL-1: Action Code (ID) <b> </b>
052     * <li>GOL-2: Action Date/Time (TS) <b> </b>
053     * <li>GOL-3: Goal ID (CE) <b> </b>
054     * <li>GOL-4: Goal Instance ID (EI) <b> </b>
055     * <li>GOL-5: Episode of Care ID (EI) <b>optional </b>
056     * <li>GOL-6: Goal List Priority (NM) <b>optional </b>
057     * <li>GOL-7: Goal Established Date/Time (TS) <b>optional </b>
058     * <li>GOL-8: Expected Goal Achieve Date/Time (TS) <b>optional </b>
059     * <li>GOL-9: Goal Classification (CE) <b>optional </b>
060     * <li>GOL-10: Goal Management Discipline (CE) <b>optional </b>
061     * <li>GOL-11: Current Goal Review Status (CE) <b>optional </b>
062     * <li>GOL-12: Current Goal Review Date/Time (TS) <b>optional </b>
063     * <li>GOL-13: Next Goal Review Date/Time (TS) <b>optional </b>
064     * <li>GOL-14: Previous Goal Review Date/Time (TS) <b>optional </b>
065     * <li>GOL-15: Goal Review Interval (TQ) <b>optional </b>
066     * <li>GOL-16: Goal Evaluation (CE) <b>optional </b>
067     * <li>GOL-17: Goal Evaluation Comment (ST) <b>optional repeating</b>
068     * <li>GOL-18: Goal Life Cycle Status (CE) <b>optional </b>
069     * <li>GOL-19: Goal Life Cycle Status Date/Time (TS) <b>optional </b>
070     * <li>GOL-20: Goal Target Type (CE) <b>optional repeating</b>
071     * <li>GOL-21: Goal Target Name (XPN) <b>optional repeating</b>
072 * </ul>
073 */
074@SuppressWarnings("unused")
075public class GOL extends AbstractSegment {
076
077    /** 
078     * Creates a new GOL segment
079     */
080    public GOL(Group parent, ModelClassFactory factory) {
081       super(parent, factory);
082       init(factory);
083    }
084
085    private void init(ModelClassFactory factory) {
086       try {
087                                              this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(287) }, "Action Code");
088                                  this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Action Date/Time");
089                                  this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Goal ID");
090                                  this.add(EI.class, true, 1, 60, new Object[]{ getMessage() }, "Goal Instance ID");
091                                  this.add(EI.class, false, 1, 60, new Object[]{ getMessage() }, "Episode of Care ID");
092                                  this.add(NM.class, false, 1, 60, new Object[]{ getMessage() }, "Goal List Priority");
093                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Goal Established Date/Time");
094                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Goal Achieve Date/Time");
095                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Goal Classification");
096                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Goal Management Discipline");
097                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Current Goal Review Status");
098                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Current Goal Review Date/Time");
099                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Next Goal Review Date/Time");
100                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Previous Goal Review Date/Time");
101                                  this.add(TQ.class, false, 1, 200, new Object[]{ getMessage() }, "Goal Review Interval");
102                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Goal Evaluation");
103                                  this.add(ST.class, false, 0, 300, new Object[]{ getMessage() }, "Goal Evaluation Comment");
104                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Goal Life Cycle Status");
105                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Goal Life Cycle Status Date/Time");
106                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Goal Target Type");
107                                  this.add(XPN.class, false, 0, 250, new Object[]{ getMessage() }, "Goal Target Name");
108       } catch(HL7Exception e) {
109          log.error("Unexpected error creating GOL - this is probably a bug in the source code generator.", e);
110       }
111    }
112
113
114
115    /**
116     * Returns
117     * GOL-1: "Action Code" - creates it if necessary
118     */
119    public ID getActionCode() { 
120                ID retVal = this.getTypedField(1, 0);
121                return retVal;
122    }
123    
124    /**
125     * Returns
126     * GOL-1: "Action Code" - creates it if necessary
127     */
128    public ID getGol1_ActionCode() { 
129                ID retVal = this.getTypedField(1, 0);
130                return retVal;
131    }
132
133
134
135    /**
136     * Returns
137     * GOL-2: "Action Date/Time" - creates it if necessary
138     */
139    public TS getActionDateTime() { 
140                TS retVal = this.getTypedField(2, 0);
141                return retVal;
142    }
143    
144    /**
145     * Returns
146     * GOL-2: "Action Date/Time" - creates it if necessary
147     */
148    public TS getGol2_ActionDateTime() { 
149                TS retVal = this.getTypedField(2, 0);
150                return retVal;
151    }
152
153
154
155    /**
156     * Returns
157     * GOL-3: "Goal ID" - creates it if necessary
158     */
159    public CE getGoalID() { 
160                CE retVal = this.getTypedField(3, 0);
161                return retVal;
162    }
163    
164    /**
165     * Returns
166     * GOL-3: "Goal ID" - creates it if necessary
167     */
168    public CE getGol3_GoalID() { 
169                CE retVal = this.getTypedField(3, 0);
170                return retVal;
171    }
172
173
174
175    /**
176     * Returns
177     * GOL-4: "Goal Instance ID" - creates it if necessary
178     */
179    public EI getGoalInstanceID() { 
180                EI retVal = this.getTypedField(4, 0);
181                return retVal;
182    }
183    
184    /**
185     * Returns
186     * GOL-4: "Goal Instance ID" - creates it if necessary
187     */
188    public EI getGol4_GoalInstanceID() { 
189                EI retVal = this.getTypedField(4, 0);
190                return retVal;
191    }
192
193
194
195    /**
196     * Returns
197     * GOL-5: "Episode of Care ID" - creates it if necessary
198     */
199    public EI getEpisodeOfCareID() { 
200                EI retVal = this.getTypedField(5, 0);
201                return retVal;
202    }
203    
204    /**
205     * Returns
206     * GOL-5: "Episode of Care ID" - creates it if necessary
207     */
208    public EI getGol5_EpisodeOfCareID() { 
209                EI retVal = this.getTypedField(5, 0);
210                return retVal;
211    }
212
213
214
215    /**
216     * Returns
217     * GOL-6: "Goal List Priority" - creates it if necessary
218     */
219    public NM getGoalListPriority() { 
220                NM retVal = this.getTypedField(6, 0);
221                return retVal;
222    }
223    
224    /**
225     * Returns
226     * GOL-6: "Goal List Priority" - creates it if necessary
227     */
228    public NM getGol6_GoalListPriority() { 
229                NM retVal = this.getTypedField(6, 0);
230                return retVal;
231    }
232
233
234
235    /**
236     * Returns
237     * GOL-7: "Goal Established Date/Time" - creates it if necessary
238     */
239    public TS getGoalEstablishedDateTime() { 
240                TS retVal = this.getTypedField(7, 0);
241                return retVal;
242    }
243    
244    /**
245     * Returns
246     * GOL-7: "Goal Established Date/Time" - creates it if necessary
247     */
248    public TS getGol7_GoalEstablishedDateTime() { 
249                TS retVal = this.getTypedField(7, 0);
250                return retVal;
251    }
252
253
254
255    /**
256     * Returns
257     * GOL-8: "Expected Goal Achieve Date/Time" - creates it if necessary
258     */
259    public TS getExpectedGoalAchieveDateTime() { 
260                TS retVal = this.getTypedField(8, 0);
261                return retVal;
262    }
263    
264    /**
265     * Returns
266     * GOL-8: "Expected Goal Achieve Date/Time" - creates it if necessary
267     */
268    public TS getGol8_ExpectedGoalAchieveDateTime() { 
269                TS retVal = this.getTypedField(8, 0);
270                return retVal;
271    }
272
273
274
275    /**
276     * Returns
277     * GOL-9: "Goal Classification" - creates it if necessary
278     */
279    public CE getGoalClassification() { 
280                CE retVal = this.getTypedField(9, 0);
281                return retVal;
282    }
283    
284    /**
285     * Returns
286     * GOL-9: "Goal Classification" - creates it if necessary
287     */
288    public CE getGol9_GoalClassification() { 
289                CE retVal = this.getTypedField(9, 0);
290                return retVal;
291    }
292
293
294
295    /**
296     * Returns
297     * GOL-10: "Goal Management Discipline" - creates it if necessary
298     */
299    public CE getGoalManagementDiscipline() { 
300                CE retVal = this.getTypedField(10, 0);
301                return retVal;
302    }
303    
304    /**
305     * Returns
306     * GOL-10: "Goal Management Discipline" - creates it if necessary
307     */
308    public CE getGol10_GoalManagementDiscipline() { 
309                CE retVal = this.getTypedField(10, 0);
310                return retVal;
311    }
312
313
314
315    /**
316     * Returns
317     * GOL-11: "Current Goal Review Status" - creates it if necessary
318     */
319    public CE getCurrentGoalReviewStatus() { 
320                CE retVal = this.getTypedField(11, 0);
321                return retVal;
322    }
323    
324    /**
325     * Returns
326     * GOL-11: "Current Goal Review Status" - creates it if necessary
327     */
328    public CE getGol11_CurrentGoalReviewStatus() { 
329                CE retVal = this.getTypedField(11, 0);
330                return retVal;
331    }
332
333
334
335    /**
336     * Returns
337     * GOL-12: "Current Goal Review Date/Time" - creates it if necessary
338     */
339    public TS getCurrentGoalReviewDateTime() { 
340                TS retVal = this.getTypedField(12, 0);
341                return retVal;
342    }
343    
344    /**
345     * Returns
346     * GOL-12: "Current Goal Review Date/Time" - creates it if necessary
347     */
348    public TS getGol12_CurrentGoalReviewDateTime() { 
349                TS retVal = this.getTypedField(12, 0);
350                return retVal;
351    }
352
353
354
355    /**
356     * Returns
357     * GOL-13: "Next Goal Review Date/Time" - creates it if necessary
358     */
359    public TS getNextGoalReviewDateTime() { 
360                TS retVal = this.getTypedField(13, 0);
361                return retVal;
362    }
363    
364    /**
365     * Returns
366     * GOL-13: "Next Goal Review Date/Time" - creates it if necessary
367     */
368    public TS getGol13_NextGoalReviewDateTime() { 
369                TS retVal = this.getTypedField(13, 0);
370                return retVal;
371    }
372
373
374
375    /**
376     * Returns
377     * GOL-14: "Previous Goal Review Date/Time" - creates it if necessary
378     */
379    public TS getPreviousGoalReviewDateTime() { 
380                TS retVal = this.getTypedField(14, 0);
381                return retVal;
382    }
383    
384    /**
385     * Returns
386     * GOL-14: "Previous Goal Review Date/Time" - creates it if necessary
387     */
388    public TS getGol14_PreviousGoalReviewDateTime() { 
389                TS retVal = this.getTypedField(14, 0);
390                return retVal;
391    }
392
393
394
395    /**
396     * Returns
397     * GOL-15: "Goal Review Interval" - creates it if necessary
398     */
399    public TQ getGoalReviewInterval() { 
400                TQ retVal = this.getTypedField(15, 0);
401                return retVal;
402    }
403    
404    /**
405     * Returns
406     * GOL-15: "Goal Review Interval" - creates it if necessary
407     */
408    public TQ getGol15_GoalReviewInterval() { 
409                TQ retVal = this.getTypedField(15, 0);
410                return retVal;
411    }
412
413
414
415    /**
416     * Returns
417     * GOL-16: "Goal Evaluation" - creates it if necessary
418     */
419    public CE getGoalEvaluation() { 
420                CE retVal = this.getTypedField(16, 0);
421                return retVal;
422    }
423    
424    /**
425     * Returns
426     * GOL-16: "Goal Evaluation" - creates it if necessary
427     */
428    public CE getGol16_GoalEvaluation() { 
429                CE retVal = this.getTypedField(16, 0);
430                return retVal;
431    }
432
433
434    /**
435     * Returns all repetitions of Goal Evaluation Comment (GOL-17).
436     */
437    public ST[] getGoalEvaluationComment() {
438        ST[] retVal = this.getTypedField(17, new ST[0]);
439        return retVal;
440    }
441
442
443    /**
444     * Returns all repetitions of Goal Evaluation Comment (GOL-17).
445     */
446    public ST[] getGol17_GoalEvaluationComment() {
447        ST[] retVal = this.getTypedField(17, new ST[0]);
448        return retVal;
449    }
450
451
452    /**
453     * Returns a count of the current number of repetitions of Goal Evaluation Comment (GOL-17).
454     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
455     * it will return zero.
456     */
457    public int getGoalEvaluationCommentReps() {
458        return this.getReps(17);
459    }
460
461
462    /**
463     * Returns a specific repetition of
464     * GOL-17: "Goal Evaluation Comment" - creates it if necessary
465     *
466     * @param rep The repetition index (0-indexed)
467     */
468    public ST getGoalEvaluationComment(int rep) { 
469                ST retVal = this.getTypedField(17, rep);
470                return retVal;
471    }
472
473    /**
474     * Returns a specific repetition of
475     * GOL-17: "Goal Evaluation Comment" - creates it if necessary
476     *
477     * @param rep The repetition index (0-indexed)
478     */
479    public ST getGol17_GoalEvaluationComment(int rep) { 
480                ST retVal = this.getTypedField(17, rep);
481                return retVal;
482    }
483
484    /**
485     * Returns a count of the current number of repetitions of Goal Evaluation Comment (GOL-17).
486     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
487     * it will return zero.
488     */
489    public int getGol17_GoalEvaluationCommentReps() {
490        return this.getReps(17);
491    }
492
493
494    /**
495     * Inserts a repetition of
496     * GOL-17: "Goal Evaluation Comment" at a specific index
497     *
498     * @param rep The repetition index (0-indexed)
499     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
500     */
501    public ST insertGoalEvaluationComment(int rep) throws HL7Exception { 
502        return (ST) super.insertRepetition(17, rep);
503    }
504
505
506    /**
507     * Inserts a repetition of
508     * GOL-17: "Goal Evaluation Comment" at a specific index
509     *
510     * @param rep The repetition index (0-indexed)
511     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
512     */
513    public ST insertGol17_GoalEvaluationComment(int rep) throws HL7Exception { 
514        return (ST) super.insertRepetition(17, rep);
515    }
516
517
518    /**
519     * Removes a repetition of
520     * GOL-17: "Goal Evaluation Comment" at a specific index
521     *
522     * @param rep The repetition index (0-indexed)
523     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
524     */
525    public ST removeGoalEvaluationComment(int rep) throws HL7Exception { 
526        return (ST) super.removeRepetition(17, rep);
527    }
528
529
530    /**
531     * Removes a repetition of
532     * GOL-17: "Goal Evaluation Comment" at a specific index
533     *
534     * @param rep The repetition index (0-indexed)
535     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
536     */
537    public ST removeGol17_GoalEvaluationComment(int rep) throws HL7Exception { 
538        return (ST) super.removeRepetition(17, rep);
539    }
540
541
542
543
544    /**
545     * Returns
546     * GOL-18: "Goal Life Cycle Status" - creates it if necessary
547     */
548    public CE getGoalLifeCycleStatus() { 
549                CE retVal = this.getTypedField(18, 0);
550                return retVal;
551    }
552    
553    /**
554     * Returns
555     * GOL-18: "Goal Life Cycle Status" - creates it if necessary
556     */
557    public CE getGol18_GoalLifeCycleStatus() { 
558                CE retVal = this.getTypedField(18, 0);
559                return retVal;
560    }
561
562
563
564    /**
565     * Returns
566     * GOL-19: "Goal Life Cycle Status Date/Time" - creates it if necessary
567     */
568    public TS getGoalLifeCycleStatusDateTime() { 
569                TS retVal = this.getTypedField(19, 0);
570                return retVal;
571    }
572    
573    /**
574     * Returns
575     * GOL-19: "Goal Life Cycle Status Date/Time" - creates it if necessary
576     */
577    public TS getGol19_GoalLifeCycleStatusDateTime() { 
578                TS retVal = this.getTypedField(19, 0);
579                return retVal;
580    }
581
582
583    /**
584     * Returns all repetitions of Goal Target Type (GOL-20).
585     */
586    public CE[] getGoalTargetType() {
587        CE[] retVal = this.getTypedField(20, new CE[0]);
588        return retVal;
589    }
590
591
592    /**
593     * Returns all repetitions of Goal Target Type (GOL-20).
594     */
595    public CE[] getGol20_GoalTargetType() {
596        CE[] retVal = this.getTypedField(20, new CE[0]);
597        return retVal;
598    }
599
600
601    /**
602     * Returns a count of the current number of repetitions of Goal Target Type (GOL-20).
603     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
604     * it will return zero.
605     */
606    public int getGoalTargetTypeReps() {
607        return this.getReps(20);
608    }
609
610
611    /**
612     * Returns a specific repetition of
613     * GOL-20: "Goal Target Type" - creates it if necessary
614     *
615     * @param rep The repetition index (0-indexed)
616     */
617    public CE getGoalTargetType(int rep) { 
618                CE retVal = this.getTypedField(20, rep);
619                return retVal;
620    }
621
622    /**
623     * Returns a specific repetition of
624     * GOL-20: "Goal Target Type" - creates it if necessary
625     *
626     * @param rep The repetition index (0-indexed)
627     */
628    public CE getGol20_GoalTargetType(int rep) { 
629                CE retVal = this.getTypedField(20, rep);
630                return retVal;
631    }
632
633    /**
634     * Returns a count of the current number of repetitions of Goal Target Type (GOL-20).
635     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
636     * it will return zero.
637     */
638    public int getGol20_GoalTargetTypeReps() {
639        return this.getReps(20);
640    }
641
642
643    /**
644     * Inserts a repetition of
645     * GOL-20: "Goal Target Type" at a specific index
646     *
647     * @param rep The repetition index (0-indexed)
648     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
649     */
650    public CE insertGoalTargetType(int rep) throws HL7Exception { 
651        return (CE) super.insertRepetition(20, rep);
652    }
653
654
655    /**
656     * Inserts a repetition of
657     * GOL-20: "Goal Target Type" at a specific index
658     *
659     * @param rep The repetition index (0-indexed)
660     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
661     */
662    public CE insertGol20_GoalTargetType(int rep) throws HL7Exception { 
663        return (CE) super.insertRepetition(20, rep);
664    }
665
666
667    /**
668     * Removes a repetition of
669     * GOL-20: "Goal Target Type" at a specific index
670     *
671     * @param rep The repetition index (0-indexed)
672     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
673     */
674    public CE removeGoalTargetType(int rep) throws HL7Exception { 
675        return (CE) super.removeRepetition(20, rep);
676    }
677
678
679    /**
680     * Removes a repetition of
681     * GOL-20: "Goal Target Type" at a specific index
682     *
683     * @param rep The repetition index (0-indexed)
684     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
685     */
686    public CE removeGol20_GoalTargetType(int rep) throws HL7Exception { 
687        return (CE) super.removeRepetition(20, rep);
688    }
689
690
691
692    /**
693     * Returns all repetitions of Goal Target Name (GOL-21).
694     */
695    public XPN[] getGoalTargetName() {
696        XPN[] retVal = this.getTypedField(21, new XPN[0]);
697        return retVal;
698    }
699
700
701    /**
702     * Returns all repetitions of Goal Target Name (GOL-21).
703     */
704    public XPN[] getGol21_GoalTargetName() {
705        XPN[] retVal = this.getTypedField(21, new XPN[0]);
706        return retVal;
707    }
708
709
710    /**
711     * Returns a count of the current number of repetitions of Goal Target Name (GOL-21).
712     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
713     * it will return zero.
714     */
715    public int getGoalTargetNameReps() {
716        return this.getReps(21);
717    }
718
719
720    /**
721     * Returns a specific repetition of
722     * GOL-21: "Goal Target Name" - creates it if necessary
723     *
724     * @param rep The repetition index (0-indexed)
725     */
726    public XPN getGoalTargetName(int rep) { 
727                XPN retVal = this.getTypedField(21, rep);
728                return retVal;
729    }
730
731    /**
732     * Returns a specific repetition of
733     * GOL-21: "Goal Target Name" - creates it if necessary
734     *
735     * @param rep The repetition index (0-indexed)
736     */
737    public XPN getGol21_GoalTargetName(int rep) { 
738                XPN retVal = this.getTypedField(21, rep);
739                return retVal;
740    }
741
742    /**
743     * Returns a count of the current number of repetitions of Goal Target Name (GOL-21).
744     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
745     * it will return zero.
746     */
747    public int getGol21_GoalTargetNameReps() {
748        return this.getReps(21);
749    }
750
751
752    /**
753     * Inserts a repetition of
754     * GOL-21: "Goal Target Name" at a specific index
755     *
756     * @param rep The repetition index (0-indexed)
757     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
758     */
759    public XPN insertGoalTargetName(int rep) throws HL7Exception { 
760        return (XPN) super.insertRepetition(21, rep);
761    }
762
763
764    /**
765     * Inserts a repetition of
766     * GOL-21: "Goal Target Name" at a specific index
767     *
768     * @param rep The repetition index (0-indexed)
769     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
770     */
771    public XPN insertGol21_GoalTargetName(int rep) throws HL7Exception { 
772        return (XPN) super.insertRepetition(21, rep);
773    }
774
775
776    /**
777     * Removes a repetition of
778     * GOL-21: "Goal Target Name" at a specific index
779     *
780     * @param rep The repetition index (0-indexed)
781     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
782     */
783    public XPN removeGoalTargetName(int rep) throws HL7Exception { 
784        return (XPN) super.removeRepetition(21, rep);
785    }
786
787
788    /**
789     * Removes a repetition of
790     * GOL-21: "Goal Target Name" at a specific index
791     *
792     * @param rep The repetition index (0-indexed)
793     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
794     */
795    public XPN removeGol21_GoalTargetName(int rep) throws HL7Exception { 
796        return (XPN) super.removeRepetition(21, rep);
797    }
798
799
800
801
802
803
804    /** {@inheritDoc} */   
805    protected Type createNewTypeWithoutReflection(int field) {
806       switch (field) {
807          case 0: return new ID(getMessage(), new Integer( 287 ));
808          case 1: return new TS(getMessage());
809          case 2: return new CE(getMessage());
810          case 3: return new EI(getMessage());
811          case 4: return new EI(getMessage());
812          case 5: return new NM(getMessage());
813          case 6: return new TS(getMessage());
814          case 7: return new TS(getMessage());
815          case 8: return new CE(getMessage());
816          case 9: return new CE(getMessage());
817          case 10: return new CE(getMessage());
818          case 11: return new TS(getMessage());
819          case 12: return new TS(getMessage());
820          case 13: return new TS(getMessage());
821          case 14: return new TQ(getMessage());
822          case 15: return new CE(getMessage());
823          case 16: return new ST(getMessage());
824          case 17: return new CE(getMessage());
825          case 18: return new TS(getMessage());
826          case 19: return new CE(getMessage());
827          case 20: return new XPN(getMessage());
828          default: return null;
829       }
830   }
831
832
833}
834