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