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