1 /*
2 * This class is an auto-generated source file for a HAPI
3 * HL7 v2.x standard structure class.
4 *
5 * For more information, visit: http://hl7api.sourceforge.net/
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * (the "License"); you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
12 * specific language governing rights and limitations under the License.
13 *
14 * The Original Code is "[file_name]". Description:
15 * "[one_line_description]"
16 *
17 * The Initial Developer of the Original Code is University Health Network. Copyright (C)
18 * 2012. All Rights Reserved.
19 *
20 * Contributor(s): ______________________________________.
21 *
22 * Alternatively, the contents of this file may be used under the terms of the
23 * GNU General Public License (the "GPL"), in which case the provisions of the GPL are
24 * applicable instead of those above. If you wish to allow use of your version of this
25 * file only under the terms of the GPL and not to allow others to use your version
26 * of this file under the MPL, indicate your decision by deleting the provisions above
27 * and replace them with the notice and other provisions required by the GPL License.
28 * If you do not delete the provisions above, a recipient may use your version of
29 * this file under either the MPL or the GPL.
30 *
31 */
32
33
34 package ca.uhn.hl7v2.model.v28.group;
35
36 import ca.uhn.hl7v2.model.v28.segment.*;
37
38 import ca.uhn.hl7v2.HL7Exception;
39 import ca.uhn.hl7v2.parser.ModelClassFactory;
40 import ca.uhn.hl7v2.model.*;
41
42 /**
43 * <p>Represents a BAR_P01_VISIT group structure (a Group object).
44 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
45 * This Group contains the following elements:
46 * </p>
47 * <ul>
48 * <li>1: PV1 (Patient Visit) <b>optional </b></li>
49 * <li>2: PV2 (Patient Visit - Additional Information) <b>optional </b></li>
50 * <li>3: PRT (Participation Information) <b>optional repeating </b></li>
51 * <li>4: ROL (Role) <b>optional repeating </b></li>
52 * <li>5: DB1 (Disability) <b>optional repeating </b></li>
53 * <li>6: OBX (Observation/Result) <b>optional repeating </b></li>
54 * <li>7: AL1 (Patient Allergy Information) <b>optional repeating </b></li>
55 * <li>8: DG1 (Diagnosis) <b>optional repeating </b></li>
56 * <li>9: DRG (Diagnosis Related Group) <b>optional </b></li>
57 * <li>10: BAR_P01_PROCEDURE (a Group object) <b>optional repeating </b></li>
58 * <li>11: GT1 (Guarantor) <b>optional repeating </b></li>
59 * <li>12: NK1 (Next of Kin / Associated Parties) <b>optional repeating </b></li>
60 * <li>13: BAR_P01_INSURANCE (a Group object) <b>optional repeating </b></li>
61 * <li>14: ACC (Accident) <b>optional </b></li>
62 * <li>15: UB1 () <b>optional </b></li>
63 * <li>16: UB2 (Uniform Billing Data) <b>optional </b></li>
64 * </ul>
65 */
66 //@SuppressWarnings("unused")
67 public class BAR_P01_VISIT extends AbstractGroup {
68
69 /**
70 * Creates a new BAR_P01_VISIT group
71 */
72 public BAR_P01_VISIT(Group parent, ModelClassFactory factory) {
73 super(parent, factory);
74 init(factory);
75 }
76
77 private void init(ModelClassFactory factory) {
78 try {
79 this.add(PV1.class, false, false, false);
80 this.add(PV2.class, false, false, false);
81 this.add(PRT.class, false, true, false);
82 this.add(ROL.class, false, true, false);
83 this.add(DB1.class, false, true, false);
84 this.add(OBX.class, false, true, false);
85 this.add(AL1.class, false, true, false);
86 this.add(DG1.class, false, true, false);
87 this.add(DRG.class, false, false, false);
88 this.add(BAR_P01_PROCEDURE.class, false, true, false);
89 this.add(GT1.class, false, true, false);
90 this.add(NK1.class, false, true, false);
91 this.add(BAR_P01_INSURANCE.class, false, true, false);
92 this.add(ACC.class, false, false, false);
93 this.add(UB1.class, false, false, false);
94 this.add(UB2.class, false, false, false);
95 } catch(HL7Exception e) {
96 log.error("Unexpected error creating BAR_P01_VISIT - this is probably a bug in the source code generator.", e);
97 }
98 }
99
100 /**
101 * Returns "2.8"
102 */
103 public String getVersion() {
104 return "2.8";
105 }
106
107
108
109 /**
110 * Returns
111 * PV1 (Patient Visit) - creates it if necessary
112 */
113 public PV1 getPV1() {
114 PV1 retVal = getTyped("PV1", PV1.class);
115 return retVal;
116 }
117
118
119
120
121 /**
122 * Returns
123 * PV2 (Patient Visit - Additional Information) - creates it if necessary
124 */
125 public PV2 getPV2() {
126 PV2 retVal = getTyped("PV2", PV2.class);
127 return retVal;
128 }
129
130
131
132
133 /**
134 * Returns
135 * the first repetition of
136 * PRT (Participation Information) - creates it if necessary
137 */
138 public PRT getPRT() {
139 PRT retVal = getTyped("PRT", PRT.class);
140 return retVal;
141 }
142
143
144 /**
145 * Returns a specific repetition of
146 * PRT (Participation Information) - creates it if necessary
147 *
148 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
149 * @throws HL7Exception if the repetition requested is more than one
150 * greater than the number of existing repetitions.
151 */
152 public PRT getPRT(int rep) {
153 PRT retVal = getTyped("PRT", rep, PRT.class);
154 return retVal;
155 }
156
157 /**
158 * Returns the number of existing repetitions of PRT
159 */
160 public int getPRTReps() {
161 return getReps("PRT");
162 }
163
164 /**
165 * <p>
166 * Returns a non-modifiable List containing all current existing repetitions of PRT.
167 * <p>
168 * <p>
169 * Note that unlike {@link #getPRT()}, this method will not create any reps
170 * if none are already present, so an empty list may be returned.
171 * </p>
172 */
173 public java.util.List<PRT> getPRTAll() throws HL7Exception {
174 return getAllAsList("PRT", PRT.class);
175 }
176
177 /**
178 * Inserts a specific repetition of PRT (Participation Information)
179 * @see AbstractGroup#insertRepetition(Structure, int)
180 */
181 public void insertPRT(PRT structure, int rep) throws HL7Exception {
182 super.insertRepetition("PRT", structure, rep);
183 }
184
185
186 /**
187 * Inserts a specific repetition of PRT (Participation Information)
188 * @see AbstractGroup#insertRepetition(Structure, int)
189 */
190 public PRT insertPRT(int rep) throws HL7Exception {
191 return (PRT)super.insertRepetition("PRT", rep);
192 }
193
194
195 /**
196 * Removes a specific repetition of PRT (Participation Information)
197 * @see AbstractGroup#removeRepetition(String, int)
198 */
199 public PRT removePRT(int rep) throws HL7Exception {
200 return (PRT)super.removeRepetition("PRT", rep);
201 }
202
203
204
205 /**
206 * Returns
207 * the first repetition of
208 * ROL (Role) - creates it if necessary
209 */
210 public ROL getROL() {
211 ROL retVal = getTyped("ROL", ROL.class);
212 return retVal;
213 }
214
215
216 /**
217 * Returns a specific repetition of
218 * ROL (Role) - creates it if necessary
219 *
220 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
221 * @throws HL7Exception if the repetition requested is more than one
222 * greater than the number of existing repetitions.
223 */
224 public ROL getROL(int rep) {
225 ROL retVal = getTyped("ROL", rep, ROL.class);
226 return retVal;
227 }
228
229 /**
230 * Returns the number of existing repetitions of ROL
231 */
232 public int getROLReps() {
233 return getReps("ROL");
234 }
235
236 /**
237 * <p>
238 * Returns a non-modifiable List containing all current existing repetitions of ROL.
239 * <p>
240 * <p>
241 * Note that unlike {@link #getROL()}, this method will not create any reps
242 * if none are already present, so an empty list may be returned.
243 * </p>
244 */
245 public java.util.List<ROL> getROLAll() throws HL7Exception {
246 return getAllAsList("ROL", ROL.class);
247 }
248
249 /**
250 * Inserts a specific repetition of ROL (Role)
251 * @see AbstractGroup#insertRepetition(Structure, int)
252 */
253 public void insertROL(ROL structure, int rep) throws HL7Exception {
254 super.insertRepetition("ROL", structure, rep);
255 }
256
257
258 /**
259 * Inserts a specific repetition of ROL (Role)
260 * @see AbstractGroup#insertRepetition(Structure, int)
261 */
262 public ROL insertROL(int rep) throws HL7Exception {
263 return (ROL)super.insertRepetition("ROL", rep);
264 }
265
266
267 /**
268 * Removes a specific repetition of ROL (Role)
269 * @see AbstractGroup#removeRepetition(String, int)
270 */
271 public ROL removeROL(int rep) throws HL7Exception {
272 return (ROL)super.removeRepetition("ROL", rep);
273 }
274
275
276
277 /**
278 * Returns
279 * the first repetition of
280 * DB1 (Disability) - creates it if necessary
281 */
282 public DB1 getDB1() {
283 DB1 retVal = getTyped("DB1", DB1.class);
284 return retVal;
285 }
286
287
288 /**
289 * Returns a specific repetition of
290 * DB1 (Disability) - creates it if necessary
291 *
292 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
293 * @throws HL7Exception if the repetition requested is more than one
294 * greater than the number of existing repetitions.
295 */
296 public DB1 getDB1(int rep) {
297 DB1 retVal = getTyped("DB1", rep, DB1.class);
298 return retVal;
299 }
300
301 /**
302 * Returns the number of existing repetitions of DB1
303 */
304 public int getDB1Reps() {
305 return getReps("DB1");
306 }
307
308 /**
309 * <p>
310 * Returns a non-modifiable List containing all current existing repetitions of DB1.
311 * <p>
312 * <p>
313 * Note that unlike {@link #getDB1()}, this method will not create any reps
314 * if none are already present, so an empty list may be returned.
315 * </p>
316 */
317 public java.util.List<DB1> getDB1All() throws HL7Exception {
318 return getAllAsList("DB1", DB1.class);
319 }
320
321 /**
322 * Inserts a specific repetition of DB1 (Disability)
323 * @see AbstractGroup#insertRepetition(Structure, int)
324 */
325 public void insertDB1(DB1 structure, int rep) throws HL7Exception {
326 super.insertRepetition("DB1", structure, rep);
327 }
328
329
330 /**
331 * Inserts a specific repetition of DB1 (Disability)
332 * @see AbstractGroup#insertRepetition(Structure, int)
333 */
334 public DB1 insertDB1(int rep) throws HL7Exception {
335 return (DB1)super.insertRepetition("DB1", rep);
336 }
337
338
339 /**
340 * Removes a specific repetition of DB1 (Disability)
341 * @see AbstractGroup#removeRepetition(String, int)
342 */
343 public DB1 removeDB1(int rep) throws HL7Exception {
344 return (DB1)super.removeRepetition("DB1", rep);
345 }
346
347
348
349 /**
350 * Returns
351 * the first repetition of
352 * OBX (Observation/Result) - creates it if necessary
353 */
354 public OBX getOBX() {
355 OBX retVal = getTyped("OBX", OBX.class);
356 return retVal;
357 }
358
359
360 /**
361 * Returns a specific repetition of
362 * OBX (Observation/Result) - creates it if necessary
363 *
364 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
365 * @throws HL7Exception if the repetition requested is more than one
366 * greater than the number of existing repetitions.
367 */
368 public OBX getOBX(int rep) {
369 OBX retVal = getTyped("OBX", rep, OBX.class);
370 return retVal;
371 }
372
373 /**
374 * Returns the number of existing repetitions of OBX
375 */
376 public int getOBXReps() {
377 return getReps("OBX");
378 }
379
380 /**
381 * <p>
382 * Returns a non-modifiable List containing all current existing repetitions of OBX.
383 * <p>
384 * <p>
385 * Note that unlike {@link #getOBX()}, this method will not create any reps
386 * if none are already present, so an empty list may be returned.
387 * </p>
388 */
389 public java.util.List<OBX> getOBXAll() throws HL7Exception {
390 return getAllAsList("OBX", OBX.class);
391 }
392
393 /**
394 * Inserts a specific repetition of OBX (Observation/Result)
395 * @see AbstractGroup#insertRepetition(Structure, int)
396 */
397 public void insertOBX(OBX structure, int rep) throws HL7Exception {
398 super.insertRepetition("OBX", structure, rep);
399 }
400
401
402 /**
403 * Inserts a specific repetition of OBX (Observation/Result)
404 * @see AbstractGroup#insertRepetition(Structure, int)
405 */
406 public OBX insertOBX(int rep) throws HL7Exception {
407 return (OBX)super.insertRepetition("OBX", rep);
408 }
409
410
411 /**
412 * Removes a specific repetition of OBX (Observation/Result)
413 * @see AbstractGroup#removeRepetition(String, int)
414 */
415 public OBX removeOBX(int rep) throws HL7Exception {
416 return (OBX)super.removeRepetition("OBX", rep);
417 }
418
419
420
421 /**
422 * Returns
423 * the first repetition of
424 * AL1 (Patient Allergy Information) - creates it if necessary
425 */
426 public AL1 getAL1() {
427 AL1 retVal = getTyped("AL1", AL1.class);
428 return retVal;
429 }
430
431
432 /**
433 * Returns a specific repetition of
434 * AL1 (Patient Allergy Information) - creates it if necessary
435 *
436 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
437 * @throws HL7Exception if the repetition requested is more than one
438 * greater than the number of existing repetitions.
439 */
440 public AL1 getAL1(int rep) {
441 AL1 retVal = getTyped("AL1", rep, AL1.class);
442 return retVal;
443 }
444
445 /**
446 * Returns the number of existing repetitions of AL1
447 */
448 public int getAL1Reps() {
449 return getReps("AL1");
450 }
451
452 /**
453 * <p>
454 * Returns a non-modifiable List containing all current existing repetitions of AL1.
455 * <p>
456 * <p>
457 * Note that unlike {@link #getAL1()}, this method will not create any reps
458 * if none are already present, so an empty list may be returned.
459 * </p>
460 */
461 public java.util.List<AL1> getAL1All() throws HL7Exception {
462 return getAllAsList("AL1", AL1.class);
463 }
464
465 /**
466 * Inserts a specific repetition of AL1 (Patient Allergy Information)
467 * @see AbstractGroup#insertRepetition(Structure, int)
468 */
469 public void insertAL1(AL1 structure, int rep) throws HL7Exception {
470 super.insertRepetition("AL1", structure, rep);
471 }
472
473
474 /**
475 * Inserts a specific repetition of AL1 (Patient Allergy Information)
476 * @see AbstractGroup#insertRepetition(Structure, int)
477 */
478 public AL1 insertAL1(int rep) throws HL7Exception {
479 return (AL1)super.insertRepetition("AL1", rep);
480 }
481
482
483 /**
484 * Removes a specific repetition of AL1 (Patient Allergy Information)
485 * @see AbstractGroup#removeRepetition(String, int)
486 */
487 public AL1 removeAL1(int rep) throws HL7Exception {
488 return (AL1)super.removeRepetition("AL1", rep);
489 }
490
491
492
493 /**
494 * Returns
495 * the first repetition of
496 * DG1 (Diagnosis) - creates it if necessary
497 */
498 public DG1 getDG1() {
499 DG1 retVal = getTyped("DG1", DG1.class);
500 return retVal;
501 }
502
503
504 /**
505 * Returns a specific repetition of
506 * DG1 (Diagnosis) - creates it if necessary
507 *
508 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
509 * @throws HL7Exception if the repetition requested is more than one
510 * greater than the number of existing repetitions.
511 */
512 public DG1 getDG1(int rep) {
513 DG1 retVal = getTyped("DG1", rep, DG1.class);
514 return retVal;
515 }
516
517 /**
518 * Returns the number of existing repetitions of DG1
519 */
520 public int getDG1Reps() {
521 return getReps("DG1");
522 }
523
524 /**
525 * <p>
526 * Returns a non-modifiable List containing all current existing repetitions of DG1.
527 * <p>
528 * <p>
529 * Note that unlike {@link #getDG1()}, this method will not create any reps
530 * if none are already present, so an empty list may be returned.
531 * </p>
532 */
533 public java.util.List<DG1> getDG1All() throws HL7Exception {
534 return getAllAsList("DG1", DG1.class);
535 }
536
537 /**
538 * Inserts a specific repetition of DG1 (Diagnosis)
539 * @see AbstractGroup#insertRepetition(Structure, int)
540 */
541 public void insertDG1(DG1 structure, int rep) throws HL7Exception {
542 super.insertRepetition("DG1", structure, rep);
543 }
544
545
546 /**
547 * Inserts a specific repetition of DG1 (Diagnosis)
548 * @see AbstractGroup#insertRepetition(Structure, int)
549 */
550 public DG1 insertDG1(int rep) throws HL7Exception {
551 return (DG1)super.insertRepetition("DG1", rep);
552 }
553
554
555 /**
556 * Removes a specific repetition of DG1 (Diagnosis)
557 * @see AbstractGroup#removeRepetition(String, int)
558 */
559 public DG1 removeDG1(int rep) throws HL7Exception {
560 return (DG1)super.removeRepetition("DG1", rep);
561 }
562
563
564
565 /**
566 * Returns
567 * DRG (Diagnosis Related Group) - creates it if necessary
568 */
569 public DRG getDRG() {
570 DRG retVal = getTyped("DRG", DRG.class);
571 return retVal;
572 }
573
574
575
576
577 /**
578 * Returns
579 * the first repetition of
580 * PROCEDURE (a Group object) - creates it if necessary
581 */
582 public BAR_P01_PROCEDURE getPROCEDURE() {
583 BAR_P01_PROCEDURE retVal = getTyped("PROCEDURE", BAR_P01_PROCEDURE.class);
584 return retVal;
585 }
586
587
588 /**
589 * Returns a specific repetition of
590 * PROCEDURE (a Group object) - creates it if necessary
591 *
592 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
593 * @throws HL7Exception if the repetition requested is more than one
594 * greater than the number of existing repetitions.
595 */
596 public BAR_P01_PROCEDURE getPROCEDURE(int rep) {
597 BAR_P01_PROCEDURE retVal = getTyped("PROCEDURE", rep, BAR_P01_PROCEDURE.class);
598 return retVal;
599 }
600
601 /**
602 * Returns the number of existing repetitions of PROCEDURE
603 */
604 public int getPROCEDUREReps() {
605 return getReps("PROCEDURE");
606 }
607
608 /**
609 * <p>
610 * Returns a non-modifiable List containing all current existing repetitions of PROCEDURE.
611 * <p>
612 * <p>
613 * Note that unlike {@link #getPROCEDURE()}, this method will not create any reps
614 * if none are already present, so an empty list may be returned.
615 * </p>
616 */
617 public java.util.List<BAR_P01_PROCEDURE> getPROCEDUREAll() throws HL7Exception {
618 return getAllAsList("PROCEDURE", BAR_P01_PROCEDURE.class);
619 }
620
621 /**
622 * Inserts a specific repetition of PROCEDURE (a Group object)
623 * @see AbstractGroup#insertRepetition(Structure, int)
624 */
625 public void insertPROCEDURE(BAR_P01_PROCEDURE structure, int rep) throws HL7Exception {
626 super.insertRepetition("PROCEDURE", structure, rep);
627 }
628
629
630 /**
631 * Inserts a specific repetition of PROCEDURE (a Group object)
632 * @see AbstractGroup#insertRepetition(Structure, int)
633 */
634 public BAR_P01_PROCEDURE insertPROCEDURE(int rep) throws HL7Exception {
635 return (BAR_P01_PROCEDURE)super.insertRepetition("PROCEDURE", rep);
636 }
637
638
639 /**
640 * Removes a specific repetition of PROCEDURE (a Group object)
641 * @see AbstractGroup#removeRepetition(String, int)
642 */
643 public BAR_P01_PROCEDURE removePROCEDURE(int rep) throws HL7Exception {
644 return (BAR_P01_PROCEDURE)super.removeRepetition("PROCEDURE", rep);
645 }
646
647
648
649 /**
650 * Returns
651 * the first repetition of
652 * GT1 (Guarantor) - creates it if necessary
653 */
654 public GT1 getGT1() {
655 GT1 retVal = getTyped("GT1", GT1.class);
656 return retVal;
657 }
658
659
660 /**
661 * Returns a specific repetition of
662 * GT1 (Guarantor) - creates it if necessary
663 *
664 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
665 * @throws HL7Exception if the repetition requested is more than one
666 * greater than the number of existing repetitions.
667 */
668 public GT1 getGT1(int rep) {
669 GT1 retVal = getTyped("GT1", rep, GT1.class);
670 return retVal;
671 }
672
673 /**
674 * Returns the number of existing repetitions of GT1
675 */
676 public int getGT1Reps() {
677 return getReps("GT1");
678 }
679
680 /**
681 * <p>
682 * Returns a non-modifiable List containing all current existing repetitions of GT1.
683 * <p>
684 * <p>
685 * Note that unlike {@link #getGT1()}, this method will not create any reps
686 * if none are already present, so an empty list may be returned.
687 * </p>
688 */
689 public java.util.List<GT1> getGT1All() throws HL7Exception {
690 return getAllAsList("GT1", GT1.class);
691 }
692
693 /**
694 * Inserts a specific repetition of GT1 (Guarantor)
695 * @see AbstractGroup#insertRepetition(Structure, int)
696 */
697 public void insertGT1(GT1 structure, int rep) throws HL7Exception {
698 super.insertRepetition("GT1", structure, rep);
699 }
700
701
702 /**
703 * Inserts a specific repetition of GT1 (Guarantor)
704 * @see AbstractGroup#insertRepetition(Structure, int)
705 */
706 public GT1 insertGT1(int rep) throws HL7Exception {
707 return (GT1)super.insertRepetition("GT1", rep);
708 }
709
710
711 /**
712 * Removes a specific repetition of GT1 (Guarantor)
713 * @see AbstractGroup#removeRepetition(String, int)
714 */
715 public GT1 removeGT1(int rep) throws HL7Exception {
716 return (GT1)super.removeRepetition("GT1", rep);
717 }
718
719
720
721 /**
722 * Returns
723 * the first repetition of
724 * NK1 (Next of Kin / Associated Parties) - creates it if necessary
725 */
726 public NK1 getNK1() {
727 NK1 retVal = getTyped("NK1", NK1.class);
728 return retVal;
729 }
730
731
732 /**
733 * Returns a specific repetition of
734 * NK1 (Next of Kin / Associated Parties) - creates it if necessary
735 *
736 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
737 * @throws HL7Exception if the repetition requested is more than one
738 * greater than the number of existing repetitions.
739 */
740 public NK1 getNK1(int rep) {
741 NK1 retVal = getTyped("NK1", rep, NK1.class);
742 return retVal;
743 }
744
745 /**
746 * Returns the number of existing repetitions of NK1
747 */
748 public int getNK1Reps() {
749 return getReps("NK1");
750 }
751
752 /**
753 * <p>
754 * Returns a non-modifiable List containing all current existing repetitions of NK1.
755 * <p>
756 * <p>
757 * Note that unlike {@link #getNK1()}, this method will not create any reps
758 * if none are already present, so an empty list may be returned.
759 * </p>
760 */
761 public java.util.List<NK1> getNK1All() throws HL7Exception {
762 return getAllAsList("NK1", NK1.class);
763 }
764
765 /**
766 * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
767 * @see AbstractGroup#insertRepetition(Structure, int)
768 */
769 public void insertNK1(NK1 structure, int rep) throws HL7Exception {
770 super.insertRepetition("NK1", structure, rep);
771 }
772
773
774 /**
775 * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
776 * @see AbstractGroup#insertRepetition(Structure, int)
777 */
778 public NK1 insertNK1(int rep) throws HL7Exception {
779 return (NK1)super.insertRepetition("NK1", rep);
780 }
781
782
783 /**
784 * Removes a specific repetition of NK1 (Next of Kin / Associated Parties)
785 * @see AbstractGroup#removeRepetition(String, int)
786 */
787 public NK1 removeNK1(int rep) throws HL7Exception {
788 return (NK1)super.removeRepetition("NK1", rep);
789 }
790
791
792
793 /**
794 * Returns
795 * the first repetition of
796 * INSURANCE (a Group object) - creates it if necessary
797 */
798 public BAR_P01_INSURANCE getINSURANCE() {
799 BAR_P01_INSURANCE retVal = getTyped("INSURANCE", BAR_P01_INSURANCE.class);
800 return retVal;
801 }
802
803
804 /**
805 * Returns a specific repetition of
806 * INSURANCE (a Group object) - creates it if necessary
807 *
808 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
809 * @throws HL7Exception if the repetition requested is more than one
810 * greater than the number of existing repetitions.
811 */
812 public BAR_P01_INSURANCE getINSURANCE(int rep) {
813 BAR_P01_INSURANCE retVal = getTyped("INSURANCE", rep, BAR_P01_INSURANCE.class);
814 return retVal;
815 }
816
817 /**
818 * Returns the number of existing repetitions of INSURANCE
819 */
820 public int getINSURANCEReps() {
821 return getReps("INSURANCE");
822 }
823
824 /**
825 * <p>
826 * Returns a non-modifiable List containing all current existing repetitions of INSURANCE.
827 * <p>
828 * <p>
829 * Note that unlike {@link #getINSURANCE()}, this method will not create any reps
830 * if none are already present, so an empty list may be returned.
831 * </p>
832 */
833 public java.util.List<BAR_P01_INSURANCE> getINSURANCEAll() throws HL7Exception {
834 return getAllAsList("INSURANCE", BAR_P01_INSURANCE.class);
835 }
836
837 /**
838 * Inserts a specific repetition of INSURANCE (a Group object)
839 * @see AbstractGroup#insertRepetition(Structure, int)
840 */
841 public void insertINSURANCE(BAR_P01_INSURANCE structure, int rep) throws HL7Exception {
842 super.insertRepetition("INSURANCE", structure, rep);
843 }
844
845
846 /**
847 * Inserts a specific repetition of INSURANCE (a Group object)
848 * @see AbstractGroup#insertRepetition(Structure, int)
849 */
850 public BAR_P01_INSURANCE insertINSURANCE(int rep) throws HL7Exception {
851 return (BAR_P01_INSURANCE)super.insertRepetition("INSURANCE", rep);
852 }
853
854
855 /**
856 * Removes a specific repetition of INSURANCE (a Group object)
857 * @see AbstractGroup#removeRepetition(String, int)
858 */
859 public BAR_P01_INSURANCE removeINSURANCE(int rep) throws HL7Exception {
860 return (BAR_P01_INSURANCE)super.removeRepetition("INSURANCE", rep);
861 }
862
863
864
865 /**
866 * Returns
867 * ACC (Accident) - creates it if necessary
868 */
869 public ACC getACC() {
870 ACC retVal = getTyped("ACC", ACC.class);
871 return retVal;
872 }
873
874
875
876
877 /**
878 * Returns
879 * UB1 () - creates it if necessary
880 */
881 public UB1 getUB1() {
882 UB1 retVal = getTyped("UB1", UB1.class);
883 return retVal;
884 }
885
886
887
888
889 /**
890 * Returns
891 * UB2 (Uniform Billing Data) - creates it if necessary
892 */
893 public UB2 getUB2() {
894 UB2 retVal = getTyped("UB2", UB2.class);
895 return retVal;
896 }
897
898
899
900
901 }
902