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.v281.segment;
35  
36  // import ca.uhn.hl7v2.model.v281.group.*;
37  import ca.uhn.hl7v2.model.v281.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 OM4 message segment (Observations that Require Specimens). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>OM4-1: Sequence Number - Test/Observation Master File (NM) <b>optional </b>
53       * <li>OM4-2: Derived Specimen (ID) <b>optional </b>
54       * <li>OM4-3: Container Description (TX) <b>optional repeating</b>
55       * <li>OM4-4: Container Volume (NM) <b>optional repeating</b>
56       * <li>OM4-5: Container Units (CWE) <b>optional repeating</b>
57       * <li>OM4-6: Specimen (CWE) <b>optional </b>
58       * <li>OM4-7: Additive (CWE) <b>optional </b>
59       * <li>OM4-8: Preparation (TX) <b>optional </b>
60       * <li>OM4-9: Special Handling Requirements (TX) <b>optional </b>
61       * <li>OM4-10: Normal Collection Volume (CQ) <b>optional </b>
62       * <li>OM4-11: Minimum Collection Volume (CQ) <b>optional </b>
63       * <li>OM4-12: Specimen Requirements (TX) <b>optional </b>
64       * <li>OM4-13: Specimen Priorities (ID) <b>optional repeating</b>
65       * <li>OM4-14: Specimen Retention Time (CQ) <b>optional </b>
66       * <li>OM4-15: Specimen Handling Code (CWE) <b>optional repeating</b>
67       * <li>OM4-16: Specimen Preference (ID) <b>optional </b>
68       * <li>OM4-17: Preferred Specimen/Attribture Sequence ID (NM) <b>optional </b>
69       * <li>OM4-18: Taxonomic Classification Code (CWE) <b>optional repeating</b>
70   * </ul>
71   */
72  @SuppressWarnings("unused")
73  public class OM4 extends AbstractSegment {
74  
75      /** 
76       * Creates a new OM4 segment
77       */
78      public OM4(Group parent, ModelClassFactory factory) {
79         super(parent, factory);
80         init(factory);
81      }
82  
83      private void init(ModelClassFactory factory) {
84         try {
85                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Sequence Number - Test/Observation Master File");
86                                                this.add(ID.class, false, 1, 0, new Object[]{ getMessage(), new Integer(170) }, "Derived Specimen");
87                                    this.add(TX.class, false, 0, 0, new Object[]{ getMessage() }, "Container Description");
88                                    this.add(NM.class, false, 0, 0, new Object[]{ getMessage() }, "Container Volume");
89                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Container Units");
90                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Specimen");
91                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Additive");
92                                    this.add(TX.class, false, 1, 0, new Object[]{ getMessage() }, "Preparation");
93                                    this.add(TX.class, false, 1, 0, new Object[]{ getMessage() }, "Special Handling Requirements");
94                                    this.add(CQ.class, false, 1, 0, new Object[]{ getMessage() }, "Normal Collection Volume");
95                                    this.add(CQ.class, false, 1, 0, new Object[]{ getMessage() }, "Minimum Collection Volume");
96                                    this.add(TX.class, false, 1, 0, new Object[]{ getMessage() }, "Specimen Requirements");
97                                                this.add(ID.class, false, 0, 0, new Object[]{ getMessage(), new Integer(27) }, "Specimen Priorities");
98                                    this.add(CQ.class, false, 1, 0, new Object[]{ getMessage() }, "Specimen Retention Time");
99                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Specimen Handling Code");
100                                               this.add(ID.class, false, 1, 0, new Object[]{ getMessage(), new Integer(920) }, "Specimen Preference");
101                                   this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Preferred Specimen/Attribture Sequence ID");
102                                   this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Taxonomic Classification Code");
103        } catch(HL7Exception e) {
104           log.error("Unexpected error creating OM4 - this is probably a bug in the source code generator.", e);
105        }
106     }
107 
108 
109 
110     /**
111      * Returns
112      * OM4-1: "Sequence Number - Test/Observation Master File" - creates it if necessary
113      */
114     public NM getSequenceNumberTestObservationMasterFile() { 
115 		NM retVal = this.getTypedField(1, 0);
116 		return retVal;
117     }
118     
119     /**
120      * Returns
121      * OM4-1: "Sequence Number - Test/Observation Master File" - creates it if necessary
122      */
123     public NM getOm41_SequenceNumberTestObservationMasterFile() { 
124 		NM retVal = this.getTypedField(1, 0);
125 		return retVal;
126     }
127 
128 
129 
130     /**
131      * Returns
132      * OM4-2: "Derived Specimen" - creates it if necessary
133      */
134     public ID getDerivedSpecimen() { 
135 		ID retVal = this.getTypedField(2, 0);
136 		return retVal;
137     }
138     
139     /**
140      * Returns
141      * OM4-2: "Derived Specimen" - creates it if necessary
142      */
143     public ID getOm42_DerivedSpecimen() { 
144 		ID retVal = this.getTypedField(2, 0);
145 		return retVal;
146     }
147 
148 
149     /**
150      * Returns all repetitions of Container Description (OM4-3).
151      */
152     public TX[] getContainerDescription() {
153     	TX[] retVal = this.getTypedField(3, new TX[0]);
154     	return retVal;
155     }
156 
157 
158     /**
159      * Returns all repetitions of Container Description (OM4-3).
160      */
161     public TX[] getOm43_ContainerDescription() {
162     	TX[] retVal = this.getTypedField(3, new TX[0]);
163     	return retVal;
164     }
165 
166 
167     /**
168      * Returns a count of the current number of repetitions of Container Description (OM4-3).
169      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
170      * it will return zero.
171      */
172     public int getContainerDescriptionReps() {
173     	return this.getReps(3);
174     }
175 
176 
177     /**
178      * Returns a specific repetition of
179      * OM4-3: "Container Description" - creates it if necessary
180      *
181      * @param rep The repetition index (0-indexed)
182      */
183     public TX getContainerDescription(int rep) { 
184 		TX retVal = this.getTypedField(3, rep);
185 		return retVal;
186     }
187 
188     /**
189      * Returns a specific repetition of
190      * OM4-3: "Container Description" - creates it if necessary
191      *
192      * @param rep The repetition index (0-indexed)
193      */
194     public TX getOm43_ContainerDescription(int rep) { 
195 		TX retVal = this.getTypedField(3, rep);
196 		return retVal;
197     }
198 
199     /**
200      * Returns a count of the current number of repetitions of Container Description (OM4-3).
201      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
202      * it will return zero.
203      */
204     public int getOm43_ContainerDescriptionReps() {
205     	return this.getReps(3);
206     }
207 
208 
209     /**
210      * Inserts a repetition of
211      * OM4-3: "Container Description" at a specific index
212      *
213      * @param rep The repetition index (0-indexed)
214      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
215      */
216     public TX insertContainerDescription(int rep) throws HL7Exception { 
217         return (TX) super.insertRepetition(3, rep);
218     }
219 
220 
221     /**
222      * Inserts a repetition of
223      * OM4-3: "Container Description" at a specific index
224      *
225      * @param rep The repetition index (0-indexed)
226      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
227      */
228     public TX insertOm43_ContainerDescription(int rep) throws HL7Exception { 
229         return (TX) super.insertRepetition(3, rep);
230     }
231 
232 
233     /**
234      * Removes a repetition of
235      * OM4-3: "Container Description" at a specific index
236      *
237      * @param rep The repetition index (0-indexed)
238      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
239      */
240     public TX removeContainerDescription(int rep) throws HL7Exception { 
241         return (TX) super.removeRepetition(3, rep);
242     }
243 
244 
245     /**
246      * Removes a repetition of
247      * OM4-3: "Container Description" at a specific index
248      *
249      * @param rep The repetition index (0-indexed)
250      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
251      */
252     public TX removeOm43_ContainerDescription(int rep) throws HL7Exception { 
253         return (TX) super.removeRepetition(3, rep);
254     }
255 
256 
257 
258     /**
259      * Returns all repetitions of Container Volume (OM4-4).
260      */
261     public NM[] getContainerVolume() {
262     	NM[] retVal = this.getTypedField(4, new NM[0]);
263     	return retVal;
264     }
265 
266 
267     /**
268      * Returns all repetitions of Container Volume (OM4-4).
269      */
270     public NM[] getOm44_ContainerVolume() {
271     	NM[] retVal = this.getTypedField(4, new NM[0]);
272     	return retVal;
273     }
274 
275 
276     /**
277      * Returns a count of the current number of repetitions of Container Volume (OM4-4).
278      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
279      * it will return zero.
280      */
281     public int getContainerVolumeReps() {
282     	return this.getReps(4);
283     }
284 
285 
286     /**
287      * Returns a specific repetition of
288      * OM4-4: "Container Volume" - creates it if necessary
289      *
290      * @param rep The repetition index (0-indexed)
291      */
292     public NM getContainerVolume(int rep) { 
293 		NM retVal = this.getTypedField(4, rep);
294 		return retVal;
295     }
296 
297     /**
298      * Returns a specific repetition of
299      * OM4-4: "Container Volume" - creates it if necessary
300      *
301      * @param rep The repetition index (0-indexed)
302      */
303     public NM getOm44_ContainerVolume(int rep) { 
304 		NM retVal = this.getTypedField(4, rep);
305 		return retVal;
306     }
307 
308     /**
309      * Returns a count of the current number of repetitions of Container Volume (OM4-4).
310      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
311      * it will return zero.
312      */
313     public int getOm44_ContainerVolumeReps() {
314     	return this.getReps(4);
315     }
316 
317 
318     /**
319      * Inserts a repetition of
320      * OM4-4: "Container Volume" at a specific index
321      *
322      * @param rep The repetition index (0-indexed)
323      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
324      */
325     public NM insertContainerVolume(int rep) throws HL7Exception { 
326         return (NM) super.insertRepetition(4, rep);
327     }
328 
329 
330     /**
331      * Inserts a repetition of
332      * OM4-4: "Container Volume" at a specific index
333      *
334      * @param rep The repetition index (0-indexed)
335      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
336      */
337     public NM insertOm44_ContainerVolume(int rep) throws HL7Exception { 
338         return (NM) super.insertRepetition(4, rep);
339     }
340 
341 
342     /**
343      * Removes a repetition of
344      * OM4-4: "Container Volume" at a specific index
345      *
346      * @param rep The repetition index (0-indexed)
347      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
348      */
349     public NM removeContainerVolume(int rep) throws HL7Exception { 
350         return (NM) super.removeRepetition(4, rep);
351     }
352 
353 
354     /**
355      * Removes a repetition of
356      * OM4-4: "Container Volume" at a specific index
357      *
358      * @param rep The repetition index (0-indexed)
359      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
360      */
361     public NM removeOm44_ContainerVolume(int rep) throws HL7Exception { 
362         return (NM) super.removeRepetition(4, rep);
363     }
364 
365 
366 
367     /**
368      * Returns all repetitions of Container Units (OM4-5).
369      */
370     public CWE[] getContainerUnits() {
371     	CWE[] retVal = this.getTypedField(5, new CWE[0]);
372     	return retVal;
373     }
374 
375 
376     /**
377      * Returns all repetitions of Container Units (OM4-5).
378      */
379     public CWE[] getOm45_ContainerUnits() {
380     	CWE[] retVal = this.getTypedField(5, new CWE[0]);
381     	return retVal;
382     }
383 
384 
385     /**
386      * Returns a count of the current number of repetitions of Container Units (OM4-5).
387      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
388      * it will return zero.
389      */
390     public int getContainerUnitsReps() {
391     	return this.getReps(5);
392     }
393 
394 
395     /**
396      * Returns a specific repetition of
397      * OM4-5: "Container Units" - creates it if necessary
398      *
399      * @param rep The repetition index (0-indexed)
400      */
401     public CWE getContainerUnits(int rep) { 
402 		CWE retVal = this.getTypedField(5, rep);
403 		return retVal;
404     }
405 
406     /**
407      * Returns a specific repetition of
408      * OM4-5: "Container Units" - creates it if necessary
409      *
410      * @param rep The repetition index (0-indexed)
411      */
412     public CWE getOm45_ContainerUnits(int rep) { 
413 		CWE retVal = this.getTypedField(5, rep);
414 		return retVal;
415     }
416 
417     /**
418      * Returns a count of the current number of repetitions of Container Units (OM4-5).
419      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
420      * it will return zero.
421      */
422     public int getOm45_ContainerUnitsReps() {
423     	return this.getReps(5);
424     }
425 
426 
427     /**
428      * Inserts a repetition of
429      * OM4-5: "Container Units" at a specific index
430      *
431      * @param rep The repetition index (0-indexed)
432      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
433      */
434     public CWE insertContainerUnits(int rep) throws HL7Exception { 
435         return (CWE) super.insertRepetition(5, rep);
436     }
437 
438 
439     /**
440      * Inserts a repetition of
441      * OM4-5: "Container Units" at a specific index
442      *
443      * @param rep The repetition index (0-indexed)
444      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
445      */
446     public CWE insertOm45_ContainerUnits(int rep) throws HL7Exception { 
447         return (CWE) super.insertRepetition(5, rep);
448     }
449 
450 
451     /**
452      * Removes a repetition of
453      * OM4-5: "Container Units" at a specific index
454      *
455      * @param rep The repetition index (0-indexed)
456      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
457      */
458     public CWE removeContainerUnits(int rep) throws HL7Exception { 
459         return (CWE) super.removeRepetition(5, rep);
460     }
461 
462 
463     /**
464      * Removes a repetition of
465      * OM4-5: "Container Units" at a specific index
466      *
467      * @param rep The repetition index (0-indexed)
468      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
469      */
470     public CWE removeOm45_ContainerUnits(int rep) throws HL7Exception { 
471         return (CWE) super.removeRepetition(5, rep);
472     }
473 
474 
475 
476 
477     /**
478      * Returns
479      * OM4-6: "Specimen" - creates it if necessary
480      */
481     public CWE getSpecimen() { 
482 		CWE retVal = this.getTypedField(6, 0);
483 		return retVal;
484     }
485     
486     /**
487      * Returns
488      * OM4-6: "Specimen" - creates it if necessary
489      */
490     public CWE getOm46_Specimen() { 
491 		CWE retVal = this.getTypedField(6, 0);
492 		return retVal;
493     }
494 
495 
496 
497     /**
498      * Returns
499      * OM4-7: "Additive" - creates it if necessary
500      */
501     public CWE getAdditive() { 
502 		CWE retVal = this.getTypedField(7, 0);
503 		return retVal;
504     }
505     
506     /**
507      * Returns
508      * OM4-7: "Additive" - creates it if necessary
509      */
510     public CWE getOm47_Additive() { 
511 		CWE retVal = this.getTypedField(7, 0);
512 		return retVal;
513     }
514 
515 
516 
517     /**
518      * Returns
519      * OM4-8: "Preparation" - creates it if necessary
520      */
521     public TX getPreparation() { 
522 		TX retVal = this.getTypedField(8, 0);
523 		return retVal;
524     }
525     
526     /**
527      * Returns
528      * OM4-8: "Preparation" - creates it if necessary
529      */
530     public TX getOm48_Preparation() { 
531 		TX retVal = this.getTypedField(8, 0);
532 		return retVal;
533     }
534 
535 
536 
537     /**
538      * Returns
539      * OM4-9: "Special Handling Requirements" - creates it if necessary
540      */
541     public TX getSpecialHandlingRequirements() { 
542 		TX retVal = this.getTypedField(9, 0);
543 		return retVal;
544     }
545     
546     /**
547      * Returns
548      * OM4-9: "Special Handling Requirements" - creates it if necessary
549      */
550     public TX getOm49_SpecialHandlingRequirements() { 
551 		TX retVal = this.getTypedField(9, 0);
552 		return retVal;
553     }
554 
555 
556 
557     /**
558      * Returns
559      * OM4-10: "Normal Collection Volume" - creates it if necessary
560      */
561     public CQ getNormalCollectionVolume() { 
562 		CQ retVal = this.getTypedField(10, 0);
563 		return retVal;
564     }
565     
566     /**
567      * Returns
568      * OM4-10: "Normal Collection Volume" - creates it if necessary
569      */
570     public CQ getOm410_NormalCollectionVolume() { 
571 		CQ retVal = this.getTypedField(10, 0);
572 		return retVal;
573     }
574 
575 
576 
577     /**
578      * Returns
579      * OM4-11: "Minimum Collection Volume" - creates it if necessary
580      */
581     public CQ getMinimumCollectionVolume() { 
582 		CQ retVal = this.getTypedField(11, 0);
583 		return retVal;
584     }
585     
586     /**
587      * Returns
588      * OM4-11: "Minimum Collection Volume" - creates it if necessary
589      */
590     public CQ getOm411_MinimumCollectionVolume() { 
591 		CQ retVal = this.getTypedField(11, 0);
592 		return retVal;
593     }
594 
595 
596 
597     /**
598      * Returns
599      * OM4-12: "Specimen Requirements" - creates it if necessary
600      */
601     public TX getSpecimenRequirements() { 
602 		TX retVal = this.getTypedField(12, 0);
603 		return retVal;
604     }
605     
606     /**
607      * Returns
608      * OM4-12: "Specimen Requirements" - creates it if necessary
609      */
610     public TX getOm412_SpecimenRequirements() { 
611 		TX retVal = this.getTypedField(12, 0);
612 		return retVal;
613     }
614 
615 
616     /**
617      * Returns all repetitions of Specimen Priorities (OM4-13).
618      */
619     public ID[] getSpecimenPriorities() {
620     	ID[] retVal = this.getTypedField(13, new ID[0]);
621     	return retVal;
622     }
623 
624 
625     /**
626      * Returns all repetitions of Specimen Priorities (OM4-13).
627      */
628     public ID[] getOm413_SpecimenPriorities() {
629     	ID[] retVal = this.getTypedField(13, new ID[0]);
630     	return retVal;
631     }
632 
633 
634     /**
635      * Returns a count of the current number of repetitions of Specimen Priorities (OM4-13).
636      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
637      * it will return zero.
638      */
639     public int getSpecimenPrioritiesReps() {
640     	return this.getReps(13);
641     }
642 
643 
644     /**
645      * Returns a specific repetition of
646      * OM4-13: "Specimen Priorities" - creates it if necessary
647      *
648      * @param rep The repetition index (0-indexed)
649      */
650     public ID getSpecimenPriorities(int rep) { 
651 		ID retVal = this.getTypedField(13, rep);
652 		return retVal;
653     }
654 
655     /**
656      * Returns a specific repetition of
657      * OM4-13: "Specimen Priorities" - creates it if necessary
658      *
659      * @param rep The repetition index (0-indexed)
660      */
661     public ID getOm413_SpecimenPriorities(int rep) { 
662 		ID retVal = this.getTypedField(13, rep);
663 		return retVal;
664     }
665 
666     /**
667      * Returns a count of the current number of repetitions of Specimen Priorities (OM4-13).
668      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
669      * it will return zero.
670      */
671     public int getOm413_SpecimenPrioritiesReps() {
672     	return this.getReps(13);
673     }
674 
675 
676     /**
677      * Inserts a repetition of
678      * OM4-13: "Specimen Priorities" 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 ID insertSpecimenPriorities(int rep) throws HL7Exception { 
684         return (ID) super.insertRepetition(13, rep);
685     }
686 
687 
688     /**
689      * Inserts a repetition of
690      * OM4-13: "Specimen Priorities" 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 ID insertOm413_SpecimenPriorities(int rep) throws HL7Exception { 
696         return (ID) super.insertRepetition(13, rep);
697     }
698 
699 
700     /**
701      * Removes a repetition of
702      * OM4-13: "Specimen Priorities" at a specific index
703      *
704      * @param rep The repetition index (0-indexed)
705      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
706      */
707     public ID removeSpecimenPriorities(int rep) throws HL7Exception { 
708         return (ID) super.removeRepetition(13, rep);
709     }
710 
711 
712     /**
713      * Removes a repetition of
714      * OM4-13: "Specimen Priorities" at a specific index
715      *
716      * @param rep The repetition index (0-indexed)
717      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
718      */
719     public ID removeOm413_SpecimenPriorities(int rep) throws HL7Exception { 
720         return (ID) super.removeRepetition(13, rep);
721     }
722 
723 
724 
725 
726     /**
727      * Returns
728      * OM4-14: "Specimen Retention Time" - creates it if necessary
729      */
730     public CQ getSpecimenRetentionTime() { 
731 		CQ retVal = this.getTypedField(14, 0);
732 		return retVal;
733     }
734     
735     /**
736      * Returns
737      * OM4-14: "Specimen Retention Time" - creates it if necessary
738      */
739     public CQ getOm414_SpecimenRetentionTime() { 
740 		CQ retVal = this.getTypedField(14, 0);
741 		return retVal;
742     }
743 
744 
745     /**
746      * Returns all repetitions of Specimen Handling Code (OM4-15).
747      */
748     public CWE[] getSpecimenHandlingCode() {
749     	CWE[] retVal = this.getTypedField(15, new CWE[0]);
750     	return retVal;
751     }
752 
753 
754     /**
755      * Returns all repetitions of Specimen Handling Code (OM4-15).
756      */
757     public CWE[] getOm415_SpecimenHandlingCode() {
758     	CWE[] retVal = this.getTypedField(15, new CWE[0]);
759     	return retVal;
760     }
761 
762 
763     /**
764      * Returns a count of the current number of repetitions of Specimen Handling Code (OM4-15).
765      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
766      * it will return zero.
767      */
768     public int getSpecimenHandlingCodeReps() {
769     	return this.getReps(15);
770     }
771 
772 
773     /**
774      * Returns a specific repetition of
775      * OM4-15: "Specimen Handling Code" - creates it if necessary
776      *
777      * @param rep The repetition index (0-indexed)
778      */
779     public CWE getSpecimenHandlingCode(int rep) { 
780 		CWE retVal = this.getTypedField(15, rep);
781 		return retVal;
782     }
783 
784     /**
785      * Returns a specific repetition of
786      * OM4-15: "Specimen Handling Code" - creates it if necessary
787      *
788      * @param rep The repetition index (0-indexed)
789      */
790     public CWE getOm415_SpecimenHandlingCode(int rep) { 
791 		CWE retVal = this.getTypedField(15, rep);
792 		return retVal;
793     }
794 
795     /**
796      * Returns a count of the current number of repetitions of Specimen Handling Code (OM4-15).
797      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
798      * it will return zero.
799      */
800     public int getOm415_SpecimenHandlingCodeReps() {
801     	return this.getReps(15);
802     }
803 
804 
805     /**
806      * Inserts a repetition of
807      * OM4-15: "Specimen Handling Code" at a specific index
808      *
809      * @param rep The repetition index (0-indexed)
810      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
811      */
812     public CWE insertSpecimenHandlingCode(int rep) throws HL7Exception { 
813         return (CWE) super.insertRepetition(15, rep);
814     }
815 
816 
817     /**
818      * Inserts a repetition of
819      * OM4-15: "Specimen Handling Code" at a specific index
820      *
821      * @param rep The repetition index (0-indexed)
822      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
823      */
824     public CWE insertOm415_SpecimenHandlingCode(int rep) throws HL7Exception { 
825         return (CWE) super.insertRepetition(15, rep);
826     }
827 
828 
829     /**
830      * Removes a repetition of
831      * OM4-15: "Specimen Handling Code" at a specific index
832      *
833      * @param rep The repetition index (0-indexed)
834      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
835      */
836     public CWE removeSpecimenHandlingCode(int rep) throws HL7Exception { 
837         return (CWE) super.removeRepetition(15, rep);
838     }
839 
840 
841     /**
842      * Removes a repetition of
843      * OM4-15: "Specimen Handling Code" at a specific index
844      *
845      * @param rep The repetition index (0-indexed)
846      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
847      */
848     public CWE removeOm415_SpecimenHandlingCode(int rep) throws HL7Exception { 
849         return (CWE) super.removeRepetition(15, rep);
850     }
851 
852 
853 
854 
855     /**
856      * Returns
857      * OM4-16: "Specimen Preference" - creates it if necessary
858      */
859     public ID getSpecimenPreference() { 
860 		ID retVal = this.getTypedField(16, 0);
861 		return retVal;
862     }
863     
864     /**
865      * Returns
866      * OM4-16: "Specimen Preference" - creates it if necessary
867      */
868     public ID getOm416_SpecimenPreference() { 
869 		ID retVal = this.getTypedField(16, 0);
870 		return retVal;
871     }
872 
873 
874 
875     /**
876      * Returns
877      * OM4-17: "Preferred Specimen/Attribture Sequence ID" - creates it if necessary
878      */
879     public NM getPreferredSpecimenAttribtureSequenceID() { 
880 		NM retVal = this.getTypedField(17, 0);
881 		return retVal;
882     }
883     
884     /**
885      * Returns
886      * OM4-17: "Preferred Specimen/Attribture Sequence ID" - creates it if necessary
887      */
888     public NM getOm417_PreferredSpecimenAttribtureSequenceID() { 
889 		NM retVal = this.getTypedField(17, 0);
890 		return retVal;
891     }
892 
893 
894     /**
895      * Returns all repetitions of Taxonomic Classification Code (OM4-18).
896      */
897     public CWE[] getTaxonomicClassificationCode() {
898     	CWE[] retVal = this.getTypedField(18, new CWE[0]);
899     	return retVal;
900     }
901 
902 
903     /**
904      * Returns all repetitions of Taxonomic Classification Code (OM4-18).
905      */
906     public CWE[] getOm418_TaxonomicClassificationCode() {
907     	CWE[] retVal = this.getTypedField(18, new CWE[0]);
908     	return retVal;
909     }
910 
911 
912     /**
913      * Returns a count of the current number of repetitions of Taxonomic Classification Code (OM4-18).
914      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
915      * it will return zero.
916      */
917     public int getTaxonomicClassificationCodeReps() {
918     	return this.getReps(18);
919     }
920 
921 
922     /**
923      * Returns a specific repetition of
924      * OM4-18: "Taxonomic Classification Code" - creates it if necessary
925      *
926      * @param rep The repetition index (0-indexed)
927      */
928     public CWE getTaxonomicClassificationCode(int rep) { 
929 		CWE retVal = this.getTypedField(18, rep);
930 		return retVal;
931     }
932 
933     /**
934      * Returns a specific repetition of
935      * OM4-18: "Taxonomic Classification Code" - creates it if necessary
936      *
937      * @param rep The repetition index (0-indexed)
938      */
939     public CWE getOm418_TaxonomicClassificationCode(int rep) { 
940 		CWE retVal = this.getTypedField(18, rep);
941 		return retVal;
942     }
943 
944     /**
945      * Returns a count of the current number of repetitions of Taxonomic Classification Code (OM4-18).
946      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
947      * it will return zero.
948      */
949     public int getOm418_TaxonomicClassificationCodeReps() {
950     	return this.getReps(18);
951     }
952 
953 
954     /**
955      * Inserts a repetition of
956      * OM4-18: "Taxonomic Classification Code" at a specific index
957      *
958      * @param rep The repetition index (0-indexed)
959      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
960      */
961     public CWE insertTaxonomicClassificationCode(int rep) throws HL7Exception { 
962         return (CWE) super.insertRepetition(18, rep);
963     }
964 
965 
966     /**
967      * Inserts a repetition of
968      * OM4-18: "Taxonomic Classification Code" at a specific index
969      *
970      * @param rep The repetition index (0-indexed)
971      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
972      */
973     public CWE insertOm418_TaxonomicClassificationCode(int rep) throws HL7Exception { 
974         return (CWE) super.insertRepetition(18, rep);
975     }
976 
977 
978     /**
979      * Removes a repetition of
980      * OM4-18: "Taxonomic Classification Code" at a specific index
981      *
982      * @param rep The repetition index (0-indexed)
983      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
984      */
985     public CWE removeTaxonomicClassificationCode(int rep) throws HL7Exception { 
986         return (CWE) super.removeRepetition(18, rep);
987     }
988 
989 
990     /**
991      * Removes a repetition of
992      * OM4-18: "Taxonomic Classification Code" at a specific index
993      *
994      * @param rep The repetition index (0-indexed)
995      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
996      */
997     public CWE removeOm418_TaxonomicClassificationCode(int rep) throws HL7Exception { 
998         return (CWE) super.removeRepetition(18, rep);
999     }
1000 
1001 
1002 
1003 
1004 
1005 
1006     /** {@inheritDoc} */   
1007     protected Type createNewTypeWithoutReflection(int field) {
1008        switch (field) {
1009           case 0: return new NM(getMessage());
1010           case 1: return new ID(getMessage(), new Integer( 170 ));
1011           case 2: return new TX(getMessage());
1012           case 3: return new NM(getMessage());
1013           case 4: return new CWE(getMessage());
1014           case 5: return new CWE(getMessage());
1015           case 6: return new CWE(getMessage());
1016           case 7: return new TX(getMessage());
1017           case 8: return new TX(getMessage());
1018           case 9: return new CQ(getMessage());
1019           case 10: return new CQ(getMessage());
1020           case 11: return new TX(getMessage());
1021           case 12: return new ID(getMessage(), new Integer( 27 ));
1022           case 13: return new CQ(getMessage());
1023           case 14: return new CWE(getMessage());
1024           case 15: return new ID(getMessage(), new Integer( 920 ));
1025           case 16: return new NM(getMessage());
1026           case 17: return new CWE(getMessage());
1027           default: return null;
1028        }
1029    }
1030 
1031 
1032 }
1033