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.message;
035
036import ca.uhn.hl7v2.model.v26.group.*;
037import ca.uhn.hl7v2.model.v26.segment.*;
038
039import ca.uhn.hl7v2.HL7Exception;
040import ca.uhn.hl7v2.parser.ModelClassFactory;
041import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
042import ca.uhn.hl7v2.model.*;
043
044
045/**
046 * <p>Represents a VXR_V03 message structure (see chapter 4.17.5). This structure contains the 
047 * following elements: </p>
048 * <ul>
049                                 * <li>1: MSH (Message Header) <b> </b> </li>
050                                 * <li>2: MSA (Message Acknowledgment) <b> </b> </li>
051                                 * <li>3: SFT (Software Segment) <b>optional repeating</b> </li>
052                                 * <li>4: UAC (User Authentication Credential Segment) <b>optional </b> </li>
053                                 * <li>5: QRD (Original-Style Query Definition) <b> </b> </li>
054                                 * <li>6: QRF (Original style query filter) <b>optional </b> </li>
055                                 * <li>7: PID (Patient Identification) <b> </b> </li>
056                                 * <li>8: PD1 (Patient Additional Demographic) <b>optional </b> </li>
057                                 * <li>9: NK1 (Next of Kin / Associated Parties) <b>optional repeating</b> </li>
058                                 * <li>10: VXR_V03_PATIENT_VISIT (a Group object) <b>optional </b> </li>
059                                 * <li>11: GT1 (Guarantor) <b>optional repeating</b> </li>
060                                 * <li>12: VXR_V03_INSURANCE (a Group object) <b>optional repeating</b> </li>
061                                 * <li>13: VXR_V03_ORDER (a Group object) <b>optional repeating</b> </li>
062 * </ul>
063 */
064//@SuppressWarnings("unused")
065public class VXR_V03 extends AbstractMessage  {
066
067    /**
068     * Creates a new VXR_V03 message with DefaultModelClassFactory. 
069     */ 
070    public VXR_V03() { 
071       this(new DefaultModelClassFactory());
072    }
073
074    /** 
075     * Creates a new VXR_V03 message with custom ModelClassFactory.
076     */
077    public VXR_V03(ModelClassFactory factory) {
078       super(factory);
079       init(factory);
080    }
081
082    private void init(ModelClassFactory factory) {
083       try {
084                          this.add(MSH.class, true, false);
085                                  this.add(MSA.class, true, false);
086                                  this.add(SFT.class, false, true);
087                                  this.add(UAC.class, false, false);
088                                  this.add(QRD.class, true, false);
089                                  this.add(QRF.class, false, false);
090                                  this.add(PID.class, true, false);
091                                  this.add(PD1.class, false, false);
092                                  this.add(NK1.class, false, true);
093                                  this.add(VXR_V03_PATIENT_VISIT.class, false, false);
094                                  this.add(GT1.class, false, true);
095                                  this.add(VXR_V03_INSURANCE.class, false, true);
096                                  this.add(VXR_V03_ORDER.class, false, true);
097               } catch(HL7Exception e) {
098          log.error("Unexpected error creating VXR_V03 - this is probably a bug in the source code generator.", e);
099       }
100    }
101
102
103    /** 
104     * Returns "2.6"
105     */
106    public String getVersion() {
107       return "2.6";
108    }
109
110
111
112
113    /**
114     * <p>
115     * Returns
116     * MSH (Message Header) - creates it if necessary
117     * </p>
118     * 
119     *
120     */
121    public MSH getMSH() { 
122       return getTyped("MSH", MSH.class);
123    }
124
125
126
127
128
129    /**
130     * <p>
131     * Returns
132     * MSA (Message Acknowledgment) - creates it if necessary
133     * </p>
134     * 
135     *
136     */
137    public MSA getMSA() { 
138       return getTyped("MSA", MSA.class);
139    }
140
141
142
143
144
145    /**
146     * <p>
147     * Returns
148     * the first repetition of 
149     * SFT (Software Segment) - creates it if necessary
150     * </p>
151     * 
152     *
153     */
154    public SFT getSFT() { 
155       return getTyped("SFT", SFT.class);
156    }
157
158
159    /**
160     * <p>
161     * Returns a specific repetition of
162     * SFT (Software Segment) - creates it if necessary
163     * </p>
164     * 
165     *
166     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
167     * @throws HL7Exception if the repetition requested is more than one 
168     *     greater than the number of existing repetitions.
169     */
170    public SFT getSFT(int rep) { 
171       return getTyped("SFT", rep, SFT.class);
172    }
173
174    /** 
175     * <p>
176     * Returns the number of existing repetitions of SFT 
177     * </p>
178     * 
179     */ 
180    public int getSFTReps() { 
181        return getReps("SFT");
182    } 
183
184    /** 
185     * <p>
186     * Returns a non-modifiable List containing all current existing repetitions of SFT.
187     * <p>
188     * <p>
189     * Note that unlike {@link #getSFT()}, this method will not create any reps
190     * if none are already present, so an empty list may be returned.
191     * </p>
192     * 
193     */ 
194    public java.util.List<SFT> getSFTAll() throws HL7Exception {
195        return getAllAsList("SFT", SFT.class);
196    } 
197
198    /**
199     * <p>
200     * Inserts a specific repetition of SFT (Software Segment)
201     * </p>
202     * 
203     *
204     * @see AbstractGroup#insertRepetition(Structure, int) 
205     */
206    public void insertSFT(SFT structure, int rep) throws HL7Exception { 
207       super.insertRepetition( "SFT", structure, rep);
208    }
209
210
211    /**
212     * <p>
213     * Inserts a specific repetition of SFT (Software Segment)
214     * </p>
215     * 
216     *
217     * @see AbstractGroup#insertRepetition(Structure, int) 
218     */
219    public SFT insertSFT(int rep) throws HL7Exception { 
220       return (SFT)super.insertRepetition("SFT", rep);
221    }
222
223
224    /**
225     * <p>
226     * Removes a specific repetition of SFT (Software Segment)
227     * </p>
228     * 
229     *
230     * @see AbstractGroup#removeRepetition(String, int) 
231     */
232    public SFT removeSFT(int rep) throws HL7Exception { 
233       return (SFT)super.removeRepetition("SFT", rep);
234    }
235
236
237
238
239    /**
240     * <p>
241     * Returns
242     * UAC (User Authentication Credential Segment) - creates it if necessary
243     * </p>
244     * 
245     *
246     */
247    public UAC getUAC() { 
248       return getTyped("UAC", UAC.class);
249    }
250
251
252
253
254
255    /**
256     * <p>
257     * Returns
258     * QRD (Original-Style Query Definition) - creates it if necessary
259     * </p>
260     * 
261     *
262     */
263    public QRD getQRD() { 
264       return getTyped("QRD", QRD.class);
265    }
266
267
268
269
270
271    /**
272     * <p>
273     * Returns
274     * QRF (Original style query filter) - creates it if necessary
275     * </p>
276     * 
277     *
278     */
279    public QRF getQRF() { 
280       return getTyped("QRF", QRF.class);
281    }
282
283
284
285
286
287    /**
288     * <p>
289     * Returns
290     * PID (Patient Identification) - creates it if necessary
291     * </p>
292     * 
293     *
294     */
295    public PID getPID() { 
296       return getTyped("PID", PID.class);
297    }
298
299
300
301
302
303    /**
304     * <p>
305     * Returns
306     * PD1 (Patient Additional Demographic) - creates it if necessary
307     * </p>
308     * 
309     *
310     */
311    public PD1 getPD1() { 
312       return getTyped("PD1", PD1.class);
313    }
314
315
316
317
318
319    /**
320     * <p>
321     * Returns
322     * the first repetition of 
323     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
324     * </p>
325     * 
326     *
327     */
328    public NK1 getNK1() { 
329       return getTyped("NK1", NK1.class);
330    }
331
332
333    /**
334     * <p>
335     * Returns a specific repetition of
336     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
337     * </p>
338     * 
339     *
340     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
341     * @throws HL7Exception if the repetition requested is more than one 
342     *     greater than the number of existing repetitions.
343     */
344    public NK1 getNK1(int rep) { 
345       return getTyped("NK1", rep, NK1.class);
346    }
347
348    /** 
349     * <p>
350     * Returns the number of existing repetitions of NK1 
351     * </p>
352     * 
353     */ 
354    public int getNK1Reps() { 
355        return getReps("NK1");
356    } 
357
358    /** 
359     * <p>
360     * Returns a non-modifiable List containing all current existing repetitions of NK1.
361     * <p>
362     * <p>
363     * Note that unlike {@link #getNK1()}, this method will not create any reps
364     * if none are already present, so an empty list may be returned.
365     * </p>
366     * 
367     */ 
368    public java.util.List<NK1> getNK1All() throws HL7Exception {
369        return getAllAsList("NK1", NK1.class);
370    } 
371
372    /**
373     * <p>
374     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
375     * </p>
376     * 
377     *
378     * @see AbstractGroup#insertRepetition(Structure, int) 
379     */
380    public void insertNK1(NK1 structure, int rep) throws HL7Exception { 
381       super.insertRepetition( "NK1", structure, rep);
382    }
383
384
385    /**
386     * <p>
387     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
388     * </p>
389     * 
390     *
391     * @see AbstractGroup#insertRepetition(Structure, int) 
392     */
393    public NK1 insertNK1(int rep) throws HL7Exception { 
394       return (NK1)super.insertRepetition("NK1", rep);
395    }
396
397
398    /**
399     * <p>
400     * Removes a specific repetition of NK1 (Next of Kin / Associated Parties)
401     * </p>
402     * 
403     *
404     * @see AbstractGroup#removeRepetition(String, int) 
405     */
406    public NK1 removeNK1(int rep) throws HL7Exception { 
407       return (NK1)super.removeRepetition("NK1", rep);
408    }
409
410
411
412
413    /**
414     * <p>
415     * Returns
416     * PATIENT_VISIT (a Group object) - creates it if necessary
417     * </p>
418     * 
419     *
420     */
421    public VXR_V03_PATIENT_VISIT getPATIENT_VISIT() { 
422       return getTyped("PATIENT_VISIT", VXR_V03_PATIENT_VISIT.class);
423    }
424
425
426
427
428
429    /**
430     * <p>
431     * Returns
432     * the first repetition of 
433     * GT1 (Guarantor) - creates it if necessary
434     * </p>
435     * 
436     *
437     */
438    public GT1 getGT1() { 
439       return getTyped("GT1", GT1.class);
440    }
441
442
443    /**
444     * <p>
445     * Returns a specific repetition of
446     * GT1 (Guarantor) - creates it if necessary
447     * </p>
448     * 
449     *
450     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
451     * @throws HL7Exception if the repetition requested is more than one 
452     *     greater than the number of existing repetitions.
453     */
454    public GT1 getGT1(int rep) { 
455       return getTyped("GT1", rep, GT1.class);
456    }
457
458    /** 
459     * <p>
460     * Returns the number of existing repetitions of GT1 
461     * </p>
462     * 
463     */ 
464    public int getGT1Reps() { 
465        return getReps("GT1");
466    } 
467
468    /** 
469     * <p>
470     * Returns a non-modifiable List containing all current existing repetitions of GT1.
471     * <p>
472     * <p>
473     * Note that unlike {@link #getGT1()}, this method will not create any reps
474     * if none are already present, so an empty list may be returned.
475     * </p>
476     * 
477     */ 
478    public java.util.List<GT1> getGT1All() throws HL7Exception {
479        return getAllAsList("GT1", GT1.class);
480    } 
481
482    /**
483     * <p>
484     * Inserts a specific repetition of GT1 (Guarantor)
485     * </p>
486     * 
487     *
488     * @see AbstractGroup#insertRepetition(Structure, int) 
489     */
490    public void insertGT1(GT1 structure, int rep) throws HL7Exception { 
491       super.insertRepetition( "GT1", structure, rep);
492    }
493
494
495    /**
496     * <p>
497     * Inserts a specific repetition of GT1 (Guarantor)
498     * </p>
499     * 
500     *
501     * @see AbstractGroup#insertRepetition(Structure, int) 
502     */
503    public GT1 insertGT1(int rep) throws HL7Exception { 
504       return (GT1)super.insertRepetition("GT1", rep);
505    }
506
507
508    /**
509     * <p>
510     * Removes a specific repetition of GT1 (Guarantor)
511     * </p>
512     * 
513     *
514     * @see AbstractGroup#removeRepetition(String, int) 
515     */
516    public GT1 removeGT1(int rep) throws HL7Exception { 
517       return (GT1)super.removeRepetition("GT1", rep);
518    }
519
520
521
522
523    /**
524     * <p>
525     * Returns
526     * the first repetition of 
527     * INSURANCE (a Group object) - creates it if necessary
528     * </p>
529     * 
530     *
531     */
532    public VXR_V03_INSURANCE getINSURANCE() { 
533       return getTyped("INSURANCE", VXR_V03_INSURANCE.class);
534    }
535
536
537    /**
538     * <p>
539     * Returns a specific repetition of
540     * INSURANCE (a Group object) - creates it if necessary
541     * </p>
542     * 
543     *
544     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
545     * @throws HL7Exception if the repetition requested is more than one 
546     *     greater than the number of existing repetitions.
547     */
548    public VXR_V03_INSURANCE getINSURANCE(int rep) { 
549       return getTyped("INSURANCE", rep, VXR_V03_INSURANCE.class);
550    }
551
552    /** 
553     * <p>
554     * Returns the number of existing repetitions of INSURANCE 
555     * </p>
556     * 
557     */ 
558    public int getINSURANCEReps() { 
559        return getReps("INSURANCE");
560    } 
561
562    /** 
563     * <p>
564     * Returns a non-modifiable List containing all current existing repetitions of INSURANCE.
565     * <p>
566     * <p>
567     * Note that unlike {@link #getINSURANCE()}, this method will not create any reps
568     * if none are already present, so an empty list may be returned.
569     * </p>
570     * 
571     */ 
572    public java.util.List<VXR_V03_INSURANCE> getINSURANCEAll() throws HL7Exception {
573        return getAllAsList("INSURANCE", VXR_V03_INSURANCE.class);
574    } 
575
576    /**
577     * <p>
578     * Inserts a specific repetition of INSURANCE (a Group object)
579     * </p>
580     * 
581     *
582     * @see AbstractGroup#insertRepetition(Structure, int) 
583     */
584    public void insertINSURANCE(VXR_V03_INSURANCE structure, int rep) throws HL7Exception { 
585       super.insertRepetition( "INSURANCE", structure, rep);
586    }
587
588
589    /**
590     * <p>
591     * Inserts a specific repetition of INSURANCE (a Group object)
592     * </p>
593     * 
594     *
595     * @see AbstractGroup#insertRepetition(Structure, int) 
596     */
597    public VXR_V03_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 
598       return (VXR_V03_INSURANCE)super.insertRepetition("INSURANCE", rep);
599    }
600
601
602    /**
603     * <p>
604     * Removes a specific repetition of INSURANCE (a Group object)
605     * </p>
606     * 
607     *
608     * @see AbstractGroup#removeRepetition(String, int) 
609     */
610    public VXR_V03_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 
611       return (VXR_V03_INSURANCE)super.removeRepetition("INSURANCE", rep);
612    }
613
614
615
616
617    /**
618     * <p>
619     * Returns
620     * the first repetition of 
621     * ORDER (a Group object) - creates it if necessary
622     * </p>
623     * 
624     *
625     */
626    public VXR_V03_ORDER getORDER() { 
627       return getTyped("ORDER", VXR_V03_ORDER.class);
628    }
629
630
631    /**
632     * <p>
633     * Returns a specific repetition of
634     * ORDER (a Group object) - creates it if necessary
635     * </p>
636     * 
637     *
638     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
639     * @throws HL7Exception if the repetition requested is more than one 
640     *     greater than the number of existing repetitions.
641     */
642    public VXR_V03_ORDER getORDER(int rep) { 
643       return getTyped("ORDER", rep, VXR_V03_ORDER.class);
644    }
645
646    /** 
647     * <p>
648     * Returns the number of existing repetitions of ORDER 
649     * </p>
650     * 
651     */ 
652    public int getORDERReps() { 
653        return getReps("ORDER");
654    } 
655
656    /** 
657     * <p>
658     * Returns a non-modifiable List containing all current existing repetitions of ORDER.
659     * <p>
660     * <p>
661     * Note that unlike {@link #getORDER()}, this method will not create any reps
662     * if none are already present, so an empty list may be returned.
663     * </p>
664     * 
665     */ 
666    public java.util.List<VXR_V03_ORDER> getORDERAll() throws HL7Exception {
667        return getAllAsList("ORDER", VXR_V03_ORDER.class);
668    } 
669
670    /**
671     * <p>
672     * Inserts a specific repetition of ORDER (a Group object)
673     * </p>
674     * 
675     *
676     * @see AbstractGroup#insertRepetition(Structure, int) 
677     */
678    public void insertORDER(VXR_V03_ORDER structure, int rep) throws HL7Exception { 
679       super.insertRepetition( "ORDER", structure, rep);
680    }
681
682
683    /**
684     * <p>
685     * Inserts a specific repetition of ORDER (a Group object)
686     * </p>
687     * 
688     *
689     * @see AbstractGroup#insertRepetition(Structure, int) 
690     */
691    public VXR_V03_ORDER insertORDER(int rep) throws HL7Exception { 
692       return (VXR_V03_ORDER)super.insertRepetition("ORDER", rep);
693    }
694
695
696    /**
697     * <p>
698     * Removes a specific repetition of ORDER (a Group object)
699     * </p>
700     * 
701     *
702     * @see AbstractGroup#removeRepetition(String, int) 
703     */
704    public VXR_V03_ORDER removeORDER(int rep) throws HL7Exception { 
705       return (VXR_V03_ORDER)super.removeRepetition("ORDER", rep);
706    }
707
708
709
710}
711