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