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.v21.message;
35  
36  import ca.uhn.hl7v2.model.v21.group.*;
37  import ca.uhn.hl7v2.model.v21.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_AXX message structure (see chapter ). This structure contains the 
47   * following elements: </p>
48   * <ul>
49  		                 * <li>1: MSH () <b> </b> <ul><li>Used for the following structures: [ADT_A01, ADT_A02, ADT_A03, ADT_A04, ADT_A05, ADT_A06, ADT_A07, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16, ADT_A17, ADT_A18, ADT_A20, ADT_A21, ADT_A22, ADT_A23, ADT_A24]</li></ul></li>
50  		                 * <li>2: EVN () <b> </b> <ul><li>Used for the following structures: [ADT_A01, ADT_A02, ADT_A03, ADT_A04, ADT_A05, ADT_A06, ADT_A07, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16, ADT_A17, ADT_A18, ADT_A20, ADT_A21, ADT_A22, ADT_A23, ADT_A24]</li></ul></li>
51  		                 * <li>3: PID () <b>optional </b> <ul><li>Used for the following structures: [ADT_A01, ADT_A02, ADT_A03, ADT_A04, ADT_A05, ADT_A06, ADT_A07, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16, ADT_A18, ADT_A21, ADT_A22, ADT_A23, ADT_A24]</li></ul></li>
52  		                 * <li>4: MRG () <b>optional </b> <ul><li>Used for the following structures: [ADT_A18]</li></ul></li>
53  		                 * <li>5: PD1 () <b>optional </b> <ul><li>Used for the following structures: [ADT_A14]</li></ul></li>
54  		                 * <li>6: NK1 () <b>optional </b> <ul><li>Used for the following structures: [ADT_A01, ADT_A04, ADT_A05, ADT_A08, ADT_A14]</li></ul></li>
55  		                 * <li>7: PV1 () <b>optional </b> <ul><li>Used for the following structures: [ADT_A01, ADT_A02, ADT_A03, ADT_A04, ADT_A05, ADT_A06, ADT_A07, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16, ADT_A18, ADT_A21, ADT_A22, ADT_A23, ADT_A24]</li></ul></li>
56  		                 * <li>8: DG1 () <b>optional </b> <ul><li>Used for the following structures: [ADT_A01, ADT_A04, ADT_A05, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16]</li></ul></li>
57  		                 * <li>9: ADT_AXX_PATIENT () <b>optional repeating</b> </li>
58  		                 * <li>10: NPU () <b>optional </b> <ul><li>Used for the following structures: [ADT_A20]</li></ul></li>
59  		                 * <li>11: PID () <b>optional </b> <ul><li>Used for the following structures: [ADT_A24]</li></ul></li>
60   * </ul>
61   */
62  //@SuppressWarnings("unused")
63  public class ADT_AXX extends AbstractSuperMessage  {
64  
65      /**
66       * Creates a new ADT_AXX message with DefaultModelClassFactory. 
67       */ 
68      public ADT_AXX() { 
69         this(new DefaultModelClassFactory());
70      }
71  
72      /** 
73       * Creates a new ADT_AXX message with custom ModelClassFactory.
74       */
75      public ADT_AXX(ModelClassFactory factory) {
76         super(factory);
77         init(factory);
78      }
79  
80      private void init(ModelClassFactory factory) {
81         try {
82                            this.add(MSH.class, true, false);
83  	          this.addSuperstructureApplication("MSH", "ADT_A01"); 
84  	          this.addSuperstructureApplication("MSH", "ADT_A02"); 
85  	          this.addSuperstructureApplication("MSH", "ADT_A03"); 
86  	          this.addSuperstructureApplication("MSH", "ADT_A04"); 
87  	          this.addSuperstructureApplication("MSH", "ADT_A05"); 
88  	          this.addSuperstructureApplication("MSH", "ADT_A06"); 
89  	          this.addSuperstructureApplication("MSH", "ADT_A07"); 
90  	          this.addSuperstructureApplication("MSH", "ADT_A08"); 
91  	          this.addSuperstructureApplication("MSH", "ADT_A09"); 
92  	          this.addSuperstructureApplication("MSH", "ADT_A10"); 
93  	          this.addSuperstructureApplication("MSH", "ADT_A11"); 
94  	          this.addSuperstructureApplication("MSH", "ADT_A12"); 
95  	          this.addSuperstructureApplication("MSH", "ADT_A13"); 
96  	          this.addSuperstructureApplication("MSH", "ADT_A14"); 
97  	          this.addSuperstructureApplication("MSH", "ADT_A15"); 
98  	          this.addSuperstructureApplication("MSH", "ADT_A16"); 
99  	          this.addSuperstructureApplication("MSH", "ADT_A17"); 
100 	          this.addSuperstructureApplication("MSH", "ADT_A18"); 
101 	          this.addSuperstructureApplication("MSH", "ADT_A20"); 
102 	          this.addSuperstructureApplication("MSH", "ADT_A21"); 
103 	          this.addSuperstructureApplication("MSH", "ADT_A22"); 
104 	          this.addSuperstructureApplication("MSH", "ADT_A23"); 
105 	          this.addSuperstructureApplication("MSH", "ADT_A24"); 
106 	                          this.add(EVN.class, true, false);
107 	          this.addSuperstructureApplication("EVN", "ADT_A01"); 
108 	          this.addSuperstructureApplication("EVN", "ADT_A02"); 
109 	          this.addSuperstructureApplication("EVN", "ADT_A03"); 
110 	          this.addSuperstructureApplication("EVN", "ADT_A04"); 
111 	          this.addSuperstructureApplication("EVN", "ADT_A05"); 
112 	          this.addSuperstructureApplication("EVN", "ADT_A06"); 
113 	          this.addSuperstructureApplication("EVN", "ADT_A07"); 
114 	          this.addSuperstructureApplication("EVN", "ADT_A08"); 
115 	          this.addSuperstructureApplication("EVN", "ADT_A09"); 
116 	          this.addSuperstructureApplication("EVN", "ADT_A10"); 
117 	          this.addSuperstructureApplication("EVN", "ADT_A11"); 
118 	          this.addSuperstructureApplication("EVN", "ADT_A12"); 
119 	          this.addSuperstructureApplication("EVN", "ADT_A13"); 
120 	          this.addSuperstructureApplication("EVN", "ADT_A14"); 
121 	          this.addSuperstructureApplication("EVN", "ADT_A15"); 
122 	          this.addSuperstructureApplication("EVN", "ADT_A16"); 
123 	          this.addSuperstructureApplication("EVN", "ADT_A17"); 
124 	          this.addSuperstructureApplication("EVN", "ADT_A18"); 
125 	          this.addSuperstructureApplication("EVN", "ADT_A20"); 
126 	          this.addSuperstructureApplication("EVN", "ADT_A21"); 
127 	          this.addSuperstructureApplication("EVN", "ADT_A22"); 
128 	          this.addSuperstructureApplication("EVN", "ADT_A23"); 
129 	          this.addSuperstructureApplication("EVN", "ADT_A24"); 
130 	                          this.add(PID.class, false, false);
131 	          this.addSuperstructureApplication("PID", "ADT_A01"); 
132 	          this.addSuperstructureApplication("PID", "ADT_A02"); 
133 	          this.addSuperstructureApplication("PID", "ADT_A03"); 
134 	          this.addSuperstructureApplication("PID", "ADT_A04"); 
135 	          this.addSuperstructureApplication("PID", "ADT_A05"); 
136 	          this.addSuperstructureApplication("PID", "ADT_A06"); 
137 	          this.addSuperstructureApplication("PID", "ADT_A07"); 
138 	          this.addSuperstructureApplication("PID", "ADT_A08"); 
139 	          this.addSuperstructureApplication("PID", "ADT_A09"); 
140 	          this.addSuperstructureApplication("PID", "ADT_A10"); 
141 	          this.addSuperstructureApplication("PID", "ADT_A11"); 
142 	          this.addSuperstructureApplication("PID", "ADT_A12"); 
143 	          this.addSuperstructureApplication("PID", "ADT_A13"); 
144 	          this.addSuperstructureApplication("PID", "ADT_A14"); 
145 	          this.addSuperstructureApplication("PID", "ADT_A15"); 
146 	          this.addSuperstructureApplication("PID", "ADT_A16"); 
147 	          this.addSuperstructureApplication("PID", "ADT_A18"); 
148 	          this.addSuperstructureApplication("PID", "ADT_A21"); 
149 	          this.addSuperstructureApplication("PID", "ADT_A22"); 
150 	          this.addSuperstructureApplication("PID", "ADT_A23"); 
151 	          this.addSuperstructureApplication("PID", "ADT_A24"); 
152 	                          this.add(MRG.class, false, false);
153 	          this.addSuperstructureApplication("MRG", "ADT_A18"); 
154 	                          this.add(PD1.class, false, false);
155 	          this.addSuperstructureApplication("PD1", "ADT_A14"); 
156 	                          this.add(NK1.class, false, false);
157 	          this.addSuperstructureApplication("NK1", "ADT_A01"); 
158 	          this.addSuperstructureApplication("NK1", "ADT_A04"); 
159 	          this.addSuperstructureApplication("NK1", "ADT_A05"); 
160 	          this.addSuperstructureApplication("NK1", "ADT_A08"); 
161 	          this.addSuperstructureApplication("NK1", "ADT_A14"); 
162 	                          this.add(PV1.class, false, false);
163 	          this.addSuperstructureApplication("PV1", "ADT_A01"); 
164 	          this.addSuperstructureApplication("PV1", "ADT_A02"); 
165 	          this.addSuperstructureApplication("PV1", "ADT_A03"); 
166 	          this.addSuperstructureApplication("PV1", "ADT_A04"); 
167 	          this.addSuperstructureApplication("PV1", "ADT_A05"); 
168 	          this.addSuperstructureApplication("PV1", "ADT_A06"); 
169 	          this.addSuperstructureApplication("PV1", "ADT_A07"); 
170 	          this.addSuperstructureApplication("PV1", "ADT_A08"); 
171 	          this.addSuperstructureApplication("PV1", "ADT_A09"); 
172 	          this.addSuperstructureApplication("PV1", "ADT_A10"); 
173 	          this.addSuperstructureApplication("PV1", "ADT_A11"); 
174 	          this.addSuperstructureApplication("PV1", "ADT_A12"); 
175 	          this.addSuperstructureApplication("PV1", "ADT_A13"); 
176 	          this.addSuperstructureApplication("PV1", "ADT_A14"); 
177 	          this.addSuperstructureApplication("PV1", "ADT_A15"); 
178 	          this.addSuperstructureApplication("PV1", "ADT_A16"); 
179 	          this.addSuperstructureApplication("PV1", "ADT_A18"); 
180 	          this.addSuperstructureApplication("PV1", "ADT_A21"); 
181 	          this.addSuperstructureApplication("PV1", "ADT_A22"); 
182 	          this.addSuperstructureApplication("PV1", "ADT_A23"); 
183 	          this.addSuperstructureApplication("PV1", "ADT_A24"); 
184 	                          this.add(DG1.class, false, false);
185 	          this.addSuperstructureApplication("DG1", "ADT_A01"); 
186 	          this.addSuperstructureApplication("DG1", "ADT_A04"); 
187 	          this.addSuperstructureApplication("DG1", "ADT_A05"); 
188 	          this.addSuperstructureApplication("DG1", "ADT_A08"); 
189 	          this.addSuperstructureApplication("DG1", "ADT_A09"); 
190 	          this.addSuperstructureApplication("DG1", "ADT_A10"); 
191 	          this.addSuperstructureApplication("DG1", "ADT_A11"); 
192 	          this.addSuperstructureApplication("DG1", "ADT_A12"); 
193 	          this.addSuperstructureApplication("DG1", "ADT_A13"); 
194 	          this.addSuperstructureApplication("DG1", "ADT_A14"); 
195 	          this.addSuperstructureApplication("DG1", "ADT_A15"); 
196 	          this.addSuperstructureApplication("DG1", "ADT_A16"); 
197 	                          this.add(ADT_AXX_PATIENT.class, false, true);
198 	                          this.add(NPU.class, false, false);
199 	          this.addSuperstructureApplication("NPU", "ADT_A20"); 
200 	                          this.add(PID.class, false, false);
201 	          this.addSuperstructureApplication("PID2", "ADT_A24"); 
202 	       } catch(HL7Exception e) {
203           log.error("Unexpected error creating ADT_AXX - this is probably a bug in the source code generator.", e);
204        }
205     }
206 
207 	public java.util.List<String> getChildNamesForStructure(String theStructure) {
208 		java.util.ArrayList<String> retVal = new java.util.ArrayList<String>();
209 			if ( "ADT_A01".equals(theStructure) ) {
210 					retVal.add("MSH"); 
211 					retVal.add("EVN"); 
212 					retVal.add("PID"); 
213 					retVal.add("NK1"); 
214 					retVal.add("PV1"); 
215 					retVal.add("DG1"); 
216 				}
217 			if ( "ADT_A02".equals(theStructure) ) {
218 					retVal.add("MSH"); 
219 					retVal.add("EVN"); 
220 					retVal.add("PID"); 
221 					retVal.add("PV1"); 
222 				}
223 			if ( "ADT_A03".equals(theStructure) ) {
224 					retVal.add("MSH"); 
225 					retVal.add("EVN"); 
226 					retVal.add("PID"); 
227 					retVal.add("PV1"); 
228 				}
229 			if ( "ADT_A04".equals(theStructure) ) {
230 					retVal.add("MSH"); 
231 					retVal.add("EVN"); 
232 					retVal.add("PID"); 
233 					retVal.add("NK1"); 
234 					retVal.add("PV1"); 
235 					retVal.add("DG1"); 
236 				}
237 			if ( "ADT_A05".equals(theStructure) ) {
238 					retVal.add("MSH"); 
239 					retVal.add("EVN"); 
240 					retVal.add("PID"); 
241 					retVal.add("NK1"); 
242 					retVal.add("PV1"); 
243 					retVal.add("DG1"); 
244 				}
245 			if ( "ADT_A06".equals(theStructure) ) {
246 					retVal.add("MSH"); 
247 					retVal.add("EVN"); 
248 					retVal.add("PID"); 
249 					retVal.add("PV1"); 
250 				}
251 			if ( "ADT_A07".equals(theStructure) ) {
252 					retVal.add("MSH"); 
253 					retVal.add("EVN"); 
254 					retVal.add("PID"); 
255 					retVal.add("PV1"); 
256 				}
257 			if ( "ADT_A08".equals(theStructure) ) {
258 					retVal.add("MSH"); 
259 					retVal.add("EVN"); 
260 					retVal.add("PID"); 
261 					retVal.add("NK1"); 
262 					retVal.add("PV1"); 
263 					retVal.add("DG1"); 
264 				}
265 			if ( "ADT_A09".equals(theStructure) ) {
266 					retVal.add("MSH"); 
267 					retVal.add("EVN"); 
268 					retVal.add("PID"); 
269 					retVal.add("PV1"); 
270 					retVal.add("DG1"); 
271 				}
272 			if ( "ADT_A10".equals(theStructure) ) {
273 					retVal.add("MSH"); 
274 					retVal.add("EVN"); 
275 					retVal.add("PID"); 
276 					retVal.add("PV1"); 
277 					retVal.add("DG1"); 
278 				}
279 			if ( "ADT_A11".equals(theStructure) ) {
280 					retVal.add("MSH"); 
281 					retVal.add("EVN"); 
282 					retVal.add("PID"); 
283 					retVal.add("PV1"); 
284 					retVal.add("DG1"); 
285 				}
286 			if ( "ADT_A12".equals(theStructure) ) {
287 					retVal.add("MSH"); 
288 					retVal.add("EVN"); 
289 					retVal.add("PID"); 
290 					retVal.add("PV1"); 
291 					retVal.add("DG1"); 
292 				}
293 			if ( "ADT_A13".equals(theStructure) ) {
294 					retVal.add("MSH"); 
295 					retVal.add("EVN"); 
296 					retVal.add("PID"); 
297 					retVal.add("PV1"); 
298 					retVal.add("DG1"); 
299 				}
300 			if ( "ADT_A14".equals(theStructure) ) {
301 					retVal.add("MSH"); 
302 					retVal.add("EVN"); 
303 					retVal.add("PID"); 
304 					retVal.add("PD1"); 
305 					retVal.add("NK1"); 
306 					retVal.add("PV1"); 
307 					retVal.add("DG1"); 
308 				}
309 			if ( "ADT_A15".equals(theStructure) ) {
310 					retVal.add("MSH"); 
311 					retVal.add("EVN"); 
312 					retVal.add("PID"); 
313 					retVal.add("PV1"); 
314 					retVal.add("DG1"); 
315 				}
316 			if ( "ADT_A16".equals(theStructure) ) {
317 					retVal.add("MSH"); 
318 					retVal.add("EVN"); 
319 					retVal.add("PID"); 
320 					retVal.add("PV1"); 
321 					retVal.add("DG1"); 
322 				}
323 			if ( "ADT_A17".equals(theStructure) ) {
324 					retVal.add("MSH"); 
325 					retVal.add("EVN"); 
326 					retVal.add("PATIENT"); 
327 				}
328 			if ( "ADT_A18".equals(theStructure) ) {
329 					retVal.add("MSH"); 
330 					retVal.add("EVN"); 
331 					retVal.add("PID"); 
332 					retVal.add("MRG"); 
333 					retVal.add("PV1"); 
334 				}
335 			if ( "ADT_A20".equals(theStructure) ) {
336 					retVal.add("MSH"); 
337 					retVal.add("EVN"); 
338 					retVal.add("NPU"); 
339 				}
340 			if ( "ADT_A21".equals(theStructure) ) {
341 					retVal.add("MSH"); 
342 					retVal.add("EVN"); 
343 					retVal.add("PID"); 
344 					retVal.add("PV1"); 
345 				}
346 			if ( "ADT_A22".equals(theStructure) ) {
347 					retVal.add("MSH"); 
348 					retVal.add("EVN"); 
349 					retVal.add("PID"); 
350 					retVal.add("PV1"); 
351 				}
352 			if ( "ADT_A23".equals(theStructure) ) {
353 					retVal.add("MSH"); 
354 					retVal.add("EVN"); 
355 					retVal.add("PID"); 
356 					retVal.add("PV1"); 
357 				}
358 			if ( "ADT_A24".equals(theStructure) ) {
359 					retVal.add("MSH"); 
360 					retVal.add("EVN"); 
361 					retVal.add("PID"); 
362 					retVal.add("PV1"); 
363 					retVal.add("PID2"); 
364 				}
365 			return retVal;
366 	}
367 
368     /** 
369      * Returns "2.1"
370      */
371     public String getVersion() {
372        return "2.1";
373     }
374 
375 
376 
377 
378     /**
379      * <p>
380      * Returns
381      * MSH () - creates it if necessary
382      * </p>
383      * Used for the following structures: [ADT_A01, ADT_A02, ADT_A03, ADT_A04, ADT_A05, ADT_A06, ADT_A07, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16, ADT_A17, ADT_A18, ADT_A20, ADT_A21, ADT_A22, ADT_A23, ADT_A24]
384      *
385      */
386     public MSH getMSH() { 
387        return getTyped("MSH", MSH.class);
388     }
389 
390 
391 
392 
393 
394     /**
395      * <p>
396      * Returns
397      * EVN () - creates it if necessary
398      * </p>
399      * Used for the following structures: [ADT_A01, ADT_A02, ADT_A03, ADT_A04, ADT_A05, ADT_A06, ADT_A07, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16, ADT_A17, ADT_A18, ADT_A20, ADT_A21, ADT_A22, ADT_A23, ADT_A24]
400      *
401      */
402     public EVN getEVN() { 
403        return getTyped("EVN", EVN.class);
404     }
405 
406 
407 
408 
409 
410     /**
411      * <p>
412      * Returns
413      * PID () - creates it if necessary
414      * </p>
415      * Used for the following structures: [ADT_A01, ADT_A02, ADT_A03, ADT_A04, ADT_A05, ADT_A06, ADT_A07, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16, ADT_A18, ADT_A21, ADT_A22, ADT_A23, ADT_A24]
416      *
417      */
418     public PID getPID() { 
419        return getTyped("PID", PID.class);
420     }
421 
422 
423 
424 
425 
426     /**
427      * <p>
428      * Returns
429      * MRG () - creates it if necessary
430      * </p>
431      * Used for the following structures: [ADT_A18]
432      *
433      */
434     public MRG getMRG() { 
435        return getTyped("MRG", MRG.class);
436     }
437 
438 
439 
440 
441 
442     /**
443      * <p>
444      * Returns
445      * PD1 () - creates it if necessary
446      * </p>
447      * Used for the following structures: [ADT_A14]
448      *
449      */
450     public PD1 getPD1() { 
451        return getTyped("PD1", PD1.class);
452     }
453 
454 
455 
456 
457 
458     /**
459      * <p>
460      * Returns
461      * NK1 () - creates it if necessary
462      * </p>
463      * Used for the following structures: [ADT_A01, ADT_A04, ADT_A05, ADT_A08, ADT_A14]
464      *
465      */
466     public NK1 getNK1() { 
467        return getTyped("NK1", NK1.class);
468     }
469 
470 
471 
472 
473 
474     /**
475      * <p>
476      * Returns
477      * PV1 () - creates it if necessary
478      * </p>
479      * Used for the following structures: [ADT_A01, ADT_A02, ADT_A03, ADT_A04, ADT_A05, ADT_A06, ADT_A07, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16, ADT_A18, ADT_A21, ADT_A22, ADT_A23, ADT_A24]
480      *
481      */
482     public PV1 getPV1() { 
483        return getTyped("PV1", PV1.class);
484     }
485 
486 
487 
488 
489 
490     /**
491      * <p>
492      * Returns
493      * DG1 () - creates it if necessary
494      * </p>
495      * Used for the following structures: [ADT_A01, ADT_A04, ADT_A05, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A15, ADT_A16]
496      *
497      */
498     public DG1 getDG1() { 
499        return getTyped("DG1", DG1.class);
500     }
501 
502 
503 
504 
505 
506     /**
507      * <p>
508      * Returns
509      * the first repetition of 
510      * PATIENT () - creates it if necessary
511      * </p>
512      * 
513      *
514      */
515     public ADT_AXX_PATIENT getPATIENT() { 
516        return getTyped("PATIENT", ADT_AXX_PATIENT.class);
517     }
518 
519 
520     /**
521      * <p>
522      * Returns a specific repetition of
523      * PATIENT () - creates it if necessary
524      * </p>
525      * 
526      *
527      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
528      * @throws HL7Exception if the repetition requested is more than one 
529      *     greater than the number of existing repetitions.
530      */
531     public ADT_AXX_PATIENT getPATIENT(int rep) { 
532        return getTyped("PATIENT", rep, ADT_AXX_PATIENT.class);
533     }
534 
535     /** 
536      * <p>
537      * Returns the number of existing repetitions of PATIENT 
538      * </p>
539      * 
540      */ 
541     public int getPATIENTReps() { 
542     	return getReps("PATIENT");
543     } 
544 
545     /** 
546      * <p>
547      * Returns a non-modifiable List containing all current existing repetitions of PATIENT.
548      * <p>
549      * <p>
550      * Note that unlike {@link #getPATIENT()}, this method will not create any reps
551      * if none are already present, so an empty list may be returned.
552      * </p>
553      * 
554      */ 
555     public java.util.List<ADT_AXX_PATIENT> getPATIENTAll() throws HL7Exception {
556     	return getAllAsList("PATIENT", ADT_AXX_PATIENT.class);
557     } 
558 
559     /**
560      * <p>
561      * Inserts a specific repetition of PATIENT ()
562      * </p>
563      * 
564      *
565      * @see AbstractGroup#insertRepetition(Structure, int) 
566      */
567     public void insertPATIENT(ADT_AXX_PATIENT structure, int rep) throws HL7Exception { 
568        super.insertRepetition( "PATIENT", structure, rep);
569     }
570 
571 
572     /**
573      * <p>
574      * Inserts a specific repetition of PATIENT ()
575      * </p>
576      * 
577      *
578      * @see AbstractGroup#insertRepetition(Structure, int) 
579      */
580     public ADT_AXX_PATIENT insertPATIENT(int rep) throws HL7Exception { 
581        return (ADT_AXX_PATIENT)super.insertRepetition("PATIENT", rep);
582     }
583 
584 
585     /**
586      * <p>
587      * Removes a specific repetition of PATIENT ()
588      * </p>
589      * 
590      *
591      * @see AbstractGroup#removeRepetition(String, int) 
592      */
593     public ADT_AXX_PATIENT removePATIENT(int rep) throws HL7Exception { 
594        return (ADT_AXX_PATIENT)super.removeRepetition("PATIENT", rep);
595     }
596 
597 
598 
599 
600     /**
601      * <p>
602      * Returns
603      * NPU () - creates it if necessary
604      * </p>
605      * Used for the following structures: [ADT_A20]
606      *
607      */
608     public NPU getNPU() { 
609        return getTyped("NPU", NPU.class);
610     }
611 
612 
613 
614 
615 
616     /**
617      * <p>
618      * Returns
619      * PID2 () - creates it if necessary
620      * </p>
621      * Used for the following structures: [ADT_A24]
622      *
623      */
624     public PID getPID2() { 
625        return getTyped("PID2", PID.class);
626     }
627 
628 
629 
630 
631 }
632