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.v26.segment; 035 036// import ca.uhn.hl7v2.model.v26.group.*; 037import ca.uhn.hl7v2.model.v26.datatype.*; 038import ca.uhn.hl7v2.HL7Exception; 039import ca.uhn.hl7v2.parser.ModelClassFactory; 040import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 041import ca.uhn.hl7v2.model.AbstractMessage; 042import ca.uhn.hl7v2.model.Group; 043import ca.uhn.hl7v2.model.Type; 044import ca.uhn.hl7v2.model.AbstractSegment; 045import ca.uhn.hl7v2.model.Varies; 046 047 048/** 049 *<p>Represents an HL7 CSR message segment (Clinical Study Registration). 050 * This segment has the following fields:</p> 051 * <ul> 052 * <li>CSR-1: Sponsor Study ID (EI) <b> </b> 053 * <li>CSR-2: Alternate Study ID (EI) <b>optional </b> 054 * <li>CSR-3: Institution Registering the Patient (CWE) <b>optional </b> 055 * <li>CSR-4: Sponsor Patient ID (CX) <b> </b> 056 * <li>CSR-5: Alternate Patient ID - CSR (CX) <b>optional </b> 057 * <li>CSR-6: Date/Time of Patient Study Registration (DTM) <b> </b> 058 * <li>CSR-7: Person Performing Study Registration (XCN) <b>optional repeating</b> 059 * <li>CSR-8: Study Authorizing Provider (XCN) <b> repeating</b> 060 * <li>CSR-9: Date/time Patient Study Consent Signed (DTM) <b>optional </b> 061 * <li>CSR-10: Patient Study Eligibility Status (CWE) <b>optional </b> 062 * <li>CSR-11: Study Randomization Date/time (DTM) <b>optional repeating</b> 063 * <li>CSR-12: Randomized Study Arm (CWE) <b>optional repeating</b> 064 * <li>CSR-13: Stratum for Study Randomization (CWE) <b>optional repeating</b> 065 * <li>CSR-14: Patient Evaluability Status (CWE) <b>optional </b> 066 * <li>CSR-15: Date/time Ended Study (DTM) <b>optional </b> 067 * <li>CSR-16: Reason Ended Study (CWE) <b>optional </b> 068 * </ul> 069 */ 070@SuppressWarnings("unused") 071public class CSR extends AbstractSegment { 072 073 /** 074 * Creates a new CSR segment 075 */ 076 public CSR(Group parent, ModelClassFactory factory) { 077 super(parent, factory); 078 init(factory); 079 } 080 081 private void init(ModelClassFactory factory) { 082 try { 083 this.add(EI.class, true, 1, 427, new Object[]{ getMessage() }, "Sponsor Study ID"); 084 this.add(EI.class, false, 1, 427, new Object[]{ getMessage() }, "Alternate Study ID"); 085 this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Institution Registering the Patient"); 086 this.add(CX.class, true, 1, 1913, new Object[]{ getMessage() }, "Sponsor Patient ID"); 087 this.add(CX.class, false, 1, 1913, new Object[]{ getMessage() }, "Alternate Patient ID - CSR"); 088 this.add(DTM.class, true, 1, 24, new Object[]{ getMessage() }, "Date/Time of Patient Study Registration"); 089 this.add(XCN.class, false, 0, 3220, new Object[]{ getMessage() }, "Person Performing Study Registration"); 090 this.add(XCN.class, true, 0, 3220, new Object[]{ getMessage() }, "Study Authorizing Provider"); 091 this.add(DTM.class, false, 1, 24, new Object[]{ getMessage() }, "Date/time Patient Study Consent Signed"); 092 this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Patient Study Eligibility Status"); 093 this.add(DTM.class, false, 3, 24, new Object[]{ getMessage() }, "Study Randomization Date/time"); 094 this.add(CWE.class, false, 3, 705, new Object[]{ getMessage() }, "Randomized Study Arm"); 095 this.add(CWE.class, false, 3, 705, new Object[]{ getMessage() }, "Stratum for Study Randomization"); 096 this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Patient Evaluability Status"); 097 this.add(DTM.class, false, 1, 24, new Object[]{ getMessage() }, "Date/time Ended Study"); 098 this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Reason Ended Study"); 099 } catch(HL7Exception e) { 100 log.error("Unexpected error creating CSR - this is probably a bug in the source code generator.", e); 101 } 102 } 103 104 105 106 /** 107 * Returns 108 * CSR-1: "Sponsor Study ID" - creates it if necessary 109 */ 110 public EI getSponsorStudyID() { 111 EI retVal = this.getTypedField(1, 0); 112 return retVal; 113 } 114 115 /** 116 * Returns 117 * CSR-1: "Sponsor Study ID" - creates it if necessary 118 */ 119 public EI getCsr1_SponsorStudyID() { 120 EI retVal = this.getTypedField(1, 0); 121 return retVal; 122 } 123 124 125 126 /** 127 * Returns 128 * CSR-2: "Alternate Study ID" - creates it if necessary 129 */ 130 public EI getAlternateStudyID() { 131 EI retVal = this.getTypedField(2, 0); 132 return retVal; 133 } 134 135 /** 136 * Returns 137 * CSR-2: "Alternate Study ID" - creates it if necessary 138 */ 139 public EI getCsr2_AlternateStudyID() { 140 EI retVal = this.getTypedField(2, 0); 141 return retVal; 142 } 143 144 145 146 /** 147 * Returns 148 * CSR-3: "Institution Registering the Patient" - creates it if necessary 149 */ 150 public CWE getInstitutionRegisteringThePatient() { 151 CWE retVal = this.getTypedField(3, 0); 152 return retVal; 153 } 154 155 /** 156 * Returns 157 * CSR-3: "Institution Registering the Patient" - creates it if necessary 158 */ 159 public CWE getCsr3_InstitutionRegisteringThePatient() { 160 CWE retVal = this.getTypedField(3, 0); 161 return retVal; 162 } 163 164 165 166 /** 167 * Returns 168 * CSR-4: "Sponsor Patient ID" - creates it if necessary 169 */ 170 public CX getSponsorPatientID() { 171 CX retVal = this.getTypedField(4, 0); 172 return retVal; 173 } 174 175 /** 176 * Returns 177 * CSR-4: "Sponsor Patient ID" - creates it if necessary 178 */ 179 public CX getCsr4_SponsorPatientID() { 180 CX retVal = this.getTypedField(4, 0); 181 return retVal; 182 } 183 184 185 186 /** 187 * Returns 188 * CSR-5: "Alternate Patient ID - CSR" - creates it if necessary 189 */ 190 public CX getAlternatePatientIDCSR() { 191 CX retVal = this.getTypedField(5, 0); 192 return retVal; 193 } 194 195 /** 196 * Returns 197 * CSR-5: "Alternate Patient ID - CSR" - creates it if necessary 198 */ 199 public CX getCsr5_AlternatePatientIDCSR() { 200 CX retVal = this.getTypedField(5, 0); 201 return retVal; 202 } 203 204 205 206 /** 207 * Returns 208 * CSR-6: "Date/Time of Patient Study Registration" - creates it if necessary 209 */ 210 public DTM getDateTimeOfPatientStudyRegistration() { 211 DTM retVal = this.getTypedField(6, 0); 212 return retVal; 213 } 214 215 /** 216 * Returns 217 * CSR-6: "Date/Time of Patient Study Registration" - creates it if necessary 218 */ 219 public DTM getCsr6_DateTimeOfPatientStudyRegistration() { 220 DTM retVal = this.getTypedField(6, 0); 221 return retVal; 222 } 223 224 225 /** 226 * Returns all repetitions of Person Performing Study Registration (CSR-7). 227 */ 228 public XCN[] getPersonPerformingStudyRegistration() { 229 XCN[] retVal = this.getTypedField(7, new XCN[0]); 230 return retVal; 231 } 232 233 234 /** 235 * Returns all repetitions of Person Performing Study Registration (CSR-7). 236 */ 237 public XCN[] getCsr7_PersonPerformingStudyRegistration() { 238 XCN[] retVal = this.getTypedField(7, new XCN[0]); 239 return retVal; 240 } 241 242 243 /** 244 * Returns a count of the current number of repetitions of Person Performing Study Registration (CSR-7). 245 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 246 * it will return zero. 247 */ 248 public int getPersonPerformingStudyRegistrationReps() { 249 return this.getReps(7); 250 } 251 252 253 /** 254 * Returns a specific repetition of 255 * CSR-7: "Person Performing Study Registration" - creates it if necessary 256 * 257 * @param rep The repetition index (0-indexed) 258 */ 259 public XCN getPersonPerformingStudyRegistration(int rep) { 260 XCN retVal = this.getTypedField(7, rep); 261 return retVal; 262 } 263 264 /** 265 * Returns a specific repetition of 266 * CSR-7: "Person Performing Study Registration" - creates it if necessary 267 * 268 * @param rep The repetition index (0-indexed) 269 */ 270 public XCN getCsr7_PersonPerformingStudyRegistration(int rep) { 271 XCN retVal = this.getTypedField(7, rep); 272 return retVal; 273 } 274 275 /** 276 * Returns a count of the current number of repetitions of Person Performing Study Registration (CSR-7). 277 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 278 * it will return zero. 279 */ 280 public int getCsr7_PersonPerformingStudyRegistrationReps() { 281 return this.getReps(7); 282 } 283 284 285 /** 286 * Inserts a repetition of 287 * CSR-7: "Person Performing Study Registration" at a specific index 288 * 289 * @param rep The repetition index (0-indexed) 290 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 291 */ 292 public XCN insertPersonPerformingStudyRegistration(int rep) throws HL7Exception { 293 return (XCN) super.insertRepetition(7, rep); 294 } 295 296 297 /** 298 * Inserts a repetition of 299 * CSR-7: "Person Performing Study Registration" at a specific index 300 * 301 * @param rep The repetition index (0-indexed) 302 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 303 */ 304 public XCN insertCsr7_PersonPerformingStudyRegistration(int rep) throws HL7Exception { 305 return (XCN) super.insertRepetition(7, rep); 306 } 307 308 309 /** 310 * Removes a repetition of 311 * CSR-7: "Person Performing Study Registration" at a specific index 312 * 313 * @param rep The repetition index (0-indexed) 314 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 315 */ 316 public XCN removePersonPerformingStudyRegistration(int rep) throws HL7Exception { 317 return (XCN) super.removeRepetition(7, rep); 318 } 319 320 321 /** 322 * Removes a repetition of 323 * CSR-7: "Person Performing Study Registration" at a specific index 324 * 325 * @param rep The repetition index (0-indexed) 326 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 327 */ 328 public XCN removeCsr7_PersonPerformingStudyRegistration(int rep) throws HL7Exception { 329 return (XCN) super.removeRepetition(7, rep); 330 } 331 332 333 334 /** 335 * Returns all repetitions of Study Authorizing Provider (CSR-8). 336 */ 337 public XCN[] getStudyAuthorizingProvider() { 338 XCN[] retVal = this.getTypedField(8, new XCN[0]); 339 return retVal; 340 } 341 342 343 /** 344 * Returns all repetitions of Study Authorizing Provider (CSR-8). 345 */ 346 public XCN[] getCsr8_StudyAuthorizingProvider() { 347 XCN[] retVal = this.getTypedField(8, new XCN[0]); 348 return retVal; 349 } 350 351 352 /** 353 * Returns a count of the current number of repetitions of Study Authorizing Provider (CSR-8). 354 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 355 * it will return zero. 356 */ 357 public int getStudyAuthorizingProviderReps() { 358 return this.getReps(8); 359 } 360 361 362 /** 363 * Returns a specific repetition of 364 * CSR-8: "Study Authorizing Provider" - creates it if necessary 365 * 366 * @param rep The repetition index (0-indexed) 367 */ 368 public XCN getStudyAuthorizingProvider(int rep) { 369 XCN retVal = this.getTypedField(8, rep); 370 return retVal; 371 } 372 373 /** 374 * Returns a specific repetition of 375 * CSR-8: "Study Authorizing Provider" - creates it if necessary 376 * 377 * @param rep The repetition index (0-indexed) 378 */ 379 public XCN getCsr8_StudyAuthorizingProvider(int rep) { 380 XCN retVal = this.getTypedField(8, rep); 381 return retVal; 382 } 383 384 /** 385 * Returns a count of the current number of repetitions of Study Authorizing Provider (CSR-8). 386 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 387 * it will return zero. 388 */ 389 public int getCsr8_StudyAuthorizingProviderReps() { 390 return this.getReps(8); 391 } 392 393 394 /** 395 * Inserts a repetition of 396 * CSR-8: "Study Authorizing Provider" at a specific index 397 * 398 * @param rep The repetition index (0-indexed) 399 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 400 */ 401 public XCN insertStudyAuthorizingProvider(int rep) throws HL7Exception { 402 return (XCN) super.insertRepetition(8, rep); 403 } 404 405 406 /** 407 * Inserts a repetition of 408 * CSR-8: "Study Authorizing Provider" at a specific index 409 * 410 * @param rep The repetition index (0-indexed) 411 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 412 */ 413 public XCN insertCsr8_StudyAuthorizingProvider(int rep) throws HL7Exception { 414 return (XCN) super.insertRepetition(8, rep); 415 } 416 417 418 /** 419 * Removes a repetition of 420 * CSR-8: "Study Authorizing Provider" at a specific index 421 * 422 * @param rep The repetition index (0-indexed) 423 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 424 */ 425 public XCN removeStudyAuthorizingProvider(int rep) throws HL7Exception { 426 return (XCN) super.removeRepetition(8, rep); 427 } 428 429 430 /** 431 * Removes a repetition of 432 * CSR-8: "Study Authorizing Provider" at a specific index 433 * 434 * @param rep The repetition index (0-indexed) 435 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 436 */ 437 public XCN removeCsr8_StudyAuthorizingProvider(int rep) throws HL7Exception { 438 return (XCN) super.removeRepetition(8, rep); 439 } 440 441 442 443 444 /** 445 * Returns 446 * CSR-9: "Date/time Patient Study Consent Signed" - creates it if necessary 447 */ 448 public DTM getDateTimePatientStudyConsentSigned() { 449 DTM retVal = this.getTypedField(9, 0); 450 return retVal; 451 } 452 453 /** 454 * Returns 455 * CSR-9: "Date/time Patient Study Consent Signed" - creates it if necessary 456 */ 457 public DTM getCsr9_DateTimePatientStudyConsentSigned() { 458 DTM retVal = this.getTypedField(9, 0); 459 return retVal; 460 } 461 462 463 464 /** 465 * Returns 466 * CSR-10: "Patient Study Eligibility Status" - creates it if necessary 467 */ 468 public CWE getPatientStudyEligibilityStatus() { 469 CWE retVal = this.getTypedField(10, 0); 470 return retVal; 471 } 472 473 /** 474 * Returns 475 * CSR-10: "Patient Study Eligibility Status" - creates it if necessary 476 */ 477 public CWE getCsr10_PatientStudyEligibilityStatus() { 478 CWE retVal = this.getTypedField(10, 0); 479 return retVal; 480 } 481 482 483 /** 484 * Returns all repetitions of Study Randomization Date/time (CSR-11). 485 */ 486 public DTM[] getStudyRandomizationDateTime() { 487 DTM[] retVal = this.getTypedField(11, new DTM[0]); 488 return retVal; 489 } 490 491 492 /** 493 * Returns all repetitions of Study Randomization Date/time (CSR-11). 494 */ 495 public DTM[] getCsr11_StudyRandomizationDateTime() { 496 DTM[] retVal = this.getTypedField(11, new DTM[0]); 497 return retVal; 498 } 499 500 501 /** 502 * Returns a count of the current number of repetitions of Study Randomization Date/time (CSR-11). 503 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 504 * it will return zero. 505 */ 506 public int getStudyRandomizationDateTimeReps() { 507 return this.getReps(11); 508 } 509 510 511 /** 512 * Returns a specific repetition of 513 * CSR-11: "Study Randomization Date/time" - creates it if necessary 514 * 515 * @param rep The repetition index (0-indexed) 516 */ 517 public DTM getStudyRandomizationDateTime(int rep) { 518 DTM retVal = this.getTypedField(11, rep); 519 return retVal; 520 } 521 522 /** 523 * Returns a specific repetition of 524 * CSR-11: "Study Randomization Date/time" - creates it if necessary 525 * 526 * @param rep The repetition index (0-indexed) 527 */ 528 public DTM getCsr11_StudyRandomizationDateTime(int rep) { 529 DTM retVal = this.getTypedField(11, rep); 530 return retVal; 531 } 532 533 /** 534 * Returns a count of the current number of repetitions of Study Randomization Date/time (CSR-11). 535 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 536 * it will return zero. 537 */ 538 public int getCsr11_StudyRandomizationDateTimeReps() { 539 return this.getReps(11); 540 } 541 542 543 /** 544 * Inserts a repetition of 545 * CSR-11: "Study Randomization Date/time" at a specific index 546 * 547 * @param rep The repetition index (0-indexed) 548 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 549 */ 550 public DTM insertStudyRandomizationDateTime(int rep) throws HL7Exception { 551 return (DTM) super.insertRepetition(11, rep); 552 } 553 554 555 /** 556 * Inserts a repetition of 557 * CSR-11: "Study Randomization Date/time" at a specific index 558 * 559 * @param rep The repetition index (0-indexed) 560 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 561 */ 562 public DTM insertCsr11_StudyRandomizationDateTime(int rep) throws HL7Exception { 563 return (DTM) super.insertRepetition(11, rep); 564 } 565 566 567 /** 568 * Removes a repetition of 569 * CSR-11: "Study Randomization Date/time" at a specific index 570 * 571 * @param rep The repetition index (0-indexed) 572 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 573 */ 574 public DTM removeStudyRandomizationDateTime(int rep) throws HL7Exception { 575 return (DTM) super.removeRepetition(11, rep); 576 } 577 578 579 /** 580 * Removes a repetition of 581 * CSR-11: "Study Randomization Date/time" at a specific index 582 * 583 * @param rep The repetition index (0-indexed) 584 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 585 */ 586 public DTM removeCsr11_StudyRandomizationDateTime(int rep) throws HL7Exception { 587 return (DTM) super.removeRepetition(11, rep); 588 } 589 590 591 592 /** 593 * Returns all repetitions of Randomized Study Arm (CSR-12). 594 */ 595 public CWE[] getRandomizedStudyArm() { 596 CWE[] retVal = this.getTypedField(12, new CWE[0]); 597 return retVal; 598 } 599 600 601 /** 602 * Returns all repetitions of Randomized Study Arm (CSR-12). 603 */ 604 public CWE[] getCsr12_RandomizedStudyArm() { 605 CWE[] retVal = this.getTypedField(12, new CWE[0]); 606 return retVal; 607 } 608 609 610 /** 611 * Returns a count of the current number of repetitions of Randomized Study Arm (CSR-12). 612 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 613 * it will return zero. 614 */ 615 public int getRandomizedStudyArmReps() { 616 return this.getReps(12); 617 } 618 619 620 /** 621 * Returns a specific repetition of 622 * CSR-12: "Randomized Study Arm" - creates it if necessary 623 * 624 * @param rep The repetition index (0-indexed) 625 */ 626 public CWE getRandomizedStudyArm(int rep) { 627 CWE retVal = this.getTypedField(12, rep); 628 return retVal; 629 } 630 631 /** 632 * Returns a specific repetition of 633 * CSR-12: "Randomized Study Arm" - creates it if necessary 634 * 635 * @param rep The repetition index (0-indexed) 636 */ 637 public CWE getCsr12_RandomizedStudyArm(int rep) { 638 CWE retVal = this.getTypedField(12, rep); 639 return retVal; 640 } 641 642 /** 643 * Returns a count of the current number of repetitions of Randomized Study Arm (CSR-12). 644 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 645 * it will return zero. 646 */ 647 public int getCsr12_RandomizedStudyArmReps() { 648 return this.getReps(12); 649 } 650 651 652 /** 653 * Inserts a repetition of 654 * CSR-12: "Randomized Study Arm" at a specific index 655 * 656 * @param rep The repetition index (0-indexed) 657 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 658 */ 659 public CWE insertRandomizedStudyArm(int rep) throws HL7Exception { 660 return (CWE) super.insertRepetition(12, rep); 661 } 662 663 664 /** 665 * Inserts a repetition of 666 * CSR-12: "Randomized Study Arm" at a specific index 667 * 668 * @param rep The repetition index (0-indexed) 669 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 670 */ 671 public CWE insertCsr12_RandomizedStudyArm(int rep) throws HL7Exception { 672 return (CWE) super.insertRepetition(12, rep); 673 } 674 675 676 /** 677 * Removes a repetition of 678 * CSR-12: "Randomized Study Arm" at a specific index 679 * 680 * @param rep The repetition index (0-indexed) 681 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 682 */ 683 public CWE removeRandomizedStudyArm(int rep) throws HL7Exception { 684 return (CWE) super.removeRepetition(12, rep); 685 } 686 687 688 /** 689 * Removes a repetition of 690 * CSR-12: "Randomized Study Arm" at a specific index 691 * 692 * @param rep The repetition index (0-indexed) 693 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 694 */ 695 public CWE removeCsr12_RandomizedStudyArm(int rep) throws HL7Exception { 696 return (CWE) super.removeRepetition(12, rep); 697 } 698 699 700 701 /** 702 * Returns all repetitions of Stratum for Study Randomization (CSR-13). 703 */ 704 public CWE[] getStratumForStudyRandomization() { 705 CWE[] retVal = this.getTypedField(13, new CWE[0]); 706 return retVal; 707 } 708 709 710 /** 711 * Returns all repetitions of Stratum for Study Randomization (CSR-13). 712 */ 713 public CWE[] getCsr13_StratumForStudyRandomization() { 714 CWE[] retVal = this.getTypedField(13, new CWE[0]); 715 return retVal; 716 } 717 718 719 /** 720 * Returns a count of the current number of repetitions of Stratum for Study Randomization (CSR-13). 721 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 722 * it will return zero. 723 */ 724 public int getStratumForStudyRandomizationReps() { 725 return this.getReps(13); 726 } 727 728 729 /** 730 * Returns a specific repetition of 731 * CSR-13: "Stratum for Study Randomization" - creates it if necessary 732 * 733 * @param rep The repetition index (0-indexed) 734 */ 735 public CWE getStratumForStudyRandomization(int rep) { 736 CWE retVal = this.getTypedField(13, rep); 737 return retVal; 738 } 739 740 /** 741 * Returns a specific repetition of 742 * CSR-13: "Stratum for Study Randomization" - creates it if necessary 743 * 744 * @param rep The repetition index (0-indexed) 745 */ 746 public CWE getCsr13_StratumForStudyRandomization(int rep) { 747 CWE retVal = this.getTypedField(13, rep); 748 return retVal; 749 } 750 751 /** 752 * Returns a count of the current number of repetitions of Stratum for Study Randomization (CSR-13). 753 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 754 * it will return zero. 755 */ 756 public int getCsr13_StratumForStudyRandomizationReps() { 757 return this.getReps(13); 758 } 759 760 761 /** 762 * Inserts a repetition of 763 * CSR-13: "Stratum for Study Randomization" at a specific index 764 * 765 * @param rep The repetition index (0-indexed) 766 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 767 */ 768 public CWE insertStratumForStudyRandomization(int rep) throws HL7Exception { 769 return (CWE) super.insertRepetition(13, rep); 770 } 771 772 773 /** 774 * Inserts a repetition of 775 * CSR-13: "Stratum for Study Randomization" at a specific index 776 * 777 * @param rep The repetition index (0-indexed) 778 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 779 */ 780 public CWE insertCsr13_StratumForStudyRandomization(int rep) throws HL7Exception { 781 return (CWE) super.insertRepetition(13, rep); 782 } 783 784 785 /** 786 * Removes a repetition of 787 * CSR-13: "Stratum for Study Randomization" at a specific index 788 * 789 * @param rep The repetition index (0-indexed) 790 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 791 */ 792 public CWE removeStratumForStudyRandomization(int rep) throws HL7Exception { 793 return (CWE) super.removeRepetition(13, rep); 794 } 795 796 797 /** 798 * Removes a repetition of 799 * CSR-13: "Stratum for Study Randomization" at a specific index 800 * 801 * @param rep The repetition index (0-indexed) 802 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 803 */ 804 public CWE removeCsr13_StratumForStudyRandomization(int rep) throws HL7Exception { 805 return (CWE) super.removeRepetition(13, rep); 806 } 807 808 809 810 811 /** 812 * Returns 813 * CSR-14: "Patient Evaluability Status" - creates it if necessary 814 */ 815 public CWE getPatientEvaluabilityStatus() { 816 CWE retVal = this.getTypedField(14, 0); 817 return retVal; 818 } 819 820 /** 821 * Returns 822 * CSR-14: "Patient Evaluability Status" - creates it if necessary 823 */ 824 public CWE getCsr14_PatientEvaluabilityStatus() { 825 CWE retVal = this.getTypedField(14, 0); 826 return retVal; 827 } 828 829 830 831 /** 832 * Returns 833 * CSR-15: "Date/time Ended Study" - creates it if necessary 834 */ 835 public DTM getDateTimeEndedStudy() { 836 DTM retVal = this.getTypedField(15, 0); 837 return retVal; 838 } 839 840 /** 841 * Returns 842 * CSR-15: "Date/time Ended Study" - creates it if necessary 843 */ 844 public DTM getCsr15_DateTimeEndedStudy() { 845 DTM retVal = this.getTypedField(15, 0); 846 return retVal; 847 } 848 849 850 851 /** 852 * Returns 853 * CSR-16: "Reason Ended Study" - creates it if necessary 854 */ 855 public CWE getReasonEndedStudy() { 856 CWE retVal = this.getTypedField(16, 0); 857 return retVal; 858 } 859 860 /** 861 * Returns 862 * CSR-16: "Reason Ended Study" - creates it if necessary 863 */ 864 public CWE getCsr16_ReasonEndedStudy() { 865 CWE retVal = this.getTypedField(16, 0); 866 return retVal; 867 } 868 869 870 871 872 873 /** {@inheritDoc} */ 874 protected Type createNewTypeWithoutReflection(int field) { 875 switch (field) { 876 case 0: return new EI(getMessage()); 877 case 1: return new EI(getMessage()); 878 case 2: return new CWE(getMessage()); 879 case 3: return new CX(getMessage()); 880 case 4: return new CX(getMessage()); 881 case 5: return new DTM(getMessage()); 882 case 6: return new XCN(getMessage()); 883 case 7: return new XCN(getMessage()); 884 case 8: return new DTM(getMessage()); 885 case 9: return new CWE(getMessage()); 886 case 10: return new DTM(getMessage()); 887 case 11: return new CWE(getMessage()); 888 case 12: return new CWE(getMessage()); 889 case 13: return new CWE(getMessage()); 890 case 14: return new DTM(getMessage()); 891 case 15: return new CWE(getMessage()); 892 default: return null; 893 } 894 } 895 896 897} 898