001/* 002 * This class is an auto-generated source file for a HAPI 003 * HL7 v2.x standard structure class. 004 * 005 * For more information, visit: http://hl7api.sourceforge.net/ 006 * 007 * The contents of this file are subject to the Mozilla Public License Version 1.1 008 * (the "License"); you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 010 * Software distributed under the License is distributed on an "AS IS" basis, 011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 012 * specific language governing rights and limitations under the License. 013 * 014 * The Original Code is "[file_name]". Description: 015 * "[one_line_description]" 016 * 017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 018 * 2012. All Rights Reserved. 019 * 020 * Contributor(s): ______________________________________. 021 * 022 * Alternatively, the contents of this file may be used under the terms of the 023 * GNU General Public License (the "GPL"), in which case the provisions of the GPL are 024 * applicable instead of those above. If you wish to allow use of your version of this 025 * file only under the terms of the GPL and not to allow others to use your version 026 * of this file under the MPL, indicate your decision by deleting the provisions above 027 * and replace them with the notice and other provisions required by the GPL License. 028 * If you do not delete the provisions above, a recipient may use your version of 029 * this file under either the MPL or the GPL. 030 * 031 */ 032 033 034package ca.uhn.hl7v2.model.v22.group; 035 036import ca.uhn.hl7v2.model.v22.segment.*; 037 038import java.util.List; 039 040import ca.uhn.hl7v2.HL7Exception; 041import ca.uhn.hl7v2.parser.ModelClassFactory; 042import ca.uhn.hl7v2.model.*; 043 044/** 045 * <p>Represents a ADR_A19_QUERY_RESPONSE group structure (a Group object). 046 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together. 047 * This Group contains the following elements: 048 * </p> 049 * <ul> 050 * <li>1: EVN (EVENT TYPE) <b>optional </b></li> 051 * <li>2: PID (PATIENT IDENTIFICATION) <b> </b></li> 052 * <li>3: NK1 (NEXT OF KIN) <b>optional repeating</b></li> 053 * <li>4: PV1 (PATIENT VISIT) <b> </b></li> 054 * <li>5: PV2 (PATIENT VISIT - additional information) <b>optional </b></li> 055 * <li>6: OBX (OBSERVATION RESULT) <b>optional repeating</b></li> 056 * <li>7: AL1 (PATIENT ALLERGY INFORMATION) <b>optional repeating</b></li> 057 * <li>8: DG1 (DIAGNOSIS) <b>optional repeating</b></li> 058 * <li>9: PR1 (PROCEDURES) <b>optional repeating</b></li> 059 * <li>10: GT1 (GUARANTOR) <b>optional repeating</b></li> 060 * <li>11: ADR_A19_INSURANCE (a Group object) <b>optional repeating</b></li> 061 * <li>12: ACC (ACCIDENT) <b>optional </b></li> 062 * <li>13: UB1 (UB82 DATA) <b>optional </b></li> 063 * <li>14: UB2 (UB92 DATA) <b>optional </b></li> 064 * </ul> 065 */ 066@SuppressWarnings("unused") 067public class ADR_A19_QUERY_RESPONSE extends AbstractGroup { 068 069 /** 070 * Creates a new ADR_A19_QUERY_RESPONSE group 071 */ 072 public ADR_A19_QUERY_RESPONSE(Group parent, ModelClassFactory factory) { 073 super(parent, factory); 074 init(factory); 075 } 076 077 private void init(ModelClassFactory factory) { 078 try { 079 this.add(EVN.class, false, false); 080 this.add(PID.class, true, false); 081 this.add(NK1.class, false, true); 082 this.add(PV1.class, true, false); 083 this.add(PV2.class, false, false); 084 this.add(OBX.class, false, true); 085 this.add(AL1.class, false, true); 086 this.add(DG1.class, false, true); 087 this.add(PR1.class, false, true); 088 this.add(GT1.class, false, true); 089 this.add(ADR_A19_INSURANCE.class, false, true); 090 this.add(ACC.class, false, false); 091 this.add(UB1.class, false, false); 092 this.add(UB2.class, false, false); 093 } catch(HL7Exception e) { 094 log.error("Unexpected error creating ADR_A19_QUERY_RESPONSE - this is probably a bug in the source code generator.", e); 095 } 096 } 097 098 /** 099 * Returns "2.2" 100 */ 101 public String getVersion() { 102 return "2.2"; 103 } 104 105 106 107 /** 108 * Returns 109 * EVN (EVENT TYPE) - creates it if necessary 110 */ 111 public EVN getEVN() { 112 EVN retVal = getTyped("EVN", EVN.class); 113 return retVal; 114 } 115 116 117 118 119 /** 120 * Returns 121 * PID (PATIENT IDENTIFICATION) - creates it if necessary 122 */ 123 public PID getPID() { 124 PID retVal = getTyped("PID", PID.class); 125 return retVal; 126 } 127 128 129 130 131 /** 132 * Returns 133 * the first repetition of 134 * NK1 (NEXT OF KIN) - creates it if necessary 135 */ 136 public NK1 getNK1() { 137 NK1 retVal = getTyped("NK1", NK1.class); 138 return retVal; 139 } 140 141 142 /** 143 * Returns a specific repetition of 144 * NK1 (NEXT OF KIN) - creates it if necessary 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 NK1 getNK1(int rep) { 151 NK1 retVal = getTyped("NK1", rep, NK1.class); 152 return retVal; 153 } 154 155 /** 156 * Returns the number of existing repetitions of NK1 157 */ 158 public int getNK1Reps() { 159 return getReps("NK1"); 160 } 161 162 /** 163 * <p> 164 * Returns a non-modifiable List containing all current existing repetitions of NK1. 165 * <p> 166 * <p> 167 * Note that unlike {@link #getNK1()}, this method will not create any reps 168 * if none are already present, so an empty list may be returned. 169 * </p> 170 */ 171 public List<NK1> getNK1All() throws HL7Exception { 172 return getAllAsList("NK1", NK1.class); 173 } 174 175 /** 176 * Inserts a specific repetition of NK1 (NEXT OF KIN) 177 * @see AbstractGroup#insertRepetition(Structure, int) 178 */ 179 public void insertNK1(NK1 structure, int rep) throws HL7Exception { 180 super.insertRepetition("NK1", structure, rep); 181 } 182 183 184 /** 185 * Inserts a specific repetition of NK1 (NEXT OF KIN) 186 * @see AbstractGroup#insertRepetition(Structure, int) 187 */ 188 public NK1 insertNK1(int rep) throws HL7Exception { 189 return (NK1)super.insertRepetition("NK1", rep); 190 } 191 192 193 /** 194 * Removes a specific repetition of NK1 (NEXT OF KIN) 195 * @see AbstractGroup#removeRepetition(String, int) 196 */ 197 public NK1 removeNK1(int rep) throws HL7Exception { 198 return (NK1)super.removeRepetition("NK1", rep); 199 } 200 201 202 203 /** 204 * Returns 205 * PV1 (PATIENT VISIT) - creates it if necessary 206 */ 207 public PV1 getPV1() { 208 PV1 retVal = getTyped("PV1", PV1.class); 209 return retVal; 210 } 211 212 213 214 215 /** 216 * Returns 217 * PV2 (PATIENT VISIT - additional information) - creates it if necessary 218 */ 219 public PV2 getPV2() { 220 PV2 retVal = getTyped("PV2", PV2.class); 221 return retVal; 222 } 223 224 225 226 227 /** 228 * Returns 229 * the first repetition of 230 * OBX (OBSERVATION RESULT) - creates it if necessary 231 */ 232 public OBX getOBX() { 233 OBX retVal = getTyped("OBX", OBX.class); 234 return retVal; 235 } 236 237 238 /** 239 * Returns a specific repetition of 240 * OBX (OBSERVATION RESULT) - creates it if necessary 241 * 242 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 243 * @throws HL7Exception if the repetition requested is more than one 244 * greater than the number of existing repetitions. 245 */ 246 public OBX getOBX(int rep) { 247 OBX retVal = getTyped("OBX", rep, OBX.class); 248 return retVal; 249 } 250 251 /** 252 * Returns the number of existing repetitions of OBX 253 */ 254 public int getOBXReps() { 255 return getReps("OBX"); 256 } 257 258 /** 259 * <p> 260 * Returns a non-modifiable List containing all current existing repetitions of OBX. 261 * <p> 262 * <p> 263 * Note that unlike {@link #getOBX()}, this method will not create any reps 264 * if none are already present, so an empty list may be returned. 265 * </p> 266 */ 267 public List<OBX> getOBXAll() throws HL7Exception { 268 return getAllAsList("OBX", OBX.class); 269 } 270 271 /** 272 * Inserts a specific repetition of OBX (OBSERVATION RESULT) 273 * @see AbstractGroup#insertRepetition(Structure, int) 274 */ 275 public void insertOBX(OBX structure, int rep) throws HL7Exception { 276 super.insertRepetition("OBX", structure, rep); 277 } 278 279 280 /** 281 * Inserts a specific repetition of OBX (OBSERVATION RESULT) 282 * @see AbstractGroup#insertRepetition(Structure, int) 283 */ 284 public OBX insertOBX(int rep) throws HL7Exception { 285 return (OBX)super.insertRepetition("OBX", rep); 286 } 287 288 289 /** 290 * Removes a specific repetition of OBX (OBSERVATION RESULT) 291 * @see AbstractGroup#removeRepetition(String, int) 292 */ 293 public OBX removeOBX(int rep) throws HL7Exception { 294 return (OBX)super.removeRepetition("OBX", rep); 295 } 296 297 298 299 /** 300 * Returns 301 * the first repetition of 302 * AL1 (PATIENT ALLERGY INFORMATION) - creates it if necessary 303 */ 304 public AL1 getAL1() { 305 AL1 retVal = getTyped("AL1", AL1.class); 306 return retVal; 307 } 308 309 310 /** 311 * Returns a specific repetition of 312 * AL1 (PATIENT ALLERGY INFORMATION) - creates it if necessary 313 * 314 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 315 * @throws HL7Exception if the repetition requested is more than one 316 * greater than the number of existing repetitions. 317 */ 318 public AL1 getAL1(int rep) { 319 AL1 retVal = getTyped("AL1", rep, AL1.class); 320 return retVal; 321 } 322 323 /** 324 * Returns the number of existing repetitions of AL1 325 */ 326 public int getAL1Reps() { 327 return getReps("AL1"); 328 } 329 330 /** 331 * <p> 332 * Returns a non-modifiable List containing all current existing repetitions of AL1. 333 * <p> 334 * <p> 335 * Note that unlike {@link #getAL1()}, this method will not create any reps 336 * if none are already present, so an empty list may be returned. 337 * </p> 338 */ 339 public List<AL1> getAL1All() throws HL7Exception { 340 return getAllAsList("AL1", AL1.class); 341 } 342 343 /** 344 * Inserts a specific repetition of AL1 (PATIENT ALLERGY INFORMATION) 345 * @see AbstractGroup#insertRepetition(Structure, int) 346 */ 347 public void insertAL1(AL1 structure, int rep) throws HL7Exception { 348 super.insertRepetition("AL1", structure, rep); 349 } 350 351 352 /** 353 * Inserts a specific repetition of AL1 (PATIENT ALLERGY INFORMATION) 354 * @see AbstractGroup#insertRepetition(Structure, int) 355 */ 356 public AL1 insertAL1(int rep) throws HL7Exception { 357 return (AL1)super.insertRepetition("AL1", rep); 358 } 359 360 361 /** 362 * Removes a specific repetition of AL1 (PATIENT ALLERGY INFORMATION) 363 * @see AbstractGroup#removeRepetition(String, int) 364 */ 365 public AL1 removeAL1(int rep) throws HL7Exception { 366 return (AL1)super.removeRepetition("AL1", rep); 367 } 368 369 370 371 /** 372 * Returns 373 * the first repetition of 374 * DG1 (DIAGNOSIS) - creates it if necessary 375 */ 376 public DG1 getDG1() { 377 DG1 retVal = getTyped("DG1", DG1.class); 378 return retVal; 379 } 380 381 382 /** 383 * Returns a specific repetition of 384 * DG1 (DIAGNOSIS) - creates it if necessary 385 * 386 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 387 * @throws HL7Exception if the repetition requested is more than one 388 * greater than the number of existing repetitions. 389 */ 390 public DG1 getDG1(int rep) { 391 DG1 retVal = getTyped("DG1", rep, DG1.class); 392 return retVal; 393 } 394 395 /** 396 * Returns the number of existing repetitions of DG1 397 */ 398 public int getDG1Reps() { 399 return getReps("DG1"); 400 } 401 402 /** 403 * <p> 404 * Returns a non-modifiable List containing all current existing repetitions of DG1. 405 * <p> 406 * <p> 407 * Note that unlike {@link #getDG1()}, this method will not create any reps 408 * if none are already present, so an empty list may be returned. 409 * </p> 410 */ 411 public List<DG1> getDG1All() throws HL7Exception { 412 return getAllAsList("DG1", DG1.class); 413 } 414 415 /** 416 * Inserts a specific repetition of DG1 (DIAGNOSIS) 417 * @see AbstractGroup#insertRepetition(Structure, int) 418 */ 419 public void insertDG1(DG1 structure, int rep) throws HL7Exception { 420 super.insertRepetition("DG1", structure, rep); 421 } 422 423 424 /** 425 * Inserts a specific repetition of DG1 (DIAGNOSIS) 426 * @see AbstractGroup#insertRepetition(Structure, int) 427 */ 428 public DG1 insertDG1(int rep) throws HL7Exception { 429 return (DG1)super.insertRepetition("DG1", rep); 430 } 431 432 433 /** 434 * Removes a specific repetition of DG1 (DIAGNOSIS) 435 * @see AbstractGroup#removeRepetition(String, int) 436 */ 437 public DG1 removeDG1(int rep) throws HL7Exception { 438 return (DG1)super.removeRepetition("DG1", rep); 439 } 440 441 442 443 /** 444 * Returns 445 * the first repetition of 446 * PR1 (PROCEDURES) - creates it if necessary 447 */ 448 public PR1 getPR1() { 449 PR1 retVal = getTyped("PR1", PR1.class); 450 return retVal; 451 } 452 453 454 /** 455 * Returns a specific repetition of 456 * PR1 (PROCEDURES) - creates it if necessary 457 * 458 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 459 * @throws HL7Exception if the repetition requested is more than one 460 * greater than the number of existing repetitions. 461 */ 462 public PR1 getPR1(int rep) { 463 PR1 retVal = getTyped("PR1", rep, PR1.class); 464 return retVal; 465 } 466 467 /** 468 * Returns the number of existing repetitions of PR1 469 */ 470 public int getPR1Reps() { 471 return getReps("PR1"); 472 } 473 474 /** 475 * <p> 476 * Returns a non-modifiable List containing all current existing repetitions of PR1. 477 * <p> 478 * <p> 479 * Note that unlike {@link #getPR1()}, this method will not create any reps 480 * if none are already present, so an empty list may be returned. 481 * </p> 482 */ 483 public List<PR1> getPR1All() throws HL7Exception { 484 return getAllAsList("PR1", PR1.class); 485 } 486 487 /** 488 * Inserts a specific repetition of PR1 (PROCEDURES) 489 * @see AbstractGroup#insertRepetition(Structure, int) 490 */ 491 public void insertPR1(PR1 structure, int rep) throws HL7Exception { 492 super.insertRepetition("PR1", structure, rep); 493 } 494 495 496 /** 497 * Inserts a specific repetition of PR1 (PROCEDURES) 498 * @see AbstractGroup#insertRepetition(Structure, int) 499 */ 500 public PR1 insertPR1(int rep) throws HL7Exception { 501 return (PR1)super.insertRepetition("PR1", rep); 502 } 503 504 505 /** 506 * Removes a specific repetition of PR1 (PROCEDURES) 507 * @see AbstractGroup#removeRepetition(String, int) 508 */ 509 public PR1 removePR1(int rep) throws HL7Exception { 510 return (PR1)super.removeRepetition("PR1", rep); 511 } 512 513 514 515 /** 516 * Returns 517 * the first repetition of 518 * GT1 (GUARANTOR) - creates it if necessary 519 */ 520 public GT1 getGT1() { 521 GT1 retVal = getTyped("GT1", GT1.class); 522 return retVal; 523 } 524 525 526 /** 527 * Returns a specific repetition of 528 * GT1 (GUARANTOR) - creates it if necessary 529 * 530 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 531 * @throws HL7Exception if the repetition requested is more than one 532 * greater than the number of existing repetitions. 533 */ 534 public GT1 getGT1(int rep) { 535 GT1 retVal = getTyped("GT1", rep, GT1.class); 536 return retVal; 537 } 538 539 /** 540 * Returns the number of existing repetitions of GT1 541 */ 542 public int getGT1Reps() { 543 return getReps("GT1"); 544 } 545 546 /** 547 * <p> 548 * Returns a non-modifiable List containing all current existing repetitions of GT1. 549 * <p> 550 * <p> 551 * Note that unlike {@link #getGT1()}, this method will not create any reps 552 * if none are already present, so an empty list may be returned. 553 * </p> 554 */ 555 public List<GT1> getGT1All() throws HL7Exception { 556 return getAllAsList("GT1", GT1.class); 557 } 558 559 /** 560 * Inserts a specific repetition of GT1 (GUARANTOR) 561 * @see AbstractGroup#insertRepetition(Structure, int) 562 */ 563 public void insertGT1(GT1 structure, int rep) throws HL7Exception { 564 super.insertRepetition("GT1", structure, rep); 565 } 566 567 568 /** 569 * Inserts a specific repetition of GT1 (GUARANTOR) 570 * @see AbstractGroup#insertRepetition(Structure, int) 571 */ 572 public GT1 insertGT1(int rep) throws HL7Exception { 573 return (GT1)super.insertRepetition("GT1", rep); 574 } 575 576 577 /** 578 * Removes a specific repetition of GT1 (GUARANTOR) 579 * @see AbstractGroup#removeRepetition(String, int) 580 */ 581 public GT1 removeGT1(int rep) throws HL7Exception { 582 return (GT1)super.removeRepetition("GT1", rep); 583 } 584 585 586 587 /** 588 * Returns 589 * the first repetition of 590 * INSURANCE (a Group object) - creates it if necessary 591 */ 592 public ADR_A19_INSURANCE getINSURANCE() { 593 ADR_A19_INSURANCE retVal = getTyped("INSURANCE", ADR_A19_INSURANCE.class); 594 return retVal; 595 } 596 597 598 /** 599 * Returns a specific repetition of 600 * INSURANCE (a Group object) - creates it if necessary 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 ADR_A19_INSURANCE getINSURANCE(int rep) { 607 ADR_A19_INSURANCE retVal = getTyped("INSURANCE", rep, ADR_A19_INSURANCE.class); 608 return retVal; 609 } 610 611 /** 612 * Returns the number of existing repetitions of INSURANCE 613 */ 614 public int getINSURANCEReps() { 615 return getReps("INSURANCE"); 616 } 617 618 /** 619 * <p> 620 * Returns a non-modifiable List containing all current existing repetitions of INSURANCE. 621 * <p> 622 * <p> 623 * Note that unlike {@link #getINSURANCE()}, this method will not create any reps 624 * if none are already present, so an empty list may be returned. 625 * </p> 626 */ 627 public List<ADR_A19_INSURANCE> getINSURANCEAll() throws HL7Exception { 628 return getAllAsList("INSURANCE", ADR_A19_INSURANCE.class); 629 } 630 631 /** 632 * Inserts a specific repetition of INSURANCE (a Group object) 633 * @see AbstractGroup#insertRepetition(Structure, int) 634 */ 635 public void insertINSURANCE(ADR_A19_INSURANCE structure, int rep) throws HL7Exception { 636 super.insertRepetition("INSURANCE", structure, rep); 637 } 638 639 640 /** 641 * Inserts a specific repetition of INSURANCE (a Group object) 642 * @see AbstractGroup#insertRepetition(Structure, int) 643 */ 644 public ADR_A19_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 645 return (ADR_A19_INSURANCE)super.insertRepetition("INSURANCE", rep); 646 } 647 648 649 /** 650 * Removes a specific repetition of INSURANCE (a Group object) 651 * @see AbstractGroup#removeRepetition(String, int) 652 */ 653 public ADR_A19_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 654 return (ADR_A19_INSURANCE)super.removeRepetition("INSURANCE", rep); 655 } 656 657 658 659 /** 660 * Returns 661 * ACC (ACCIDENT) - creates it if necessary 662 */ 663 public ACC getACC() { 664 ACC retVal = getTyped("ACC", ACC.class); 665 return retVal; 666 } 667 668 669 670 671 /** 672 * Returns 673 * UB1 (UB82 DATA) - creates it if necessary 674 */ 675 public UB1 getUB1() { 676 UB1 retVal = getTyped("UB1", UB1.class); 677 return retVal; 678 } 679 680 681 682 683 /** 684 * Returns 685 * UB2 (UB92 DATA) - creates it if necessary 686 */ 687 public UB2 getUB2() { 688 UB2 retVal = getTyped("UB2", UB2.class); 689 return retVal; 690 } 691 692 693 694 695} 696