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