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.v231.group; 035 036import ca.uhn.hl7v2.model.v231.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 PGL_PC6_GOLNTEVARROLVARPTHVAROBXNTEPRBNTEVARROLVAROBXNTEORCOBRRXONTEVAROBXNTEVAR 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: GOL (Goal Detail) <b> </b></li> 051 * <li>2: NTE (NTE - notes and comments segment) <b>optional repeating</b></li> 052 * <li>3: VAR (Variance) <b>optional repeating</b></li> 053 * <li>4: PGL_PC6_ROLVAR (a Group object) <b>optional repeating</b></li> 054 * <li>5: PGL_PC6_PTHVAR (a Group object) <b>optional repeating</b></li> 055 * <li>6: PGL_PC6_OBXNTE (a Group object) <b>optional repeating</b></li> 056 * <li>7: PGL_PC6_PRBNTEVARROLVAROBXNTE (a Group object) <b>optional repeating</b></li> 057 * <li>8: PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR (a Group object) <b>optional repeating</b></li> 058 * </ul> 059 */ 060@SuppressWarnings("unused") 061public class PGL_PC6_GOLNTEVARROLVARPTHVAROBXNTEPRBNTEVARROLVAROBXNTEORCOBRRXONTEVAROBXNTEVAR extends AbstractGroup { 062 063 /** 064 * Creates a new PGL_PC6_GOLNTEVARROLVARPTHVAROBXNTEPRBNTEVARROLVAROBXNTEORCOBRRXONTEVAROBXNTEVAR group 065 */ 066 public PGL_PC6_GOLNTEVARROLVARPTHVAROBXNTEPRBNTEVARROLVAROBXNTEORCOBRRXONTEVAROBXNTEVAR(Group parent, ModelClassFactory factory) { 067 super(parent, factory); 068 init(factory); 069 } 070 071 private void init(ModelClassFactory factory) { 072 try { 073 this.add(GOL.class, true, false); 074 this.add(NTE.class, false, true); 075 this.add(VAR.class, false, true); 076 this.add(PGL_PC6_ROLVAR.class, false, true); 077 this.add(PGL_PC6_PTHVAR.class, false, true); 078 this.add(PGL_PC6_OBXNTE.class, false, true); 079 this.add(PGL_PC6_PRBNTEVARROLVAROBXNTE.class, false, true); 080 this.add(PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR.class, false, true); 081 } catch(HL7Exception e) { 082 log.error("Unexpected error creating PGL_PC6_GOLNTEVARROLVARPTHVAROBXNTEPRBNTEVARROLVAROBXNTEORCOBRRXONTEVAROBXNTEVAR - this is probably a bug in the source code generator.", e); 083 } 084 } 085 086 /** 087 * Returns "2.3.1" 088 */ 089 public String getVersion() { 090 return "2.3.1"; 091 } 092 093 094 095 /** 096 * Returns 097 * GOL (Goal Detail) - creates it if necessary 098 */ 099 public GOL getGOL() { 100 GOL retVal = getTyped("GOL", GOL.class); 101 return retVal; 102 } 103 104 105 106 107 /** 108 * Returns 109 * the first repetition of 110 * NTE (NTE - notes and comments segment) - creates it if necessary 111 */ 112 public NTE getNTE() { 113 NTE retVal = getTyped("NTE", NTE.class); 114 return retVal; 115 } 116 117 118 /** 119 * Returns a specific repetition of 120 * NTE (NTE - notes and comments segment) - creates it if necessary 121 * 122 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 123 * @throws HL7Exception if the repetition requested is more than one 124 * greater than the number of existing repetitions. 125 */ 126 public NTE getNTE(int rep) { 127 NTE retVal = getTyped("NTE", rep, NTE.class); 128 return retVal; 129 } 130 131 /** 132 * Returns the number of existing repetitions of NTE 133 */ 134 public int getNTEReps() { 135 return getReps("NTE"); 136 } 137 138 /** 139 * <p> 140 * Returns a non-modifiable List containing all current existing repetitions of NTE. 141 * <p> 142 * <p> 143 * Note that unlike {@link #getNTE()}, this method will not create any reps 144 * if none are already present, so an empty list may be returned. 145 * </p> 146 */ 147 public List<NTE> getNTEAll() throws HL7Exception { 148 return getAllAsList("NTE", NTE.class); 149 } 150 151 /** 152 * Inserts a specific repetition of NTE (NTE - notes and comments segment) 153 * @see AbstractGroup#insertRepetition(Structure, int) 154 */ 155 public void insertNTE(NTE structure, int rep) throws HL7Exception { 156 super.insertRepetition("NTE", structure, rep); 157 } 158 159 160 /** 161 * Inserts a specific repetition of NTE (NTE - notes and comments segment) 162 * @see AbstractGroup#insertRepetition(Structure, int) 163 */ 164 public NTE insertNTE(int rep) throws HL7Exception { 165 return (NTE)super.insertRepetition("NTE", rep); 166 } 167 168 169 /** 170 * Removes a specific repetition of NTE (NTE - notes and comments segment) 171 * @see AbstractGroup#removeRepetition(String, int) 172 */ 173 public NTE removeNTE(int rep) throws HL7Exception { 174 return (NTE)super.removeRepetition("NTE", rep); 175 } 176 177 178 179 /** 180 * Returns 181 * the first repetition of 182 * VAR (Variance) - creates it if necessary 183 */ 184 public VAR getVAR() { 185 VAR retVal = getTyped("VAR", VAR.class); 186 return retVal; 187 } 188 189 190 /** 191 * Returns a specific repetition of 192 * VAR (Variance) - creates it if necessary 193 * 194 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 195 * @throws HL7Exception if the repetition requested is more than one 196 * greater than the number of existing repetitions. 197 */ 198 public VAR getVAR(int rep) { 199 VAR retVal = getTyped("VAR", rep, VAR.class); 200 return retVal; 201 } 202 203 /** 204 * Returns the number of existing repetitions of VAR 205 */ 206 public int getVARReps() { 207 return getReps("VAR"); 208 } 209 210 /** 211 * <p> 212 * Returns a non-modifiable List containing all current existing repetitions of VAR. 213 * <p> 214 * <p> 215 * Note that unlike {@link #getVAR()}, this method will not create any reps 216 * if none are already present, so an empty list may be returned. 217 * </p> 218 */ 219 public List<VAR> getVARAll() throws HL7Exception { 220 return getAllAsList("VAR", VAR.class); 221 } 222 223 /** 224 * Inserts a specific repetition of VAR (Variance) 225 * @see AbstractGroup#insertRepetition(Structure, int) 226 */ 227 public void insertVAR(VAR structure, int rep) throws HL7Exception { 228 super.insertRepetition("VAR", structure, rep); 229 } 230 231 232 /** 233 * Inserts a specific repetition of VAR (Variance) 234 * @see AbstractGroup#insertRepetition(Structure, int) 235 */ 236 public VAR insertVAR(int rep) throws HL7Exception { 237 return (VAR)super.insertRepetition("VAR", rep); 238 } 239 240 241 /** 242 * Removes a specific repetition of VAR (Variance) 243 * @see AbstractGroup#removeRepetition(String, int) 244 */ 245 public VAR removeVAR(int rep) throws HL7Exception { 246 return (VAR)super.removeRepetition("VAR", rep); 247 } 248 249 250 251 /** 252 * Returns 253 * the first repetition of 254 * ROLVAR (a Group object) - creates it if necessary 255 */ 256 public PGL_PC6_ROLVAR getROLVAR() { 257 PGL_PC6_ROLVAR retVal = getTyped("ROLVAR", PGL_PC6_ROLVAR.class); 258 return retVal; 259 } 260 261 262 /** 263 * Returns a specific repetition of 264 * ROLVAR (a Group object) - creates it if necessary 265 * 266 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 267 * @throws HL7Exception if the repetition requested is more than one 268 * greater than the number of existing repetitions. 269 */ 270 public PGL_PC6_ROLVAR getROLVAR(int rep) { 271 PGL_PC6_ROLVAR retVal = getTyped("ROLVAR", rep, PGL_PC6_ROLVAR.class); 272 return retVal; 273 } 274 275 /** 276 * Returns the number of existing repetitions of ROLVAR 277 */ 278 public int getROLVARReps() { 279 return getReps("ROLVAR"); 280 } 281 282 /** 283 * <p> 284 * Returns a non-modifiable List containing all current existing repetitions of ROLVAR. 285 * <p> 286 * <p> 287 * Note that unlike {@link #getROLVAR()}, this method will not create any reps 288 * if none are already present, so an empty list may be returned. 289 * </p> 290 */ 291 public List<PGL_PC6_ROLVAR> getROLVARAll() throws HL7Exception { 292 return getAllAsList("ROLVAR", PGL_PC6_ROLVAR.class); 293 } 294 295 /** 296 * Inserts a specific repetition of ROLVAR (a Group object) 297 * @see AbstractGroup#insertRepetition(Structure, int) 298 */ 299 public void insertROLVAR(PGL_PC6_ROLVAR structure, int rep) throws HL7Exception { 300 super.insertRepetition("ROLVAR", structure, rep); 301 } 302 303 304 /** 305 * Inserts a specific repetition of ROLVAR (a Group object) 306 * @see AbstractGroup#insertRepetition(Structure, int) 307 */ 308 public PGL_PC6_ROLVAR insertROLVAR(int rep) throws HL7Exception { 309 return (PGL_PC6_ROLVAR)super.insertRepetition("ROLVAR", rep); 310 } 311 312 313 /** 314 * Removes a specific repetition of ROLVAR (a Group object) 315 * @see AbstractGroup#removeRepetition(String, int) 316 */ 317 public PGL_PC6_ROLVAR removeROLVAR(int rep) throws HL7Exception { 318 return (PGL_PC6_ROLVAR)super.removeRepetition("ROLVAR", rep); 319 } 320 321 322 323 /** 324 * Returns 325 * the first repetition of 326 * PTHVAR (a Group object) - creates it if necessary 327 */ 328 public PGL_PC6_PTHVAR getPTHVAR() { 329 PGL_PC6_PTHVAR retVal = getTyped("PTHVAR", PGL_PC6_PTHVAR.class); 330 return retVal; 331 } 332 333 334 /** 335 * Returns a specific repetition of 336 * PTHVAR (a Group object) - creates it if necessary 337 * 338 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 339 * @throws HL7Exception if the repetition requested is more than one 340 * greater than the number of existing repetitions. 341 */ 342 public PGL_PC6_PTHVAR getPTHVAR(int rep) { 343 PGL_PC6_PTHVAR retVal = getTyped("PTHVAR", rep, PGL_PC6_PTHVAR.class); 344 return retVal; 345 } 346 347 /** 348 * Returns the number of existing repetitions of PTHVAR 349 */ 350 public int getPTHVARReps() { 351 return getReps("PTHVAR"); 352 } 353 354 /** 355 * <p> 356 * Returns a non-modifiable List containing all current existing repetitions of PTHVAR. 357 * <p> 358 * <p> 359 * Note that unlike {@link #getPTHVAR()}, this method will not create any reps 360 * if none are already present, so an empty list may be returned. 361 * </p> 362 */ 363 public List<PGL_PC6_PTHVAR> getPTHVARAll() throws HL7Exception { 364 return getAllAsList("PTHVAR", PGL_PC6_PTHVAR.class); 365 } 366 367 /** 368 * Inserts a specific repetition of PTHVAR (a Group object) 369 * @see AbstractGroup#insertRepetition(Structure, int) 370 */ 371 public void insertPTHVAR(PGL_PC6_PTHVAR structure, int rep) throws HL7Exception { 372 super.insertRepetition("PTHVAR", structure, rep); 373 } 374 375 376 /** 377 * Inserts a specific repetition of PTHVAR (a Group object) 378 * @see AbstractGroup#insertRepetition(Structure, int) 379 */ 380 public PGL_PC6_PTHVAR insertPTHVAR(int rep) throws HL7Exception { 381 return (PGL_PC6_PTHVAR)super.insertRepetition("PTHVAR", rep); 382 } 383 384 385 /** 386 * Removes a specific repetition of PTHVAR (a Group object) 387 * @see AbstractGroup#removeRepetition(String, int) 388 */ 389 public PGL_PC6_PTHVAR removePTHVAR(int rep) throws HL7Exception { 390 return (PGL_PC6_PTHVAR)super.removeRepetition("PTHVAR", rep); 391 } 392 393 394 395 /** 396 * Returns 397 * the first repetition of 398 * OBXNTE (a Group object) - creates it if necessary 399 */ 400 public PGL_PC6_OBXNTE getOBXNTE() { 401 PGL_PC6_OBXNTE retVal = getTyped("OBXNTE", PGL_PC6_OBXNTE.class); 402 return retVal; 403 } 404 405 406 /** 407 * Returns a specific repetition of 408 * OBXNTE (a Group object) - creates it if necessary 409 * 410 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 411 * @throws HL7Exception if the repetition requested is more than one 412 * greater than the number of existing repetitions. 413 */ 414 public PGL_PC6_OBXNTE getOBXNTE(int rep) { 415 PGL_PC6_OBXNTE retVal = getTyped("OBXNTE", rep, PGL_PC6_OBXNTE.class); 416 return retVal; 417 } 418 419 /** 420 * Returns the number of existing repetitions of OBXNTE 421 */ 422 public int getOBXNTEReps() { 423 return getReps("OBXNTE"); 424 } 425 426 /** 427 * <p> 428 * Returns a non-modifiable List containing all current existing repetitions of OBXNTE. 429 * <p> 430 * <p> 431 * Note that unlike {@link #getOBXNTE()}, this method will not create any reps 432 * if none are already present, so an empty list may be returned. 433 * </p> 434 */ 435 public List<PGL_PC6_OBXNTE> getOBXNTEAll() throws HL7Exception { 436 return getAllAsList("OBXNTE", PGL_PC6_OBXNTE.class); 437 } 438 439 /** 440 * Inserts a specific repetition of OBXNTE (a Group object) 441 * @see AbstractGroup#insertRepetition(Structure, int) 442 */ 443 public void insertOBXNTE(PGL_PC6_OBXNTE structure, int rep) throws HL7Exception { 444 super.insertRepetition("OBXNTE", structure, rep); 445 } 446 447 448 /** 449 * Inserts a specific repetition of OBXNTE (a Group object) 450 * @see AbstractGroup#insertRepetition(Structure, int) 451 */ 452 public PGL_PC6_OBXNTE insertOBXNTE(int rep) throws HL7Exception { 453 return (PGL_PC6_OBXNTE)super.insertRepetition("OBXNTE", rep); 454 } 455 456 457 /** 458 * Removes a specific repetition of OBXNTE (a Group object) 459 * @see AbstractGroup#removeRepetition(String, int) 460 */ 461 public PGL_PC6_OBXNTE removeOBXNTE(int rep) throws HL7Exception { 462 return (PGL_PC6_OBXNTE)super.removeRepetition("OBXNTE", rep); 463 } 464 465 466 467 /** 468 * Returns 469 * the first repetition of 470 * PRBNTEVARROLVAROBXNTE (a Group object) - creates it if necessary 471 */ 472 public PGL_PC6_PRBNTEVARROLVAROBXNTE getPRBNTEVARROLVAROBXNTE() { 473 PGL_PC6_PRBNTEVARROLVAROBXNTE retVal = getTyped("PRBNTEVARROLVAROBXNTE", PGL_PC6_PRBNTEVARROLVAROBXNTE.class); 474 return retVal; 475 } 476 477 478 /** 479 * Returns a specific repetition of 480 * PRBNTEVARROLVAROBXNTE (a Group object) - creates it if necessary 481 * 482 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 483 * @throws HL7Exception if the repetition requested is more than one 484 * greater than the number of existing repetitions. 485 */ 486 public PGL_PC6_PRBNTEVARROLVAROBXNTE getPRBNTEVARROLVAROBXNTE(int rep) { 487 PGL_PC6_PRBNTEVARROLVAROBXNTE retVal = getTyped("PRBNTEVARROLVAROBXNTE", rep, PGL_PC6_PRBNTEVARROLVAROBXNTE.class); 488 return retVal; 489 } 490 491 /** 492 * Returns the number of existing repetitions of PRBNTEVARROLVAROBXNTE 493 */ 494 public int getPRBNTEVARROLVAROBXNTEReps() { 495 return getReps("PRBNTEVARROLVAROBXNTE"); 496 } 497 498 /** 499 * <p> 500 * Returns a non-modifiable List containing all current existing repetitions of PRBNTEVARROLVAROBXNTE. 501 * <p> 502 * <p> 503 * Note that unlike {@link #getPRBNTEVARROLVAROBXNTE()}, this method will not create any reps 504 * if none are already present, so an empty list may be returned. 505 * </p> 506 */ 507 public List<PGL_PC6_PRBNTEVARROLVAROBXNTE> getPRBNTEVARROLVAROBXNTEAll() throws HL7Exception { 508 return getAllAsList("PRBNTEVARROLVAROBXNTE", PGL_PC6_PRBNTEVARROLVAROBXNTE.class); 509 } 510 511 /** 512 * Inserts a specific repetition of PRBNTEVARROLVAROBXNTE (a Group object) 513 * @see AbstractGroup#insertRepetition(Structure, int) 514 */ 515 public void insertPRBNTEVARROLVAROBXNTE(PGL_PC6_PRBNTEVARROLVAROBXNTE structure, int rep) throws HL7Exception { 516 super.insertRepetition("PRBNTEVARROLVAROBXNTE", structure, rep); 517 } 518 519 520 /** 521 * Inserts a specific repetition of PRBNTEVARROLVAROBXNTE (a Group object) 522 * @see AbstractGroup#insertRepetition(Structure, int) 523 */ 524 public PGL_PC6_PRBNTEVARROLVAROBXNTE insertPRBNTEVARROLVAROBXNTE(int rep) throws HL7Exception { 525 return (PGL_PC6_PRBNTEVARROLVAROBXNTE)super.insertRepetition("PRBNTEVARROLVAROBXNTE", rep); 526 } 527 528 529 /** 530 * Removes a specific repetition of PRBNTEVARROLVAROBXNTE (a Group object) 531 * @see AbstractGroup#removeRepetition(String, int) 532 */ 533 public PGL_PC6_PRBNTEVARROLVAROBXNTE removePRBNTEVARROLVAROBXNTE(int rep) throws HL7Exception { 534 return (PGL_PC6_PRBNTEVARROLVAROBXNTE)super.removeRepetition("PRBNTEVARROLVAROBXNTE", rep); 535 } 536 537 538 539 /** 540 * Returns 541 * the first repetition of 542 * ORCOBRRXONTEVAROBXNTEVAR (a Group object) - creates it if necessary 543 */ 544 public PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR getORCOBRRXONTEVAROBXNTEVAR() { 545 PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR retVal = getTyped("ORCOBRRXONTEVAROBXNTEVAR", PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR.class); 546 return retVal; 547 } 548 549 550 /** 551 * Returns a specific repetition of 552 * ORCOBRRXONTEVAROBXNTEVAR (a Group object) - creates it if necessary 553 * 554 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 555 * @throws HL7Exception if the repetition requested is more than one 556 * greater than the number of existing repetitions. 557 */ 558 public PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR getORCOBRRXONTEVAROBXNTEVAR(int rep) { 559 PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR retVal = getTyped("ORCOBRRXONTEVAROBXNTEVAR", rep, PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR.class); 560 return retVal; 561 } 562 563 /** 564 * Returns the number of existing repetitions of ORCOBRRXONTEVAROBXNTEVAR 565 */ 566 public int getORCOBRRXONTEVAROBXNTEVARReps() { 567 return getReps("ORCOBRRXONTEVAROBXNTEVAR"); 568 } 569 570 /** 571 * <p> 572 * Returns a non-modifiable List containing all current existing repetitions of ORCOBRRXONTEVAROBXNTEVAR. 573 * <p> 574 * <p> 575 * Note that unlike {@link #getORCOBRRXONTEVAROBXNTEVAR()}, this method will not create any reps 576 * if none are already present, so an empty list may be returned. 577 * </p> 578 */ 579 public List<PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR> getORCOBRRXONTEVAROBXNTEVARAll() throws HL7Exception { 580 return getAllAsList("ORCOBRRXONTEVAROBXNTEVAR", PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR.class); 581 } 582 583 /** 584 * Inserts a specific repetition of ORCOBRRXONTEVAROBXNTEVAR (a Group object) 585 * @see AbstractGroup#insertRepetition(Structure, int) 586 */ 587 public void insertORCOBRRXONTEVAROBXNTEVAR(PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR structure, int rep) throws HL7Exception { 588 super.insertRepetition("ORCOBRRXONTEVAROBXNTEVAR", structure, rep); 589 } 590 591 592 /** 593 * Inserts a specific repetition of ORCOBRRXONTEVAROBXNTEVAR (a Group object) 594 * @see AbstractGroup#insertRepetition(Structure, int) 595 */ 596 public PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR insertORCOBRRXONTEVAROBXNTEVAR(int rep) throws HL7Exception { 597 return (PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR)super.insertRepetition("ORCOBRRXONTEVAROBXNTEVAR", rep); 598 } 599 600 601 /** 602 * Removes a specific repetition of ORCOBRRXONTEVAROBXNTEVAR (a Group object) 603 * @see AbstractGroup#removeRepetition(String, int) 604 */ 605 public PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR removeORCOBRRXONTEVAROBXNTEVAR(int rep) throws HL7Exception { 606 return (PGL_PC6_ORCOBRRXONTEVAROBXNTEVAR)super.removeRepetition("ORCOBRRXONTEVAROBXNTEVAR", rep); 607 } 608 609 610 611} 612