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.v251.segment;
035
036// import ca.uhn.hl7v2.model.v251.group.*;
037import ca.uhn.hl7v2.model.v251.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 SPM message segment (Specimen). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>SPM-1: Set ID - SPM (SI) <b>optional </b>
053     * <li>SPM-2: Specimen ID (EIP) <b>optional </b>
054     * <li>SPM-3: Specimen Parent IDs (EIP) <b>optional repeating</b>
055     * <li>SPM-4: Specimen Type (CWE) <b> </b>
056     * <li>SPM-5: Specimen Type Modifier (CWE) <b>optional repeating</b>
057     * <li>SPM-6: Specimen Additives (CWE) <b>optional repeating</b>
058     * <li>SPM-7: Specimen Collection Method (CWE) <b>optional </b>
059     * <li>SPM-8: Specimen Source Site (CWE) <b>optional </b>
060     * <li>SPM-9: Specimen Source Site Modifier (CWE) <b>optional repeating</b>
061     * <li>SPM-10: Specimen Collection Site (CWE) <b>optional </b>
062     * <li>SPM-11: Specimen Role (CWE) <b>optional repeating</b>
063     * <li>SPM-12: Specimen Collection Amount (CQ) <b>optional </b>
064     * <li>SPM-13: Grouped Specimen Count (NM) <b>optional </b>
065     * <li>SPM-14: Specimen Description (ST) <b>optional repeating</b>
066     * <li>SPM-15: Specimen Handling Code (CWE) <b>optional repeating</b>
067     * <li>SPM-16: Specimen Risk Code (CWE) <b>optional repeating</b>
068     * <li>SPM-17: Specimen Collection Date/Time (DR) <b>optional </b>
069     * <li>SPM-18: Specimen Received Date/Time (TS) <b>optional </b>
070     * <li>SPM-19: Specimen Expiration Date/Time (TS) <b>optional </b>
071     * <li>SPM-20: Specimen Availability (ID) <b>optional </b>
072     * <li>SPM-21: Specimen Reject Reason (CWE) <b>optional repeating</b>
073     * <li>SPM-22: Specimen Quality (CWE) <b>optional </b>
074     * <li>SPM-23: Specimen Appropriateness (CWE) <b>optional </b>
075     * <li>SPM-24: Specimen Condition (CWE) <b>optional repeating</b>
076     * <li>SPM-25: Specimen Current Quantity (CQ) <b>optional </b>
077     * <li>SPM-26: Number of Specimen Containers (NM) <b>optional </b>
078     * <li>SPM-27: Container Type (CWE) <b>optional </b>
079     * <li>SPM-28: Container Condition (CWE) <b>optional </b>
080     * <li>SPM-29: Specimen Child Role (CWE) <b>optional </b>
081 * </ul>
082 */
083@SuppressWarnings("unused")
084public class SPM extends AbstractSegment {
085
086    /** 
087     * Creates a new SPM segment
088     */
089    public SPM(Group parent, ModelClassFactory factory) {
090       super(parent, factory);
091       init(factory);
092    }
093
094    private void init(ModelClassFactory factory) {
095       try {
096                                  this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - SPM");
097                                  this.add(EIP.class, false, 1, 80, new Object[]{ getMessage() }, "Specimen ID");
098                                  this.add(EIP.class, false, 0, 80, new Object[]{ getMessage() }, "Specimen Parent IDs");
099                                  this.add(CWE.class, true, 1, 250, new Object[]{ getMessage() }, "Specimen Type");
100                                  this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Specimen Type Modifier");
101                                  this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Specimen Additives");
102                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Specimen Collection Method");
103                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Specimen Source Site");
104                                  this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Specimen Source Site Modifier");
105                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Specimen Collection Site");
106                                  this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Specimen Role");
107                                  this.add(CQ.class, false, 1, 20, new Object[]{ getMessage() }, "Specimen Collection Amount");
108                                  this.add(NM.class, false, 1, 6, new Object[]{ getMessage() }, "Grouped Specimen Count");
109                                  this.add(ST.class, false, 0, 250, new Object[]{ getMessage() }, "Specimen Description");
110                                  this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Specimen Handling Code");
111                                  this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Specimen Risk Code");
112                                  this.add(DR.class, false, 1, 26, new Object[]{ getMessage() }, "Specimen Collection Date/Time");
113                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Specimen Received Date/Time");
114                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Specimen Expiration Date/Time");
115                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Specimen Availability");
116                                  this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Specimen Reject Reason");
117                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Specimen Quality");
118                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Specimen Appropriateness");
119                                  this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Specimen Condition");
120                                  this.add(CQ.class, false, 1, 20, new Object[]{ getMessage() }, "Specimen Current Quantity");
121                                  this.add(NM.class, false, 1, 4, new Object[]{ getMessage() }, "Number of Specimen Containers");
122                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Container Type");
123                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Container Condition");
124                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Specimen Child Role");
125       } catch(HL7Exception e) {
126          log.error("Unexpected error creating SPM - this is probably a bug in the source code generator.", e);
127       }
128    }
129
130
131
132    /**
133     * Returns
134     * SPM-1: "Set ID - SPM" - creates it if necessary
135     */
136    public SI getSetIDSPM() { 
137                SI retVal = this.getTypedField(1, 0);
138                return retVal;
139    }
140    
141    /**
142     * Returns
143     * SPM-1: "Set ID - SPM" - creates it if necessary
144     */
145    public SI getSpm1_SetIDSPM() { 
146                SI retVal = this.getTypedField(1, 0);
147                return retVal;
148    }
149
150
151
152    /**
153     * Returns
154     * SPM-2: "Specimen ID" - creates it if necessary
155     */
156    public EIP getSpecimenID() { 
157                EIP retVal = this.getTypedField(2, 0);
158                return retVal;
159    }
160    
161    /**
162     * Returns
163     * SPM-2: "Specimen ID" - creates it if necessary
164     */
165    public EIP getSpm2_SpecimenID() { 
166                EIP retVal = this.getTypedField(2, 0);
167                return retVal;
168    }
169
170
171    /**
172     * Returns all repetitions of Specimen Parent IDs (SPM-3).
173     */
174    public EIP[] getSpecimenParentIDs() {
175        EIP[] retVal = this.getTypedField(3, new EIP[0]);
176        return retVal;
177    }
178
179
180    /**
181     * Returns all repetitions of Specimen Parent IDs (SPM-3).
182     */
183    public EIP[] getSpm3_SpecimenParentIDs() {
184        EIP[] retVal = this.getTypedField(3, new EIP[0]);
185        return retVal;
186    }
187
188
189    /**
190     * Returns a count of the current number of repetitions of Specimen Parent IDs (SPM-3).
191     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
192     * it will return zero.
193     */
194    public int getSpecimenParentIDsReps() {
195        return this.getReps(3);
196    }
197
198
199    /**
200     * Returns a specific repetition of
201     * SPM-3: "Specimen Parent IDs" - creates it if necessary
202     *
203     * @param rep The repetition index (0-indexed)
204     */
205    public EIP getSpecimenParentIDs(int rep) { 
206                EIP retVal = this.getTypedField(3, rep);
207                return retVal;
208    }
209
210    /**
211     * Returns a specific repetition of
212     * SPM-3: "Specimen Parent IDs" - creates it if necessary
213     *
214     * @param rep The repetition index (0-indexed)
215     */
216    public EIP getSpm3_SpecimenParentIDs(int rep) { 
217                EIP retVal = this.getTypedField(3, rep);
218                return retVal;
219    }
220
221    /**
222     * Returns a count of the current number of repetitions of Specimen Parent IDs (SPM-3).
223     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
224     * it will return zero.
225     */
226    public int getSpm3_SpecimenParentIDsReps() {
227        return this.getReps(3);
228    }
229
230
231    /**
232     * Inserts a repetition of
233     * SPM-3: "Specimen Parent IDs" at a specific index
234     *
235     * @param rep The repetition index (0-indexed)
236     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
237     */
238    public EIP insertSpecimenParentIDs(int rep) throws HL7Exception { 
239        return (EIP) super.insertRepetition(3, rep);
240    }
241
242
243    /**
244     * Inserts a repetition of
245     * SPM-3: "Specimen Parent IDs" at a specific index
246     *
247     * @param rep The repetition index (0-indexed)
248     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
249     */
250    public EIP insertSpm3_SpecimenParentIDs(int rep) throws HL7Exception { 
251        return (EIP) super.insertRepetition(3, rep);
252    }
253
254
255    /**
256     * Removes a repetition of
257     * SPM-3: "Specimen Parent IDs" at a specific index
258     *
259     * @param rep The repetition index (0-indexed)
260     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
261     */
262    public EIP removeSpecimenParentIDs(int rep) throws HL7Exception { 
263        return (EIP) super.removeRepetition(3, rep);
264    }
265
266
267    /**
268     * Removes a repetition of
269     * SPM-3: "Specimen Parent IDs" at a specific index
270     *
271     * @param rep The repetition index (0-indexed)
272     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
273     */
274    public EIP removeSpm3_SpecimenParentIDs(int rep) throws HL7Exception { 
275        return (EIP) super.removeRepetition(3, rep);
276    }
277
278
279
280
281    /**
282     * Returns
283     * SPM-4: "Specimen Type" - creates it if necessary
284     */
285    public CWE getSpecimenType() { 
286                CWE retVal = this.getTypedField(4, 0);
287                return retVal;
288    }
289    
290    /**
291     * Returns
292     * SPM-4: "Specimen Type" - creates it if necessary
293     */
294    public CWE getSpm4_SpecimenType() { 
295                CWE retVal = this.getTypedField(4, 0);
296                return retVal;
297    }
298
299
300    /**
301     * Returns all repetitions of Specimen Type Modifier (SPM-5).
302     */
303    public CWE[] getSpecimenTypeModifier() {
304        CWE[] retVal = this.getTypedField(5, new CWE[0]);
305        return retVal;
306    }
307
308
309    /**
310     * Returns all repetitions of Specimen Type Modifier (SPM-5).
311     */
312    public CWE[] getSpm5_SpecimenTypeModifier() {
313        CWE[] retVal = this.getTypedField(5, new CWE[0]);
314        return retVal;
315    }
316
317
318    /**
319     * Returns a count of the current number of repetitions of Specimen Type Modifier (SPM-5).
320     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
321     * it will return zero.
322     */
323    public int getSpecimenTypeModifierReps() {
324        return this.getReps(5);
325    }
326
327
328    /**
329     * Returns a specific repetition of
330     * SPM-5: "Specimen Type Modifier" - creates it if necessary
331     *
332     * @param rep The repetition index (0-indexed)
333     */
334    public CWE getSpecimenTypeModifier(int rep) { 
335                CWE retVal = this.getTypedField(5, rep);
336                return retVal;
337    }
338
339    /**
340     * Returns a specific repetition of
341     * SPM-5: "Specimen Type Modifier" - creates it if necessary
342     *
343     * @param rep The repetition index (0-indexed)
344     */
345    public CWE getSpm5_SpecimenTypeModifier(int rep) { 
346                CWE retVal = this.getTypedField(5, rep);
347                return retVal;
348    }
349
350    /**
351     * Returns a count of the current number of repetitions of Specimen Type Modifier (SPM-5).
352     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
353     * it will return zero.
354     */
355    public int getSpm5_SpecimenTypeModifierReps() {
356        return this.getReps(5);
357    }
358
359
360    /**
361     * Inserts a repetition of
362     * SPM-5: "Specimen Type Modifier" at a specific index
363     *
364     * @param rep The repetition index (0-indexed)
365     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
366     */
367    public CWE insertSpecimenTypeModifier(int rep) throws HL7Exception { 
368        return (CWE) super.insertRepetition(5, rep);
369    }
370
371
372    /**
373     * Inserts a repetition of
374     * SPM-5: "Specimen Type Modifier" at a specific index
375     *
376     * @param rep The repetition index (0-indexed)
377     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
378     */
379    public CWE insertSpm5_SpecimenTypeModifier(int rep) throws HL7Exception { 
380        return (CWE) super.insertRepetition(5, rep);
381    }
382
383
384    /**
385     * Removes a repetition of
386     * SPM-5: "Specimen Type Modifier" at a specific index
387     *
388     * @param rep The repetition index (0-indexed)
389     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
390     */
391    public CWE removeSpecimenTypeModifier(int rep) throws HL7Exception { 
392        return (CWE) super.removeRepetition(5, rep);
393    }
394
395
396    /**
397     * Removes a repetition of
398     * SPM-5: "Specimen Type Modifier" at a specific index
399     *
400     * @param rep The repetition index (0-indexed)
401     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
402     */
403    public CWE removeSpm5_SpecimenTypeModifier(int rep) throws HL7Exception { 
404        return (CWE) super.removeRepetition(5, rep);
405    }
406
407
408
409    /**
410     * Returns all repetitions of Specimen Additives (SPM-6).
411     */
412    public CWE[] getSpecimenAdditives() {
413        CWE[] retVal = this.getTypedField(6, new CWE[0]);
414        return retVal;
415    }
416
417
418    /**
419     * Returns all repetitions of Specimen Additives (SPM-6).
420     */
421    public CWE[] getSpm6_SpecimenAdditives() {
422        CWE[] retVal = this.getTypedField(6, new CWE[0]);
423        return retVal;
424    }
425
426
427    /**
428     * Returns a count of the current number of repetitions of Specimen Additives (SPM-6).
429     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
430     * it will return zero.
431     */
432    public int getSpecimenAdditivesReps() {
433        return this.getReps(6);
434    }
435
436
437    /**
438     * Returns a specific repetition of
439     * SPM-6: "Specimen Additives" - creates it if necessary
440     *
441     * @param rep The repetition index (0-indexed)
442     */
443    public CWE getSpecimenAdditives(int rep) { 
444                CWE retVal = this.getTypedField(6, rep);
445                return retVal;
446    }
447
448    /**
449     * Returns a specific repetition of
450     * SPM-6: "Specimen Additives" - creates it if necessary
451     *
452     * @param rep The repetition index (0-indexed)
453     */
454    public CWE getSpm6_SpecimenAdditives(int rep) { 
455                CWE retVal = this.getTypedField(6, rep);
456                return retVal;
457    }
458
459    /**
460     * Returns a count of the current number of repetitions of Specimen Additives (SPM-6).
461     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
462     * it will return zero.
463     */
464    public int getSpm6_SpecimenAdditivesReps() {
465        return this.getReps(6);
466    }
467
468
469    /**
470     * Inserts a repetition of
471     * SPM-6: "Specimen Additives" at a specific index
472     *
473     * @param rep The repetition index (0-indexed)
474     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
475     */
476    public CWE insertSpecimenAdditives(int rep) throws HL7Exception { 
477        return (CWE) super.insertRepetition(6, rep);
478    }
479
480
481    /**
482     * Inserts a repetition of
483     * SPM-6: "Specimen Additives" at a specific index
484     *
485     * @param rep The repetition index (0-indexed)
486     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
487     */
488    public CWE insertSpm6_SpecimenAdditives(int rep) throws HL7Exception { 
489        return (CWE) super.insertRepetition(6, rep);
490    }
491
492
493    /**
494     * Removes a repetition of
495     * SPM-6: "Specimen Additives" at a specific index
496     *
497     * @param rep The repetition index (0-indexed)
498     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
499     */
500    public CWE removeSpecimenAdditives(int rep) throws HL7Exception { 
501        return (CWE) super.removeRepetition(6, rep);
502    }
503
504
505    /**
506     * Removes a repetition of
507     * SPM-6: "Specimen Additives" at a specific index
508     *
509     * @param rep The repetition index (0-indexed)
510     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
511     */
512    public CWE removeSpm6_SpecimenAdditives(int rep) throws HL7Exception { 
513        return (CWE) super.removeRepetition(6, rep);
514    }
515
516
517
518
519    /**
520     * Returns
521     * SPM-7: "Specimen Collection Method" - creates it if necessary
522     */
523    public CWE getSpecimenCollectionMethod() { 
524                CWE retVal = this.getTypedField(7, 0);
525                return retVal;
526    }
527    
528    /**
529     * Returns
530     * SPM-7: "Specimen Collection Method" - creates it if necessary
531     */
532    public CWE getSpm7_SpecimenCollectionMethod() { 
533                CWE retVal = this.getTypedField(7, 0);
534                return retVal;
535    }
536
537
538
539    /**
540     * Returns
541     * SPM-8: "Specimen Source Site" - creates it if necessary
542     */
543    public CWE getSpecimenSourceSite() { 
544                CWE retVal = this.getTypedField(8, 0);
545                return retVal;
546    }
547    
548    /**
549     * Returns
550     * SPM-8: "Specimen Source Site" - creates it if necessary
551     */
552    public CWE getSpm8_SpecimenSourceSite() { 
553                CWE retVal = this.getTypedField(8, 0);
554                return retVal;
555    }
556
557
558    /**
559     * Returns all repetitions of Specimen Source Site Modifier (SPM-9).
560     */
561    public CWE[] getSpecimenSourceSiteModifier() {
562        CWE[] retVal = this.getTypedField(9, new CWE[0]);
563        return retVal;
564    }
565
566
567    /**
568     * Returns all repetitions of Specimen Source Site Modifier (SPM-9).
569     */
570    public CWE[] getSpm9_SpecimenSourceSiteModifier() {
571        CWE[] retVal = this.getTypedField(9, new CWE[0]);
572        return retVal;
573    }
574
575
576    /**
577     * Returns a count of the current number of repetitions of Specimen Source Site Modifier (SPM-9).
578     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
579     * it will return zero.
580     */
581    public int getSpecimenSourceSiteModifierReps() {
582        return this.getReps(9);
583    }
584
585
586    /**
587     * Returns a specific repetition of
588     * SPM-9: "Specimen Source Site Modifier" - creates it if necessary
589     *
590     * @param rep The repetition index (0-indexed)
591     */
592    public CWE getSpecimenSourceSiteModifier(int rep) { 
593                CWE retVal = this.getTypedField(9, rep);
594                return retVal;
595    }
596
597    /**
598     * Returns a specific repetition of
599     * SPM-9: "Specimen Source Site Modifier" - creates it if necessary
600     *
601     * @param rep The repetition index (0-indexed)
602     */
603    public CWE getSpm9_SpecimenSourceSiteModifier(int rep) { 
604                CWE retVal = this.getTypedField(9, rep);
605                return retVal;
606    }
607
608    /**
609     * Returns a count of the current number of repetitions of Specimen Source Site Modifier (SPM-9).
610     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
611     * it will return zero.
612     */
613    public int getSpm9_SpecimenSourceSiteModifierReps() {
614        return this.getReps(9);
615    }
616
617
618    /**
619     * Inserts a repetition of
620     * SPM-9: "Specimen Source Site Modifier" at a specific index
621     *
622     * @param rep The repetition index (0-indexed)
623     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
624     */
625    public CWE insertSpecimenSourceSiteModifier(int rep) throws HL7Exception { 
626        return (CWE) super.insertRepetition(9, rep);
627    }
628
629
630    /**
631     * Inserts a repetition of
632     * SPM-9: "Specimen Source Site Modifier" at a specific index
633     *
634     * @param rep The repetition index (0-indexed)
635     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
636     */
637    public CWE insertSpm9_SpecimenSourceSiteModifier(int rep) throws HL7Exception { 
638        return (CWE) super.insertRepetition(9, rep);
639    }
640
641
642    /**
643     * Removes a repetition of
644     * SPM-9: "Specimen Source Site Modifier" at a specific index
645     *
646     * @param rep The repetition index (0-indexed)
647     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
648     */
649    public CWE removeSpecimenSourceSiteModifier(int rep) throws HL7Exception { 
650        return (CWE) super.removeRepetition(9, rep);
651    }
652
653
654    /**
655     * Removes a repetition of
656     * SPM-9: "Specimen Source Site Modifier" at a specific index
657     *
658     * @param rep The repetition index (0-indexed)
659     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
660     */
661    public CWE removeSpm9_SpecimenSourceSiteModifier(int rep) throws HL7Exception { 
662        return (CWE) super.removeRepetition(9, rep);
663    }
664
665
666
667
668    /**
669     * Returns
670     * SPM-10: "Specimen Collection Site" - creates it if necessary
671     */
672    public CWE getSpecimenCollectionSite() { 
673                CWE retVal = this.getTypedField(10, 0);
674                return retVal;
675    }
676    
677    /**
678     * Returns
679     * SPM-10: "Specimen Collection Site" - creates it if necessary
680     */
681    public CWE getSpm10_SpecimenCollectionSite() { 
682                CWE retVal = this.getTypedField(10, 0);
683                return retVal;
684    }
685
686
687    /**
688     * Returns all repetitions of Specimen Role (SPM-11).
689     */
690    public CWE[] getSpecimenRole() {
691        CWE[] retVal = this.getTypedField(11, new CWE[0]);
692        return retVal;
693    }
694
695
696    /**
697     * Returns all repetitions of Specimen Role (SPM-11).
698     */
699    public CWE[] getSpm11_SpecimenRole() {
700        CWE[] retVal = this.getTypedField(11, new CWE[0]);
701        return retVal;
702    }
703
704
705    /**
706     * Returns a count of the current number of repetitions of Specimen Role (SPM-11).
707     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
708     * it will return zero.
709     */
710    public int getSpecimenRoleReps() {
711        return this.getReps(11);
712    }
713
714
715    /**
716     * Returns a specific repetition of
717     * SPM-11: "Specimen Role" - creates it if necessary
718     *
719     * @param rep The repetition index (0-indexed)
720     */
721    public CWE getSpecimenRole(int rep) { 
722                CWE retVal = this.getTypedField(11, rep);
723                return retVal;
724    }
725
726    /**
727     * Returns a specific repetition of
728     * SPM-11: "Specimen Role" - creates it if necessary
729     *
730     * @param rep The repetition index (0-indexed)
731     */
732    public CWE getSpm11_SpecimenRole(int rep) { 
733                CWE retVal = this.getTypedField(11, rep);
734                return retVal;
735    }
736
737    /**
738     * Returns a count of the current number of repetitions of Specimen Role (SPM-11).
739     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
740     * it will return zero.
741     */
742    public int getSpm11_SpecimenRoleReps() {
743        return this.getReps(11);
744    }
745
746
747    /**
748     * Inserts a repetition of
749     * SPM-11: "Specimen Role" at a specific index
750     *
751     * @param rep The repetition index (0-indexed)
752     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
753     */
754    public CWE insertSpecimenRole(int rep) throws HL7Exception { 
755        return (CWE) super.insertRepetition(11, rep);
756    }
757
758
759    /**
760     * Inserts a repetition of
761     * SPM-11: "Specimen Role" at a specific index
762     *
763     * @param rep The repetition index (0-indexed)
764     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
765     */
766    public CWE insertSpm11_SpecimenRole(int rep) throws HL7Exception { 
767        return (CWE) super.insertRepetition(11, rep);
768    }
769
770
771    /**
772     * Removes a repetition of
773     * SPM-11: "Specimen Role" at a specific index
774     *
775     * @param rep The repetition index (0-indexed)
776     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
777     */
778    public CWE removeSpecimenRole(int rep) throws HL7Exception { 
779        return (CWE) super.removeRepetition(11, rep);
780    }
781
782
783    /**
784     * Removes a repetition of
785     * SPM-11: "Specimen Role" at a specific index
786     *
787     * @param rep The repetition index (0-indexed)
788     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
789     */
790    public CWE removeSpm11_SpecimenRole(int rep) throws HL7Exception { 
791        return (CWE) super.removeRepetition(11, rep);
792    }
793
794
795
796
797    /**
798     * Returns
799     * SPM-12: "Specimen Collection Amount" - creates it if necessary
800     */
801    public CQ getSpecimenCollectionAmount() { 
802                CQ retVal = this.getTypedField(12, 0);
803                return retVal;
804    }
805    
806    /**
807     * Returns
808     * SPM-12: "Specimen Collection Amount" - creates it if necessary
809     */
810    public CQ getSpm12_SpecimenCollectionAmount() { 
811                CQ retVal = this.getTypedField(12, 0);
812                return retVal;
813    }
814
815
816
817    /**
818     * Returns
819     * SPM-13: "Grouped Specimen Count" - creates it if necessary
820     */
821    public NM getGroupedSpecimenCount() { 
822                NM retVal = this.getTypedField(13, 0);
823                return retVal;
824    }
825    
826    /**
827     * Returns
828     * SPM-13: "Grouped Specimen Count" - creates it if necessary
829     */
830    public NM getSpm13_GroupedSpecimenCount() { 
831                NM retVal = this.getTypedField(13, 0);
832                return retVal;
833    }
834
835
836    /**
837     * Returns all repetitions of Specimen Description (SPM-14).
838     */
839    public ST[] getSpecimenDescription() {
840        ST[] retVal = this.getTypedField(14, new ST[0]);
841        return retVal;
842    }
843
844
845    /**
846     * Returns all repetitions of Specimen Description (SPM-14).
847     */
848    public ST[] getSpm14_SpecimenDescription() {
849        ST[] retVal = this.getTypedField(14, new ST[0]);
850        return retVal;
851    }
852
853
854    /**
855     * Returns a count of the current number of repetitions of Specimen Description (SPM-14).
856     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
857     * it will return zero.
858     */
859    public int getSpecimenDescriptionReps() {
860        return this.getReps(14);
861    }
862
863
864    /**
865     * Returns a specific repetition of
866     * SPM-14: "Specimen Description" - creates it if necessary
867     *
868     * @param rep The repetition index (0-indexed)
869     */
870    public ST getSpecimenDescription(int rep) { 
871                ST retVal = this.getTypedField(14, rep);
872                return retVal;
873    }
874
875    /**
876     * Returns a specific repetition of
877     * SPM-14: "Specimen Description" - creates it if necessary
878     *
879     * @param rep The repetition index (0-indexed)
880     */
881    public ST getSpm14_SpecimenDescription(int rep) { 
882                ST retVal = this.getTypedField(14, rep);
883                return retVal;
884    }
885
886    /**
887     * Returns a count of the current number of repetitions of Specimen Description (SPM-14).
888     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
889     * it will return zero.
890     */
891    public int getSpm14_SpecimenDescriptionReps() {
892        return this.getReps(14);
893    }
894
895
896    /**
897     * Inserts a repetition of
898     * SPM-14: "Specimen Description" at a specific index
899     *
900     * @param rep The repetition index (0-indexed)
901     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
902     */
903    public ST insertSpecimenDescription(int rep) throws HL7Exception { 
904        return (ST) super.insertRepetition(14, rep);
905    }
906
907
908    /**
909     * Inserts a repetition of
910     * SPM-14: "Specimen Description" at a specific index
911     *
912     * @param rep The repetition index (0-indexed)
913     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
914     */
915    public ST insertSpm14_SpecimenDescription(int rep) throws HL7Exception { 
916        return (ST) super.insertRepetition(14, rep);
917    }
918
919
920    /**
921     * Removes a repetition of
922     * SPM-14: "Specimen Description" at a specific index
923     *
924     * @param rep The repetition index (0-indexed)
925     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
926     */
927    public ST removeSpecimenDescription(int rep) throws HL7Exception { 
928        return (ST) super.removeRepetition(14, rep);
929    }
930
931
932    /**
933     * Removes a repetition of
934     * SPM-14: "Specimen Description" at a specific index
935     *
936     * @param rep The repetition index (0-indexed)
937     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
938     */
939    public ST removeSpm14_SpecimenDescription(int rep) throws HL7Exception { 
940        return (ST) super.removeRepetition(14, rep);
941    }
942
943
944
945    /**
946     * Returns all repetitions of Specimen Handling Code (SPM-15).
947     */
948    public CWE[] getSpecimenHandlingCode() {
949        CWE[] retVal = this.getTypedField(15, new CWE[0]);
950        return retVal;
951    }
952
953
954    /**
955     * Returns all repetitions of Specimen Handling Code (SPM-15).
956     */
957    public CWE[] getSpm15_SpecimenHandlingCode() {
958        CWE[] retVal = this.getTypedField(15, new CWE[0]);
959        return retVal;
960    }
961
962
963    /**
964     * Returns a count of the current number of repetitions of Specimen Handling Code (SPM-15).
965     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
966     * it will return zero.
967     */
968    public int getSpecimenHandlingCodeReps() {
969        return this.getReps(15);
970    }
971
972
973    /**
974     * Returns a specific repetition of
975     * SPM-15: "Specimen Handling Code" - creates it if necessary
976     *
977     * @param rep The repetition index (0-indexed)
978     */
979    public CWE getSpecimenHandlingCode(int rep) { 
980                CWE retVal = this.getTypedField(15, rep);
981                return retVal;
982    }
983
984    /**
985     * Returns a specific repetition of
986     * SPM-15: "Specimen Handling Code" - creates it if necessary
987     *
988     * @param rep The repetition index (0-indexed)
989     */
990    public CWE getSpm15_SpecimenHandlingCode(int rep) { 
991                CWE retVal = this.getTypedField(15, rep);
992                return retVal;
993    }
994
995    /**
996     * Returns a count of the current number of repetitions of Specimen Handling Code (SPM-15).
997     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
998     * it will return zero.
999     */
1000    public int getSpm15_SpecimenHandlingCodeReps() {
1001        return this.getReps(15);
1002    }
1003
1004
1005    /**
1006     * Inserts a repetition of
1007     * SPM-15: "Specimen Handling Code" at a specific index
1008     *
1009     * @param rep The repetition index (0-indexed)
1010     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1011     */
1012    public CWE insertSpecimenHandlingCode(int rep) throws HL7Exception { 
1013        return (CWE) super.insertRepetition(15, rep);
1014    }
1015
1016
1017    /**
1018     * Inserts a repetition of
1019     * SPM-15: "Specimen Handling Code" at a specific index
1020     *
1021     * @param rep The repetition index (0-indexed)
1022     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1023     */
1024    public CWE insertSpm15_SpecimenHandlingCode(int rep) throws HL7Exception { 
1025        return (CWE) super.insertRepetition(15, rep);
1026    }
1027
1028
1029    /**
1030     * Removes a repetition of
1031     * SPM-15: "Specimen Handling Code" at a specific index
1032     *
1033     * @param rep The repetition index (0-indexed)
1034     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1035     */
1036    public CWE removeSpecimenHandlingCode(int rep) throws HL7Exception { 
1037        return (CWE) super.removeRepetition(15, rep);
1038    }
1039
1040
1041    /**
1042     * Removes a repetition of
1043     * SPM-15: "Specimen Handling Code" at a specific index
1044     *
1045     * @param rep The repetition index (0-indexed)
1046     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1047     */
1048    public CWE removeSpm15_SpecimenHandlingCode(int rep) throws HL7Exception { 
1049        return (CWE) super.removeRepetition(15, rep);
1050    }
1051
1052
1053
1054    /**
1055     * Returns all repetitions of Specimen Risk Code (SPM-16).
1056     */
1057    public CWE[] getSpecimenRiskCode() {
1058        CWE[] retVal = this.getTypedField(16, new CWE[0]);
1059        return retVal;
1060    }
1061
1062
1063    /**
1064     * Returns all repetitions of Specimen Risk Code (SPM-16).
1065     */
1066    public CWE[] getSpm16_SpecimenRiskCode() {
1067        CWE[] retVal = this.getTypedField(16, new CWE[0]);
1068        return retVal;
1069    }
1070
1071
1072    /**
1073     * Returns a count of the current number of repetitions of Specimen Risk Code (SPM-16).
1074     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1075     * it will return zero.
1076     */
1077    public int getSpecimenRiskCodeReps() {
1078        return this.getReps(16);
1079    }
1080
1081
1082    /**
1083     * Returns a specific repetition of
1084     * SPM-16: "Specimen Risk Code" - creates it if necessary
1085     *
1086     * @param rep The repetition index (0-indexed)
1087     */
1088    public CWE getSpecimenRiskCode(int rep) { 
1089                CWE retVal = this.getTypedField(16, rep);
1090                return retVal;
1091    }
1092
1093    /**
1094     * Returns a specific repetition of
1095     * SPM-16: "Specimen Risk Code" - creates it if necessary
1096     *
1097     * @param rep The repetition index (0-indexed)
1098     */
1099    public CWE getSpm16_SpecimenRiskCode(int rep) { 
1100                CWE retVal = this.getTypedField(16, rep);
1101                return retVal;
1102    }
1103
1104    /**
1105     * Returns a count of the current number of repetitions of Specimen Risk Code (SPM-16).
1106     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1107     * it will return zero.
1108     */
1109    public int getSpm16_SpecimenRiskCodeReps() {
1110        return this.getReps(16);
1111    }
1112
1113
1114    /**
1115     * Inserts a repetition of
1116     * SPM-16: "Specimen Risk Code" at a specific index
1117     *
1118     * @param rep The repetition index (0-indexed)
1119     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1120     */
1121    public CWE insertSpecimenRiskCode(int rep) throws HL7Exception { 
1122        return (CWE) super.insertRepetition(16, rep);
1123    }
1124
1125
1126    /**
1127     * Inserts a repetition of
1128     * SPM-16: "Specimen Risk Code" at a specific index
1129     *
1130     * @param rep The repetition index (0-indexed)
1131     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1132     */
1133    public CWE insertSpm16_SpecimenRiskCode(int rep) throws HL7Exception { 
1134        return (CWE) super.insertRepetition(16, rep);
1135    }
1136
1137
1138    /**
1139     * Removes a repetition of
1140     * SPM-16: "Specimen Risk Code" at a specific index
1141     *
1142     * @param rep The repetition index (0-indexed)
1143     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1144     */
1145    public CWE removeSpecimenRiskCode(int rep) throws HL7Exception { 
1146        return (CWE) super.removeRepetition(16, rep);
1147    }
1148
1149
1150    /**
1151     * Removes a repetition of
1152     * SPM-16: "Specimen Risk Code" at a specific index
1153     *
1154     * @param rep The repetition index (0-indexed)
1155     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1156     */
1157    public CWE removeSpm16_SpecimenRiskCode(int rep) throws HL7Exception { 
1158        return (CWE) super.removeRepetition(16, rep);
1159    }
1160
1161
1162
1163
1164    /**
1165     * Returns
1166     * SPM-17: "Specimen Collection Date/Time" - creates it if necessary
1167     */
1168    public DR getSpecimenCollectionDateTime() { 
1169                DR retVal = this.getTypedField(17, 0);
1170                return retVal;
1171    }
1172    
1173    /**
1174     * Returns
1175     * SPM-17: "Specimen Collection Date/Time" - creates it if necessary
1176     */
1177    public DR getSpm17_SpecimenCollectionDateTime() { 
1178                DR retVal = this.getTypedField(17, 0);
1179                return retVal;
1180    }
1181
1182
1183
1184    /**
1185     * Returns
1186     * SPM-18: "Specimen Received Date/Time" - creates it if necessary
1187     */
1188    public TS getSpecimenReceivedDateTime() { 
1189                TS retVal = this.getTypedField(18, 0);
1190                return retVal;
1191    }
1192    
1193    /**
1194     * Returns
1195     * SPM-18: "Specimen Received Date/Time" - creates it if necessary
1196     */
1197    public TS getSpm18_SpecimenReceivedDateTime() { 
1198                TS retVal = this.getTypedField(18, 0);
1199                return retVal;
1200    }
1201
1202
1203
1204    /**
1205     * Returns
1206     * SPM-19: "Specimen Expiration Date/Time" - creates it if necessary
1207     */
1208    public TS getSpecimenExpirationDateTime() { 
1209                TS retVal = this.getTypedField(19, 0);
1210                return retVal;
1211    }
1212    
1213    /**
1214     * Returns
1215     * SPM-19: "Specimen Expiration Date/Time" - creates it if necessary
1216     */
1217    public TS getSpm19_SpecimenExpirationDateTime() { 
1218                TS retVal = this.getTypedField(19, 0);
1219                return retVal;
1220    }
1221
1222
1223
1224    /**
1225     * Returns
1226     * SPM-20: "Specimen Availability" - creates it if necessary
1227     */
1228    public ID getSpecimenAvailability() { 
1229                ID retVal = this.getTypedField(20, 0);
1230                return retVal;
1231    }
1232    
1233    /**
1234     * Returns
1235     * SPM-20: "Specimen Availability" - creates it if necessary
1236     */
1237    public ID getSpm20_SpecimenAvailability() { 
1238                ID retVal = this.getTypedField(20, 0);
1239                return retVal;
1240    }
1241
1242
1243    /**
1244     * Returns all repetitions of Specimen Reject Reason (SPM-21).
1245     */
1246    public CWE[] getSpecimenRejectReason() {
1247        CWE[] retVal = this.getTypedField(21, new CWE[0]);
1248        return retVal;
1249    }
1250
1251
1252    /**
1253     * Returns all repetitions of Specimen Reject Reason (SPM-21).
1254     */
1255    public CWE[] getSpm21_SpecimenRejectReason() {
1256        CWE[] retVal = this.getTypedField(21, new CWE[0]);
1257        return retVal;
1258    }
1259
1260
1261    /**
1262     * Returns a count of the current number of repetitions of Specimen Reject Reason (SPM-21).
1263     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1264     * it will return zero.
1265     */
1266    public int getSpecimenRejectReasonReps() {
1267        return this.getReps(21);
1268    }
1269
1270
1271    /**
1272     * Returns a specific repetition of
1273     * SPM-21: "Specimen Reject Reason" - creates it if necessary
1274     *
1275     * @param rep The repetition index (0-indexed)
1276     */
1277    public CWE getSpecimenRejectReason(int rep) { 
1278                CWE retVal = this.getTypedField(21, rep);
1279                return retVal;
1280    }
1281
1282    /**
1283     * Returns a specific repetition of
1284     * SPM-21: "Specimen Reject Reason" - creates it if necessary
1285     *
1286     * @param rep The repetition index (0-indexed)
1287     */
1288    public CWE getSpm21_SpecimenRejectReason(int rep) { 
1289                CWE retVal = this.getTypedField(21, rep);
1290                return retVal;
1291    }
1292
1293    /**
1294     * Returns a count of the current number of repetitions of Specimen Reject Reason (SPM-21).
1295     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1296     * it will return zero.
1297     */
1298    public int getSpm21_SpecimenRejectReasonReps() {
1299        return this.getReps(21);
1300    }
1301
1302
1303    /**
1304     * Inserts a repetition of
1305     * SPM-21: "Specimen Reject Reason" at a specific index
1306     *
1307     * @param rep The repetition index (0-indexed)
1308     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1309     */
1310    public CWE insertSpecimenRejectReason(int rep) throws HL7Exception { 
1311        return (CWE) super.insertRepetition(21, rep);
1312    }
1313
1314
1315    /**
1316     * Inserts a repetition of
1317     * SPM-21: "Specimen Reject Reason" at a specific index
1318     *
1319     * @param rep The repetition index (0-indexed)
1320     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1321     */
1322    public CWE insertSpm21_SpecimenRejectReason(int rep) throws HL7Exception { 
1323        return (CWE) super.insertRepetition(21, rep);
1324    }
1325
1326
1327    /**
1328     * Removes a repetition of
1329     * SPM-21: "Specimen Reject Reason" at a specific index
1330     *
1331     * @param rep The repetition index (0-indexed)
1332     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1333     */
1334    public CWE removeSpecimenRejectReason(int rep) throws HL7Exception { 
1335        return (CWE) super.removeRepetition(21, rep);
1336    }
1337
1338
1339    /**
1340     * Removes a repetition of
1341     * SPM-21: "Specimen Reject Reason" at a specific index
1342     *
1343     * @param rep The repetition index (0-indexed)
1344     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1345     */
1346    public CWE removeSpm21_SpecimenRejectReason(int rep) throws HL7Exception { 
1347        return (CWE) super.removeRepetition(21, rep);
1348    }
1349
1350
1351
1352
1353    /**
1354     * Returns
1355     * SPM-22: "Specimen Quality" - creates it if necessary
1356     */
1357    public CWE getSpecimenQuality() { 
1358                CWE retVal = this.getTypedField(22, 0);
1359                return retVal;
1360    }
1361    
1362    /**
1363     * Returns
1364     * SPM-22: "Specimen Quality" - creates it if necessary
1365     */
1366    public CWE getSpm22_SpecimenQuality() { 
1367                CWE retVal = this.getTypedField(22, 0);
1368                return retVal;
1369    }
1370
1371
1372
1373    /**
1374     * Returns
1375     * SPM-23: "Specimen Appropriateness" - creates it if necessary
1376     */
1377    public CWE getSpecimenAppropriateness() { 
1378                CWE retVal = this.getTypedField(23, 0);
1379                return retVal;
1380    }
1381    
1382    /**
1383     * Returns
1384     * SPM-23: "Specimen Appropriateness" - creates it if necessary
1385     */
1386    public CWE getSpm23_SpecimenAppropriateness() { 
1387                CWE retVal = this.getTypedField(23, 0);
1388                return retVal;
1389    }
1390
1391
1392    /**
1393     * Returns all repetitions of Specimen Condition (SPM-24).
1394     */
1395    public CWE[] getSpecimenCondition() {
1396        CWE[] retVal = this.getTypedField(24, new CWE[0]);
1397        return retVal;
1398    }
1399
1400
1401    /**
1402     * Returns all repetitions of Specimen Condition (SPM-24).
1403     */
1404    public CWE[] getSpm24_SpecimenCondition() {
1405        CWE[] retVal = this.getTypedField(24, new CWE[0]);
1406        return retVal;
1407    }
1408
1409
1410    /**
1411     * Returns a count of the current number of repetitions of Specimen Condition (SPM-24).
1412     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1413     * it will return zero.
1414     */
1415    public int getSpecimenConditionReps() {
1416        return this.getReps(24);
1417    }
1418
1419
1420    /**
1421     * Returns a specific repetition of
1422     * SPM-24: "Specimen Condition" - creates it if necessary
1423     *
1424     * @param rep The repetition index (0-indexed)
1425     */
1426    public CWE getSpecimenCondition(int rep) { 
1427                CWE retVal = this.getTypedField(24, rep);
1428                return retVal;
1429    }
1430
1431    /**
1432     * Returns a specific repetition of
1433     * SPM-24: "Specimen Condition" - creates it if necessary
1434     *
1435     * @param rep The repetition index (0-indexed)
1436     */
1437    public CWE getSpm24_SpecimenCondition(int rep) { 
1438                CWE retVal = this.getTypedField(24, rep);
1439                return retVal;
1440    }
1441
1442    /**
1443     * Returns a count of the current number of repetitions of Specimen Condition (SPM-24).
1444     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1445     * it will return zero.
1446     */
1447    public int getSpm24_SpecimenConditionReps() {
1448        return this.getReps(24);
1449    }
1450
1451
1452    /**
1453     * Inserts a repetition of
1454     * SPM-24: "Specimen Condition" at a specific index
1455     *
1456     * @param rep The repetition index (0-indexed)
1457     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1458     */
1459    public CWE insertSpecimenCondition(int rep) throws HL7Exception { 
1460        return (CWE) super.insertRepetition(24, rep);
1461    }
1462
1463
1464    /**
1465     * Inserts a repetition of
1466     * SPM-24: "Specimen Condition" at a specific index
1467     *
1468     * @param rep The repetition index (0-indexed)
1469     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1470     */
1471    public CWE insertSpm24_SpecimenCondition(int rep) throws HL7Exception { 
1472        return (CWE) super.insertRepetition(24, rep);
1473    }
1474
1475
1476    /**
1477     * Removes a repetition of
1478     * SPM-24: "Specimen Condition" at a specific index
1479     *
1480     * @param rep The repetition index (0-indexed)
1481     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1482     */
1483    public CWE removeSpecimenCondition(int rep) throws HL7Exception { 
1484        return (CWE) super.removeRepetition(24, rep);
1485    }
1486
1487
1488    /**
1489     * Removes a repetition of
1490     * SPM-24: "Specimen Condition" at a specific index
1491     *
1492     * @param rep The repetition index (0-indexed)
1493     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1494     */
1495    public CWE removeSpm24_SpecimenCondition(int rep) throws HL7Exception { 
1496        return (CWE) super.removeRepetition(24, rep);
1497    }
1498
1499
1500
1501
1502    /**
1503     * Returns
1504     * SPM-25: "Specimen Current Quantity" - creates it if necessary
1505     */
1506    public CQ getSpecimenCurrentQuantity() { 
1507                CQ retVal = this.getTypedField(25, 0);
1508                return retVal;
1509    }
1510    
1511    /**
1512     * Returns
1513     * SPM-25: "Specimen Current Quantity" - creates it if necessary
1514     */
1515    public CQ getSpm25_SpecimenCurrentQuantity() { 
1516                CQ retVal = this.getTypedField(25, 0);
1517                return retVal;
1518    }
1519
1520
1521
1522    /**
1523     * Returns
1524     * SPM-26: "Number of Specimen Containers" - creates it if necessary
1525     */
1526    public NM getNumberOfSpecimenContainers() { 
1527                NM retVal = this.getTypedField(26, 0);
1528                return retVal;
1529    }
1530    
1531    /**
1532     * Returns
1533     * SPM-26: "Number of Specimen Containers" - creates it if necessary
1534     */
1535    public NM getSpm26_NumberOfSpecimenContainers() { 
1536                NM retVal = this.getTypedField(26, 0);
1537                return retVal;
1538    }
1539
1540
1541
1542    /**
1543     * Returns
1544     * SPM-27: "Container Type" - creates it if necessary
1545     */
1546    public CWE getContainerType() { 
1547                CWE retVal = this.getTypedField(27, 0);
1548                return retVal;
1549    }
1550    
1551    /**
1552     * Returns
1553     * SPM-27: "Container Type" - creates it if necessary
1554     */
1555    public CWE getSpm27_ContainerType() { 
1556                CWE retVal = this.getTypedField(27, 0);
1557                return retVal;
1558    }
1559
1560
1561
1562    /**
1563     * Returns
1564     * SPM-28: "Container Condition" - creates it if necessary
1565     */
1566    public CWE getContainerCondition() { 
1567                CWE retVal = this.getTypedField(28, 0);
1568                return retVal;
1569    }
1570    
1571    /**
1572     * Returns
1573     * SPM-28: "Container Condition" - creates it if necessary
1574     */
1575    public CWE getSpm28_ContainerCondition() { 
1576                CWE retVal = this.getTypedField(28, 0);
1577                return retVal;
1578    }
1579
1580
1581
1582    /**
1583     * Returns
1584     * SPM-29: "Specimen Child Role" - creates it if necessary
1585     */
1586    public CWE getSpecimenChildRole() { 
1587                CWE retVal = this.getTypedField(29, 0);
1588                return retVal;
1589    }
1590    
1591    /**
1592     * Returns
1593     * SPM-29: "Specimen Child Role" - creates it if necessary
1594     */
1595    public CWE getSpm29_SpecimenChildRole() { 
1596                CWE retVal = this.getTypedField(29, 0);
1597                return retVal;
1598    }
1599
1600
1601
1602
1603
1604    /** {@inheritDoc} */   
1605    protected Type createNewTypeWithoutReflection(int field) {
1606       switch (field) {
1607          case 0: return new SI(getMessage());
1608          case 1: return new EIP(getMessage());
1609          case 2: return new EIP(getMessage());
1610          case 3: return new CWE(getMessage());
1611          case 4: return new CWE(getMessage());
1612          case 5: return new CWE(getMessage());
1613          case 6: return new CWE(getMessage());
1614          case 7: return new CWE(getMessage());
1615          case 8: return new CWE(getMessage());
1616          case 9: return new CWE(getMessage());
1617          case 10: return new CWE(getMessage());
1618          case 11: return new CQ(getMessage());
1619          case 12: return new NM(getMessage());
1620          case 13: return new ST(getMessage());
1621          case 14: return new CWE(getMessage());
1622          case 15: return new CWE(getMessage());
1623          case 16: return new DR(getMessage());
1624          case 17: return new TS(getMessage());
1625          case 18: return new TS(getMessage());
1626          case 19: return new ID(getMessage(), new Integer( 136 ));
1627          case 20: return new CWE(getMessage());
1628          case 21: return new CWE(getMessage());
1629          case 22: return new CWE(getMessage());
1630          case 23: return new CWE(getMessage());
1631          case 24: return new CQ(getMessage());
1632          case 25: return new NM(getMessage());
1633          case 26: return new CWE(getMessage());
1634          case 27: return new CWE(getMessage());
1635          case 28: return new CWE(getMessage());
1636          default: return null;
1637       }
1638   }
1639
1640
1641}
1642