View Javadoc
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.v231.segment;
35  
36  // import ca.uhn.hl7v2.model.v231.group.*;
37  import ca.uhn.hl7v2.model.v231.datatype.*;
38  import ca.uhn.hl7v2.HL7Exception;
39  import ca.uhn.hl7v2.parser.ModelClassFactory;
40  import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
41  import ca.uhn.hl7v2.model.AbstractMessage;
42  import ca.uhn.hl7v2.model.Group;
43  import ca.uhn.hl7v2.model.Type;
44  import ca.uhn.hl7v2.model.AbstractSegment;
45  import ca.uhn.hl7v2.model.Varies;
46  
47  
48  /**
49   *<p>Represents an HL7 CSR message segment (CSR - clinical study registration segment). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>CSR-1: Sponsor Study ID (EI) <b> </b>
53       * <li>CSR-2: Alternate Study ID (EI) <b>optional </b>
54       * <li>CSR-3: Institution Registering the Patient (CE) <b>optional </b>
55       * <li>CSR-4: Sponsor Patient ID (CX) <b> </b>
56       * <li>CSR-5: Alternate Patient ID - CSR (CX) <b>optional </b>
57       * <li>CSR-6: Date/Time Of Patient Study Registration (TS) <b> </b>
58       * <li>CSR-7: Person Performing Study Registration (XCN) <b>optional repeating</b>
59       * <li>CSR-8: Study Authorizing Provider (XCN) <b> repeating</b>
60       * <li>CSR-9: Date/time Patient Study Consent Signed (TS) <b>optional </b>
61       * <li>CSR-10: Patient Study Eligibility Status (CE) <b>optional </b>
62       * <li>CSR-11: Study Randomization Date/time (TS) <b>optional repeating</b>
63       * <li>CSR-12: Randomized Study Arm (CE) <b>optional repeating</b>
64       * <li>CSR-13: Stratum for Study Randomization (CE) <b>optional repeating</b>
65       * <li>CSR-14: Patient Evaluability Status (CE) <b>optional </b>
66       * <li>CSR-15: Date/time Ended Study (TS) <b>optional </b>
67       * <li>CSR-16: Reason Ended Study (CE) <b>optional </b>
68   * </ul>
69   */
70  @SuppressWarnings("unused")
71  public class CSR extends AbstractSegment {
72  
73      /** 
74       * Creates a new CSR segment
75       */
76      public CSR(Group parent, ModelClassFactory factory) {
77         super(parent, factory);
78         init(factory);
79      }
80  
81      private void init(ModelClassFactory factory) {
82         try {
83                                    this.add(EI.class, true, 1, 60, new Object[]{ getMessage() }, "Sponsor Study ID");
84                                    this.add(EI.class, false, 1, 60, new Object[]{ getMessage() }, "Alternate Study ID");
85                                    this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Institution Registering the Patient");
86                                    this.add(CX.class, true, 1, 30, new Object[]{ getMessage() }, "Sponsor Patient ID");
87                                    this.add(CX.class, false, 1, 30, new Object[]{ getMessage() }, "Alternate Patient ID - CSR");
88                                    this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Date/Time Of Patient Study Registration");
89                                    this.add(XCN.class, false, 0, 60, new Object[]{ getMessage() }, "Person Performing Study Registration");
90                                    this.add(XCN.class, true, 0, 60, new Object[]{ getMessage() }, "Study Authorizing Provider");
91                                    this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/time Patient Study Consent Signed");
92                                    this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Patient Study Eligibility Status");
93                                    this.add(TS.class, false, 3, 26, new Object[]{ getMessage() }, "Study Randomization Date/time");
94                                    this.add(CE.class, false, 3, 200, new Object[]{ getMessage() }, "Randomized Study Arm");
95                                    this.add(CE.class, false, 3, 200, new Object[]{ getMessage() }, "Stratum for Study Randomization");
96                                    this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Patient Evaluability Status");
97                                    this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/time Ended Study");
98                                    this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Reason Ended Study");
99         } 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 CE getInstitutionRegisteringThePatient() { 
151 		CE 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 CE getCsr3_InstitutionRegisteringThePatient() { 
160 		CE 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 TS getDateTimeOfPatientStudyRegistration() { 
211 		TS 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 TS getCsr6_DateTimeOfPatientStudyRegistration() { 
220 		TS 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 TS getDateTimePatientStudyConsentSigned() { 
449 		TS 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 TS getCsr9_DateTimePatientStudyConsentSigned() { 
458 		TS 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 CE getPatientStudyEligibilityStatus() { 
469 		CE 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 CE getCsr10_PatientStudyEligibilityStatus() { 
478 		CE 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 TS[] getStudyRandomizationDateTime() {
487     	TS[] retVal = this.getTypedField(11, new TS[0]);
488     	return retVal;
489     }
490 
491 
492     /**
493      * Returns all repetitions of Study Randomization Date/time (CSR-11).
494      */
495     public TS[] getCsr11_StudyRandomizationDateTime() {
496     	TS[] retVal = this.getTypedField(11, new TS[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 TS getStudyRandomizationDateTime(int rep) { 
518 		TS 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 TS getCsr11_StudyRandomizationDateTime(int rep) { 
529 		TS 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 TS insertStudyRandomizationDateTime(int rep) throws HL7Exception { 
551         return (TS) 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 TS insertCsr11_StudyRandomizationDateTime(int rep) throws HL7Exception { 
563         return (TS) 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 TS removeStudyRandomizationDateTime(int rep) throws HL7Exception { 
575         return (TS) 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 TS removeCsr11_StudyRandomizationDateTime(int rep) throws HL7Exception { 
587         return (TS) super.removeRepetition(11, rep);
588     }
589 
590 
591 
592     /**
593      * Returns all repetitions of Randomized Study Arm (CSR-12).
594      */
595     public CE[] getRandomizedStudyArm() {
596     	CE[] retVal = this.getTypedField(12, new CE[0]);
597     	return retVal;
598     }
599 
600 
601     /**
602      * Returns all repetitions of Randomized Study Arm (CSR-12).
603      */
604     public CE[] getCsr12_RandomizedStudyArm() {
605     	CE[] retVal = this.getTypedField(12, new CE[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 CE getRandomizedStudyArm(int rep) { 
627 		CE 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 CE getCsr12_RandomizedStudyArm(int rep) { 
638 		CE 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 CE insertRandomizedStudyArm(int rep) throws HL7Exception { 
660         return (CE) 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 CE insertCsr12_RandomizedStudyArm(int rep) throws HL7Exception { 
672         return (CE) 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 CE removeRandomizedStudyArm(int rep) throws HL7Exception { 
684         return (CE) 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 CE removeCsr12_RandomizedStudyArm(int rep) throws HL7Exception { 
696         return (CE) super.removeRepetition(12, rep);
697     }
698 
699 
700 
701     /**
702      * Returns all repetitions of Stratum for Study Randomization (CSR-13).
703      */
704     public CE[] getStratumForStudyRandomization() {
705     	CE[] retVal = this.getTypedField(13, new CE[0]);
706     	return retVal;
707     }
708 
709 
710     /**
711      * Returns all repetitions of Stratum for Study Randomization (CSR-13).
712      */
713     public CE[] getCsr13_StratumForStudyRandomization() {
714     	CE[] retVal = this.getTypedField(13, new CE[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 CE getStratumForStudyRandomization(int rep) { 
736 		CE 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 CE getCsr13_StratumForStudyRandomization(int rep) { 
747 		CE 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 CE insertStratumForStudyRandomization(int rep) throws HL7Exception { 
769         return (CE) 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 CE insertCsr13_StratumForStudyRandomization(int rep) throws HL7Exception { 
781         return (CE) 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 CE removeStratumForStudyRandomization(int rep) throws HL7Exception { 
793         return (CE) 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 CE removeCsr13_StratumForStudyRandomization(int rep) throws HL7Exception { 
805         return (CE) 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 CE getPatientEvaluabilityStatus() { 
816 		CE 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 CE getCsr14_PatientEvaluabilityStatus() { 
825 		CE 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 TS getDateTimeEndedStudy() { 
836 		TS 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 TS getCsr15_DateTimeEndedStudy() { 
845 		TS 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 CE getReasonEndedStudy() { 
856 		CE 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 CE getCsr16_ReasonEndedStudy() { 
865 		CE 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 CE(getMessage());
879           case 3: return new CX(getMessage());
880           case 4: return new CX(getMessage());
881           case 5: return new TS(getMessage());
882           case 6: return new XCN(getMessage());
883           case 7: return new XCN(getMessage());
884           case 8: return new TS(getMessage());
885           case 9: return new CE(getMessage());
886           case 10: return new TS(getMessage());
887           case 11: return new CE(getMessage());
888           case 12: return new CE(getMessage());
889           case 13: return new CE(getMessage());
890           case 14: return new TS(getMessage());
891           case 15: return new CE(getMessage());
892           default: return null;
893        }
894    }
895 
896 
897 }
898