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