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