View Javadoc
1   /*
2    * This class is an auto-generated source file for a HAPI
3    * HL7 v2.x standard structure class.
4    *
5    * For more information, visit: http://hl7api.sourceforge.net/
6    * 
7    * The contents of this file are subject to the Mozilla Public License Version 1.1 
8    * (the "License"); you may not use this file except in compliance with the License. 
9    * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
10   * Software distributed under the License is distributed on an "AS IS" basis, 
11   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
12   * specific language governing rights and limitations under the License. 
13   * 
14   * The Original Code is "[file_name]".  Description: 
15   * "[one_line_description]" 
16   * 
17   * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
18   * 2012.  All Rights Reserved. 
19   * 
20   * Contributor(s): ______________________________________. 
21   * 
22   * Alternatively, the contents of this file may be used under the terms of the 
23   * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
24   * applicable instead of those above.  If you wish to allow use of your version of this 
25   * file only under the terms of the GPL and not to allow others to use your version 
26   * of this file under the MPL, indicate your decision by deleting  the provisions above 
27   * and replace  them with the notice and other provisions required by the GPL License.  
28   * If you do not delete the provisions above, a recipient may use your version of 
29   * this file under either the MPL or the GPL. 
30   * 
31   */
32  
33  
34  package ca.uhn.hl7v2.model.v24.message;
35  
36  import ca.uhn.hl7v2.model.v24.group.*;
37  import ca.uhn.hl7v2.model.v24.segment.*;
38  
39  import ca.uhn.hl7v2.HL7Exception;
40  import ca.uhn.hl7v2.parser.ModelClassFactory;
41  import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
42  import ca.uhn.hl7v2.model.*;
43  
44  
45  /**
46   * <p>Represents a RCL_I06 message structure (see chapter 11). This structure contains the 
47   * following elements: </p>
48   * <ul>
49  		                 * <li>1: MSH (Message Header) <b> </b> </li>
50  		                 * <li>2: MSA (Message Acknowledgment) <b> </b> </li>
51  		                 * <li>3: QRD (Original-Style Query Definition) <b> </b> </li>
52  		                 * <li>4: QRF (Original Style Query Filter) <b>optional </b> </li>
53  		                 * <li>5: RCL_I06_PROVIDER (a Group object) <b> repeating</b> </li>
54  		                 * <li>6: PID (Patient identification) <b> </b> </li>
55  		                 * <li>7: DG1 (Diagnosis) <b>optional repeating</b> </li>
56  		                 * <li>8: DRG (Diagnosis Related Group) <b>optional repeating</b> </li>
57  		                 * <li>9: AL1 (Patient allergy information) <b>optional repeating</b> </li>
58  		                 * <li>10: NTE (Notes and Comments) <b>optional repeating</b> </li>
59  		                 * <li>11: DSP (Display Data) <b>optional repeating</b> </li>
60  		                 * <li>12: DSC (Continuation Pointer) <b>optional </b> </li>
61   * </ul>
62   */
63  //@SuppressWarnings("unused")
64  public class RCL_I06 extends AbstractMessage  {
65  
66      /**
67       * Creates a new RCL_I06 message with DefaultModelClassFactory. 
68       */ 
69      public RCL_I06() { 
70         this(new DefaultModelClassFactory());
71      }
72  
73      /** 
74       * Creates a new RCL_I06 message with custom ModelClassFactory.
75       */
76      public RCL_I06(ModelClassFactory factory) {
77         super(factory);
78         init(factory);
79      }
80  
81      private void init(ModelClassFactory factory) {
82         try {
83                            this.add(MSH.class, true, false);
84  	                          this.add(MSA.class, true, false);
85  	                          this.add(QRD.class, true, false);
86  	                          this.add(QRF.class, false, false);
87  	                          this.add(RCL_I06_PROVIDER.class, true, true);
88  	                          this.add(PID.class, true, false);
89  	                          this.add(DG1.class, false, true);
90  	                          this.add(DRG.class, false, true);
91  	                          this.add(AL1.class, false, true);
92  	                          this.add(NTE.class, false, true);
93  	                          this.add(DSP.class, false, true);
94  	                          this.add(DSC.class, false, false);
95  	       } catch(HL7Exception e) {
96            log.error("Unexpected error creating RCL_I06 - this is probably a bug in the source code generator.", e);
97         }
98      }
99  
100 
101     /** 
102      * Returns "2.4"
103      */
104     public String getVersion() {
105        return "2.4";
106     }
107 
108 
109 
110 
111     /**
112      * <p>
113      * Returns
114      * MSH (Message Header) - creates it if necessary
115      * </p>
116      * 
117      *
118      */
119     public MSH getMSH() { 
120        return getTyped("MSH", MSH.class);
121     }
122 
123 
124 
125 
126 
127     /**
128      * <p>
129      * Returns
130      * MSA (Message Acknowledgment) - creates it if necessary
131      * </p>
132      * 
133      *
134      */
135     public MSA getMSA() { 
136        return getTyped("MSA", MSA.class);
137     }
138 
139 
140 
141 
142 
143     /**
144      * <p>
145      * Returns
146      * QRD (Original-Style Query Definition) - creates it if necessary
147      * </p>
148      * 
149      *
150      */
151     public QRD getQRD() { 
152        return getTyped("QRD", QRD.class);
153     }
154 
155 
156 
157 
158 
159     /**
160      * <p>
161      * Returns
162      * QRF (Original Style Query Filter) - creates it if necessary
163      * </p>
164      * 
165      *
166      */
167     public QRF getQRF() { 
168        return getTyped("QRF", QRF.class);
169     }
170 
171 
172 
173 
174 
175     /**
176      * <p>
177      * Returns
178      * the first repetition of 
179      * PROVIDER (a Group object) - creates it if necessary
180      * </p>
181      * 
182      *
183      */
184     public RCL_I06_PROVIDER getPROVIDER() { 
185        return getTyped("PROVIDER", RCL_I06_PROVIDER.class);
186     }
187 
188 
189     /**
190      * <p>
191      * Returns a specific repetition of
192      * PROVIDER (a Group object) - creates it if necessary
193      * </p>
194      * 
195      *
196      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
197      * @throws HL7Exception if the repetition requested is more than one 
198      *     greater than the number of existing repetitions.
199      */
200     public RCL_I06_PROVIDER getPROVIDER(int rep) { 
201        return getTyped("PROVIDER", rep, RCL_I06_PROVIDER.class);
202     }
203 
204     /** 
205      * <p>
206      * Returns the number of existing repetitions of PROVIDER 
207      * </p>
208      * 
209      */ 
210     public int getPROVIDERReps() { 
211     	return getReps("PROVIDER");
212     } 
213 
214     /** 
215      * <p>
216      * Returns a non-modifiable List containing all current existing repetitions of PROVIDER.
217      * <p>
218      * <p>
219      * Note that unlike {@link #getPROVIDER()}, this method will not create any reps
220      * if none are already present, so an empty list may be returned.
221      * </p>
222      * 
223      */ 
224     public java.util.List<RCL_I06_PROVIDER> getPROVIDERAll() throws HL7Exception {
225     	return getAllAsList("PROVIDER", RCL_I06_PROVIDER.class);
226     } 
227 
228     /**
229      * <p>
230      * Inserts a specific repetition of PROVIDER (a Group object)
231      * </p>
232      * 
233      *
234      * @see AbstractGroup#insertRepetition(Structure, int) 
235      */
236     public void insertPROVIDER(RCL_I06_PROVIDER structure, int rep) throws HL7Exception { 
237        super.insertRepetition( "PROVIDER", structure, rep);
238     }
239 
240 
241     /**
242      * <p>
243      * Inserts a specific repetition of PROVIDER (a Group object)
244      * </p>
245      * 
246      *
247      * @see AbstractGroup#insertRepetition(Structure, int) 
248      */
249     public RCL_I06_PROVIDER insertPROVIDER(int rep) throws HL7Exception { 
250        return (RCL_I06_PROVIDER)super.insertRepetition("PROVIDER", rep);
251     }
252 
253 
254     /**
255      * <p>
256      * Removes a specific repetition of PROVIDER (a Group object)
257      * </p>
258      * 
259      *
260      * @see AbstractGroup#removeRepetition(String, int) 
261      */
262     public RCL_I06_PROVIDER removePROVIDER(int rep) throws HL7Exception { 
263        return (RCL_I06_PROVIDER)super.removeRepetition("PROVIDER", rep);
264     }
265 
266 
267 
268 
269     /**
270      * <p>
271      * Returns
272      * PID (Patient identification) - creates it if necessary
273      * </p>
274      * 
275      *
276      */
277     public PID getPID() { 
278        return getTyped("PID", PID.class);
279     }
280 
281 
282 
283 
284 
285     /**
286      * <p>
287      * Returns
288      * the first repetition of 
289      * DG1 (Diagnosis) - creates it if necessary
290      * </p>
291      * 
292      *
293      */
294     public DG1 getDG1() { 
295        return getTyped("DG1", DG1.class);
296     }
297 
298 
299     /**
300      * <p>
301      * Returns a specific repetition of
302      * DG1 (Diagnosis) - creates it if necessary
303      * </p>
304      * 
305      *
306      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
307      * @throws HL7Exception if the repetition requested is more than one 
308      *     greater than the number of existing repetitions.
309      */
310     public DG1 getDG1(int rep) { 
311        return getTyped("DG1", rep, DG1.class);
312     }
313 
314     /** 
315      * <p>
316      * Returns the number of existing repetitions of DG1 
317      * </p>
318      * 
319      */ 
320     public int getDG1Reps() { 
321     	return getReps("DG1");
322     } 
323 
324     /** 
325      * <p>
326      * Returns a non-modifiable List containing all current existing repetitions of DG1.
327      * <p>
328      * <p>
329      * Note that unlike {@link #getDG1()}, this method will not create any reps
330      * if none are already present, so an empty list may be returned.
331      * </p>
332      * 
333      */ 
334     public java.util.List<DG1> getDG1All() throws HL7Exception {
335     	return getAllAsList("DG1", DG1.class);
336     } 
337 
338     /**
339      * <p>
340      * Inserts a specific repetition of DG1 (Diagnosis)
341      * </p>
342      * 
343      *
344      * @see AbstractGroup#insertRepetition(Structure, int) 
345      */
346     public void insertDG1(DG1 structure, int rep) throws HL7Exception { 
347        super.insertRepetition( "DG1", structure, rep);
348     }
349 
350 
351     /**
352      * <p>
353      * Inserts a specific repetition of DG1 (Diagnosis)
354      * </p>
355      * 
356      *
357      * @see AbstractGroup#insertRepetition(Structure, int) 
358      */
359     public DG1 insertDG1(int rep) throws HL7Exception { 
360        return (DG1)super.insertRepetition("DG1", rep);
361     }
362 
363 
364     /**
365      * <p>
366      * Removes a specific repetition of DG1 (Diagnosis)
367      * </p>
368      * 
369      *
370      * @see AbstractGroup#removeRepetition(String, int) 
371      */
372     public DG1 removeDG1(int rep) throws HL7Exception { 
373        return (DG1)super.removeRepetition("DG1", rep);
374     }
375 
376 
377 
378 
379     /**
380      * <p>
381      * Returns
382      * the first repetition of 
383      * DRG (Diagnosis Related Group) - creates it if necessary
384      * </p>
385      * 
386      *
387      */
388     public DRG getDRG() { 
389        return getTyped("DRG", DRG.class);
390     }
391 
392 
393     /**
394      * <p>
395      * Returns a specific repetition of
396      * DRG (Diagnosis Related Group) - creates it if necessary
397      * </p>
398      * 
399      *
400      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
401      * @throws HL7Exception if the repetition requested is more than one 
402      *     greater than the number of existing repetitions.
403      */
404     public DRG getDRG(int rep) { 
405        return getTyped("DRG", rep, DRG.class);
406     }
407 
408     /** 
409      * <p>
410      * Returns the number of existing repetitions of DRG 
411      * </p>
412      * 
413      */ 
414     public int getDRGReps() { 
415     	return getReps("DRG");
416     } 
417 
418     /** 
419      * <p>
420      * Returns a non-modifiable List containing all current existing repetitions of DRG.
421      * <p>
422      * <p>
423      * Note that unlike {@link #getDRG()}, this method will not create any reps
424      * if none are already present, so an empty list may be returned.
425      * </p>
426      * 
427      */ 
428     public java.util.List<DRG> getDRGAll() throws HL7Exception {
429     	return getAllAsList("DRG", DRG.class);
430     } 
431 
432     /**
433      * <p>
434      * Inserts a specific repetition of DRG (Diagnosis Related Group)
435      * </p>
436      * 
437      *
438      * @see AbstractGroup#insertRepetition(Structure, int) 
439      */
440     public void insertDRG(DRG structure, int rep) throws HL7Exception { 
441        super.insertRepetition( "DRG", structure, rep);
442     }
443 
444 
445     /**
446      * <p>
447      * Inserts a specific repetition of DRG (Diagnosis Related Group)
448      * </p>
449      * 
450      *
451      * @see AbstractGroup#insertRepetition(Structure, int) 
452      */
453     public DRG insertDRG(int rep) throws HL7Exception { 
454        return (DRG)super.insertRepetition("DRG", rep);
455     }
456 
457 
458     /**
459      * <p>
460      * Removes a specific repetition of DRG (Diagnosis Related Group)
461      * </p>
462      * 
463      *
464      * @see AbstractGroup#removeRepetition(String, int) 
465      */
466     public DRG removeDRG(int rep) throws HL7Exception { 
467        return (DRG)super.removeRepetition("DRG", rep);
468     }
469 
470 
471 
472 
473     /**
474      * <p>
475      * Returns
476      * the first repetition of 
477      * AL1 (Patient allergy information) - creates it if necessary
478      * </p>
479      * 
480      *
481      */
482     public AL1 getAL1() { 
483        return getTyped("AL1", AL1.class);
484     }
485 
486 
487     /**
488      * <p>
489      * Returns a specific repetition of
490      * AL1 (Patient allergy information) - creates it if necessary
491      * </p>
492      * 
493      *
494      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
495      * @throws HL7Exception if the repetition requested is more than one 
496      *     greater than the number of existing repetitions.
497      */
498     public AL1 getAL1(int rep) { 
499        return getTyped("AL1", rep, AL1.class);
500     }
501 
502     /** 
503      * <p>
504      * Returns the number of existing repetitions of AL1 
505      * </p>
506      * 
507      */ 
508     public int getAL1Reps() { 
509     	return getReps("AL1");
510     } 
511 
512     /** 
513      * <p>
514      * Returns a non-modifiable List containing all current existing repetitions of AL1.
515      * <p>
516      * <p>
517      * Note that unlike {@link #getAL1()}, this method will not create any reps
518      * if none are already present, so an empty list may be returned.
519      * </p>
520      * 
521      */ 
522     public java.util.List<AL1> getAL1All() throws HL7Exception {
523     	return getAllAsList("AL1", AL1.class);
524     } 
525 
526     /**
527      * <p>
528      * Inserts a specific repetition of AL1 (Patient allergy information)
529      * </p>
530      * 
531      *
532      * @see AbstractGroup#insertRepetition(Structure, int) 
533      */
534     public void insertAL1(AL1 structure, int rep) throws HL7Exception { 
535        super.insertRepetition( "AL1", structure, rep);
536     }
537 
538 
539     /**
540      * <p>
541      * Inserts a specific repetition of AL1 (Patient allergy information)
542      * </p>
543      * 
544      *
545      * @see AbstractGroup#insertRepetition(Structure, int) 
546      */
547     public AL1 insertAL1(int rep) throws HL7Exception { 
548        return (AL1)super.insertRepetition("AL1", rep);
549     }
550 
551 
552     /**
553      * <p>
554      * Removes a specific repetition of AL1 (Patient allergy information)
555      * </p>
556      * 
557      *
558      * @see AbstractGroup#removeRepetition(String, int) 
559      */
560     public AL1 removeAL1(int rep) throws HL7Exception { 
561        return (AL1)super.removeRepetition("AL1", rep);
562     }
563 
564 
565 
566 
567     /**
568      * <p>
569      * Returns
570      * the first repetition of 
571      * NTE (Notes and Comments) - creates it if necessary
572      * </p>
573      * 
574      *
575      */
576     public NTE getNTE() { 
577        return getTyped("NTE", NTE.class);
578     }
579 
580 
581     /**
582      * <p>
583      * Returns a specific repetition of
584      * NTE (Notes and Comments) - creates it if necessary
585      * </p>
586      * 
587      *
588      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
589      * @throws HL7Exception if the repetition requested is more than one 
590      *     greater than the number of existing repetitions.
591      */
592     public NTE getNTE(int rep) { 
593        return getTyped("NTE", rep, NTE.class);
594     }
595 
596     /** 
597      * <p>
598      * Returns the number of existing repetitions of NTE 
599      * </p>
600      * 
601      */ 
602     public int getNTEReps() { 
603     	return getReps("NTE");
604     } 
605 
606     /** 
607      * <p>
608      * Returns a non-modifiable List containing all current existing repetitions of NTE.
609      * <p>
610      * <p>
611      * Note that unlike {@link #getNTE()}, this method will not create any reps
612      * if none are already present, so an empty list may be returned.
613      * </p>
614      * 
615      */ 
616     public java.util.List<NTE> getNTEAll() throws HL7Exception {
617     	return getAllAsList("NTE", NTE.class);
618     } 
619 
620     /**
621      * <p>
622      * Inserts a specific repetition of NTE (Notes and Comments)
623      * </p>
624      * 
625      *
626      * @see AbstractGroup#insertRepetition(Structure, int) 
627      */
628     public void insertNTE(NTE structure, int rep) throws HL7Exception { 
629        super.insertRepetition( "NTE", structure, rep);
630     }
631 
632 
633     /**
634      * <p>
635      * Inserts a specific repetition of NTE (Notes and Comments)
636      * </p>
637      * 
638      *
639      * @see AbstractGroup#insertRepetition(Structure, int) 
640      */
641     public NTE insertNTE(int rep) throws HL7Exception { 
642        return (NTE)super.insertRepetition("NTE", rep);
643     }
644 
645 
646     /**
647      * <p>
648      * Removes a specific repetition of NTE (Notes and Comments)
649      * </p>
650      * 
651      *
652      * @see AbstractGroup#removeRepetition(String, int) 
653      */
654     public NTE removeNTE(int rep) throws HL7Exception { 
655        return (NTE)super.removeRepetition("NTE", rep);
656     }
657 
658 
659 
660 
661     /**
662      * <p>
663      * Returns
664      * the first repetition of 
665      * DSP (Display Data) - creates it if necessary
666      * </p>
667      * 
668      *
669      */
670     public DSP getDSP() { 
671        return getTyped("DSP", DSP.class);
672     }
673 
674 
675     /**
676      * <p>
677      * Returns a specific repetition of
678      * DSP (Display Data) - creates it if necessary
679      * </p>
680      * 
681      *
682      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
683      * @throws HL7Exception if the repetition requested is more than one 
684      *     greater than the number of existing repetitions.
685      */
686     public DSP getDSP(int rep) { 
687        return getTyped("DSP", rep, DSP.class);
688     }
689 
690     /** 
691      * <p>
692      * Returns the number of existing repetitions of DSP 
693      * </p>
694      * 
695      */ 
696     public int getDSPReps() { 
697     	return getReps("DSP");
698     } 
699 
700     /** 
701      * <p>
702      * Returns a non-modifiable List containing all current existing repetitions of DSP.
703      * <p>
704      * <p>
705      * Note that unlike {@link #getDSP()}, this method will not create any reps
706      * if none are already present, so an empty list may be returned.
707      * </p>
708      * 
709      */ 
710     public java.util.List<DSP> getDSPAll() throws HL7Exception {
711     	return getAllAsList("DSP", DSP.class);
712     } 
713 
714     /**
715      * <p>
716      * Inserts a specific repetition of DSP (Display Data)
717      * </p>
718      * 
719      *
720      * @see AbstractGroup#insertRepetition(Structure, int) 
721      */
722     public void insertDSP(DSP structure, int rep) throws HL7Exception { 
723        super.insertRepetition( "DSP", structure, rep);
724     }
725 
726 
727     /**
728      * <p>
729      * Inserts a specific repetition of DSP (Display Data)
730      * </p>
731      * 
732      *
733      * @see AbstractGroup#insertRepetition(Structure, int) 
734      */
735     public DSP insertDSP(int rep) throws HL7Exception { 
736        return (DSP)super.insertRepetition("DSP", rep);
737     }
738 
739 
740     /**
741      * <p>
742      * Removes a specific repetition of DSP (Display Data)
743      * </p>
744      * 
745      *
746      * @see AbstractGroup#removeRepetition(String, int) 
747      */
748     public DSP removeDSP(int rep) throws HL7Exception { 
749        return (DSP)super.removeRepetition("DSP", rep);
750     }
751 
752 
753 
754 
755     /**
756      * <p>
757      * Returns
758      * DSC (Continuation Pointer) - creates it if necessary
759      * </p>
760      * 
761      *
762      */
763     public DSC getDSC() { 
764        return getTyped("DSC", DSC.class);
765     }
766 
767 
768 
769 
770 }
771