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.v251.message;
35
36 import ca.uhn.hl7v2.model.v251.group.*;
37 import ca.uhn.hl7v2.model.v251.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 VXR_V03 message structure (see chapter 4.17.5). This structure contains the
47 * following elements: </p>
48 * <ul>
49 * <li>1: MSH (Message Header) <b> </b> </li>
50 * <li>2: MSA (Message Acknowledgment) <b> </b> </li>
51 * <li>3: SFT (Software Segment) <b>optional repeating</b> </li>
52 * <li>4: QRD (Original-Style Query Definition) <b> </b> </li>
53 * <li>5: QRF (Original style query filter) <b>optional </b> </li>
54 * <li>6: PID (Patient Identification) <b> </b> </li>
55 * <li>7: PD1 (Patient Additional Demographic) <b>optional </b> </li>
56 * <li>8: NK1 (Next of Kin / Associated Parties) <b>optional repeating</b> </li>
57 * <li>9: VXR_V03_PATIENT_VISIT (a Group object) <b>optional </b> </li>
58 * <li>10: GT1 (Guarantor) <b>optional repeating</b> </li>
59 * <li>11: VXR_V03_INSURANCE (a Group object) <b>optional repeating</b> </li>
60 * <li>12: VXR_V03_ORDER (a Group object) <b>optional repeating</b> </li>
61 * </ul>
62 */
63 //@SuppressWarnings("unused")
64 public class VXR_V03 extends AbstractMessage {
65
66 /**
67 * Creates a new VXR_V03 message with DefaultModelClassFactory.
68 */
69 public VXR_V03() {
70 this(new DefaultModelClassFactory());
71 }
72
73 /**
74 * Creates a new VXR_V03 message with custom ModelClassFactory.
75 */
76 public VXR_V03(ModelClassFactory factory) {
77 super(factory);
78 init(factory);
79 }
80
81 private void init(ModelClassFactory factory) {
82 try {
83 this.add(MSH.class, true, false);
84 this.add(MSA.class, true, false);
85 this.add(SFT.class, false, true);
86 this.add(QRD.class, true, false);
87 this.add(QRF.class, false, false);
88 this.add(PID.class, true, false);
89 this.add(PD1.class, false, false);
90 this.add(NK1.class, false, true);
91 this.add(VXR_V03_PATIENT_VISIT.class, false, false);
92 this.add(GT1.class, false, true);
93 this.add(VXR_V03_INSURANCE.class, false, true);
94 this.add(VXR_V03_ORDER.class, false, true);
95 } catch(HL7Exception e) {
96 log.error("Unexpected error creating VXR_V03 - this is probably a bug in the source code generator.", e);
97 }
98 }
99
100
101 /**
102 * Returns "2.5.1"
103 */
104 public String getVersion() {
105 return "2.5.1";
106 }
107
108
109
110
111 /**
112 * <p>
113 * Returns
114 * MSH (Message Header) - creates it if necessary
115 * </p>
116 *
117 *
118 */
119 public MSH getMSH() {
120 return getTyped("MSH", MSH.class);
121 }
122
123
124
125
126
127 /**
128 * <p>
129 * Returns
130 * MSA (Message Acknowledgment) - creates it if necessary
131 * </p>
132 *
133 *
134 */
135 public MSA getMSA() {
136 return getTyped("MSA", MSA.class);
137 }
138
139
140
141
142
143 /**
144 * <p>
145 * Returns
146 * the first repetition of
147 * SFT (Software Segment) - creates it if necessary
148 * </p>
149 *
150 *
151 */
152 public SFT getSFT() {
153 return getTyped("SFT", SFT.class);
154 }
155
156
157 /**
158 * <p>
159 * Returns a specific repetition of
160 * SFT (Software Segment) - creates it if necessary
161 * </p>
162 *
163 *
164 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
165 * @throws HL7Exception if the repetition requested is more than one
166 * greater than the number of existing repetitions.
167 */
168 public SFT getSFT(int rep) {
169 return getTyped("SFT", rep, SFT.class);
170 }
171
172 /**
173 * <p>
174 * Returns the number of existing repetitions of SFT
175 * </p>
176 *
177 */
178 public int getSFTReps() {
179 return getReps("SFT");
180 }
181
182 /**
183 * <p>
184 * Returns a non-modifiable List containing all current existing repetitions of SFT.
185 * <p>
186 * <p>
187 * Note that unlike {@link #getSFT()}, this method will not create any reps
188 * if none are already present, so an empty list may be returned.
189 * </p>
190 *
191 */
192 public java.util.List<SFT> getSFTAll() throws HL7Exception {
193 return getAllAsList("SFT", SFT.class);
194 }
195
196 /**
197 * <p>
198 * Inserts a specific repetition of SFT (Software Segment)
199 * </p>
200 *
201 *
202 * @see AbstractGroup#insertRepetition(Structure, int)
203 */
204 public void insertSFT(SFT structure, int rep) throws HL7Exception {
205 super.insertRepetition( "SFT", structure, rep);
206 }
207
208
209 /**
210 * <p>
211 * Inserts a specific repetition of SFT (Software Segment)
212 * </p>
213 *
214 *
215 * @see AbstractGroup#insertRepetition(Structure, int)
216 */
217 public SFT insertSFT(int rep) throws HL7Exception {
218 return (SFT)super.insertRepetition("SFT", rep);
219 }
220
221
222 /**
223 * <p>
224 * Removes a specific repetition of SFT (Software Segment)
225 * </p>
226 *
227 *
228 * @see AbstractGroup#removeRepetition(String, int)
229 */
230 public SFT removeSFT(int rep) throws HL7Exception {
231 return (SFT)super.removeRepetition("SFT", rep);
232 }
233
234
235
236
237 /**
238 * <p>
239 * Returns
240 * QRD (Original-Style Query Definition) - creates it if necessary
241 * </p>
242 *
243 *
244 */
245 public QRD getQRD() {
246 return getTyped("QRD", QRD.class);
247 }
248
249
250
251
252
253 /**
254 * <p>
255 * Returns
256 * QRF (Original style query filter) - creates it if necessary
257 * </p>
258 *
259 *
260 */
261 public QRF getQRF() {
262 return getTyped("QRF", QRF.class);
263 }
264
265
266
267
268
269 /**
270 * <p>
271 * Returns
272 * PID (Patient Identification) - creates it if necessary
273 * </p>
274 *
275 *
276 */
277 public PID getPID() {
278 return getTyped("PID", PID.class);
279 }
280
281
282
283
284
285 /**
286 * <p>
287 * Returns
288 * PD1 (Patient Additional Demographic) - creates it if necessary
289 * </p>
290 *
291 *
292 */
293 public PD1 getPD1() {
294 return getTyped("PD1", PD1.class);
295 }
296
297
298
299
300
301 /**
302 * <p>
303 * Returns
304 * the first repetition of
305 * NK1 (Next of Kin / Associated Parties) - creates it if necessary
306 * </p>
307 *
308 *
309 */
310 public NK1 getNK1() {
311 return getTyped("NK1", NK1.class);
312 }
313
314
315 /**
316 * <p>
317 * Returns a specific repetition of
318 * NK1 (Next of Kin / Associated Parties) - creates it if necessary
319 * </p>
320 *
321 *
322 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
323 * @throws HL7Exception if the repetition requested is more than one
324 * greater than the number of existing repetitions.
325 */
326 public NK1 getNK1(int rep) {
327 return getTyped("NK1", rep, NK1.class);
328 }
329
330 /**
331 * <p>
332 * Returns the number of existing repetitions of NK1
333 * </p>
334 *
335 */
336 public int getNK1Reps() {
337 return getReps("NK1");
338 }
339
340 /**
341 * <p>
342 * Returns a non-modifiable List containing all current existing repetitions of NK1.
343 * <p>
344 * <p>
345 * Note that unlike {@link #getNK1()}, this method will not create any reps
346 * if none are already present, so an empty list may be returned.
347 * </p>
348 *
349 */
350 public java.util.List<NK1> getNK1All() throws HL7Exception {
351 return getAllAsList("NK1", NK1.class);
352 }
353
354 /**
355 * <p>
356 * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
357 * </p>
358 *
359 *
360 * @see AbstractGroup#insertRepetition(Structure, int)
361 */
362 public void insertNK1(NK1 structure, int rep) throws HL7Exception {
363 super.insertRepetition( "NK1", structure, rep);
364 }
365
366
367 /**
368 * <p>
369 * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
370 * </p>
371 *
372 *
373 * @see AbstractGroup#insertRepetition(Structure, int)
374 */
375 public NK1 insertNK1(int rep) throws HL7Exception {
376 return (NK1)super.insertRepetition("NK1", rep);
377 }
378
379
380 /**
381 * <p>
382 * Removes a specific repetition of NK1 (Next of Kin / Associated Parties)
383 * </p>
384 *
385 *
386 * @see AbstractGroup#removeRepetition(String, int)
387 */
388 public NK1 removeNK1(int rep) throws HL7Exception {
389 return (NK1)super.removeRepetition("NK1", rep);
390 }
391
392
393
394
395 /**
396 * <p>
397 * Returns
398 * PATIENT_VISIT (a Group object) - creates it if necessary
399 * </p>
400 *
401 *
402 */
403 public VXR_V03_PATIENT_VISIT getPATIENT_VISIT() {
404 return getTyped("PATIENT_VISIT", VXR_V03_PATIENT_VISIT.class);
405 }
406
407
408
409
410
411 /**
412 * <p>
413 * Returns
414 * the first repetition of
415 * GT1 (Guarantor) - creates it if necessary
416 * </p>
417 *
418 *
419 */
420 public GT1 getGT1() {
421 return getTyped("GT1", GT1.class);
422 }
423
424
425 /**
426 * <p>
427 * Returns a specific repetition of
428 * GT1 (Guarantor) - creates it if necessary
429 * </p>
430 *
431 *
432 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
433 * @throws HL7Exception if the repetition requested is more than one
434 * greater than the number of existing repetitions.
435 */
436 public GT1 getGT1(int rep) {
437 return getTyped("GT1", rep, GT1.class);
438 }
439
440 /**
441 * <p>
442 * Returns the number of existing repetitions of GT1
443 * </p>
444 *
445 */
446 public int getGT1Reps() {
447 return getReps("GT1");
448 }
449
450 /**
451 * <p>
452 * Returns a non-modifiable List containing all current existing repetitions of GT1.
453 * <p>
454 * <p>
455 * Note that unlike {@link #getGT1()}, this method will not create any reps
456 * if none are already present, so an empty list may be returned.
457 * </p>
458 *
459 */
460 public java.util.List<GT1> getGT1All() throws HL7Exception {
461 return getAllAsList("GT1", GT1.class);
462 }
463
464 /**
465 * <p>
466 * Inserts a specific repetition of GT1 (Guarantor)
467 * </p>
468 *
469 *
470 * @see AbstractGroup#insertRepetition(Structure, int)
471 */
472 public void insertGT1(GT1 structure, int rep) throws HL7Exception {
473 super.insertRepetition( "GT1", structure, rep);
474 }
475
476
477 /**
478 * <p>
479 * Inserts a specific repetition of GT1 (Guarantor)
480 * </p>
481 *
482 *
483 * @see AbstractGroup#insertRepetition(Structure, int)
484 */
485 public GT1 insertGT1(int rep) throws HL7Exception {
486 return (GT1)super.insertRepetition("GT1", rep);
487 }
488
489
490 /**
491 * <p>
492 * Removes a specific repetition of GT1 (Guarantor)
493 * </p>
494 *
495 *
496 * @see AbstractGroup#removeRepetition(String, int)
497 */
498 public GT1 removeGT1(int rep) throws HL7Exception {
499 return (GT1)super.removeRepetition("GT1", rep);
500 }
501
502
503
504
505 /**
506 * <p>
507 * Returns
508 * the first repetition of
509 * INSURANCE (a Group object) - creates it if necessary
510 * </p>
511 *
512 *
513 */
514 public VXR_V03_INSURANCE getINSURANCE() {
515 return getTyped("INSURANCE", VXR_V03_INSURANCE.class);
516 }
517
518
519 /**
520 * <p>
521 * Returns a specific repetition of
522 * INSURANCE (a Group object) - creates it if necessary
523 * </p>
524 *
525 *
526 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
527 * @throws HL7Exception if the repetition requested is more than one
528 * greater than the number of existing repetitions.
529 */
530 public VXR_V03_INSURANCE getINSURANCE(int rep) {
531 return getTyped("INSURANCE", rep, VXR_V03_INSURANCE.class);
532 }
533
534 /**
535 * <p>
536 * Returns the number of existing repetitions of INSURANCE
537 * </p>
538 *
539 */
540 public int getINSURANCEReps() {
541 return getReps("INSURANCE");
542 }
543
544 /**
545 * <p>
546 * Returns a non-modifiable List containing all current existing repetitions of INSURANCE.
547 * <p>
548 * <p>
549 * Note that unlike {@link #getINSURANCE()}, this method will not create any reps
550 * if none are already present, so an empty list may be returned.
551 * </p>
552 *
553 */
554 public java.util.List<VXR_V03_INSURANCE> getINSURANCEAll() throws HL7Exception {
555 return getAllAsList("INSURANCE", VXR_V03_INSURANCE.class);
556 }
557
558 /**
559 * <p>
560 * Inserts a specific repetition of INSURANCE (a Group object)
561 * </p>
562 *
563 *
564 * @see AbstractGroup#insertRepetition(Structure, int)
565 */
566 public void insertINSURANCE(VXR_V03_INSURANCE structure, int rep) throws HL7Exception {
567 super.insertRepetition( "INSURANCE", structure, rep);
568 }
569
570
571 /**
572 * <p>
573 * Inserts a specific repetition of INSURANCE (a Group object)
574 * </p>
575 *
576 *
577 * @see AbstractGroup#insertRepetition(Structure, int)
578 */
579 public VXR_V03_INSURANCE insertINSURANCE(int rep) throws HL7Exception {
580 return (VXR_V03_INSURANCE)super.insertRepetition("INSURANCE", rep);
581 }
582
583
584 /**
585 * <p>
586 * Removes a specific repetition of INSURANCE (a Group object)
587 * </p>
588 *
589 *
590 * @see AbstractGroup#removeRepetition(String, int)
591 */
592 public VXR_V03_INSURANCE removeINSURANCE(int rep) throws HL7Exception {
593 return (VXR_V03_INSURANCE)super.removeRepetition("INSURANCE", rep);
594 }
595
596
597
598
599 /**
600 * <p>
601 * Returns
602 * the first repetition of
603 * ORDER (a Group object) - creates it if necessary
604 * </p>
605 *
606 *
607 */
608 public VXR_V03_ORDER getORDER() {
609 return getTyped("ORDER", VXR_V03_ORDER.class);
610 }
611
612
613 /**
614 * <p>
615 * Returns a specific repetition of
616 * ORDER (a Group object) - creates it if necessary
617 * </p>
618 *
619 *
620 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
621 * @throws HL7Exception if the repetition requested is more than one
622 * greater than the number of existing repetitions.
623 */
624 public VXR_V03_ORDER getORDER(int rep) {
625 return getTyped("ORDER", rep, VXR_V03_ORDER.class);
626 }
627
628 /**
629 * <p>
630 * Returns the number of existing repetitions of ORDER
631 * </p>
632 *
633 */
634 public int getORDERReps() {
635 return getReps("ORDER");
636 }
637
638 /**
639 * <p>
640 * Returns a non-modifiable List containing all current existing repetitions of ORDER.
641 * <p>
642 * <p>
643 * Note that unlike {@link #getORDER()}, this method will not create any reps
644 * if none are already present, so an empty list may be returned.
645 * </p>
646 *
647 */
648 public java.util.List<VXR_V03_ORDER> getORDERAll() throws HL7Exception {
649 return getAllAsList("ORDER", VXR_V03_ORDER.class);
650 }
651
652 /**
653 * <p>
654 * Inserts a specific repetition of ORDER (a Group object)
655 * </p>
656 *
657 *
658 * @see AbstractGroup#insertRepetition(Structure, int)
659 */
660 public void insertORDER(VXR_V03_ORDER structure, int rep) throws HL7Exception {
661 super.insertRepetition( "ORDER", structure, rep);
662 }
663
664
665 /**
666 * <p>
667 * Inserts a specific repetition of ORDER (a Group object)
668 * </p>
669 *
670 *
671 * @see AbstractGroup#insertRepetition(Structure, int)
672 */
673 public VXR_V03_ORDER insertORDER(int rep) throws HL7Exception {
674 return (VXR_V03_ORDER)super.insertRepetition("ORDER", rep);
675 }
676
677
678 /**
679 * <p>
680 * Removes a specific repetition of ORDER (a Group object)
681 * </p>
682 *
683 *
684 * @see AbstractGroup#removeRepetition(String, int)
685 */
686 public VXR_V03_ORDER removeORDER(int rep) throws HL7Exception {
687 return (VXR_V03_ORDER)super.removeRepetition("ORDER", rep);
688 }
689
690
691
692 }
693