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.v25.group;
035
036import ca.uhn.hl7v2.model.v25.segment.*;
037
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.model.*;
041
042/**
043 * <p>Represents a PPV_PCA_GOAL group structure (a Group object).
044 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
045 * This Group contains the following elements:  
046 * </p>
047 * <ul>
048                         * <li>1: GOL (Goal Detail) <b>  </b></li>
049                         * <li>2: NTE (Notes and Comments) <b>optional repeating </b></li>
050                         * <li>3: VAR (Variance) <b>optional repeating </b></li>
051                         * <li>4: PPV_PCA_GOAL_ROLE (a Group object) <b>optional repeating </b></li>
052                         * <li>5: PPV_PCA_GOAL_PATHWAY (a Group object) <b>optional repeating </b></li>
053                         * <li>6: PPV_PCA_GOAL_OBSERVATION (a Group object) <b>optional repeating </b></li>
054                         * <li>7: PPV_PCA_PROBLEM (a Group object) <b>optional repeating </b></li>
055                         * <li>8: PPV_PCA_ORDER (a Group object) <b>optional repeating </b></li>
056 * </ul>
057 */
058//@SuppressWarnings("unused")
059public class PPV_PCA_GOAL extends AbstractGroup {
060
061    /** 
062     * Creates a new PPV_PCA_GOAL group
063     */
064    public PPV_PCA_GOAL(Group parent, ModelClassFactory factory) {
065       super(parent, factory);
066       init(factory);
067    }
068
069    private void init(ModelClassFactory factory) {
070       try {
071                                  this.add(GOL.class, true, false, false);
072                                  this.add(NTE.class, false, true, false);
073                                  this.add(VAR.class, false, true, false);
074                                  this.add(PPV_PCA_GOAL_ROLE.class, false, true, false);
075                                  this.add(PPV_PCA_GOAL_PATHWAY.class, false, true, false);
076                                  this.add(PPV_PCA_GOAL_OBSERVATION.class, false, true, false);
077                                  this.add(PPV_PCA_PROBLEM.class, false, true, false);
078                                  this.add(PPV_PCA_ORDER.class, false, true, false);
079       } catch(HL7Exception e) {
080          log.error("Unexpected error creating PPV_PCA_GOAL - this is probably a bug in the source code generator.", e);
081       }
082    }
083
084    /** 
085     * Returns "2.5"
086     */
087    public String getVersion() {
088       return "2.5";
089    }
090
091
092
093    /**
094     * Returns
095     * GOL (Goal Detail) - creates it if necessary
096     */
097    public GOL getGOL() { 
098       GOL retVal = getTyped("GOL", GOL.class);
099       return retVal;
100    }
101
102
103
104
105    /**
106     * Returns
107     * the first repetition of 
108     * NTE (Notes and Comments) - creates it if necessary
109     */
110    public NTE getNTE() { 
111       NTE retVal = getTyped("NTE", NTE.class);
112       return retVal;
113    }
114
115
116    /**
117     * Returns a specific repetition of
118     * NTE (Notes and Comments) - creates it if necessary
119     *
120     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
121     * @throws HL7Exception if the repetition requested is more than one 
122     *     greater than the number of existing repetitions.
123     */
124    public NTE getNTE(int rep) { 
125       NTE retVal = getTyped("NTE", rep, NTE.class);
126       return retVal;
127    }
128
129    /** 
130     * Returns the number of existing repetitions of NTE 
131     */ 
132    public int getNTEReps() {  
133        return getReps("NTE");
134    } 
135
136    /** 
137     * <p>
138     * Returns a non-modifiable List containing all current existing repetitions of NTE.
139     * <p>
140     * <p>
141     * Note that unlike {@link #getNTE()}, this method will not create any reps
142     * if none are already present, so an empty list may be returned.
143     * </p>
144     */ 
145    public java.util.List<NTE> getNTEAll() throws HL7Exception {
146        return getAllAsList("NTE", NTE.class);
147    } 
148
149    /**
150     * Inserts a specific repetition of NTE (Notes and Comments)
151     * @see AbstractGroup#insertRepetition(Structure, int) 
152     */
153    public void insertNTE(NTE structure, int rep) throws HL7Exception { 
154       super.insertRepetition("NTE", structure, rep);
155    }
156
157
158    /**
159     * Inserts a specific repetition of NTE (Notes and Comments)
160     * @see AbstractGroup#insertRepetition(Structure, int) 
161     */
162    public NTE insertNTE(int rep) throws HL7Exception { 
163       return (NTE)super.insertRepetition("NTE", rep);
164    }
165
166
167    /**
168     * Removes a specific repetition of NTE (Notes and Comments)
169     * @see AbstractGroup#removeRepetition(String, int) 
170     */
171    public NTE removeNTE(int rep) throws HL7Exception { 
172       return (NTE)super.removeRepetition("NTE", rep);
173    }
174
175
176
177    /**
178     * Returns
179     * the first repetition of 
180     * VAR (Variance) - creates it if necessary
181     */
182    public VAR getVAR() { 
183       VAR retVal = getTyped("VAR", VAR.class);
184       return retVal;
185    }
186
187
188    /**
189     * Returns a specific repetition of
190     * VAR (Variance) - creates it if necessary
191     *
192     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
193     * @throws HL7Exception if the repetition requested is more than one 
194     *     greater than the number of existing repetitions.
195     */
196    public VAR getVAR(int rep) { 
197       VAR retVal = getTyped("VAR", rep, VAR.class);
198       return retVal;
199    }
200
201    /** 
202     * Returns the number of existing repetitions of VAR 
203     */ 
204    public int getVARReps() {  
205        return getReps("VAR");
206    } 
207
208    /** 
209     * <p>
210     * Returns a non-modifiable List containing all current existing repetitions of VAR.
211     * <p>
212     * <p>
213     * Note that unlike {@link #getVAR()}, this method will not create any reps
214     * if none are already present, so an empty list may be returned.
215     * </p>
216     */ 
217    public java.util.List<VAR> getVARAll() throws HL7Exception {
218        return getAllAsList("VAR", VAR.class);
219    } 
220
221    /**
222     * Inserts a specific repetition of VAR (Variance)
223     * @see AbstractGroup#insertRepetition(Structure, int) 
224     */
225    public void insertVAR(VAR structure, int rep) throws HL7Exception { 
226       super.insertRepetition("VAR", structure, rep);
227    }
228
229
230    /**
231     * Inserts a specific repetition of VAR (Variance)
232     * @see AbstractGroup#insertRepetition(Structure, int) 
233     */
234    public VAR insertVAR(int rep) throws HL7Exception { 
235       return (VAR)super.insertRepetition("VAR", rep);
236    }
237
238
239    /**
240     * Removes a specific repetition of VAR (Variance)
241     * @see AbstractGroup#removeRepetition(String, int) 
242     */
243    public VAR removeVAR(int rep) throws HL7Exception { 
244       return (VAR)super.removeRepetition("VAR", rep);
245    }
246
247
248
249    /**
250     * Returns
251     * the first repetition of 
252     * GOAL_ROLE (a Group object) - creates it if necessary
253     */
254    public PPV_PCA_GOAL_ROLE getGOAL_ROLE() { 
255       PPV_PCA_GOAL_ROLE retVal = getTyped("GOAL_ROLE", PPV_PCA_GOAL_ROLE.class);
256       return retVal;
257    }
258
259
260    /**
261     * Returns a specific repetition of
262     * GOAL_ROLE (a Group object) - creates it if necessary
263     *
264     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
265     * @throws HL7Exception if the repetition requested is more than one 
266     *     greater than the number of existing repetitions.
267     */
268    public PPV_PCA_GOAL_ROLE getGOAL_ROLE(int rep) { 
269       PPV_PCA_GOAL_ROLE retVal = getTyped("GOAL_ROLE", rep, PPV_PCA_GOAL_ROLE.class);
270       return retVal;
271    }
272
273    /** 
274     * Returns the number of existing repetitions of GOAL_ROLE 
275     */ 
276    public int getGOAL_ROLEReps() {  
277        return getReps("GOAL_ROLE");
278    } 
279
280    /** 
281     * <p>
282     * Returns a non-modifiable List containing all current existing repetitions of GOAL_ROLE.
283     * <p>
284     * <p>
285     * Note that unlike {@link #getGOAL_ROLE()}, this method will not create any reps
286     * if none are already present, so an empty list may be returned.
287     * </p>
288     */ 
289    public java.util.List<PPV_PCA_GOAL_ROLE> getGOAL_ROLEAll() throws HL7Exception {
290        return getAllAsList("GOAL_ROLE", PPV_PCA_GOAL_ROLE.class);
291    } 
292
293    /**
294     * Inserts a specific repetition of GOAL_ROLE (a Group object)
295     * @see AbstractGroup#insertRepetition(Structure, int) 
296     */
297    public void insertGOAL_ROLE(PPV_PCA_GOAL_ROLE structure, int rep) throws HL7Exception { 
298       super.insertRepetition("GOAL_ROLE", structure, rep);
299    }
300
301
302    /**
303     * Inserts a specific repetition of GOAL_ROLE (a Group object)
304     * @see AbstractGroup#insertRepetition(Structure, int) 
305     */
306    public PPV_PCA_GOAL_ROLE insertGOAL_ROLE(int rep) throws HL7Exception { 
307       return (PPV_PCA_GOAL_ROLE)super.insertRepetition("GOAL_ROLE", rep);
308    }
309
310
311    /**
312     * Removes a specific repetition of GOAL_ROLE (a Group object)
313     * @see AbstractGroup#removeRepetition(String, int) 
314     */
315    public PPV_PCA_GOAL_ROLE removeGOAL_ROLE(int rep) throws HL7Exception { 
316       return (PPV_PCA_GOAL_ROLE)super.removeRepetition("GOAL_ROLE", rep);
317    }
318
319
320
321    /**
322     * Returns
323     * the first repetition of 
324     * GOAL_PATHWAY (a Group object) - creates it if necessary
325     */
326    public PPV_PCA_GOAL_PATHWAY getGOAL_PATHWAY() { 
327       PPV_PCA_GOAL_PATHWAY retVal = getTyped("GOAL_PATHWAY", PPV_PCA_GOAL_PATHWAY.class);
328       return retVal;
329    }
330
331
332    /**
333     * Returns a specific repetition of
334     * GOAL_PATHWAY (a Group object) - creates it if necessary
335     *
336     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
337     * @throws HL7Exception if the repetition requested is more than one 
338     *     greater than the number of existing repetitions.
339     */
340    public PPV_PCA_GOAL_PATHWAY getGOAL_PATHWAY(int rep) { 
341       PPV_PCA_GOAL_PATHWAY retVal = getTyped("GOAL_PATHWAY", rep, PPV_PCA_GOAL_PATHWAY.class);
342       return retVal;
343    }
344
345    /** 
346     * Returns the number of existing repetitions of GOAL_PATHWAY 
347     */ 
348    public int getGOAL_PATHWAYReps() {  
349        return getReps("GOAL_PATHWAY");
350    } 
351
352    /** 
353     * <p>
354     * Returns a non-modifiable List containing all current existing repetitions of GOAL_PATHWAY.
355     * <p>
356     * <p>
357     * Note that unlike {@link #getGOAL_PATHWAY()}, this method will not create any reps
358     * if none are already present, so an empty list may be returned.
359     * </p>
360     */ 
361    public java.util.List<PPV_PCA_GOAL_PATHWAY> getGOAL_PATHWAYAll() throws HL7Exception {
362        return getAllAsList("GOAL_PATHWAY", PPV_PCA_GOAL_PATHWAY.class);
363    } 
364
365    /**
366     * Inserts a specific repetition of GOAL_PATHWAY (a Group object)
367     * @see AbstractGroup#insertRepetition(Structure, int) 
368     */
369    public void insertGOAL_PATHWAY(PPV_PCA_GOAL_PATHWAY structure, int rep) throws HL7Exception { 
370       super.insertRepetition("GOAL_PATHWAY", structure, rep);
371    }
372
373
374    /**
375     * Inserts a specific repetition of GOAL_PATHWAY (a Group object)
376     * @see AbstractGroup#insertRepetition(Structure, int) 
377     */
378    public PPV_PCA_GOAL_PATHWAY insertGOAL_PATHWAY(int rep) throws HL7Exception { 
379       return (PPV_PCA_GOAL_PATHWAY)super.insertRepetition("GOAL_PATHWAY", rep);
380    }
381
382
383    /**
384     * Removes a specific repetition of GOAL_PATHWAY (a Group object)
385     * @see AbstractGroup#removeRepetition(String, int) 
386     */
387    public PPV_PCA_GOAL_PATHWAY removeGOAL_PATHWAY(int rep) throws HL7Exception { 
388       return (PPV_PCA_GOAL_PATHWAY)super.removeRepetition("GOAL_PATHWAY", rep);
389    }
390
391
392
393    /**
394     * Returns
395     * the first repetition of 
396     * GOAL_OBSERVATION (a Group object) - creates it if necessary
397     */
398    public PPV_PCA_GOAL_OBSERVATION getGOAL_OBSERVATION() { 
399       PPV_PCA_GOAL_OBSERVATION retVal = getTyped("GOAL_OBSERVATION", PPV_PCA_GOAL_OBSERVATION.class);
400       return retVal;
401    }
402
403
404    /**
405     * Returns a specific repetition of
406     * GOAL_OBSERVATION (a Group object) - creates it if necessary
407     *
408     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
409     * @throws HL7Exception if the repetition requested is more than one 
410     *     greater than the number of existing repetitions.
411     */
412    public PPV_PCA_GOAL_OBSERVATION getGOAL_OBSERVATION(int rep) { 
413       PPV_PCA_GOAL_OBSERVATION retVal = getTyped("GOAL_OBSERVATION", rep, PPV_PCA_GOAL_OBSERVATION.class);
414       return retVal;
415    }
416
417    /** 
418     * Returns the number of existing repetitions of GOAL_OBSERVATION 
419     */ 
420    public int getGOAL_OBSERVATIONReps() {  
421        return getReps("GOAL_OBSERVATION");
422    } 
423
424    /** 
425     * <p>
426     * Returns a non-modifiable List containing all current existing repetitions of GOAL_OBSERVATION.
427     * <p>
428     * <p>
429     * Note that unlike {@link #getGOAL_OBSERVATION()}, this method will not create any reps
430     * if none are already present, so an empty list may be returned.
431     * </p>
432     */ 
433    public java.util.List<PPV_PCA_GOAL_OBSERVATION> getGOAL_OBSERVATIONAll() throws HL7Exception {
434        return getAllAsList("GOAL_OBSERVATION", PPV_PCA_GOAL_OBSERVATION.class);
435    } 
436
437    /**
438     * Inserts a specific repetition of GOAL_OBSERVATION (a Group object)
439     * @see AbstractGroup#insertRepetition(Structure, int) 
440     */
441    public void insertGOAL_OBSERVATION(PPV_PCA_GOAL_OBSERVATION structure, int rep) throws HL7Exception { 
442       super.insertRepetition("GOAL_OBSERVATION", structure, rep);
443    }
444
445
446    /**
447     * Inserts a specific repetition of GOAL_OBSERVATION (a Group object)
448     * @see AbstractGroup#insertRepetition(Structure, int) 
449     */
450    public PPV_PCA_GOAL_OBSERVATION insertGOAL_OBSERVATION(int rep) throws HL7Exception { 
451       return (PPV_PCA_GOAL_OBSERVATION)super.insertRepetition("GOAL_OBSERVATION", rep);
452    }
453
454
455    /**
456     * Removes a specific repetition of GOAL_OBSERVATION (a Group object)
457     * @see AbstractGroup#removeRepetition(String, int) 
458     */
459    public PPV_PCA_GOAL_OBSERVATION removeGOAL_OBSERVATION(int rep) throws HL7Exception { 
460       return (PPV_PCA_GOAL_OBSERVATION)super.removeRepetition("GOAL_OBSERVATION", rep);
461    }
462
463
464
465    /**
466     * Returns
467     * the first repetition of 
468     * PROBLEM (a Group object) - creates it if necessary
469     */
470    public PPV_PCA_PROBLEM getPROBLEM() { 
471       PPV_PCA_PROBLEM retVal = getTyped("PROBLEM", PPV_PCA_PROBLEM.class);
472       return retVal;
473    }
474
475
476    /**
477     * Returns a specific repetition of
478     * PROBLEM (a Group object) - creates it if necessary
479     *
480     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
481     * @throws HL7Exception if the repetition requested is more than one 
482     *     greater than the number of existing repetitions.
483     */
484    public PPV_PCA_PROBLEM getPROBLEM(int rep) { 
485       PPV_PCA_PROBLEM retVal = getTyped("PROBLEM", rep, PPV_PCA_PROBLEM.class);
486       return retVal;
487    }
488
489    /** 
490     * Returns the number of existing repetitions of PROBLEM 
491     */ 
492    public int getPROBLEMReps() {  
493        return getReps("PROBLEM");
494    } 
495
496    /** 
497     * <p>
498     * Returns a non-modifiable List containing all current existing repetitions of PROBLEM.
499     * <p>
500     * <p>
501     * Note that unlike {@link #getPROBLEM()}, this method will not create any reps
502     * if none are already present, so an empty list may be returned.
503     * </p>
504     */ 
505    public java.util.List<PPV_PCA_PROBLEM> getPROBLEMAll() throws HL7Exception {
506        return getAllAsList("PROBLEM", PPV_PCA_PROBLEM.class);
507    } 
508
509    /**
510     * Inserts a specific repetition of PROBLEM (a Group object)
511     * @see AbstractGroup#insertRepetition(Structure, int) 
512     */
513    public void insertPROBLEM(PPV_PCA_PROBLEM structure, int rep) throws HL7Exception { 
514       super.insertRepetition("PROBLEM", structure, rep);
515    }
516
517
518    /**
519     * Inserts a specific repetition of PROBLEM (a Group object)
520     * @see AbstractGroup#insertRepetition(Structure, int) 
521     */
522    public PPV_PCA_PROBLEM insertPROBLEM(int rep) throws HL7Exception { 
523       return (PPV_PCA_PROBLEM)super.insertRepetition("PROBLEM", rep);
524    }
525
526
527    /**
528     * Removes a specific repetition of PROBLEM (a Group object)
529     * @see AbstractGroup#removeRepetition(String, int) 
530     */
531    public PPV_PCA_PROBLEM removePROBLEM(int rep) throws HL7Exception { 
532       return (PPV_PCA_PROBLEM)super.removeRepetition("PROBLEM", rep);
533    }
534
535
536
537    /**
538     * Returns
539     * the first repetition of 
540     * ORDER (a Group object) - creates it if necessary
541     */
542    public PPV_PCA_ORDER getORDER() { 
543       PPV_PCA_ORDER retVal = getTyped("ORDER", PPV_PCA_ORDER.class);
544       return retVal;
545    }
546
547
548    /**
549     * Returns a specific repetition of
550     * ORDER (a Group object) - creates it if necessary
551     *
552     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
553     * @throws HL7Exception if the repetition requested is more than one 
554     *     greater than the number of existing repetitions.
555     */
556    public PPV_PCA_ORDER getORDER(int rep) { 
557       PPV_PCA_ORDER retVal = getTyped("ORDER", rep, PPV_PCA_ORDER.class);
558       return retVal;
559    }
560
561    /** 
562     * Returns the number of existing repetitions of ORDER 
563     */ 
564    public int getORDERReps() {  
565        return getReps("ORDER");
566    } 
567
568    /** 
569     * <p>
570     * Returns a non-modifiable List containing all current existing repetitions of ORDER.
571     * <p>
572     * <p>
573     * Note that unlike {@link #getORDER()}, this method will not create any reps
574     * if none are already present, so an empty list may be returned.
575     * </p>
576     */ 
577    public java.util.List<PPV_PCA_ORDER> getORDERAll() throws HL7Exception {
578        return getAllAsList("ORDER", PPV_PCA_ORDER.class);
579    } 
580
581    /**
582     * Inserts a specific repetition of ORDER (a Group object)
583     * @see AbstractGroup#insertRepetition(Structure, int) 
584     */
585    public void insertORDER(PPV_PCA_ORDER structure, int rep) throws HL7Exception { 
586       super.insertRepetition("ORDER", structure, rep);
587    }
588
589
590    /**
591     * Inserts a specific repetition of ORDER (a Group object)
592     * @see AbstractGroup#insertRepetition(Structure, int) 
593     */
594    public PPV_PCA_ORDER insertORDER(int rep) throws HL7Exception { 
595       return (PPV_PCA_ORDER)super.insertRepetition("ORDER", rep);
596    }
597
598
599    /**
600     * Removes a specific repetition of ORDER (a Group object)
601     * @see AbstractGroup#removeRepetition(String, int) 
602     */
603    public PPV_PCA_ORDER removeORDER(int rep) throws HL7Exception { 
604       return (PPV_PCA_ORDER)super.removeRepetition("ORDER", rep);
605    }
606
607
608
609}
610