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.v281.message;
35  
36  import ca.uhn.hl7v2.model.v281.group.*;
37  import ca.uhn.hl7v2.model.v281.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 ADT_A15 message structure (see chapter 3.3.15). This structure contains the 
47   * following elements: </p>
48   * <ul>
49  		                 * <li>1: MSH (Message Header) <b> </b> </li>
50  		                 * <li>2: SFT (Software Segment) <b>optional repeating</b> </li>
51  		                 * <li>3: UAC (User Authentication Credential Segment) <b>optional </b> </li>
52  		                 * <li>4: EVN (Event Type) <b> </b> </li>
53  		                 * <li>5: PID (Patient Identification) <b> </b> </li>
54  		                 * <li>6: PD1 (Patient Additional Demographic) <b>optional </b> </li>
55  		                 * <li>7: ARV (Access Restriction) <b>optional repeating</b> </li>
56  		                 * <li>8: ROL (Role) <b>optional repeating</b> </li>
57  		                 * <li>9: PV1 (Patient Visit) <b> </b> </li>
58  		                 * <li>10: PV2 (Patient Visit - Additional Information) <b>optional </b> </li>
59  		                 * <li>11: ARV (Access Restriction) <b>optional repeating</b> </li>
60  		                 * <li>12: ROL (Role) <b>optional repeating</b> </li>
61  		                 * <li>13: DB1 (Disability) <b>optional repeating</b> </li>
62  		                 * <li>14: OBX (Observation/Result) <b>optional repeating</b> </li>
63   * </ul>
64   */
65  //@SuppressWarnings("unused")
66  public class ADT_A15 extends AbstractMessage  {
67  
68      /**
69       * Creates a new ADT_A15 message with DefaultModelClassFactory. 
70       */ 
71      public ADT_A15() { 
72         this(new DefaultModelClassFactory());
73      }
74  
75      /** 
76       * Creates a new ADT_A15 message with custom ModelClassFactory.
77       */
78      public ADT_A15(ModelClassFactory factory) {
79         super(factory);
80         init(factory);
81      }
82  
83      private void init(ModelClassFactory factory) {
84         try {
85                            this.add(MSH.class, true, false);
86  	                          this.add(SFT.class, false, true);
87  	                          this.add(UAC.class, false, false);
88  	                          this.add(EVN.class, true, false);
89  	                          this.add(PID.class, true, false);
90  	                          this.add(PD1.class, false, false);
91  	                          this.add(ARV.class, false, true);
92  	                          this.add(ROL.class, false, true);
93  	                          this.add(PV1.class, true, false);
94  	                          this.add(PV2.class, false, false);
95  	                          this.add(ARV.class, false, true);
96  	                          this.add(ROL.class, false, true);
97  	                          this.add(DB1.class, false, true);
98  	                          this.add(OBX.class, false, true);
99  	       } catch(HL7Exception e) {
100           log.error("Unexpected error creating ADT_A15 - this is probably a bug in the source code generator.", e);
101        }
102     }
103 
104 
105     /** 
106      * Returns "2.8.1"
107      */
108     public String getVersion() {
109        return "2.8.1";
110     }
111 
112 
113 
114 
115     /**
116      * <p>
117      * Returns
118      * MSH (Message Header) - creates it if necessary
119      * </p>
120      * 
121      *
122      */
123     public MSH getMSH() { 
124        return getTyped("MSH", MSH.class);
125     }
126 
127 
128 
129 
130 
131     /**
132      * <p>
133      * Returns
134      * the first repetition of 
135      * SFT (Software Segment) - creates it if necessary
136      * </p>
137      * 
138      *
139      */
140     public SFT getSFT() { 
141        return getTyped("SFT", SFT.class);
142     }
143 
144 
145     /**
146      * <p>
147      * Returns a specific repetition of
148      * SFT (Software Segment) - creates it if necessary
149      * </p>
150      * 
151      *
152      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
153      * @throws HL7Exception if the repetition requested is more than one 
154      *     greater than the number of existing repetitions.
155      */
156     public SFT getSFT(int rep) { 
157        return getTyped("SFT", rep, SFT.class);
158     }
159 
160     /** 
161      * <p>
162      * Returns the number of existing repetitions of SFT 
163      * </p>
164      * 
165      */ 
166     public int getSFTReps() { 
167     	return getReps("SFT");
168     } 
169 
170     /** 
171      * <p>
172      * Returns a non-modifiable List containing all current existing repetitions of SFT.
173      * <p>
174      * <p>
175      * Note that unlike {@link #getSFT()}, this method will not create any reps
176      * if none are already present, so an empty list may be returned.
177      * </p>
178      * 
179      */ 
180     public java.util.List<SFT> getSFTAll() throws HL7Exception {
181     	return getAllAsList("SFT", SFT.class);
182     } 
183 
184     /**
185      * <p>
186      * Inserts a specific repetition of SFT (Software Segment)
187      * </p>
188      * 
189      *
190      * @see AbstractGroup#insertRepetition(Structure, int) 
191      */
192     public void insertSFT(SFT structure, int rep) throws HL7Exception { 
193        super.insertRepetition( "SFT", structure, rep);
194     }
195 
196 
197     /**
198      * <p>
199      * Inserts a specific repetition of SFT (Software Segment)
200      * </p>
201      * 
202      *
203      * @see AbstractGroup#insertRepetition(Structure, int) 
204      */
205     public SFT insertSFT(int rep) throws HL7Exception { 
206        return (SFT)super.insertRepetition("SFT", rep);
207     }
208 
209 
210     /**
211      * <p>
212      * Removes a specific repetition of SFT (Software Segment)
213      * </p>
214      * 
215      *
216      * @see AbstractGroup#removeRepetition(String, int) 
217      */
218     public SFT removeSFT(int rep) throws HL7Exception { 
219        return (SFT)super.removeRepetition("SFT", rep);
220     }
221 
222 
223 
224 
225     /**
226      * <p>
227      * Returns
228      * UAC (User Authentication Credential Segment) - creates it if necessary
229      * </p>
230      * 
231      *
232      */
233     public UAC getUAC() { 
234        return getTyped("UAC", UAC.class);
235     }
236 
237 
238 
239 
240 
241     /**
242      * <p>
243      * Returns
244      * EVN (Event Type) - creates it if necessary
245      * </p>
246      * 
247      *
248      */
249     public EVN getEVN() { 
250        return getTyped("EVN", EVN.class);
251     }
252 
253 
254 
255 
256 
257     /**
258      * <p>
259      * Returns
260      * PID (Patient Identification) - creates it if necessary
261      * </p>
262      * 
263      *
264      */
265     public PID getPID() { 
266        return getTyped("PID", PID.class);
267     }
268 
269 
270 
271 
272 
273     /**
274      * <p>
275      * Returns
276      * PD1 (Patient Additional Demographic) - creates it if necessary
277      * </p>
278      * 
279      *
280      */
281     public PD1 getPD1() { 
282        return getTyped("PD1", PD1.class);
283     }
284 
285 
286 
287 
288 
289     /**
290      * <p>
291      * Returns
292      * the first repetition of 
293      * ARV (Access Restriction) - creates it if necessary
294      * </p>
295      * 
296      *
297      */
298     public ARV getARV() { 
299        return getTyped("ARV", ARV.class);
300     }
301 
302 
303     /**
304      * <p>
305      * Returns a specific repetition of
306      * ARV (Access Restriction) - creates it if necessary
307      * </p>
308      * 
309      *
310      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
311      * @throws HL7Exception if the repetition requested is more than one 
312      *     greater than the number of existing repetitions.
313      */
314     public ARV getARV(int rep) { 
315        return getTyped("ARV", rep, ARV.class);
316     }
317 
318     /** 
319      * <p>
320      * Returns the number of existing repetitions of ARV 
321      * </p>
322      * 
323      */ 
324     public int getARVReps() { 
325     	return getReps("ARV");
326     } 
327 
328     /** 
329      * <p>
330      * Returns a non-modifiable List containing all current existing repetitions of ARV.
331      * <p>
332      * <p>
333      * Note that unlike {@link #getARV()}, this method will not create any reps
334      * if none are already present, so an empty list may be returned.
335      * </p>
336      * 
337      */ 
338     public java.util.List<ARV> getARVAll() throws HL7Exception {
339     	return getAllAsList("ARV", ARV.class);
340     } 
341 
342     /**
343      * <p>
344      * Inserts a specific repetition of ARV (Access Restriction)
345      * </p>
346      * 
347      *
348      * @see AbstractGroup#insertRepetition(Structure, int) 
349      */
350     public void insertARV(ARV structure, int rep) throws HL7Exception { 
351        super.insertRepetition( "ARV", structure, rep);
352     }
353 
354 
355     /**
356      * <p>
357      * Inserts a specific repetition of ARV (Access Restriction)
358      * </p>
359      * 
360      *
361      * @see AbstractGroup#insertRepetition(Structure, int) 
362      */
363     public ARV insertARV(int rep) throws HL7Exception { 
364        return (ARV)super.insertRepetition("ARV", rep);
365     }
366 
367 
368     /**
369      * <p>
370      * Removes a specific repetition of ARV (Access Restriction)
371      * </p>
372      * 
373      *
374      * @see AbstractGroup#removeRepetition(String, int) 
375      */
376     public ARV removeARV(int rep) throws HL7Exception { 
377        return (ARV)super.removeRepetition("ARV", rep);
378     }
379 
380 
381 
382 
383     /**
384      * <p>
385      * Returns
386      * the first repetition of 
387      * ROL (Role) - creates it if necessary
388      * </p>
389      * 
390      *
391      */
392     public ROL getROL() { 
393        return getTyped("ROL", ROL.class);
394     }
395 
396 
397     /**
398      * <p>
399      * Returns a specific repetition of
400      * ROL (Role) - creates it if necessary
401      * </p>
402      * 
403      *
404      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
405      * @throws HL7Exception if the repetition requested is more than one 
406      *     greater than the number of existing repetitions.
407      */
408     public ROL getROL(int rep) { 
409        return getTyped("ROL", rep, ROL.class);
410     }
411 
412     /** 
413      * <p>
414      * Returns the number of existing repetitions of ROL 
415      * </p>
416      * 
417      */ 
418     public int getROLReps() { 
419     	return getReps("ROL");
420     } 
421 
422     /** 
423      * <p>
424      * Returns a non-modifiable List containing all current existing repetitions of ROL.
425      * <p>
426      * <p>
427      * Note that unlike {@link #getROL()}, this method will not create any reps
428      * if none are already present, so an empty list may be returned.
429      * </p>
430      * 
431      */ 
432     public java.util.List<ROL> getROLAll() throws HL7Exception {
433     	return getAllAsList("ROL", ROL.class);
434     } 
435 
436     /**
437      * <p>
438      * Inserts a specific repetition of ROL (Role)
439      * </p>
440      * 
441      *
442      * @see AbstractGroup#insertRepetition(Structure, int) 
443      */
444     public void insertROL(ROL structure, int rep) throws HL7Exception { 
445        super.insertRepetition( "ROL", structure, rep);
446     }
447 
448 
449     /**
450      * <p>
451      * Inserts a specific repetition of ROL (Role)
452      * </p>
453      * 
454      *
455      * @see AbstractGroup#insertRepetition(Structure, int) 
456      */
457     public ROL insertROL(int rep) throws HL7Exception { 
458        return (ROL)super.insertRepetition("ROL", rep);
459     }
460 
461 
462     /**
463      * <p>
464      * Removes a specific repetition of ROL (Role)
465      * </p>
466      * 
467      *
468      * @see AbstractGroup#removeRepetition(String, int) 
469      */
470     public ROL removeROL(int rep) throws HL7Exception { 
471        return (ROL)super.removeRepetition("ROL", rep);
472     }
473 
474 
475 
476 
477     /**
478      * <p>
479      * Returns
480      * PV1 (Patient Visit) - creates it if necessary
481      * </p>
482      * 
483      *
484      */
485     public PV1 getPV1() { 
486        return getTyped("PV1", PV1.class);
487     }
488 
489 
490 
491 
492 
493     /**
494      * <p>
495      * Returns
496      * PV2 (Patient Visit - Additional Information) - creates it if necessary
497      * </p>
498      * 
499      *
500      */
501     public PV2 getPV2() { 
502        return getTyped("PV2", PV2.class);
503     }
504 
505 
506 
507 
508 
509     /**
510      * <p>
511      * Returns
512      * the first repetition of 
513      * ARV2 (Access Restriction) - creates it if necessary
514      * </p>
515      * 
516      *
517      */
518     public ARV getARV2() { 
519        return getTyped("ARV2", ARV.class);
520     }
521 
522 
523     /**
524      * <p>
525      * Returns a specific repetition of
526      * ARV2 (Access Restriction) - creates it if necessary
527      * </p>
528      * 
529      *
530      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
531      * @throws HL7Exception if the repetition requested is more than one 
532      *     greater than the number of existing repetitions.
533      */
534     public ARV getARV2(int rep) { 
535        return getTyped("ARV2", rep, ARV.class);
536     }
537 
538     /** 
539      * <p>
540      * Returns the number of existing repetitions of ARV2 
541      * </p>
542      * 
543      */ 
544     public int getARV2Reps() { 
545     	return getReps("ARV2");
546     } 
547 
548     /** 
549      * <p>
550      * Returns a non-modifiable List containing all current existing repetitions of ARV2.
551      * <p>
552      * <p>
553      * Note that unlike {@link #getARV2()}, this method will not create any reps
554      * if none are already present, so an empty list may be returned.
555      * </p>
556      * 
557      */ 
558     public java.util.List<ARV> getARV2All() throws HL7Exception {
559     	return getAllAsList("ARV2", ARV.class);
560     } 
561 
562     /**
563      * <p>
564      * Inserts a specific repetition of ARV2 (Access Restriction)
565      * </p>
566      * 
567      *
568      * @see AbstractGroup#insertRepetition(Structure, int) 
569      */
570     public void insertARV2(ARV structure, int rep) throws HL7Exception { 
571        super.insertRepetition( "ARV2", structure, rep);
572     }
573 
574 
575     /**
576      * <p>
577      * Inserts a specific repetition of ARV2 (Access Restriction)
578      * </p>
579      * 
580      *
581      * @see AbstractGroup#insertRepetition(Structure, int) 
582      */
583     public ARV insertARV2(int rep) throws HL7Exception { 
584        return (ARV)super.insertRepetition("ARV2", rep);
585     }
586 
587 
588     /**
589      * <p>
590      * Removes a specific repetition of ARV2 (Access Restriction)
591      * </p>
592      * 
593      *
594      * @see AbstractGroup#removeRepetition(String, int) 
595      */
596     public ARV removeARV2(int rep) throws HL7Exception { 
597        return (ARV)super.removeRepetition("ARV2", rep);
598     }
599 
600 
601 
602 
603     /**
604      * <p>
605      * Returns
606      * the first repetition of 
607      * ROL2 (Role) - creates it if necessary
608      * </p>
609      * 
610      *
611      */
612     public ROL getROL2() { 
613        return getTyped("ROL2", ROL.class);
614     }
615 
616 
617     /**
618      * <p>
619      * Returns a specific repetition of
620      * ROL2 (Role) - creates it if necessary
621      * </p>
622      * 
623      *
624      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
625      * @throws HL7Exception if the repetition requested is more than one 
626      *     greater than the number of existing repetitions.
627      */
628     public ROL getROL2(int rep) { 
629        return getTyped("ROL2", rep, ROL.class);
630     }
631 
632     /** 
633      * <p>
634      * Returns the number of existing repetitions of ROL2 
635      * </p>
636      * 
637      */ 
638     public int getROL2Reps() { 
639     	return getReps("ROL2");
640     } 
641 
642     /** 
643      * <p>
644      * Returns a non-modifiable List containing all current existing repetitions of ROL2.
645      * <p>
646      * <p>
647      * Note that unlike {@link #getROL2()}, this method will not create any reps
648      * if none are already present, so an empty list may be returned.
649      * </p>
650      * 
651      */ 
652     public java.util.List<ROL> getROL2All() throws HL7Exception {
653     	return getAllAsList("ROL2", ROL.class);
654     } 
655 
656     /**
657      * <p>
658      * Inserts a specific repetition of ROL2 (Role)
659      * </p>
660      * 
661      *
662      * @see AbstractGroup#insertRepetition(Structure, int) 
663      */
664     public void insertROL2(ROL structure, int rep) throws HL7Exception { 
665        super.insertRepetition( "ROL2", structure, rep);
666     }
667 
668 
669     /**
670      * <p>
671      * Inserts a specific repetition of ROL2 (Role)
672      * </p>
673      * 
674      *
675      * @see AbstractGroup#insertRepetition(Structure, int) 
676      */
677     public ROL insertROL2(int rep) throws HL7Exception { 
678        return (ROL)super.insertRepetition("ROL2", rep);
679     }
680 
681 
682     /**
683      * <p>
684      * Removes a specific repetition of ROL2 (Role)
685      * </p>
686      * 
687      *
688      * @see AbstractGroup#removeRepetition(String, int) 
689      */
690     public ROL removeROL2(int rep) throws HL7Exception { 
691        return (ROL)super.removeRepetition("ROL2", rep);
692     }
693 
694 
695 
696 
697     /**
698      * <p>
699      * Returns
700      * the first repetition of 
701      * DB1 (Disability) - creates it if necessary
702      * </p>
703      * 
704      *
705      */
706     public DB1 getDB1() { 
707        return getTyped("DB1", DB1.class);
708     }
709 
710 
711     /**
712      * <p>
713      * Returns a specific repetition of
714      * DB1 (Disability) - creates it if necessary
715      * </p>
716      * 
717      *
718      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
719      * @throws HL7Exception if the repetition requested is more than one 
720      *     greater than the number of existing repetitions.
721      */
722     public DB1 getDB1(int rep) { 
723        return getTyped("DB1", rep, DB1.class);
724     }
725 
726     /** 
727      * <p>
728      * Returns the number of existing repetitions of DB1 
729      * </p>
730      * 
731      */ 
732     public int getDB1Reps() { 
733     	return getReps("DB1");
734     } 
735 
736     /** 
737      * <p>
738      * Returns a non-modifiable List containing all current existing repetitions of DB1.
739      * <p>
740      * <p>
741      * Note that unlike {@link #getDB1()}, this method will not create any reps
742      * if none are already present, so an empty list may be returned.
743      * </p>
744      * 
745      */ 
746     public java.util.List<DB1> getDB1All() throws HL7Exception {
747     	return getAllAsList("DB1", DB1.class);
748     } 
749 
750     /**
751      * <p>
752      * Inserts a specific repetition of DB1 (Disability)
753      * </p>
754      * 
755      *
756      * @see AbstractGroup#insertRepetition(Structure, int) 
757      */
758     public void insertDB1(DB1 structure, int rep) throws HL7Exception { 
759        super.insertRepetition( "DB1", structure, rep);
760     }
761 
762 
763     /**
764      * <p>
765      * Inserts a specific repetition of DB1 (Disability)
766      * </p>
767      * 
768      *
769      * @see AbstractGroup#insertRepetition(Structure, int) 
770      */
771     public DB1 insertDB1(int rep) throws HL7Exception { 
772        return (DB1)super.insertRepetition("DB1", rep);
773     }
774 
775 
776     /**
777      * <p>
778      * Removes a specific repetition of DB1 (Disability)
779      * </p>
780      * 
781      *
782      * @see AbstractGroup#removeRepetition(String, int) 
783      */
784     public DB1 removeDB1(int rep) throws HL7Exception { 
785        return (DB1)super.removeRepetition("DB1", rep);
786     }
787 
788 
789 
790 
791     /**
792      * <p>
793      * Returns
794      * the first repetition of 
795      * OBX (Observation/Result) - creates it if necessary
796      * </p>
797      * 
798      *
799      */
800     public OBX getOBX() { 
801        return getTyped("OBX", OBX.class);
802     }
803 
804 
805     /**
806      * <p>
807      * Returns a specific repetition of
808      * OBX (Observation/Result) - creates it if necessary
809      * </p>
810      * 
811      *
812      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
813      * @throws HL7Exception if the repetition requested is more than one 
814      *     greater than the number of existing repetitions.
815      */
816     public OBX getOBX(int rep) { 
817        return getTyped("OBX", rep, OBX.class);
818     }
819 
820     /** 
821      * <p>
822      * Returns the number of existing repetitions of OBX 
823      * </p>
824      * 
825      */ 
826     public int getOBXReps() { 
827     	return getReps("OBX");
828     } 
829 
830     /** 
831      * <p>
832      * Returns a non-modifiable List containing all current existing repetitions of OBX.
833      * <p>
834      * <p>
835      * Note that unlike {@link #getOBX()}, this method will not create any reps
836      * if none are already present, so an empty list may be returned.
837      * </p>
838      * 
839      */ 
840     public java.util.List<OBX> getOBXAll() throws HL7Exception {
841     	return getAllAsList("OBX", OBX.class);
842     } 
843 
844     /**
845      * <p>
846      * Inserts a specific repetition of OBX (Observation/Result)
847      * </p>
848      * 
849      *
850      * @see AbstractGroup#insertRepetition(Structure, int) 
851      */
852     public void insertOBX(OBX structure, int rep) throws HL7Exception { 
853        super.insertRepetition( "OBX", structure, rep);
854     }
855 
856 
857     /**
858      * <p>
859      * Inserts a specific repetition of OBX (Observation/Result)
860      * </p>
861      * 
862      *
863      * @see AbstractGroup#insertRepetition(Structure, int) 
864      */
865     public OBX insertOBX(int rep) throws HL7Exception { 
866        return (OBX)super.insertRepetition("OBX", rep);
867     }
868 
869 
870     /**
871      * <p>
872      * Removes a specific repetition of OBX (Observation/Result)
873      * </p>
874      * 
875      *
876      * @see AbstractGroup#removeRepetition(String, int) 
877      */
878     public OBX removeOBX(int rep) throws HL7Exception { 
879        return (OBX)super.removeRepetition("OBX", rep);
880     }
881 
882 
883 
884 }
885