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