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