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.v21.message;
035
036import ca.uhn.hl7v2.model.v21.group.*;
037import ca.uhn.hl7v2.model.v21.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 ADT_AXX message structure (see chapter ). This structure contains the 
047 * following elements: </p>
048 * <ul>
049                                 * <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>
050                                 * <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>
051                                 * <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>
052                                 * <li>4: MRG () <b>optional </b> <ul><li>Used for the following structures: [ADT_A18]</li></ul></li>
053                                 * <li>5: PD1 () <b>optional </b> <ul><li>Used for the following structures: [ADT_A14]</li></ul></li>
054                                 * <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>
055                                 * <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>
056                                 * <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>
057                                 * <li>9: ADT_AXX_PATIENT () <b>optional repeating</b> </li>
058                                 * <li>10: NPU () <b>optional </b> <ul><li>Used for the following structures: [ADT_A20]</li></ul></li>
059                                 * <li>11: PID () <b>optional </b> <ul><li>Used for the following structures: [ADT_A24]</li></ul></li>
060 * </ul>
061 */
062//@SuppressWarnings("unused")
063public class ADT_AXX extends AbstractSuperMessage  {
064
065    /**
066     * Creates a new ADT_AXX message with DefaultModelClassFactory. 
067     */ 
068    public ADT_AXX() { 
069       this(new DefaultModelClassFactory());
070    }
071
072    /** 
073     * Creates a new ADT_AXX message with custom ModelClassFactory.
074     */
075    public ADT_AXX(ModelClassFactory factory) {
076       super(factory);
077       init(factory);
078    }
079
080    private void init(ModelClassFactory factory) {
081       try {
082                          this.add(MSH.class, true, false);
083                  this.addSuperstructureApplication("MSH", "ADT_A01"); 
084                  this.addSuperstructureApplication("MSH", "ADT_A02"); 
085                  this.addSuperstructureApplication("MSH", "ADT_A03"); 
086                  this.addSuperstructureApplication("MSH", "ADT_A04"); 
087                  this.addSuperstructureApplication("MSH", "ADT_A05"); 
088                  this.addSuperstructureApplication("MSH", "ADT_A06"); 
089                  this.addSuperstructureApplication("MSH", "ADT_A07"); 
090                  this.addSuperstructureApplication("MSH", "ADT_A08"); 
091                  this.addSuperstructureApplication("MSH", "ADT_A09"); 
092                  this.addSuperstructureApplication("MSH", "ADT_A10"); 
093                  this.addSuperstructureApplication("MSH", "ADT_A11"); 
094                  this.addSuperstructureApplication("MSH", "ADT_A12"); 
095                  this.addSuperstructureApplication("MSH", "ADT_A13"); 
096                  this.addSuperstructureApplication("MSH", "ADT_A14"); 
097                  this.addSuperstructureApplication("MSH", "ADT_A15"); 
098                  this.addSuperstructureApplication("MSH", "ADT_A16"); 
099                  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