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