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
008 package ca.uhn.hl7v2.model.v24.message;
009
010 import ca.uhn.hl7v2.model.v24.group.*;
011 import ca.uhn.hl7v2.model.v24.segment.*;
012
013 import ca.uhn.log.HapiLogFactory;
014 import ca.uhn.hl7v2.HL7Exception;
015 import ca.uhn.hl7v2.parser.ModelClassFactory;
016 import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
017 import ca.uhn.hl7v2.model.AbstractMessage;
018
019 /**
020 * <p>Represents a ADT_A06 message structure (see chapter 3). This structure contains the
021 * following elements: </p>
022 * <ul>
023 * <li>1: MSH (Message Header) <b> </b></li>
024 * <li>2: EVN (Event Type) <b> </b></li>
025 * <li>3: PID (Patient identification) <b> </b></li>
026 * <li>4: PD1 (patient additional demographic) <b>optional </b></li>
027 * <li>5: ROL (Role) <b>optional repeating</b></li>
028 * <li>6: MRG (Merge patient information) <b>optional </b></li>
029 * <li>7: NK1 (Next of kin / associated parties) <b>optional repeating</b></li>
030 * <li>8: PV1 (Patient visit) <b> </b></li>
031 * <li>9: PV2 (Patient visit - additional information) <b>optional </b></li>
032 * <li>10: ROL (Role) <b>optional repeating</b></li>
033 * <li>11: DB1 (Disability) <b>optional repeating</b></li>
034 * <li>12: OBX (Observation/Result) <b>optional repeating</b></li>
035 * <li>13: AL1 (Patient allergy information) <b>optional repeating</b></li>
036 * <li>14: DG1 (Diagnosis) <b>optional repeating</b></li>
037 * <li>15: DRG (Diagnosis Related Group) <b>optional </b></li>
038 * <li>16: ADT_A06_PROCEDURE (a Group object) <b>optional repeating</b></li>
039 * <li>17: GT1 (Guarantor) <b>optional repeating</b></li>
040 * <li>18: ADT_A06_INSURANCE (a Group object) <b>optional repeating</b></li>
041 * <li>19: ACC (Accident) <b>optional </b></li>
042 * <li>20: UB1 (UB82) <b>optional </b></li>
043 * <li>21: UB2 (UB92 Data) <b>optional </b></li>
044 * </ul>
045 */
046 public class ADT_A06 extends AbstractMessage {
047
048 /**
049 * Creates a new ADT_A06 message with DefaultModelClassFactory.
050 */
051 public ADT_A06() {
052 this(new DefaultModelClassFactory());
053 }
054
055 /**
056 * Creates a new ADT_A06 message with custom ModelClassFactory.
057 */
058 public ADT_A06(ModelClassFactory factory) {
059 super(factory);
060 init(factory);
061 }
062
063 private void init(ModelClassFactory factory) {
064 try {
065 this.add(MSH.class, true, false);
066 this.add(EVN.class, true, false);
067 this.add(PID.class, true, false);
068 this.add(PD1.class, false, false);
069 this.add(ROL.class, false, true);
070 this.add(MRG.class, false, false);
071 this.add(NK1.class, false, true);
072 this.add(PV1.class, true, false);
073 this.add(PV2.class, false, false);
074 this.add(ROL.class, false, true);
075 this.add(DB1.class, false, true);
076 this.add(OBX.class, false, true);
077 this.add(AL1.class, false, true);
078 this.add(DG1.class, false, true);
079 this.add(DRG.class, false, false);
080 this.add(ADT_A06_PROCEDURE.class, false, true);
081 this.add(GT1.class, false, true);
082 this.add(ADT_A06_INSURANCE.class, false, true);
083 this.add(ACC.class, false, false);
084 this.add(UB1.class, false, false);
085 this.add(UB2.class, false, false);
086 } catch(HL7Exception e) {
087 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating ADT_A06 - this is probably a bug in the source code generator.", e);
088 }
089 }
090
091 /**
092 * Returns "2.4"
093 */
094 public String getVersion() {
095 return "2.4";
096 }
097
098
099
100 /**
101 * Returns
102 * MSH (Message Header) - creates it if necessary
103 */
104 public MSH getMSH() {
105 MSH ret = null;
106 try {
107 ret = (MSH)this.get("MSH");
108 } catch(HL7Exception e) {
109 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
110 throw new RuntimeException(e);
111 }
112 return ret;
113 }
114
115
116
117
118 /**
119 * Returns
120 * EVN (Event Type) - creates it if necessary
121 */
122 public EVN getEVN() {
123 EVN ret = null;
124 try {
125 ret = (EVN)this.get("EVN");
126 } catch(HL7Exception e) {
127 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
128 throw new RuntimeException(e);
129 }
130 return ret;
131 }
132
133
134
135
136 /**
137 * Returns
138 * PID (Patient identification) - creates it if necessary
139 */
140 public PID getPID() {
141 PID ret = null;
142 try {
143 ret = (PID)this.get("PID");
144 } catch(HL7Exception e) {
145 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
146 throw new RuntimeException(e);
147 }
148 return ret;
149 }
150
151
152
153
154 /**
155 * Returns
156 * PD1 (patient additional demographic) - creates it if necessary
157 */
158 public PD1 getPD1() {
159 PD1 ret = null;
160 try {
161 ret = (PD1)this.get("PD1");
162 } catch(HL7Exception e) {
163 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
164 throw new RuntimeException(e);
165 }
166 return ret;
167 }
168
169
170
171
172 /**
173 * Returns
174 * the first repetition of
175 * ROL (Role) - creates it if necessary
176 */
177 public ROL getROL() {
178 ROL ret = null;
179 try {
180 ret = (ROL)this.get("ROL");
181 } catch(HL7Exception e) {
182 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
183 throw new RuntimeException(e);
184 }
185 return ret;
186 }
187
188
189 /**
190 * Returns a specific repetition of
191 * ROL (Role) - creates it if necessary
192 *
193 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
194 * @throws HL7Exception if the repetition requested is more than one
195 * greater than the number of existing repetitions.
196 */
197 public ROL getROL(int rep) {
198 ROL ret = null;
199 try {
200 ret = (ROL)this.get("ROL", rep);
201 } catch(HL7Exception e) {
202 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
203 throw new RuntimeException(e);
204 }
205 return ret;
206 }
207
208 /**
209 * Returns the number of existing repetitions of ROL
210 */
211 public int getROLReps() {
212 int reps = -1;
213 try {
214 reps = this.getAll("ROL").length;
215 } catch (HL7Exception e) {
216 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
217 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
218 throw new RuntimeException(message);
219 }
220 return reps;
221 }
222
223 /**
224 * Inserts a specific repetition of ROL (Role)
225 * @see AbstractGroup\#insertRepetition(Structure, int)
226 */
227 public void insertROL(ROL structure, int rep) throws HL7Exception {
228 super.insertRepetition( "ROL", structure, rep);
229 }
230
231
232 /**
233 * Inserts a specific repetition of ROL (Role)
234 * @see AbstractGroup\#insertRepetition(Structure, int)
235 */
236 public ROL insertROL(int rep) throws HL7Exception {
237 return (ROL)super.insertRepetition("ROL", rep);
238 }
239
240
241 /**
242 * Removes a specific repetition of ROL (Role)
243 * @see AbstractGroup\#removeRepetition(String, int)
244 */
245 public ROL removeROL(int rep) throws HL7Exception {
246 return (ROL)super.removeRepetition("ROL", rep);
247 }
248
249
250
251 /**
252 * Returns
253 * MRG (Merge patient information) - creates it if necessary
254 */
255 public MRG getMRG() {
256 MRG ret = null;
257 try {
258 ret = (MRG)this.get("MRG");
259 } catch(HL7Exception e) {
260 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
261 throw new RuntimeException(e);
262 }
263 return ret;
264 }
265
266
267
268
269 /**
270 * Returns
271 * the first repetition of
272 * NK1 (Next of kin / associated parties) - creates it if necessary
273 */
274 public NK1 getNK1() {
275 NK1 ret = null;
276 try {
277 ret = (NK1)this.get("NK1");
278 } catch(HL7Exception e) {
279 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
280 throw new RuntimeException(e);
281 }
282 return ret;
283 }
284
285
286 /**
287 * Returns a specific repetition of
288 * NK1 (Next of kin / associated parties) - creates it if necessary
289 *
290 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
291 * @throws HL7Exception if the repetition requested is more than one
292 * greater than the number of existing repetitions.
293 */
294 public NK1 getNK1(int rep) {
295 NK1 ret = null;
296 try {
297 ret = (NK1)this.get("NK1", rep);
298 } catch(HL7Exception e) {
299 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
300 throw new RuntimeException(e);
301 }
302 return ret;
303 }
304
305 /**
306 * Returns the number of existing repetitions of NK1
307 */
308 public int getNK1Reps() {
309 int reps = -1;
310 try {
311 reps = this.getAll("NK1").length;
312 } catch (HL7Exception e) {
313 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
314 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
315 throw new RuntimeException(message);
316 }
317 return reps;
318 }
319
320 /**
321 * Inserts a specific repetition of NK1 (Next of kin / associated parties)
322 * @see AbstractGroup\#insertRepetition(Structure, int)
323 */
324 public void insertNK1(NK1 structure, int rep) throws HL7Exception {
325 super.insertRepetition( "NK1", structure, rep);
326 }
327
328
329 /**
330 * Inserts a specific repetition of NK1 (Next of kin / associated parties)
331 * @see AbstractGroup\#insertRepetition(Structure, int)
332 */
333 public NK1 insertNK1(int rep) throws HL7Exception {
334 return (NK1)super.insertRepetition("NK1", rep);
335 }
336
337
338 /**
339 * Removes a specific repetition of NK1 (Next of kin / associated parties)
340 * @see AbstractGroup\#removeRepetition(String, int)
341 */
342 public NK1 removeNK1(int rep) throws HL7Exception {
343 return (NK1)super.removeRepetition("NK1", rep);
344 }
345
346
347
348 /**
349 * Returns
350 * PV1 (Patient visit) - creates it if necessary
351 */
352 public PV1 getPV1() {
353 PV1 ret = null;
354 try {
355 ret = (PV1)this.get("PV1");
356 } catch(HL7Exception e) {
357 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
358 throw new RuntimeException(e);
359 }
360 return ret;
361 }
362
363
364
365
366 /**
367 * Returns
368 * PV2 (Patient visit - additional information) - creates it if necessary
369 */
370 public PV2 getPV2() {
371 PV2 ret = null;
372 try {
373 ret = (PV2)this.get("PV2");
374 } catch(HL7Exception e) {
375 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
376 throw new RuntimeException(e);
377 }
378 return ret;
379 }
380
381
382
383
384 /**
385 * Returns
386 * the first repetition of
387 * ROL2 (Role) - creates it if necessary
388 */
389 public ROL getROL2() {
390 ROL ret = null;
391 try {
392 ret = (ROL)this.get("ROL2");
393 } catch(HL7Exception e) {
394 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
395 throw new RuntimeException(e);
396 }
397 return ret;
398 }
399
400
401 /**
402 * Returns a specific repetition of
403 * ROL2 (Role) - creates it if necessary
404 *
405 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
406 * @throws HL7Exception if the repetition requested is more than one
407 * greater than the number of existing repetitions.
408 */
409 public ROL getROL2(int rep) {
410 ROL ret = null;
411 try {
412 ret = (ROL)this.get("ROL2", rep);
413 } catch(HL7Exception e) {
414 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
415 throw new RuntimeException(e);
416 }
417 return ret;
418 }
419
420 /**
421 * Returns the number of existing repetitions of ROL2
422 */
423 public int getROL2Reps() {
424 int reps = -1;
425 try {
426 reps = this.getAll("ROL2").length;
427 } catch (HL7Exception e) {
428 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
429 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
430 throw new RuntimeException(message);
431 }
432 return reps;
433 }
434
435 /**
436 * Inserts a specific repetition of ROL2 (Role)
437 * @see AbstractGroup\#insertRepetition(Structure, int)
438 */
439 public void insertROL2(ROL structure, int rep) throws HL7Exception {
440 super.insertRepetition( "ROL2", structure, rep);
441 }
442
443
444 /**
445 * Inserts a specific repetition of ROL2 (Role)
446 * @see AbstractGroup\#insertRepetition(Structure, int)
447 */
448 public ROL insertROL2(int rep) throws HL7Exception {
449 return (ROL)super.insertRepetition("ROL2", rep);
450 }
451
452
453 /**
454 * Removes a specific repetition of ROL2 (Role)
455 * @see AbstractGroup\#removeRepetition(String, int)
456 */
457 public ROL removeROL2(int rep) throws HL7Exception {
458 return (ROL)super.removeRepetition("ROL2", rep);
459 }
460
461
462
463 /**
464 * Returns
465 * the first repetition of
466 * DB1 (Disability) - creates it if necessary
467 */
468 public DB1 getDB1() {
469 DB1 ret = null;
470 try {
471 ret = (DB1)this.get("DB1");
472 } catch(HL7Exception e) {
473 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
474 throw new RuntimeException(e);
475 }
476 return ret;
477 }
478
479
480 /**
481 * Returns a specific repetition of
482 * DB1 (Disability) - creates it if necessary
483 *
484 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
485 * @throws HL7Exception if the repetition requested is more than one
486 * greater than the number of existing repetitions.
487 */
488 public DB1 getDB1(int rep) {
489 DB1 ret = null;
490 try {
491 ret = (DB1)this.get("DB1", rep);
492 } catch(HL7Exception e) {
493 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
494 throw new RuntimeException(e);
495 }
496 return ret;
497 }
498
499 /**
500 * Returns the number of existing repetitions of DB1
501 */
502 public int getDB1Reps() {
503 int reps = -1;
504 try {
505 reps = this.getAll("DB1").length;
506 } catch (HL7Exception e) {
507 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
508 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
509 throw new RuntimeException(message);
510 }
511 return reps;
512 }
513
514 /**
515 * Inserts a specific repetition of DB1 (Disability)
516 * @see AbstractGroup\#insertRepetition(Structure, int)
517 */
518 public void insertDB1(DB1 structure, int rep) throws HL7Exception {
519 super.insertRepetition( "DB1", structure, rep);
520 }
521
522
523 /**
524 * Inserts a specific repetition of DB1 (Disability)
525 * @see AbstractGroup\#insertRepetition(Structure, int)
526 */
527 public DB1 insertDB1(int rep) throws HL7Exception {
528 return (DB1)super.insertRepetition("DB1", rep);
529 }
530
531
532 /**
533 * Removes a specific repetition of DB1 (Disability)
534 * @see AbstractGroup\#removeRepetition(String, int)
535 */
536 public DB1 removeDB1(int rep) throws HL7Exception {
537 return (DB1)super.removeRepetition("DB1", rep);
538 }
539
540
541
542 /**
543 * Returns
544 * the first repetition of
545 * OBX (Observation/Result) - creates it if necessary
546 */
547 public OBX getOBX() {
548 OBX ret = null;
549 try {
550 ret = (OBX)this.get("OBX");
551 } catch(HL7Exception e) {
552 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
553 throw new RuntimeException(e);
554 }
555 return ret;
556 }
557
558
559 /**
560 * Returns a specific repetition of
561 * OBX (Observation/Result) - creates it if necessary
562 *
563 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
564 * @throws HL7Exception if the repetition requested is more than one
565 * greater than the number of existing repetitions.
566 */
567 public OBX getOBX(int rep) {
568 OBX ret = null;
569 try {
570 ret = (OBX)this.get("OBX", rep);
571 } catch(HL7Exception e) {
572 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
573 throw new RuntimeException(e);
574 }
575 return ret;
576 }
577
578 /**
579 * Returns the number of existing repetitions of OBX
580 */
581 public int getOBXReps() {
582 int reps = -1;
583 try {
584 reps = this.getAll("OBX").length;
585 } catch (HL7Exception e) {
586 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
587 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
588 throw new RuntimeException(message);
589 }
590 return reps;
591 }
592
593 /**
594 * Inserts a specific repetition of OBX (Observation/Result)
595 * @see AbstractGroup\#insertRepetition(Structure, int)
596 */
597 public void insertOBX(OBX structure, int rep) throws HL7Exception {
598 super.insertRepetition( "OBX", structure, rep);
599 }
600
601
602 /**
603 * Inserts a specific repetition of OBX (Observation/Result)
604 * @see AbstractGroup\#insertRepetition(Structure, int)
605 */
606 public OBX insertOBX(int rep) throws HL7Exception {
607 return (OBX)super.insertRepetition("OBX", rep);
608 }
609
610
611 /**
612 * Removes a specific repetition of OBX (Observation/Result)
613 * @see AbstractGroup\#removeRepetition(String, int)
614 */
615 public OBX removeOBX(int rep) throws HL7Exception {
616 return (OBX)super.removeRepetition("OBX", rep);
617 }
618
619
620
621 /**
622 * Returns
623 * the first repetition of
624 * AL1 (Patient allergy information) - creates it if necessary
625 */
626 public AL1 getAL1() {
627 AL1 ret = null;
628 try {
629 ret = (AL1)this.get("AL1");
630 } catch(HL7Exception e) {
631 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
632 throw new RuntimeException(e);
633 }
634 return ret;
635 }
636
637
638 /**
639 * Returns a specific repetition of
640 * AL1 (Patient allergy information) - creates it if necessary
641 *
642 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
643 * @throws HL7Exception if the repetition requested is more than one
644 * greater than the number of existing repetitions.
645 */
646 public AL1 getAL1(int rep) {
647 AL1 ret = null;
648 try {
649 ret = (AL1)this.get("AL1", rep);
650 } catch(HL7Exception e) {
651 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
652 throw new RuntimeException(e);
653 }
654 return ret;
655 }
656
657 /**
658 * Returns the number of existing repetitions of AL1
659 */
660 public int getAL1Reps() {
661 int reps = -1;
662 try {
663 reps = this.getAll("AL1").length;
664 } catch (HL7Exception e) {
665 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
666 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
667 throw new RuntimeException(message);
668 }
669 return reps;
670 }
671
672 /**
673 * Inserts a specific repetition of AL1 (Patient allergy information)
674 * @see AbstractGroup\#insertRepetition(Structure, int)
675 */
676 public void insertAL1(AL1 structure, int rep) throws HL7Exception {
677 super.insertRepetition( "AL1", structure, rep);
678 }
679
680
681 /**
682 * Inserts a specific repetition of AL1 (Patient allergy information)
683 * @see AbstractGroup\#insertRepetition(Structure, int)
684 */
685 public AL1 insertAL1(int rep) throws HL7Exception {
686 return (AL1)super.insertRepetition("AL1", rep);
687 }
688
689
690 /**
691 * Removes a specific repetition of AL1 (Patient allergy information)
692 * @see AbstractGroup\#removeRepetition(String, int)
693 */
694 public AL1 removeAL1(int rep) throws HL7Exception {
695 return (AL1)super.removeRepetition("AL1", rep);
696 }
697
698
699
700 /**
701 * Returns
702 * the first repetition of
703 * DG1 (Diagnosis) - creates it if necessary
704 */
705 public DG1 getDG1() {
706 DG1 ret = null;
707 try {
708 ret = (DG1)this.get("DG1");
709 } catch(HL7Exception e) {
710 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
711 throw new RuntimeException(e);
712 }
713 return ret;
714 }
715
716
717 /**
718 * Returns a specific repetition of
719 * DG1 (Diagnosis) - creates it if necessary
720 *
721 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
722 * @throws HL7Exception if the repetition requested is more than one
723 * greater than the number of existing repetitions.
724 */
725 public DG1 getDG1(int rep) {
726 DG1 ret = null;
727 try {
728 ret = (DG1)this.get("DG1", rep);
729 } catch(HL7Exception e) {
730 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
731 throw new RuntimeException(e);
732 }
733 return ret;
734 }
735
736 /**
737 * Returns the number of existing repetitions of DG1
738 */
739 public int getDG1Reps() {
740 int reps = -1;
741 try {
742 reps = this.getAll("DG1").length;
743 } catch (HL7Exception e) {
744 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
745 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
746 throw new RuntimeException(message);
747 }
748 return reps;
749 }
750
751 /**
752 * Inserts a specific repetition of DG1 (Diagnosis)
753 * @see AbstractGroup\#insertRepetition(Structure, int)
754 */
755 public void insertDG1(DG1 structure, int rep) throws HL7Exception {
756 super.insertRepetition( "DG1", structure, rep);
757 }
758
759
760 /**
761 * Inserts a specific repetition of DG1 (Diagnosis)
762 * @see AbstractGroup\#insertRepetition(Structure, int)
763 */
764 public DG1 insertDG1(int rep) throws HL7Exception {
765 return (DG1)super.insertRepetition("DG1", rep);
766 }
767
768
769 /**
770 * Removes a specific repetition of DG1 (Diagnosis)
771 * @see AbstractGroup\#removeRepetition(String, int)
772 */
773 public DG1 removeDG1(int rep) throws HL7Exception {
774 return (DG1)super.removeRepetition("DG1", rep);
775 }
776
777
778
779 /**
780 * Returns
781 * DRG (Diagnosis Related Group) - creates it if necessary
782 */
783 public DRG getDRG() {
784 DRG ret = null;
785 try {
786 ret = (DRG)this.get("DRG");
787 } catch(HL7Exception e) {
788 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
789 throw new RuntimeException(e);
790 }
791 return ret;
792 }
793
794
795
796
797 /**
798 * Returns
799 * the first repetition of
800 * PROCEDURE (a Group object) - creates it if necessary
801 */
802 public ADT_A06_PROCEDURE getPROCEDURE() {
803 ADT_A06_PROCEDURE ret = null;
804 try {
805 ret = (ADT_A06_PROCEDURE)this.get("PROCEDURE");
806 } catch(HL7Exception e) {
807 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
808 throw new RuntimeException(e);
809 }
810 return ret;
811 }
812
813
814 /**
815 * Returns a specific repetition of
816 * PROCEDURE (a Group object) - creates it if necessary
817 *
818 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
819 * @throws HL7Exception if the repetition requested is more than one
820 * greater than the number of existing repetitions.
821 */
822 public ADT_A06_PROCEDURE getPROCEDURE(int rep) {
823 ADT_A06_PROCEDURE ret = null;
824 try {
825 ret = (ADT_A06_PROCEDURE)this.get("PROCEDURE", rep);
826 } catch(HL7Exception e) {
827 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
828 throw new RuntimeException(e);
829 }
830 return ret;
831 }
832
833 /**
834 * Returns the number of existing repetitions of PROCEDURE
835 */
836 public int getPROCEDUREReps() {
837 int reps = -1;
838 try {
839 reps = this.getAll("PROCEDURE").length;
840 } catch (HL7Exception e) {
841 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
842 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
843 throw new RuntimeException(message);
844 }
845 return reps;
846 }
847
848 /**
849 * Inserts a specific repetition of PROCEDURE (a Group object)
850 * @see AbstractGroup\#insertRepetition(Structure, int)
851 */
852 public void insertPROCEDURE(ADT_A06_PROCEDURE structure, int rep) throws HL7Exception {
853 super.insertRepetition( "PROCEDURE", structure, rep);
854 }
855
856
857 /**
858 * Inserts a specific repetition of PROCEDURE (a Group object)
859 * @see AbstractGroup\#insertRepetition(Structure, int)
860 */
861 public ADT_A06_PROCEDURE insertPROCEDURE(int rep) throws HL7Exception {
862 return (ADT_A06_PROCEDURE)super.insertRepetition("PROCEDURE", rep);
863 }
864
865
866 /**
867 * Removes a specific repetition of PROCEDURE (a Group object)
868 * @see AbstractGroup\#removeRepetition(String, int)
869 */
870 public ADT_A06_PROCEDURE removePROCEDURE(int rep) throws HL7Exception {
871 return (ADT_A06_PROCEDURE)super.removeRepetition("PROCEDURE", rep);
872 }
873
874
875
876 /**
877 * Returns
878 * the first repetition of
879 * GT1 (Guarantor) - creates it if necessary
880 */
881 public GT1 getGT1() {
882 GT1 ret = null;
883 try {
884 ret = (GT1)this.get("GT1");
885 } catch(HL7Exception e) {
886 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
887 throw new RuntimeException(e);
888 }
889 return ret;
890 }
891
892
893 /**
894 * Returns a specific repetition of
895 * GT1 (Guarantor) - creates it if necessary
896 *
897 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
898 * @throws HL7Exception if the repetition requested is more than one
899 * greater than the number of existing repetitions.
900 */
901 public GT1 getGT1(int rep) {
902 GT1 ret = null;
903 try {
904 ret = (GT1)this.get("GT1", rep);
905 } catch(HL7Exception e) {
906 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
907 throw new RuntimeException(e);
908 }
909 return ret;
910 }
911
912 /**
913 * Returns the number of existing repetitions of GT1
914 */
915 public int getGT1Reps() {
916 int reps = -1;
917 try {
918 reps = this.getAll("GT1").length;
919 } catch (HL7Exception e) {
920 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
921 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
922 throw new RuntimeException(message);
923 }
924 return reps;
925 }
926
927 /**
928 * Inserts a specific repetition of GT1 (Guarantor)
929 * @see AbstractGroup\#insertRepetition(Structure, int)
930 */
931 public void insertGT1(GT1 structure, int rep) throws HL7Exception {
932 super.insertRepetition( "GT1", structure, rep);
933 }
934
935
936 /**
937 * Inserts a specific repetition of GT1 (Guarantor)
938 * @see AbstractGroup\#insertRepetition(Structure, int)
939 */
940 public GT1 insertGT1(int rep) throws HL7Exception {
941 return (GT1)super.insertRepetition("GT1", rep);
942 }
943
944
945 /**
946 * Removes a specific repetition of GT1 (Guarantor)
947 * @see AbstractGroup\#removeRepetition(String, int)
948 */
949 public GT1 removeGT1(int rep) throws HL7Exception {
950 return (GT1)super.removeRepetition("GT1", rep);
951 }
952
953
954
955 /**
956 * Returns
957 * the first repetition of
958 * INSURANCE (a Group object) - creates it if necessary
959 */
960 public ADT_A06_INSURANCE getINSURANCE() {
961 ADT_A06_INSURANCE ret = null;
962 try {
963 ret = (ADT_A06_INSURANCE)this.get("INSURANCE");
964 } catch(HL7Exception e) {
965 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
966 throw new RuntimeException(e);
967 }
968 return ret;
969 }
970
971
972 /**
973 * Returns a specific repetition of
974 * INSURANCE (a Group object) - creates it if necessary
975 *
976 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
977 * @throws HL7Exception if the repetition requested is more than one
978 * greater than the number of existing repetitions.
979 */
980 public ADT_A06_INSURANCE getINSURANCE(int rep) {
981 ADT_A06_INSURANCE ret = null;
982 try {
983 ret = (ADT_A06_INSURANCE)this.get("INSURANCE", rep);
984 } catch(HL7Exception e) {
985 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
986 throw new RuntimeException(e);
987 }
988 return ret;
989 }
990
991 /**
992 * Returns the number of existing repetitions of INSURANCE
993 */
994 public int getINSURANCEReps() {
995 int reps = -1;
996 try {
997 reps = this.getAll("INSURANCE").length;
998 } catch (HL7Exception e) {
999 String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
1000 HapiLogFactory.getHapiLog(this.getClass()).error(message, e);
1001 throw new RuntimeException(message);
1002 }
1003 return reps;
1004 }
1005
1006 /**
1007 * Inserts a specific repetition of INSURANCE (a Group object)
1008 * @see AbstractGroup\#insertRepetition(Structure, int)
1009 */
1010 public void insertINSURANCE(ADT_A06_INSURANCE structure, int rep) throws HL7Exception {
1011 super.insertRepetition( "INSURANCE", structure, rep);
1012 }
1013
1014
1015 /**
1016 * Inserts a specific repetition of INSURANCE (a Group object)
1017 * @see AbstractGroup\#insertRepetition(Structure, int)
1018 */
1019 public ADT_A06_INSURANCE insertINSURANCE(int rep) throws HL7Exception {
1020 return (ADT_A06_INSURANCE)super.insertRepetition("INSURANCE", rep);
1021 }
1022
1023
1024 /**
1025 * Removes a specific repetition of INSURANCE (a Group object)
1026 * @see AbstractGroup\#removeRepetition(String, int)
1027 */
1028 public ADT_A06_INSURANCE removeINSURANCE(int rep) throws HL7Exception {
1029 return (ADT_A06_INSURANCE)super.removeRepetition("INSURANCE", rep);
1030 }
1031
1032
1033
1034 /**
1035 * Returns
1036 * ACC (Accident) - creates it if necessary
1037 */
1038 public ACC getACC() {
1039 ACC ret = null;
1040 try {
1041 ret = (ACC)this.get("ACC");
1042 } catch(HL7Exception e) {
1043 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
1044 throw new RuntimeException(e);
1045 }
1046 return ret;
1047 }
1048
1049
1050
1051
1052 /**
1053 * Returns
1054 * UB1 (UB82) - creates it if necessary
1055 */
1056 public UB1 getUB1() {
1057 UB1 ret = null;
1058 try {
1059 ret = (UB1)this.get("UB1");
1060 } catch(HL7Exception e) {
1061 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
1062 throw new RuntimeException(e);
1063 }
1064 return ret;
1065 }
1066
1067
1068
1069
1070 /**
1071 * Returns
1072 * UB2 (UB92 Data) - creates it if necessary
1073 */
1074 public UB2 getUB2() {
1075 UB2 ret = null;
1076 try {
1077 ret = (UB2)this.get("UB2");
1078 } catch(HL7Exception e) {
1079 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
1080 throw new RuntimeException(e);
1081 }
1082 return ret;
1083 }
1084
1085
1086
1087
1088 }
1089