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.v231.message;
35
36 import ca.uhn.hl7v2.model.v231.group.*;
37 import ca.uhn.hl7v2.model.v231.segment.*;
38
39 import ca.uhn.hl7v2.HL7Exception;
40 import ca.uhn.hl7v2.parser.ModelClassFactory;
41 import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
42 import ca.uhn.hl7v2.model.*;
43
44
45 /**
46 * <p>Represents a DFT_P03 message structure (see chapter ?). This structure contains the
47 * following elements: </p>
48 * <ul>
49 * <li>1: MSH (MSH - message header segment) <b> </b> </li>
50 * <li>2: EVN (EVN - event type segment) <b> </b> </li>
51 * <li>3: PID (PID - patient identification segment) <b> </b> </li>
52 * <li>4: PD1 (PD1 - patient additional demographic segment) <b>optional </b> </li>
53 * <li>5: PV1 (PV1 - patient visit segment-) <b>optional </b> </li>
54 * <li>6: PV2 (PV2 - patient visit - additional information segment) <b>optional </b> </li>
55 * <li>7: DB1 (DB1 - Disability segment) <b>optional repeating</b> </li>
56 * <li>8: OBX (OBX - observation/result segment) <b>optional repeating</b> </li>
57 * <li>9: DFT_P03_FT1PR1ROL (a Group object) <b> repeating</b> </li>
58 * <li>10: DG1 (DG1 - diagnosis segment) <b>optional repeating</b> </li>
59 * <li>11: DRG (DRG - diagnosis related group segment) <b>optional </b> </li>
60 * <li>12: GT1 (GT1 - guarantor segment) <b>optional repeating</b> </li>
61 * <li>13: DFT_P03_IN1IN2IN3 (a Group object) <b>optional repeating</b> </li>
62 * <li>14: ACC (ACC - accident segment) <b>optional </b> </li>
63 * </ul>
64 */
65 //@SuppressWarnings("unused")
66 public class DFT_P03 extends AbstractMessage {
67
68 /**
69 * Creates a new DFT_P03 message with DefaultModelClassFactory.
70 */
71 public DFT_P03() {
72 this(new DefaultModelClassFactory());
73 }
74
75 /**
76 * Creates a new DFT_P03 message with custom ModelClassFactory.
77 */
78 public DFT_P03(ModelClassFactory factory) {
79 super(factory);
80 init(factory);
81 }
82
83 private void init(ModelClassFactory factory) {
84 try {
85 this.add(MSH.class, true, false);
86 this.add(EVN.class, true, false);
87 this.add(PID.class, true, false);
88 this.add(PD1.class, false, false);
89 this.add(PV1.class, false, false);
90 this.add(PV2.class, false, false);
91 this.add(DB1.class, false, true);
92 this.add(OBX.class, false, true);
93 this.add(DFT_P03_FT1PR1ROL.class, true, true);
94 this.add(DG1.class, false, true);
95 this.add(DRG.class, false, false);
96 this.add(GT1.class, false, true);
97 this.add(DFT_P03_IN1IN2IN3.class, false, true);
98 this.add(ACC.class, false, false);
99 } catch(HL7Exception e) {
100 log.error("Unexpected error creating DFT_P03 - this is probably a bug in the source code generator.", e);
101 }
102 }
103
104
105 /**
106 * Returns "2.3.1"
107 */
108 public String getVersion() {
109 return "2.3.1";
110 }
111
112
113
114
115 /**
116 * <p>
117 * Returns
118 * MSH (MSH - message header segment) - creates it if necessary
119 * </p>
120 *
121 *
122 */
123 public MSH getMSH() {
124 return getTyped("MSH", MSH.class);
125 }
126
127
128
129
130
131 /**
132 * <p>
133 * Returns
134 * EVN (EVN - event type segment) - creates it if necessary
135 * </p>
136 *
137 *
138 */
139 public EVN getEVN() {
140 return getTyped("EVN", EVN.class);
141 }
142
143
144
145
146
147 /**
148 * <p>
149 * Returns
150 * PID (PID - patient identification segment) - creates it if necessary
151 * </p>
152 *
153 *
154 */
155 public PID getPID() {
156 return getTyped("PID", PID.class);
157 }
158
159
160
161
162
163 /**
164 * <p>
165 * Returns
166 * PD1 (PD1 - patient additional demographic segment) - creates it if necessary
167 * </p>
168 *
169 *
170 */
171 public PD1 getPD1() {
172 return getTyped("PD1", PD1.class);
173 }
174
175
176
177
178
179 /**
180 * <p>
181 * Returns
182 * PV1 (PV1 - patient visit segment-) - creates it if necessary
183 * </p>
184 *
185 *
186 */
187 public PV1 getPV1() {
188 return getTyped("PV1", PV1.class);
189 }
190
191
192
193
194
195 /**
196 * <p>
197 * Returns
198 * PV2 (PV2 - patient visit - additional information segment) - creates it if necessary
199 * </p>
200 *
201 *
202 */
203 public PV2 getPV2() {
204 return getTyped("PV2", PV2.class);
205 }
206
207
208
209
210
211 /**
212 * <p>
213 * Returns
214 * the first repetition of
215 * DB1 (DB1 - Disability segment) - creates it if necessary
216 * </p>
217 *
218 *
219 */
220 public DB1 getDB1() {
221 return getTyped("DB1", DB1.class);
222 }
223
224
225 /**
226 * <p>
227 * Returns a specific repetition of
228 * DB1 (DB1 - Disability segment) - creates it if necessary
229 * </p>
230 *
231 *
232 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
233 * @throws HL7Exception if the repetition requested is more than one
234 * greater than the number of existing repetitions.
235 */
236 public DB1 getDB1(int rep) {
237 return getTyped("DB1", rep, DB1.class);
238 }
239
240 /**
241 * <p>
242 * Returns the number of existing repetitions of DB1
243 * </p>
244 *
245 */
246 public int getDB1Reps() {
247 return getReps("DB1");
248 }
249
250 /**
251 * <p>
252 * Returns a non-modifiable List containing all current existing repetitions of DB1.
253 * <p>
254 * <p>
255 * Note that unlike {@link #getDB1()}, this method will not create any reps
256 * if none are already present, so an empty list may be returned.
257 * </p>
258 *
259 */
260 public java.util.List<DB1> getDB1All() throws HL7Exception {
261 return getAllAsList("DB1", DB1.class);
262 }
263
264 /**
265 * <p>
266 * Inserts a specific repetition of DB1 (DB1 - Disability segment)
267 * </p>
268 *
269 *
270 * @see AbstractGroup#insertRepetition(Structure, int)
271 */
272 public void insertDB1(DB1 structure, int rep) throws HL7Exception {
273 super.insertRepetition( "DB1", structure, rep);
274 }
275
276
277 /**
278 * <p>
279 * Inserts a specific repetition of DB1 (DB1 - Disability segment)
280 * </p>
281 *
282 *
283 * @see AbstractGroup#insertRepetition(Structure, int)
284 */
285 public DB1 insertDB1(int rep) throws HL7Exception {
286 return (DB1)super.insertRepetition("DB1", rep);
287 }
288
289
290 /**
291 * <p>
292 * Removes a specific repetition of DB1 (DB1 - Disability segment)
293 * </p>
294 *
295 *
296 * @see AbstractGroup#removeRepetition(String, int)
297 */
298 public DB1 removeDB1(int rep) throws HL7Exception {
299 return (DB1)super.removeRepetition("DB1", rep);
300 }
301
302
303
304
305 /**
306 * <p>
307 * Returns
308 * the first repetition of
309 * OBX (OBX - observation/result segment) - creates it if necessary
310 * </p>
311 *
312 *
313 */
314 public OBX getOBX() {
315 return getTyped("OBX", OBX.class);
316 }
317
318
319 /**
320 * <p>
321 * Returns a specific repetition of
322 * OBX (OBX - observation/result segment) - creates it if necessary
323 * </p>
324 *
325 *
326 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
327 * @throws HL7Exception if the repetition requested is more than one
328 * greater than the number of existing repetitions.
329 */
330 public OBX getOBX(int rep) {
331 return getTyped("OBX", rep, OBX.class);
332 }
333
334 /**
335 * <p>
336 * Returns the number of existing repetitions of OBX
337 * </p>
338 *
339 */
340 public int getOBXReps() {
341 return getReps("OBX");
342 }
343
344 /**
345 * <p>
346 * Returns a non-modifiable List containing all current existing repetitions of OBX.
347 * <p>
348 * <p>
349 * Note that unlike {@link #getOBX()}, this method will not create any reps
350 * if none are already present, so an empty list may be returned.
351 * </p>
352 *
353 */
354 public java.util.List<OBX> getOBXAll() throws HL7Exception {
355 return getAllAsList("OBX", OBX.class);
356 }
357
358 /**
359 * <p>
360 * Inserts a specific repetition of OBX (OBX - observation/result segment)
361 * </p>
362 *
363 *
364 * @see AbstractGroup#insertRepetition(Structure, int)
365 */
366 public void insertOBX(OBX structure, int rep) throws HL7Exception {
367 super.insertRepetition( "OBX", structure, rep);
368 }
369
370
371 /**
372 * <p>
373 * Inserts a specific repetition of OBX (OBX - observation/result segment)
374 * </p>
375 *
376 *
377 * @see AbstractGroup#insertRepetition(Structure, int)
378 */
379 public OBX insertOBX(int rep) throws HL7Exception {
380 return (OBX)super.insertRepetition("OBX", rep);
381 }
382
383
384 /**
385 * <p>
386 * Removes a specific repetition of OBX (OBX - observation/result segment)
387 * </p>
388 *
389 *
390 * @see AbstractGroup#removeRepetition(String, int)
391 */
392 public OBX removeOBX(int rep) throws HL7Exception {
393 return (OBX)super.removeRepetition("OBX", rep);
394 }
395
396
397
398
399 /**
400 * <p>
401 * Returns
402 * the first repetition of
403 * FT1PR1ROL (a Group object) - creates it if necessary
404 * </p>
405 *
406 *
407 */
408 public DFT_P03_FT1PR1ROL getFT1PR1ROL() {
409 return getTyped("FT1PR1ROL", DFT_P03_FT1PR1ROL.class);
410 }
411
412
413 /**
414 * <p>
415 * Returns a specific repetition of
416 * FT1PR1ROL (a Group object) - creates it if necessary
417 * </p>
418 *
419 *
420 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
421 * @throws HL7Exception if the repetition requested is more than one
422 * greater than the number of existing repetitions.
423 */
424 public DFT_P03_FT1PR1ROL getFT1PR1ROL(int rep) {
425 return getTyped("FT1PR1ROL", rep, DFT_P03_FT1PR1ROL.class);
426 }
427
428 /**
429 * <p>
430 * Returns the number of existing repetitions of FT1PR1ROL
431 * </p>
432 *
433 */
434 public int getFT1PR1ROLReps() {
435 return getReps("FT1PR1ROL");
436 }
437
438 /**
439 * <p>
440 * Returns a non-modifiable List containing all current existing repetitions of FT1PR1ROL.
441 * <p>
442 * <p>
443 * Note that unlike {@link #getFT1PR1ROL()}, this method will not create any reps
444 * if none are already present, so an empty list may be returned.
445 * </p>
446 *
447 */
448 public java.util.List<DFT_P03_FT1PR1ROL> getFT1PR1ROLAll() throws HL7Exception {
449 return getAllAsList("FT1PR1ROL", DFT_P03_FT1PR1ROL.class);
450 }
451
452 /**
453 * <p>
454 * Inserts a specific repetition of FT1PR1ROL (a Group object)
455 * </p>
456 *
457 *
458 * @see AbstractGroup#insertRepetition(Structure, int)
459 */
460 public void insertFT1PR1ROL(DFT_P03_FT1PR1ROL structure, int rep) throws HL7Exception {
461 super.insertRepetition( "FT1PR1ROL", structure, rep);
462 }
463
464
465 /**
466 * <p>
467 * Inserts a specific repetition of FT1PR1ROL (a Group object)
468 * </p>
469 *
470 *
471 * @see AbstractGroup#insertRepetition(Structure, int)
472 */
473 public DFT_P03_FT1PR1ROL insertFT1PR1ROL(int rep) throws HL7Exception {
474 return (DFT_P03_FT1PR1ROL)super.insertRepetition("FT1PR1ROL", rep);
475 }
476
477
478 /**
479 * <p>
480 * Removes a specific repetition of FT1PR1ROL (a Group object)
481 * </p>
482 *
483 *
484 * @see AbstractGroup#removeRepetition(String, int)
485 */
486 public DFT_P03_FT1PR1ROL removeFT1PR1ROL(int rep) throws HL7Exception {
487 return (DFT_P03_FT1PR1ROL)super.removeRepetition("FT1PR1ROL", rep);
488 }
489
490
491
492
493 /**
494 * <p>
495 * Returns
496 * the first repetition of
497 * DG1 (DG1 - diagnosis segment) - creates it if necessary
498 * </p>
499 *
500 *
501 */
502 public DG1 getDG1() {
503 return getTyped("DG1", DG1.class);
504 }
505
506
507 /**
508 * <p>
509 * Returns a specific repetition of
510 * DG1 (DG1 - diagnosis segment) - creates it if necessary
511 * </p>
512 *
513 *
514 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
515 * @throws HL7Exception if the repetition requested is more than one
516 * greater than the number of existing repetitions.
517 */
518 public DG1 getDG1(int rep) {
519 return getTyped("DG1", rep, DG1.class);
520 }
521
522 /**
523 * <p>
524 * Returns the number of existing repetitions of DG1
525 * </p>
526 *
527 */
528 public int getDG1Reps() {
529 return getReps("DG1");
530 }
531
532 /**
533 * <p>
534 * Returns a non-modifiable List containing all current existing repetitions of DG1.
535 * <p>
536 * <p>
537 * Note that unlike {@link #getDG1()}, this method will not create any reps
538 * if none are already present, so an empty list may be returned.
539 * </p>
540 *
541 */
542 public java.util.List<DG1> getDG1All() throws HL7Exception {
543 return getAllAsList("DG1", DG1.class);
544 }
545
546 /**
547 * <p>
548 * Inserts a specific repetition of DG1 (DG1 - diagnosis segment)
549 * </p>
550 *
551 *
552 * @see AbstractGroup#insertRepetition(Structure, int)
553 */
554 public void insertDG1(DG1 structure, int rep) throws HL7Exception {
555 super.insertRepetition( "DG1", structure, rep);
556 }
557
558
559 /**
560 * <p>
561 * Inserts a specific repetition of DG1 (DG1 - diagnosis segment)
562 * </p>
563 *
564 *
565 * @see AbstractGroup#insertRepetition(Structure, int)
566 */
567 public DG1 insertDG1(int rep) throws HL7Exception {
568 return (DG1)super.insertRepetition("DG1", rep);
569 }
570
571
572 /**
573 * <p>
574 * Removes a specific repetition of DG1 (DG1 - diagnosis segment)
575 * </p>
576 *
577 *
578 * @see AbstractGroup#removeRepetition(String, int)
579 */
580 public DG1 removeDG1(int rep) throws HL7Exception {
581 return (DG1)super.removeRepetition("DG1", rep);
582 }
583
584
585
586
587 /**
588 * <p>
589 * Returns
590 * DRG (DRG - diagnosis related group segment) - creates it if necessary
591 * </p>
592 *
593 *
594 */
595 public DRG getDRG() {
596 return getTyped("DRG", DRG.class);
597 }
598
599
600
601
602
603 /**
604 * <p>
605 * Returns
606 * the first repetition of
607 * GT1 (GT1 - guarantor segment) - creates it if necessary
608 * </p>
609 *
610 *
611 */
612 public GT1 getGT1() {
613 return getTyped("GT1", GT1.class);
614 }
615
616
617 /**
618 * <p>
619 * Returns a specific repetition of
620 * GT1 (GT1 - guarantor segment) - creates it if necessary
621 * </p>
622 *
623 *
624 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
625 * @throws HL7Exception if the repetition requested is more than one
626 * greater than the number of existing repetitions.
627 */
628 public GT1 getGT1(int rep) {
629 return getTyped("GT1", rep, GT1.class);
630 }
631
632 /**
633 * <p>
634 * Returns the number of existing repetitions of GT1
635 * </p>
636 *
637 */
638 public int getGT1Reps() {
639 return getReps("GT1");
640 }
641
642 /**
643 * <p>
644 * Returns a non-modifiable List containing all current existing repetitions of GT1.
645 * <p>
646 * <p>
647 * Note that unlike {@link #getGT1()}, this method will not create any reps
648 * if none are already present, so an empty list may be returned.
649 * </p>
650 *
651 */
652 public java.util.List<GT1> getGT1All() throws HL7Exception {
653 return getAllAsList("GT1", GT1.class);
654 }
655
656 /**
657 * <p>
658 * Inserts a specific repetition of GT1 (GT1 - guarantor segment)
659 * </p>
660 *
661 *
662 * @see AbstractGroup#insertRepetition(Structure, int)
663 */
664 public void insertGT1(GT1 structure, int rep) throws HL7Exception {
665 super.insertRepetition( "GT1", structure, rep);
666 }
667
668
669 /**
670 * <p>
671 * Inserts a specific repetition of GT1 (GT1 - guarantor segment)
672 * </p>
673 *
674 *
675 * @see AbstractGroup#insertRepetition(Structure, int)
676 */
677 public GT1 insertGT1(int rep) throws HL7Exception {
678 return (GT1)super.insertRepetition("GT1", rep);
679 }
680
681
682 /**
683 * <p>
684 * Removes a specific repetition of GT1 (GT1 - guarantor segment)
685 * </p>
686 *
687 *
688 * @see AbstractGroup#removeRepetition(String, int)
689 */
690 public GT1 removeGT1(int rep) throws HL7Exception {
691 return (GT1)super.removeRepetition("GT1", rep);
692 }
693
694
695
696
697 /**
698 * <p>
699 * Returns
700 * the first repetition of
701 * IN1IN2IN3 (a Group object) - creates it if necessary
702 * </p>
703 *
704 *
705 */
706 public DFT_P03_IN1IN2IN3 getIN1IN2IN3() {
707 return getTyped("IN1IN2IN3", DFT_P03_IN1IN2IN3.class);
708 }
709
710
711 /**
712 * <p>
713 * Returns a specific repetition of
714 * IN1IN2IN3 (a Group object) - creates it if necessary
715 * </p>
716 *
717 *
718 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
719 * @throws HL7Exception if the repetition requested is more than one
720 * greater than the number of existing repetitions.
721 */
722 public DFT_P03_IN1IN2IN3 getIN1IN2IN3(int rep) {
723 return getTyped("IN1IN2IN3", rep, DFT_P03_IN1IN2IN3.class);
724 }
725
726 /**
727 * <p>
728 * Returns the number of existing repetitions of IN1IN2IN3
729 * </p>
730 *
731 */
732 public int getIN1IN2IN3Reps() {
733 return getReps("IN1IN2IN3");
734 }
735
736 /**
737 * <p>
738 * Returns a non-modifiable List containing all current existing repetitions of IN1IN2IN3.
739 * <p>
740 * <p>
741 * Note that unlike {@link #getIN1IN2IN3()}, this method will not create any reps
742 * if none are already present, so an empty list may be returned.
743 * </p>
744 *
745 */
746 public java.util.List<DFT_P03_IN1IN2IN3> getIN1IN2IN3All() throws HL7Exception {
747 return getAllAsList("IN1IN2IN3", DFT_P03_IN1IN2IN3.class);
748 }
749
750 /**
751 * <p>
752 * Inserts a specific repetition of IN1IN2IN3 (a Group object)
753 * </p>
754 *
755 *
756 * @see AbstractGroup#insertRepetition(Structure, int)
757 */
758 public void insertIN1IN2IN3(DFT_P03_IN1IN2IN3 structure, int rep) throws HL7Exception {
759 super.insertRepetition( "IN1IN2IN3", structure, rep);
760 }
761
762
763 /**
764 * <p>
765 * Inserts a specific repetition of IN1IN2IN3 (a Group object)
766 * </p>
767 *
768 *
769 * @see AbstractGroup#insertRepetition(Structure, int)
770 */
771 public DFT_P03_IN1IN2IN3 insertIN1IN2IN3(int rep) throws HL7Exception {
772 return (DFT_P03_IN1IN2IN3)super.insertRepetition("IN1IN2IN3", rep);
773 }
774
775
776 /**
777 * <p>
778 * Removes a specific repetition of IN1IN2IN3 (a Group object)
779 * </p>
780 *
781 *
782 * @see AbstractGroup#removeRepetition(String, int)
783 */
784 public DFT_P03_IN1IN2IN3 removeIN1IN2IN3(int rep) throws HL7Exception {
785 return (DFT_P03_IN1IN2IN3)super.removeRepetition("IN1IN2IN3", rep);
786 }
787
788
789
790
791 /**
792 * <p>
793 * Returns
794 * ACC (ACC - accident segment) - creates it if necessary
795 * </p>
796 *
797 *
798 */
799 public ACC getACC() {
800 return getTyped("ACC", ACC.class);
801 }
802
803
804
805
806 }
807