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.v281.segment;
035
036// import ca.uhn.hl7v2.model.v281.group.*;
037import ca.uhn.hl7v2.model.v281.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 OBX message segment (Observation/Result). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>OBX-1: Set ID - OBX (SI) <b>optional </b>
053     * <li>OBX-2: Value Type (ID) <b>optional </b>
054     * <li>OBX-3: Observation Identifier (CWE) <b> </b>
055     * <li>OBX-4: Observation Sub-ID (ST) <b>optional </b>
056     * <li>OBX-5: Observation Value (Varies) <b>optional repeating</b>
057     * <li>OBX-6: Units (CWE) <b>optional </b>
058     * <li>OBX-7: References Range (ST) <b>optional </b>
059     * <li>OBX-8: Interpretation Codes (CWE) <b>optional repeating</b>
060     * <li>OBX-9: Probability (NM) <b>optional </b>
061     * <li>OBX-10: Nature of Abnormal Test (ID) <b>optional repeating</b>
062     * <li>OBX-11: Observation Result Status (ID) <b> </b>
063     * <li>OBX-12: Effective Date of Reference Range (DTM) <b>optional </b>
064     * <li>OBX-13: User Defined Access Checks (ST) <b>optional </b>
065     * <li>OBX-14: Date/Time of the Observation (DTM) <b>optional </b>
066     * <li>OBX-15: Producer's ID (CWE) <b>optional </b>
067     * <li>OBX-16: Responsible Observer (XCN) <b>optional repeating</b>
068     * <li>OBX-17: Observation Method (CWE) <b>optional repeating</b>
069     * <li>OBX-18: Equipment Instance Identifier (EI) <b>optional repeating</b>
070     * <li>OBX-19: Date/Time of the Analysis (DTM) <b>optional </b>
071     * <li>OBX-20: Observation Site (CWE) <b>optional repeating</b>
072     * <li>OBX-21: Observation Instance Identifier (EI) <b>optional </b>
073     * <li>OBX-22: Mood Code (CNE) <b>optional </b>
074     * <li>OBX-23: Performing Organization Name (XON) <b>optional </b>
075     * <li>OBX-24: Performing Organization Address (XAD) <b>optional </b>
076     * <li>OBX-25: Performing Organization Medical Director (XCN) <b>optional </b>
077     * <li>OBX-26: Patient Results Release Category (ID) <b>optional </b>
078     * <li>OBX-27: Root Cause (CWE) <b>optional </b>
079     * <li>OBX-28: Local Process Control (CWE) <b>optional repeating</b>
080     * <li>OBX-29: Observation Type (ID) <b>optional </b>
081 * </ul>
082 */
083@SuppressWarnings("unused")
084public class OBX extends AbstractSegment {
085
086    /** 
087     * Creates a new OBX segment
088     */
089    public OBX(Group parent, ModelClassFactory factory) {
090       super(parent, factory);
091       init(factory);
092    }
093
094    private void init(ModelClassFactory factory) {
095       try {
096                                  this.add(SI.class, false, 1, 0, new Object[]{ getMessage() }, "Set ID - OBX");
097                                              this.add(ID.class, false, 1, 0, new Object[]{ getMessage(), new Integer(125) }, "Value Type");
098                                  this.add(CWE.class, true, 1, 0, new Object[]{ getMessage() }, "Observation Identifier");
099                                  this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Observation Sub-ID");
100                                  this.add(Varies.class, false, 0, 0, new Object[]{ getMessage() }, "Observation Value");
101                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Units");
102                                  this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "References Range");
103                                  this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Interpretation Codes");
104                                  this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Probability");
105                                              this.add(ID.class, false, 0, 0, new Object[]{ getMessage(), new Integer(80) }, "Nature of Abnormal Test");
106                                              this.add(ID.class, true, 1, 0, new Object[]{ getMessage(), new Integer(85) }, "Observation Result Status");
107                                  this.add(DTM.class, false, 1, 0, new Object[]{ getMessage() }, "Effective Date of Reference Range");
108                                  this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "User Defined Access Checks");
109                                  this.add(DTM.class, false, 1, 0, new Object[]{ getMessage() }, "Date/Time of the Observation");
110                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Producer's ID");
111                                  this.add(XCN.class, false, 0, 0, new Object[]{ getMessage() }, "Responsible Observer");
112                                  this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Observation Method");
113                                  this.add(EI.class, false, 0, 0, new Object[]{ getMessage() }, "Equipment Instance Identifier");
114                                  this.add(DTM.class, false, 1, 0, new Object[]{ getMessage() }, "Date/Time of the Analysis");
115                                  this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Observation Site");
116                                  this.add(EI.class, false, 1, 0, new Object[]{ getMessage() }, "Observation Instance Identifier");
117                                  this.add(CNE.class, false, 1, 0, new Object[]{ getMessage() }, "Mood Code");
118                                  this.add(XON.class, false, 1, 0, new Object[]{ getMessage() }, "Performing Organization Name");
119                                  this.add(XAD.class, false, 1, 0, new Object[]{ getMessage() }, "Performing Organization Address");
120                                  this.add(XCN.class, false, 1, 0, new Object[]{ getMessage() }, "Performing Organization Medical Director");
121                                              this.add(ID.class, false, 1, 0, new Object[]{ getMessage(), new Integer(909) }, "Patient Results Release Category");
122                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Root Cause");
123                                  this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Local Process Control");
124                                              this.add(ID.class, false, 1, 0, new Object[]{ getMessage(), new Integer(936) }, "Observation Type");
125       } catch(HL7Exception e) {
126          log.error("Unexpected error creating OBX - this is probably a bug in the source code generator.", e);
127       }
128    }
129
130
131
132    /**
133     * Returns
134     * OBX-1: "Set ID - OBX" - creates it if necessary
135     */
136    public SI getSetIDOBX() { 
137                SI retVal = this.getTypedField(1, 0);
138                return retVal;
139    }
140    
141    /**
142     * Returns
143     * OBX-1: "Set ID - OBX" - creates it if necessary
144     */
145    public SI getObx1_SetIDOBX() { 
146                SI retVal = this.getTypedField(1, 0);
147                return retVal;
148    }
149
150
151
152    /**
153     * Returns
154     * OBX-2: "Value Type" - creates it if necessary
155     */
156    public ID getValueType() { 
157                ID retVal = this.getTypedField(2, 0);
158                return retVal;
159    }
160    
161    /**
162     * Returns
163     * OBX-2: "Value Type" - creates it if necessary
164     */
165    public ID getObx2_ValueType() { 
166                ID retVal = this.getTypedField(2, 0);
167                return retVal;
168    }
169
170
171
172    /**
173     * Returns
174     * OBX-3: "Observation Identifier" - creates it if necessary
175     */
176    public CWE getObservationIdentifier() { 
177                CWE retVal = this.getTypedField(3, 0);
178                return retVal;
179    }
180    
181    /**
182     * Returns
183     * OBX-3: "Observation Identifier" - creates it if necessary
184     */
185    public CWE getObx3_ObservationIdentifier() { 
186                CWE retVal = this.getTypedField(3, 0);
187                return retVal;
188    }
189
190
191
192    /**
193     * Returns
194     * OBX-4: "Observation Sub-ID" - creates it if necessary
195     */
196    public ST getObservationSubID() { 
197                ST retVal = this.getTypedField(4, 0);
198                return retVal;
199    }
200    
201    /**
202     * Returns
203     * OBX-4: "Observation Sub-ID" - creates it if necessary
204     */
205    public ST getObx4_ObservationSubID() { 
206                ST retVal = this.getTypedField(4, 0);
207                return retVal;
208    }
209
210
211    /**
212     * Returns all repetitions of Observation Value (OBX-5).
213     */
214    public Varies[] getObservationValue() {
215        Varies[] retVal = this.getTypedField(5, new Varies[0]);
216        return retVal;
217    }
218
219
220    /**
221     * Returns all repetitions of Observation Value (OBX-5).
222     */
223    public Varies[] getObx5_ObservationValue() {
224        Varies[] retVal = this.getTypedField(5, new Varies[0]);
225        return retVal;
226    }
227
228
229    /**
230     * Returns a count of the current number of repetitions of Observation Value (OBX-5).
231     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
232     * it will return zero.
233     */
234    public int getObservationValueReps() {
235        return this.getReps(5);
236    }
237
238
239    /**
240     * Returns a specific repetition of
241     * OBX-5: "Observation Value" - creates it if necessary
242     *
243     * @param rep The repetition index (0-indexed)
244     */
245    public Varies getObservationValue(int rep) { 
246                Varies retVal = this.getTypedField(5, rep);
247                return retVal;
248    }
249
250    /**
251     * Returns a specific repetition of
252     * OBX-5: "Observation Value" - creates it if necessary
253     *
254     * @param rep The repetition index (0-indexed)
255     */
256    public Varies getObx5_ObservationValue(int rep) { 
257                Varies retVal = this.getTypedField(5, rep);
258                return retVal;
259    }
260
261    /**
262     * Returns a count of the current number of repetitions of Observation Value (OBX-5).
263     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
264     * it will return zero.
265     */
266    public int getObx5_ObservationValueReps() {
267        return this.getReps(5);
268    }
269
270
271    /**
272     * Inserts a repetition of
273     * OBX-5: "Observation Value" at a specific index
274     *
275     * @param rep The repetition index (0-indexed)
276     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
277     */
278    public Varies insertObservationValue(int rep) throws HL7Exception { 
279        return (Varies) super.insertRepetition(5, rep);
280    }
281
282
283    /**
284     * Inserts a repetition of
285     * OBX-5: "Observation Value" at a specific index
286     *
287     * @param rep The repetition index (0-indexed)
288     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
289     */
290    public Varies insertObx5_ObservationValue(int rep) throws HL7Exception { 
291        return (Varies) super.insertRepetition(5, rep);
292    }
293
294
295    /**
296     * Removes a repetition of
297     * OBX-5: "Observation Value" at a specific index
298     *
299     * @param rep The repetition index (0-indexed)
300     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
301     */
302    public Varies removeObservationValue(int rep) throws HL7Exception { 
303        return (Varies) super.removeRepetition(5, rep);
304    }
305
306
307    /**
308     * Removes a repetition of
309     * OBX-5: "Observation Value" at a specific index
310     *
311     * @param rep The repetition index (0-indexed)
312     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
313     */
314    public Varies removeObx5_ObservationValue(int rep) throws HL7Exception { 
315        return (Varies) super.removeRepetition(5, rep);
316    }
317
318
319
320
321    /**
322     * Returns
323     * OBX-6: "Units" - creates it if necessary
324     */
325    public CWE getUnits() { 
326                CWE retVal = this.getTypedField(6, 0);
327                return retVal;
328    }
329    
330    /**
331     * Returns
332     * OBX-6: "Units" - creates it if necessary
333     */
334    public CWE getObx6_Units() { 
335                CWE retVal = this.getTypedField(6, 0);
336                return retVal;
337    }
338
339
340
341    /**
342     * Returns
343     * OBX-7: "References Range" - creates it if necessary
344     */
345    public ST getReferencesRange() { 
346                ST retVal = this.getTypedField(7, 0);
347                return retVal;
348    }
349    
350    /**
351     * Returns
352     * OBX-7: "References Range" - creates it if necessary
353     */
354    public ST getObx7_ReferencesRange() { 
355                ST retVal = this.getTypedField(7, 0);
356                return retVal;
357    }
358
359
360    /**
361     * Returns all repetitions of Interpretation Codes (OBX-8).
362     */
363    public CWE[] getInterpretationCodes() {
364        CWE[] retVal = this.getTypedField(8, new CWE[0]);
365        return retVal;
366    }
367
368
369    /**
370     * Returns all repetitions of Interpretation Codes (OBX-8).
371     */
372    public CWE[] getObx8_InterpretationCodes() {
373        CWE[] retVal = this.getTypedField(8, new CWE[0]);
374        return retVal;
375    }
376
377
378    /**
379     * Returns a count of the current number of repetitions of Interpretation Codes (OBX-8).
380     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
381     * it will return zero.
382     */
383    public int getInterpretationCodesReps() {
384        return this.getReps(8);
385    }
386
387
388    /**
389     * Returns a specific repetition of
390     * OBX-8: "Interpretation Codes" - creates it if necessary
391     *
392     * @param rep The repetition index (0-indexed)
393     */
394    public CWE getInterpretationCodes(int rep) { 
395                CWE retVal = this.getTypedField(8, rep);
396                return retVal;
397    }
398
399    /**
400     * Returns a specific repetition of
401     * OBX-8: "Interpretation Codes" - creates it if necessary
402     *
403     * @param rep The repetition index (0-indexed)
404     */
405    public CWE getObx8_InterpretationCodes(int rep) { 
406                CWE retVal = this.getTypedField(8, rep);
407                return retVal;
408    }
409
410    /**
411     * Returns a count of the current number of repetitions of Interpretation Codes (OBX-8).
412     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
413     * it will return zero.
414     */
415    public int getObx8_InterpretationCodesReps() {
416        return this.getReps(8);
417    }
418
419
420    /**
421     * Inserts a repetition of
422     * OBX-8: "Interpretation Codes" at a specific index
423     *
424     * @param rep The repetition index (0-indexed)
425     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
426     */
427    public CWE insertInterpretationCodes(int rep) throws HL7Exception { 
428        return (CWE) super.insertRepetition(8, rep);
429    }
430
431
432    /**
433     * Inserts a repetition of
434     * OBX-8: "Interpretation Codes" at a specific index
435     *
436     * @param rep The repetition index (0-indexed)
437     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
438     */
439    public CWE insertObx8_InterpretationCodes(int rep) throws HL7Exception { 
440        return (CWE) super.insertRepetition(8, rep);
441    }
442
443
444    /**
445     * Removes a repetition of
446     * OBX-8: "Interpretation Codes" at a specific index
447     *
448     * @param rep The repetition index (0-indexed)
449     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
450     */
451    public CWE removeInterpretationCodes(int rep) throws HL7Exception { 
452        return (CWE) super.removeRepetition(8, rep);
453    }
454
455
456    /**
457     * Removes a repetition of
458     * OBX-8: "Interpretation Codes" at a specific index
459     *
460     * @param rep The repetition index (0-indexed)
461     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
462     */
463    public CWE removeObx8_InterpretationCodes(int rep) throws HL7Exception { 
464        return (CWE) super.removeRepetition(8, rep);
465    }
466
467
468
469
470    /**
471     * Returns
472     * OBX-9: "Probability" - creates it if necessary
473     */
474    public NM getProbability() { 
475                NM retVal = this.getTypedField(9, 0);
476                return retVal;
477    }
478    
479    /**
480     * Returns
481     * OBX-9: "Probability" - creates it if necessary
482     */
483    public NM getObx9_Probability() { 
484                NM retVal = this.getTypedField(9, 0);
485                return retVal;
486    }
487
488
489    /**
490     * Returns all repetitions of Nature of Abnormal Test (OBX-10).
491     */
492    public ID[] getNatureOfAbnormalTest() {
493        ID[] retVal = this.getTypedField(10, new ID[0]);
494        return retVal;
495    }
496
497
498    /**
499     * Returns all repetitions of Nature of Abnormal Test (OBX-10).
500     */
501    public ID[] getObx10_NatureOfAbnormalTest() {
502        ID[] retVal = this.getTypedField(10, new ID[0]);
503        return retVal;
504    }
505
506
507    /**
508     * Returns a count of the current number of repetitions of Nature of Abnormal Test (OBX-10).
509     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
510     * it will return zero.
511     */
512    public int getNatureOfAbnormalTestReps() {
513        return this.getReps(10);
514    }
515
516
517    /**
518     * Returns a specific repetition of
519     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
520     *
521     * @param rep The repetition index (0-indexed)
522     */
523    public ID getNatureOfAbnormalTest(int rep) { 
524                ID retVal = this.getTypedField(10, rep);
525                return retVal;
526    }
527
528    /**
529     * Returns a specific repetition of
530     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
531     *
532     * @param rep The repetition index (0-indexed)
533     */
534    public ID getObx10_NatureOfAbnormalTest(int rep) { 
535                ID retVal = this.getTypedField(10, rep);
536                return retVal;
537    }
538
539    /**
540     * Returns a count of the current number of repetitions of Nature of Abnormal Test (OBX-10).
541     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
542     * it will return zero.
543     */
544    public int getObx10_NatureOfAbnormalTestReps() {
545        return this.getReps(10);
546    }
547
548
549    /**
550     * Inserts a repetition of
551     * OBX-10: "Nature of Abnormal Test" at a specific index
552     *
553     * @param rep The repetition index (0-indexed)
554     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
555     */
556    public ID insertNatureOfAbnormalTest(int rep) throws HL7Exception { 
557        return (ID) super.insertRepetition(10, rep);
558    }
559
560
561    /**
562     * Inserts a repetition of
563     * OBX-10: "Nature of Abnormal Test" at a specific index
564     *
565     * @param rep The repetition index (0-indexed)
566     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
567     */
568    public ID insertObx10_NatureOfAbnormalTest(int rep) throws HL7Exception { 
569        return (ID) super.insertRepetition(10, rep);
570    }
571
572
573    /**
574     * Removes a repetition of
575     * OBX-10: "Nature of Abnormal Test" at a specific index
576     *
577     * @param rep The repetition index (0-indexed)
578     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
579     */
580    public ID removeNatureOfAbnormalTest(int rep) throws HL7Exception { 
581        return (ID) super.removeRepetition(10, rep);
582    }
583
584
585    /**
586     * Removes a repetition of
587     * OBX-10: "Nature of Abnormal Test" at a specific index
588     *
589     * @param rep The repetition index (0-indexed)
590     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
591     */
592    public ID removeObx10_NatureOfAbnormalTest(int rep) throws HL7Exception { 
593        return (ID) super.removeRepetition(10, rep);
594    }
595
596
597
598
599    /**
600     * Returns
601     * OBX-11: "Observation Result Status" - creates it if necessary
602     */
603    public ID getObservationResultStatus() { 
604                ID retVal = this.getTypedField(11, 0);
605                return retVal;
606    }
607    
608    /**
609     * Returns
610     * OBX-11: "Observation Result Status" - creates it if necessary
611     */
612    public ID getObx11_ObservationResultStatus() { 
613                ID retVal = this.getTypedField(11, 0);
614                return retVal;
615    }
616
617
618
619    /**
620     * Returns
621     * OBX-12: "Effective Date of Reference Range" - creates it if necessary
622     */
623    public DTM getEffectiveDateOfReferenceRange() { 
624                DTM retVal = this.getTypedField(12, 0);
625                return retVal;
626    }
627    
628    /**
629     * Returns
630     * OBX-12: "Effective Date of Reference Range" - creates it if necessary
631     */
632    public DTM getObx12_EffectiveDateOfReferenceRange() { 
633                DTM retVal = this.getTypedField(12, 0);
634                return retVal;
635    }
636
637
638
639    /**
640     * Returns
641     * OBX-13: "User Defined Access Checks" - creates it if necessary
642     */
643    public ST getUserDefinedAccessChecks() { 
644                ST retVal = this.getTypedField(13, 0);
645                return retVal;
646    }
647    
648    /**
649     * Returns
650     * OBX-13: "User Defined Access Checks" - creates it if necessary
651     */
652    public ST getObx13_UserDefinedAccessChecks() { 
653                ST retVal = this.getTypedField(13, 0);
654                return retVal;
655    }
656
657
658
659    /**
660     * Returns
661     * OBX-14: "Date/Time of the Observation" - creates it if necessary
662     */
663    public DTM getDateTimeOfTheObservation() { 
664                DTM retVal = this.getTypedField(14, 0);
665                return retVal;
666    }
667    
668    /**
669     * Returns
670     * OBX-14: "Date/Time of the Observation" - creates it if necessary
671     */
672    public DTM getObx14_DateTimeOfTheObservation() { 
673                DTM retVal = this.getTypedField(14, 0);
674                return retVal;
675    }
676
677
678
679    /**
680     * Returns
681     * OBX-15: "Producer's ID" - creates it if necessary
682     */
683    public CWE getProducerSID() { 
684                CWE retVal = this.getTypedField(15, 0);
685                return retVal;
686    }
687    
688    /**
689     * Returns
690     * OBX-15: "Producer's ID" - creates it if necessary
691     */
692    public CWE getObx15_ProducerSID() { 
693                CWE retVal = this.getTypedField(15, 0);
694                return retVal;
695    }
696
697
698    /**
699     * Returns all repetitions of Responsible Observer (OBX-16).
700     */
701    public XCN[] getResponsibleObserver() {
702        XCN[] retVal = this.getTypedField(16, new XCN[0]);
703        return retVal;
704    }
705
706
707    /**
708     * Returns all repetitions of Responsible Observer (OBX-16).
709     */
710    public XCN[] getObx16_ResponsibleObserver() {
711        XCN[] retVal = this.getTypedField(16, new XCN[0]);
712        return retVal;
713    }
714
715
716    /**
717     * Returns a count of the current number of repetitions of Responsible Observer (OBX-16).
718     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
719     * it will return zero.
720     */
721    public int getResponsibleObserverReps() {
722        return this.getReps(16);
723    }
724
725
726    /**
727     * Returns a specific repetition of
728     * OBX-16: "Responsible Observer" - creates it if necessary
729     *
730     * @param rep The repetition index (0-indexed)
731     */
732    public XCN getResponsibleObserver(int rep) { 
733                XCN retVal = this.getTypedField(16, rep);
734                return retVal;
735    }
736
737    /**
738     * Returns a specific repetition of
739     * OBX-16: "Responsible Observer" - creates it if necessary
740     *
741     * @param rep The repetition index (0-indexed)
742     */
743    public XCN getObx16_ResponsibleObserver(int rep) { 
744                XCN retVal = this.getTypedField(16, rep);
745                return retVal;
746    }
747
748    /**
749     * Returns a count of the current number of repetitions of Responsible Observer (OBX-16).
750     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
751     * it will return zero.
752     */
753    public int getObx16_ResponsibleObserverReps() {
754        return this.getReps(16);
755    }
756
757
758    /**
759     * Inserts a repetition of
760     * OBX-16: "Responsible Observer" 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 XCN insertResponsibleObserver(int rep) throws HL7Exception { 
766        return (XCN) super.insertRepetition(16, rep);
767    }
768
769
770    /**
771     * Inserts a repetition of
772     * OBX-16: "Responsible Observer" 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 XCN insertObx16_ResponsibleObserver(int rep) throws HL7Exception { 
778        return (XCN) super.insertRepetition(16, rep);
779    }
780
781
782    /**
783     * Removes a repetition of
784     * OBX-16: "Responsible Observer" 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 XCN removeResponsibleObserver(int rep) throws HL7Exception { 
790        return (XCN) super.removeRepetition(16, rep);
791    }
792
793
794    /**
795     * Removes a repetition of
796     * OBX-16: "Responsible Observer" at a specific index
797     *
798     * @param rep The repetition index (0-indexed)
799     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
800     */
801    public XCN removeObx16_ResponsibleObserver(int rep) throws HL7Exception { 
802        return (XCN) super.removeRepetition(16, rep);
803    }
804
805
806
807    /**
808     * Returns all repetitions of Observation Method (OBX-17).
809     */
810    public CWE[] getObservationMethod() {
811        CWE[] retVal = this.getTypedField(17, new CWE[0]);
812        return retVal;
813    }
814
815
816    /**
817     * Returns all repetitions of Observation Method (OBX-17).
818     */
819    public CWE[] getObx17_ObservationMethod() {
820        CWE[] retVal = this.getTypedField(17, new CWE[0]);
821        return retVal;
822    }
823
824
825    /**
826     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
827     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
828     * it will return zero.
829     */
830    public int getObservationMethodReps() {
831        return this.getReps(17);
832    }
833
834
835    /**
836     * Returns a specific repetition of
837     * OBX-17: "Observation Method" - creates it if necessary
838     *
839     * @param rep The repetition index (0-indexed)
840     */
841    public CWE getObservationMethod(int rep) { 
842                CWE retVal = this.getTypedField(17, rep);
843                return retVal;
844    }
845
846    /**
847     * Returns a specific repetition of
848     * OBX-17: "Observation Method" - creates it if necessary
849     *
850     * @param rep The repetition index (0-indexed)
851     */
852    public CWE getObx17_ObservationMethod(int rep) { 
853                CWE retVal = this.getTypedField(17, rep);
854                return retVal;
855    }
856
857    /**
858     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
859     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
860     * it will return zero.
861     */
862    public int getObx17_ObservationMethodReps() {
863        return this.getReps(17);
864    }
865
866
867    /**
868     * Inserts a repetition of
869     * OBX-17: "Observation Method" at a specific index
870     *
871     * @param rep The repetition index (0-indexed)
872     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
873     */
874    public CWE insertObservationMethod(int rep) throws HL7Exception { 
875        return (CWE) super.insertRepetition(17, rep);
876    }
877
878
879    /**
880     * Inserts a repetition of
881     * OBX-17: "Observation Method" at a specific index
882     *
883     * @param rep The repetition index (0-indexed)
884     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
885     */
886    public CWE insertObx17_ObservationMethod(int rep) throws HL7Exception { 
887        return (CWE) super.insertRepetition(17, rep);
888    }
889
890
891    /**
892     * Removes a repetition of
893     * OBX-17: "Observation Method" at a specific index
894     *
895     * @param rep The repetition index (0-indexed)
896     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
897     */
898    public CWE removeObservationMethod(int rep) throws HL7Exception { 
899        return (CWE) super.removeRepetition(17, rep);
900    }
901
902
903    /**
904     * Removes a repetition of
905     * OBX-17: "Observation Method" at a specific index
906     *
907     * @param rep The repetition index (0-indexed)
908     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
909     */
910    public CWE removeObx17_ObservationMethod(int rep) throws HL7Exception { 
911        return (CWE) super.removeRepetition(17, rep);
912    }
913
914
915
916    /**
917     * Returns all repetitions of Equipment Instance Identifier (OBX-18).
918     */
919    public EI[] getEquipmentInstanceIdentifier() {
920        EI[] retVal = this.getTypedField(18, new EI[0]);
921        return retVal;
922    }
923
924
925    /**
926     * Returns all repetitions of Equipment Instance Identifier (OBX-18).
927     */
928    public EI[] getObx18_EquipmentInstanceIdentifier() {
929        EI[] retVal = this.getTypedField(18, new EI[0]);
930        return retVal;
931    }
932
933
934    /**
935     * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
936     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
937     * it will return zero.
938     */
939    public int getEquipmentInstanceIdentifierReps() {
940        return this.getReps(18);
941    }
942
943
944    /**
945     * Returns a specific repetition of
946     * OBX-18: "Equipment Instance Identifier" - creates it if necessary
947     *
948     * @param rep The repetition index (0-indexed)
949     */
950    public EI getEquipmentInstanceIdentifier(int rep) { 
951                EI retVal = this.getTypedField(18, rep);
952                return retVal;
953    }
954
955    /**
956     * Returns a specific repetition of
957     * OBX-18: "Equipment Instance Identifier" - creates it if necessary
958     *
959     * @param rep The repetition index (0-indexed)
960     */
961    public EI getObx18_EquipmentInstanceIdentifier(int rep) { 
962                EI retVal = this.getTypedField(18, rep);
963                return retVal;
964    }
965
966    /**
967     * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
968     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
969     * it will return zero.
970     */
971    public int getObx18_EquipmentInstanceIdentifierReps() {
972        return this.getReps(18);
973    }
974
975
976    /**
977     * Inserts a repetition of
978     * OBX-18: "Equipment Instance Identifier" at a specific index
979     *
980     * @param rep The repetition index (0-indexed)
981     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
982     */
983    public EI insertEquipmentInstanceIdentifier(int rep) throws HL7Exception { 
984        return (EI) super.insertRepetition(18, rep);
985    }
986
987
988    /**
989     * Inserts a repetition of
990     * OBX-18: "Equipment Instance Identifier" at a specific index
991     *
992     * @param rep The repetition index (0-indexed)
993     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
994     */
995    public EI insertObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception { 
996        return (EI) super.insertRepetition(18, rep);
997    }
998
999
1000    /**
1001     * Removes a repetition of
1002     * OBX-18: "Equipment Instance Identifier" at a specific index
1003     *
1004     * @param rep The repetition index (0-indexed)
1005     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1006     */
1007    public EI removeEquipmentInstanceIdentifier(int rep) throws HL7Exception { 
1008        return (EI) super.removeRepetition(18, rep);
1009    }
1010
1011
1012    /**
1013     * Removes a repetition of
1014     * OBX-18: "Equipment Instance Identifier" at a specific index
1015     *
1016     * @param rep The repetition index (0-indexed)
1017     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1018     */
1019    public EI removeObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception { 
1020        return (EI) super.removeRepetition(18, rep);
1021    }
1022
1023
1024
1025
1026    /**
1027     * Returns
1028     * OBX-19: "Date/Time of the Analysis" - creates it if necessary
1029     */
1030    public DTM getDateTimeOfTheAnalysis() { 
1031                DTM retVal = this.getTypedField(19, 0);
1032                return retVal;
1033    }
1034    
1035    /**
1036     * Returns
1037     * OBX-19: "Date/Time of the Analysis" - creates it if necessary
1038     */
1039    public DTM getObx19_DateTimeOfTheAnalysis() { 
1040                DTM retVal = this.getTypedField(19, 0);
1041                return retVal;
1042    }
1043
1044
1045    /**
1046     * Returns all repetitions of Observation Site (OBX-20).
1047     */
1048    public CWE[] getObservationSite() {
1049        CWE[] retVal = this.getTypedField(20, new CWE[0]);
1050        return retVal;
1051    }
1052
1053
1054    /**
1055     * Returns all repetitions of Observation Site (OBX-20).
1056     */
1057    public CWE[] getObx20_ObservationSite() {
1058        CWE[] retVal = this.getTypedField(20, new CWE[0]);
1059        return retVal;
1060    }
1061
1062
1063    /**
1064     * Returns a count of the current number of repetitions of Observation Site (OBX-20).
1065     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1066     * it will return zero.
1067     */
1068    public int getObservationSiteReps() {
1069        return this.getReps(20);
1070    }
1071
1072
1073    /**
1074     * Returns a specific repetition of
1075     * OBX-20: "Observation Site" - creates it if necessary
1076     *
1077     * @param rep The repetition index (0-indexed)
1078     */
1079    public CWE getObservationSite(int rep) { 
1080                CWE retVal = this.getTypedField(20, rep);
1081                return retVal;
1082    }
1083
1084    /**
1085     * Returns a specific repetition of
1086     * OBX-20: "Observation Site" - creates it if necessary
1087     *
1088     * @param rep The repetition index (0-indexed)
1089     */
1090    public CWE getObx20_ObservationSite(int rep) { 
1091                CWE retVal = this.getTypedField(20, rep);
1092                return retVal;
1093    }
1094
1095    /**
1096     * Returns a count of the current number of repetitions of Observation Site (OBX-20).
1097     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1098     * it will return zero.
1099     */
1100    public int getObx20_ObservationSiteReps() {
1101        return this.getReps(20);
1102    }
1103
1104
1105    /**
1106     * Inserts a repetition of
1107     * OBX-20: "Observation Site" at a specific index
1108     *
1109     * @param rep The repetition index (0-indexed)
1110     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1111     */
1112    public CWE insertObservationSite(int rep) throws HL7Exception { 
1113        return (CWE) super.insertRepetition(20, rep);
1114    }
1115
1116
1117    /**
1118     * Inserts a repetition of
1119     * OBX-20: "Observation Site" at a specific index
1120     *
1121     * @param rep The repetition index (0-indexed)
1122     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1123     */
1124    public CWE insertObx20_ObservationSite(int rep) throws HL7Exception { 
1125        return (CWE) super.insertRepetition(20, rep);
1126    }
1127
1128
1129    /**
1130     * Removes a repetition of
1131     * OBX-20: "Observation Site" at a specific index
1132     *
1133     * @param rep The repetition index (0-indexed)
1134     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1135     */
1136    public CWE removeObservationSite(int rep) throws HL7Exception { 
1137        return (CWE) super.removeRepetition(20, rep);
1138    }
1139
1140
1141    /**
1142     * Removes a repetition of
1143     * OBX-20: "Observation Site" at a specific index
1144     *
1145     * @param rep The repetition index (0-indexed)
1146     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1147     */
1148    public CWE removeObx20_ObservationSite(int rep) throws HL7Exception { 
1149        return (CWE) super.removeRepetition(20, rep);
1150    }
1151
1152
1153
1154
1155    /**
1156     * Returns
1157     * OBX-21: "Observation Instance Identifier" - creates it if necessary
1158     */
1159    public EI getObservationInstanceIdentifier() { 
1160                EI retVal = this.getTypedField(21, 0);
1161                return retVal;
1162    }
1163    
1164    /**
1165     * Returns
1166     * OBX-21: "Observation Instance Identifier" - creates it if necessary
1167     */
1168    public EI getObx21_ObservationInstanceIdentifier() { 
1169                EI retVal = this.getTypedField(21, 0);
1170                return retVal;
1171    }
1172
1173
1174
1175    /**
1176     * Returns
1177     * OBX-22: "Mood Code" - creates it if necessary
1178     */
1179    public CNE getMoodCode() { 
1180                CNE retVal = this.getTypedField(22, 0);
1181                return retVal;
1182    }
1183    
1184    /**
1185     * Returns
1186     * OBX-22: "Mood Code" - creates it if necessary
1187     */
1188    public CNE getObx22_MoodCode() { 
1189                CNE retVal = this.getTypedField(22, 0);
1190                return retVal;
1191    }
1192
1193
1194
1195    /**
1196     * Returns
1197     * OBX-23: "Performing Organization Name" - creates it if necessary
1198     */
1199    public XON getPerformingOrganizationName() { 
1200                XON retVal = this.getTypedField(23, 0);
1201                return retVal;
1202    }
1203    
1204    /**
1205     * Returns
1206     * OBX-23: "Performing Organization Name" - creates it if necessary
1207     */
1208    public XON getObx23_PerformingOrganizationName() { 
1209                XON retVal = this.getTypedField(23, 0);
1210                return retVal;
1211    }
1212
1213
1214
1215    /**
1216     * Returns
1217     * OBX-24: "Performing Organization Address" - creates it if necessary
1218     */
1219    public XAD getPerformingOrganizationAddress() { 
1220                XAD retVal = this.getTypedField(24, 0);
1221                return retVal;
1222    }
1223    
1224    /**
1225     * Returns
1226     * OBX-24: "Performing Organization Address" - creates it if necessary
1227     */
1228    public XAD getObx24_PerformingOrganizationAddress() { 
1229                XAD retVal = this.getTypedField(24, 0);
1230                return retVal;
1231    }
1232
1233
1234
1235    /**
1236     * Returns
1237     * OBX-25: "Performing Organization Medical Director" - creates it if necessary
1238     */
1239    public XCN getPerformingOrganizationMedicalDirector() { 
1240                XCN retVal = this.getTypedField(25, 0);
1241                return retVal;
1242    }
1243    
1244    /**
1245     * Returns
1246     * OBX-25: "Performing Organization Medical Director" - creates it if necessary
1247     */
1248    public XCN getObx25_PerformingOrganizationMedicalDirector() { 
1249                XCN retVal = this.getTypedField(25, 0);
1250                return retVal;
1251    }
1252
1253
1254
1255    /**
1256     * Returns
1257     * OBX-26: "Patient Results Release Category" - creates it if necessary
1258     */
1259    public ID getPatientResultsReleaseCategory() { 
1260                ID retVal = this.getTypedField(26, 0);
1261                return retVal;
1262    }
1263    
1264    /**
1265     * Returns
1266     * OBX-26: "Patient Results Release Category" - creates it if necessary
1267     */
1268    public ID getObx26_PatientResultsReleaseCategory() { 
1269                ID retVal = this.getTypedField(26, 0);
1270                return retVal;
1271    }
1272
1273
1274
1275    /**
1276     * Returns
1277     * OBX-27: "Root Cause" - creates it if necessary
1278     */
1279    public CWE getRootCause() { 
1280                CWE retVal = this.getTypedField(27, 0);
1281                return retVal;
1282    }
1283    
1284    /**
1285     * Returns
1286     * OBX-27: "Root Cause" - creates it if necessary
1287     */
1288    public CWE getObx27_RootCause() { 
1289                CWE retVal = this.getTypedField(27, 0);
1290                return retVal;
1291    }
1292
1293
1294    /**
1295     * Returns all repetitions of Local Process Control (OBX-28).
1296     */
1297    public CWE[] getLocalProcessControl() {
1298        CWE[] retVal = this.getTypedField(28, new CWE[0]);
1299        return retVal;
1300    }
1301
1302
1303    /**
1304     * Returns all repetitions of Local Process Control (OBX-28).
1305     */
1306    public CWE[] getObx28_LocalProcessControl() {
1307        CWE[] retVal = this.getTypedField(28, new CWE[0]);
1308        return retVal;
1309    }
1310
1311
1312    /**
1313     * Returns a count of the current number of repetitions of Local Process Control (OBX-28).
1314     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1315     * it will return zero.
1316     */
1317    public int getLocalProcessControlReps() {
1318        return this.getReps(28);
1319    }
1320
1321
1322    /**
1323     * Returns a specific repetition of
1324     * OBX-28: "Local Process Control" - creates it if necessary
1325     *
1326     * @param rep The repetition index (0-indexed)
1327     */
1328    public CWE getLocalProcessControl(int rep) { 
1329                CWE retVal = this.getTypedField(28, rep);
1330                return retVal;
1331    }
1332
1333    /**
1334     * Returns a specific repetition of
1335     * OBX-28: "Local Process Control" - creates it if necessary
1336     *
1337     * @param rep The repetition index (0-indexed)
1338     */
1339    public CWE getObx28_LocalProcessControl(int rep) { 
1340                CWE retVal = this.getTypedField(28, rep);
1341                return retVal;
1342    }
1343
1344    /**
1345     * Returns a count of the current number of repetitions of Local Process Control (OBX-28).
1346     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1347     * it will return zero.
1348     */
1349    public int getObx28_LocalProcessControlReps() {
1350        return this.getReps(28);
1351    }
1352
1353
1354    /**
1355     * Inserts a repetition of
1356     * OBX-28: "Local Process Control" at a specific index
1357     *
1358     * @param rep The repetition index (0-indexed)
1359     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1360     */
1361    public CWE insertLocalProcessControl(int rep) throws HL7Exception { 
1362        return (CWE) super.insertRepetition(28, rep);
1363    }
1364
1365
1366    /**
1367     * Inserts a repetition of
1368     * OBX-28: "Local Process Control" at a specific index
1369     *
1370     * @param rep The repetition index (0-indexed)
1371     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1372     */
1373    public CWE insertObx28_LocalProcessControl(int rep) throws HL7Exception { 
1374        return (CWE) super.insertRepetition(28, rep);
1375    }
1376
1377
1378    /**
1379     * Removes a repetition of
1380     * OBX-28: "Local Process Control" at a specific index
1381     *
1382     * @param rep The repetition index (0-indexed)
1383     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1384     */
1385    public CWE removeLocalProcessControl(int rep) throws HL7Exception { 
1386        return (CWE) super.removeRepetition(28, rep);
1387    }
1388
1389
1390    /**
1391     * Removes a repetition of
1392     * OBX-28: "Local Process Control" at a specific index
1393     *
1394     * @param rep The repetition index (0-indexed)
1395     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1396     */
1397    public CWE removeObx28_LocalProcessControl(int rep) throws HL7Exception { 
1398        return (CWE) super.removeRepetition(28, rep);
1399    }
1400
1401
1402
1403
1404    /**
1405     * Returns
1406     * OBX-29: "Observation Type" - creates it if necessary
1407     */
1408    public ID getObservationType() { 
1409                ID retVal = this.getTypedField(29, 0);
1410                return retVal;
1411    }
1412    
1413    /**
1414     * Returns
1415     * OBX-29: "Observation Type" - creates it if necessary
1416     */
1417    public ID getObx29_ObservationType() { 
1418                ID retVal = this.getTypedField(29, 0);
1419                return retVal;
1420    }
1421
1422
1423
1424
1425
1426    /** {@inheritDoc} */   
1427    protected Type createNewTypeWithoutReflection(int field) {
1428       switch (field) {
1429          case 0: return new SI(getMessage());
1430          case 1: return new ID(getMessage(), new Integer( 125 ));
1431          case 2: return new CWE(getMessage());
1432          case 3: return new ST(getMessage());
1433          case 4: return new Varies(getMessage());
1434          case 5: return new CWE(getMessage());
1435          case 6: return new ST(getMessage());
1436          case 7: return new CWE(getMessage());
1437          case 8: return new NM(getMessage());
1438          case 9: return new ID(getMessage(), new Integer( 80 ));
1439          case 10: return new ID(getMessage(), new Integer( 85 ));
1440          case 11: return new DTM(getMessage());
1441          case 12: return new ST(getMessage());
1442          case 13: return new DTM(getMessage());
1443          case 14: return new CWE(getMessage());
1444          case 15: return new XCN(getMessage());
1445          case 16: return new CWE(getMessage());
1446          case 17: return new EI(getMessage());
1447          case 18: return new DTM(getMessage());
1448          case 19: return new CWE(getMessage());
1449          case 20: return new EI(getMessage());
1450          case 21: return new CNE(getMessage());
1451          case 22: return new XON(getMessage());
1452          case 23: return new XAD(getMessage());
1453          case 24: return new XCN(getMessage());
1454          case 25: return new ID(getMessage(), new Integer( 909 ));
1455          case 26: return new CWE(getMessage());
1456          case 27: return new CWE(getMessage());
1457          case 28: return new ID(getMessage(), new Integer( 936 ));
1458          default: return null;
1459       }
1460   }
1461
1462
1463}
1464