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_A24 message structure (see chapter 3.3.24). 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: PV1 (Patient Visit) <b>optional </b> </li>
56  		                 * <li>8: DB1 (Disability) <b>optional repeating</b> </li>
57  		                 * <li>9: PID (Patient Identification) <b> </b> </li>
58  		                 * <li>10: PD1 (Patient Additional Demographic) <b>optional </b> </li>
59  		                 * <li>11: PV1 (Patient Visit) <b>optional </b> </li>
60  		                 * <li>12: DB1 (Disability) <b>optional repeating</b> </li>
61   * </ul>
62   */
63  //@SuppressWarnings("unused")
64  public class ADT_A24 extends AbstractMessage  {
65  
66      /**
67       * Creates a new ADT_A24 message with DefaultModelClassFactory. 
68       */ 
69      public ADT_A24() { 
70         this(new DefaultModelClassFactory());
71      }
72  
73      /** 
74       * Creates a new ADT_A24 message with custom ModelClassFactory.
75       */
76      public ADT_A24(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(SFT.class, false, true);
85  	                          this.add(UAC.class, false, false);
86  	                          this.add(EVN.class, true, false);
87  	                          this.add(PID.class, true, false);
88  	                          this.add(PD1.class, false, false);
89  	                          this.add(PV1.class, false, false);
90  	                          this.add(DB1.class, false, true);
91  	                          this.add(PID.class, true, false);
92  	                          this.add(PD1.class, false, false);
93  	                          this.add(PV1.class, false, false);
94  	                          this.add(DB1.class, false, true);
95  	       } catch(HL7Exception e) {
96            log.error("Unexpected error creating ADT_A24 - this is probably a bug in the source code generator.", e);
97         }
98      }
99  
100 
101     /** 
102      * Returns "2.8.1"
103      */
104     public String getVersion() {
105        return "2.8.1";
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      * the first repetition of 
131      * SFT (Software Segment) - creates it if necessary
132      * </p>
133      * 
134      *
135      */
136     public SFT getSFT() { 
137        return getTyped("SFT", SFT.class);
138     }
139 
140 
141     /**
142      * <p>
143      * Returns a specific repetition of
144      * SFT (Software Segment) - creates it if necessary
145      * </p>
146      * 
147      *
148      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
149      * @throws HL7Exception if the repetition requested is more than one 
150      *     greater than the number of existing repetitions.
151      */
152     public SFT getSFT(int rep) { 
153        return getTyped("SFT", rep, SFT.class);
154     }
155 
156     /** 
157      * <p>
158      * Returns the number of existing repetitions of SFT 
159      * </p>
160      * 
161      */ 
162     public int getSFTReps() { 
163     	return getReps("SFT");
164     } 
165 
166     /** 
167      * <p>
168      * Returns a non-modifiable List containing all current existing repetitions of SFT.
169      * <p>
170      * <p>
171      * Note that unlike {@link #getSFT()}, this method will not create any reps
172      * if none are already present, so an empty list may be returned.
173      * </p>
174      * 
175      */ 
176     public java.util.List<SFT> getSFTAll() throws HL7Exception {
177     	return getAllAsList("SFT", SFT.class);
178     } 
179 
180     /**
181      * <p>
182      * Inserts a specific repetition of SFT (Software Segment)
183      * </p>
184      * 
185      *
186      * @see AbstractGroup#insertRepetition(Structure, int) 
187      */
188     public void insertSFT(SFT structure, int rep) throws HL7Exception { 
189        super.insertRepetition( "SFT", structure, rep);
190     }
191 
192 
193     /**
194      * <p>
195      * Inserts a specific repetition of SFT (Software Segment)
196      * </p>
197      * 
198      *
199      * @see AbstractGroup#insertRepetition(Structure, int) 
200      */
201     public SFT insertSFT(int rep) throws HL7Exception { 
202        return (SFT)super.insertRepetition("SFT", rep);
203     }
204 
205 
206     /**
207      * <p>
208      * Removes a specific repetition of SFT (Software Segment)
209      * </p>
210      * 
211      *
212      * @see AbstractGroup#removeRepetition(String, int) 
213      */
214     public SFT removeSFT(int rep) throws HL7Exception { 
215        return (SFT)super.removeRepetition("SFT", rep);
216     }
217 
218 
219 
220 
221     /**
222      * <p>
223      * Returns
224      * UAC (User Authentication Credential Segment) - creates it if necessary
225      * </p>
226      * 
227      *
228      */
229     public UAC getUAC() { 
230        return getTyped("UAC", UAC.class);
231     }
232 
233 
234 
235 
236 
237     /**
238      * <p>
239      * Returns
240      * EVN (Event Type) - creates it if necessary
241      * </p>
242      * 
243      *
244      */
245     public EVN getEVN() { 
246        return getTyped("EVN", EVN.class);
247     }
248 
249 
250 
251 
252 
253     /**
254      * <p>
255      * Returns
256      * PID (Patient Identification) - creates it if necessary
257      * </p>
258      * 
259      *
260      */
261     public PID getPID() { 
262        return getTyped("PID", PID.class);
263     }
264 
265 
266 
267 
268 
269     /**
270      * <p>
271      * Returns
272      * PD1 (Patient Additional Demographic) - creates it if necessary
273      * </p>
274      * 
275      *
276      */
277     public PD1 getPD1() { 
278        return getTyped("PD1", PD1.class);
279     }
280 
281 
282 
283 
284 
285     /**
286      * <p>
287      * Returns
288      * PV1 (Patient Visit) - creates it if necessary
289      * </p>
290      * 
291      *
292      */
293     public PV1 getPV1() { 
294        return getTyped("PV1", PV1.class);
295     }
296 
297 
298 
299 
300 
301     /**
302      * <p>
303      * Returns
304      * the first repetition of 
305      * DB1 (Disability) - creates it if necessary
306      * </p>
307      * 
308      *
309      */
310     public DB1 getDB1() { 
311        return getTyped("DB1", DB1.class);
312     }
313 
314 
315     /**
316      * <p>
317      * Returns a specific repetition of
318      * DB1 (Disability) - creates it if necessary
319      * </p>
320      * 
321      *
322      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
323      * @throws HL7Exception if the repetition requested is more than one 
324      *     greater than the number of existing repetitions.
325      */
326     public DB1 getDB1(int rep) { 
327        return getTyped("DB1", rep, DB1.class);
328     }
329 
330     /** 
331      * <p>
332      * Returns the number of existing repetitions of DB1 
333      * </p>
334      * 
335      */ 
336     public int getDB1Reps() { 
337     	return getReps("DB1");
338     } 
339 
340     /** 
341      * <p>
342      * Returns a non-modifiable List containing all current existing repetitions of DB1.
343      * <p>
344      * <p>
345      * Note that unlike {@link #getDB1()}, this method will not create any reps
346      * if none are already present, so an empty list may be returned.
347      * </p>
348      * 
349      */ 
350     public java.util.List<DB1> getDB1All() throws HL7Exception {
351     	return getAllAsList("DB1", DB1.class);
352     } 
353 
354     /**
355      * <p>
356      * Inserts a specific repetition of DB1 (Disability)
357      * </p>
358      * 
359      *
360      * @see AbstractGroup#insertRepetition(Structure, int) 
361      */
362     public void insertDB1(DB1 structure, int rep) throws HL7Exception { 
363        super.insertRepetition( "DB1", structure, rep);
364     }
365 
366 
367     /**
368      * <p>
369      * Inserts a specific repetition of DB1 (Disability)
370      * </p>
371      * 
372      *
373      * @see AbstractGroup#insertRepetition(Structure, int) 
374      */
375     public DB1 insertDB1(int rep) throws HL7Exception { 
376        return (DB1)super.insertRepetition("DB1", rep);
377     }
378 
379 
380     /**
381      * <p>
382      * Removes a specific repetition of DB1 (Disability)
383      * </p>
384      * 
385      *
386      * @see AbstractGroup#removeRepetition(String, int) 
387      */
388     public DB1 removeDB1(int rep) throws HL7Exception { 
389        return (DB1)super.removeRepetition("DB1", rep);
390     }
391 
392 
393 
394 
395     /**
396      * <p>
397      * Returns
398      * PID2 (Patient Identification) - creates it if necessary
399      * </p>
400      * 
401      *
402      */
403     public PID getPID2() { 
404        return getTyped("PID2", PID.class);
405     }
406 
407 
408 
409 
410 
411     /**
412      * <p>
413      * Returns
414      * PD12 (Patient Additional Demographic) - creates it if necessary
415      * </p>
416      * 
417      *
418      */
419     public PD1 getPD12() { 
420        return getTyped("PD12", PD1.class);
421     }
422 
423 
424 
425 
426 
427     /**
428      * <p>
429      * Returns
430      * PV12 (Patient Visit) - creates it if necessary
431      * </p>
432      * 
433      *
434      */
435     public PV1 getPV12() { 
436        return getTyped("PV12", PV1.class);
437     }
438 
439 
440 
441 
442 
443     /**
444      * <p>
445      * Returns
446      * the first repetition of 
447      * DB12 (Disability) - creates it if necessary
448      * </p>
449      * 
450      *
451      */
452     public DB1 getDB12() { 
453        return getTyped("DB12", DB1.class);
454     }
455 
456 
457     /**
458      * <p>
459      * Returns a specific repetition of
460      * DB12 (Disability) - creates it if necessary
461      * </p>
462      * 
463      *
464      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
465      * @throws HL7Exception if the repetition requested is more than one 
466      *     greater than the number of existing repetitions.
467      */
468     public DB1 getDB12(int rep) { 
469        return getTyped("DB12", rep, DB1.class);
470     }
471 
472     /** 
473      * <p>
474      * Returns the number of existing repetitions of DB12 
475      * </p>
476      * 
477      */ 
478     public int getDB12Reps() { 
479     	return getReps("DB12");
480     } 
481 
482     /** 
483      * <p>
484      * Returns a non-modifiable List containing all current existing repetitions of DB12.
485      * <p>
486      * <p>
487      * Note that unlike {@link #getDB12()}, this method will not create any reps
488      * if none are already present, so an empty list may be returned.
489      * </p>
490      * 
491      */ 
492     public java.util.List<DB1> getDB12All() throws HL7Exception {
493     	return getAllAsList("DB12", DB1.class);
494     } 
495 
496     /**
497      * <p>
498      * Inserts a specific repetition of DB12 (Disability)
499      * </p>
500      * 
501      *
502      * @see AbstractGroup#insertRepetition(Structure, int) 
503      */
504     public void insertDB12(DB1 structure, int rep) throws HL7Exception { 
505        super.insertRepetition( "DB12", structure, rep);
506     }
507 
508 
509     /**
510      * <p>
511      * Inserts a specific repetition of DB12 (Disability)
512      * </p>
513      * 
514      *
515      * @see AbstractGroup#insertRepetition(Structure, int) 
516      */
517     public DB1 insertDB12(int rep) throws HL7Exception { 
518        return (DB1)super.insertRepetition("DB12", rep);
519     }
520 
521 
522     /**
523      * <p>
524      * Removes a specific repetition of DB12 (Disability)
525      * </p>
526      * 
527      *
528      * @see AbstractGroup#removeRepetition(String, int) 
529      */
530     public DB1 removeDB12(int rep) throws HL7Exception { 
531        return (DB1)super.removeRepetition("DB12", rep);
532     }
533 
534 
535 
536 }
537