001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v251.segment;
035
036// import ca.uhn.hl7v2.model.v251.group.*;
037import ca.uhn.hl7v2.model.v251.datatype.*;
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
041import ca.uhn.hl7v2.model.AbstractMessage;
042import ca.uhn.hl7v2.model.Group;
043import ca.uhn.hl7v2.model.Type;
044import ca.uhn.hl7v2.model.AbstractSegment;
045import ca.uhn.hl7v2.model.Varies;
046
047/**
048 *<p>Represents an HL7 OBX message segment (Observation/Result). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>OBX-1: Set ID - OBX (SI) <b>optional </b>
052     * <li>OBX-2: Value Type (ID) <b>optional </b>
053     * <li>OBX-3: Observation Identifier (CE) <b> </b>
054     * <li>OBX-4: Observation Sub-ID (ST) <b>optional </b>
055     * <li>OBX-5: Observation Value (Varies) <b>optional repeating</b>
056     * <li>OBX-6: Units (CE) <b>optional </b>
057     * <li>OBX-7: References Range (ST) <b>optional </b>
058     * <li>OBX-8: Abnormal Flags (IS) <b>optional repeating</b>
059     * <li>OBX-9: Probability (NM) <b>optional </b>
060     * <li>OBX-10: Nature of Abnormal Test (ID) <b>optional repeating</b>
061     * <li>OBX-11: Observation Result Status (ID) <b> </b>
062     * <li>OBX-12: Effective Date of Reference Range Values (TS) <b>optional </b>
063     * <li>OBX-13: User Defined Access Checks (ST) <b>optional </b>
064     * <li>OBX-14: Date/Time of the Observation (TS) <b>optional </b>
065     * <li>OBX-15: Producer's Reference (CE) <b>optional </b>
066     * <li>OBX-16: Responsible Observer (XCN) <b>optional repeating</b>
067     * <li>OBX-17: Observation Method (CE) <b>optional repeating</b>
068     * <li>OBX-18: Equipment Instance Identifier (EI) <b>optional repeating</b>
069     * <li>OBX-19: Date/Time of the Analysis (TS) <b>optional </b>
070     * <li>OBX-20: Reserved for harmonization with V2.6 (Varies) <b>optional </b>
071     * <li>OBX-21: Reserved for harmonization with V2.6 Number 2 (Varies) <b>optional </b>
072     * <li>OBX-22: Reserved for harmonization with V2.6 Number 3 (Varies) <b>optional </b>
073     * <li>OBX-23: Performing Organization Name (XON) <b>optional </b>
074     * <li>OBX-24: Performing Organization Address (XAD) <b>optional </b>
075     * <li>OBX-25: Performing Organization Medical Director (XCN) <b>optional </b>
076 * </ul>
077 */
078@SuppressWarnings("unused")
079public class OBX extends AbstractSegment {
080
081    /** 
082     * Creates a new OBX segment
083     */
084    public OBX(Group parent, ModelClassFactory factory) {
085       super(parent, factory);
086       init(factory);
087    }
088
089    private void init(ModelClassFactory factory) {
090       try {
091                                  this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - OBX");
092                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(125) }, "Value Type");
093                                  this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Observation Identifier");
094                                  this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Observation Sub-ID");
095                                  this.add(Varies.class, false, 0, 99999, new Object[]{ getMessage() }, "Observation Value");
096                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Units");
097                                  this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "References Range");
098                                              this.add(IS.class, false, 0, 5, new Object[]{ getMessage(), new Integer(78) }, "Abnormal Flags");
099                                  this.add(NM.class, false, 1, 5, new Object[]{ getMessage() }, "Probability");
100                                              this.add(ID.class, false, 0, 2, new Object[]{ getMessage(), new Integer(80) }, "Nature of Abnormal Test");
101                                              this.add(ID.class, true, 1, 1, new Object[]{ getMessage(), new Integer(85) }, "Observation Result Status");
102                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Effective Date of Reference Range Values");
103                                  this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "User Defined Access Checks");
104                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time of the Observation");
105                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Producer's Reference");
106                                  this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Responsible Observer");
107                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Observation Method");
108                                  this.add(EI.class, false, 0, 22, new Object[]{ getMessage() }, "Equipment Instance Identifier");
109                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time of the Analysis");
110                                  this.add(Varies.class, false, 1, 0, new Object[]{ getMessage() }, "Reserved for harmonization with V2.6");
111                                  this.add(Varies.class, false, 1, 0, new Object[]{ getMessage() }, "Reserved for harmonization with V2.6 Number 2");
112                                  this.add(Varies.class, false, 1, 0, new Object[]{ getMessage() }, "Reserved for harmonization with V2.6 Number 3");
113                                  this.add(XON.class, false, 1, 567, new Object[]{ getMessage() }, "Performing Organization Name");
114                                  this.add(XAD.class, false, 1, 631, new Object[]{ getMessage() }, "Performing Organization Address");
115                                  this.add(XCN.class, false, 1, 3002, new Object[]{ getMessage() }, "Performing Organization Medical Director");
116       } catch(HL7Exception e) {
117          log.error("Unexpected error creating OBX - this is probably a bug in the source code generator.", e);
118       }
119    }
120
121
122
123    /**
124     * Returns
125     * OBX-1: "Set ID - OBX" - creates it if necessary
126     */
127    public SI getSetIDOBX() { 
128                SI retVal = this.getTypedField(1, 0);
129                return retVal;
130    }
131    
132    /**
133     * Returns
134     * OBX-1: "Set ID - OBX" - creates it if necessary
135     */
136    public SI getObx1_SetIDOBX() { 
137                SI retVal = this.getTypedField(1, 0);
138                return retVal;
139    }
140
141
142
143    /**
144     * Returns
145     * OBX-2: "Value Type" - creates it if necessary
146     */
147    public ID getValueType() { 
148                ID retVal = this.getTypedField(2, 0);
149                return retVal;
150    }
151    
152    /**
153     * Returns
154     * OBX-2: "Value Type" - creates it if necessary
155     */
156    public ID getObx2_ValueType() { 
157                ID retVal = this.getTypedField(2, 0);
158                return retVal;
159    }
160
161
162
163    /**
164     * Returns
165     * OBX-3: "Observation Identifier" - creates it if necessary
166     */
167    public CE getObservationIdentifier() { 
168                CE retVal = this.getTypedField(3, 0);
169                return retVal;
170    }
171    
172    /**
173     * Returns
174     * OBX-3: "Observation Identifier" - creates it if necessary
175     */
176    public CE getObx3_ObservationIdentifier() { 
177                CE retVal = this.getTypedField(3, 0);
178                return retVal;
179    }
180
181
182
183    /**
184     * Returns
185     * OBX-4: "Observation Sub-ID" - creates it if necessary
186     */
187    public ST getObservationSubID() { 
188                ST retVal = this.getTypedField(4, 0);
189                return retVal;
190    }
191    
192    /**
193     * Returns
194     * OBX-4: "Observation Sub-ID" - creates it if necessary
195     */
196    public ST getObx4_ObservationSubID() { 
197                ST retVal = this.getTypedField(4, 0);
198                return retVal;
199    }
200
201
202    /**
203     * Returns all repetitions of Observation Value (OBX-5).
204     */
205    public Varies[] getObservationValue() {
206        Varies[] retVal = this.getTypedField(5, new Varies[0]);
207        return retVal;
208    }
209
210
211    /**
212     * Returns all repetitions of Observation Value (OBX-5).
213     */
214    public Varies[] getObx5_ObservationValue() {
215        Varies[] retVal = this.getTypedField(5, new Varies[0]);
216        return retVal;
217    }
218
219
220    /**
221     * Returns a count of the current number of repetitions of Observation Value (OBX-5).
222     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
223     * it will return zero.
224     */
225    public int getObservationValueReps() {
226        return this.getReps(5);
227    }
228
229
230    /**
231     * Returns a specific repetition of
232     * OBX-5: "Observation Value" - creates it if necessary
233     *
234     * @param rep The repetition index (0-indexed)
235     */
236    public Varies getObservationValue(int rep) { 
237                Varies retVal = this.getTypedField(5, rep);
238                return retVal;
239    }
240
241    /**
242     * Returns a specific repetition of
243     * OBX-5: "Observation Value" - creates it if necessary
244     *
245     * @param rep The repetition index (0-indexed)
246     */
247    public Varies getObx5_ObservationValue(int rep) { 
248                Varies retVal = this.getTypedField(5, rep);
249                return retVal;
250    }
251
252    /**
253     * Returns a count of the current number of repetitions of Observation Value (OBX-5).
254     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
255     * it will return zero.
256     */
257    public int getObx5_ObservationValueReps() {
258        return this.getReps(5);
259    }
260
261
262    /**
263     * Inserts a repetition of
264     * OBX-5: "Observation Value" at a specific index
265     *
266     * @param rep The repetition index (0-indexed)
267     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
268     */
269    public Varies insertObservationValue(int rep) throws HL7Exception { 
270        return (Varies) super.insertRepetition(5, rep);
271    }
272
273
274    /**
275     * Inserts a repetition of
276     * OBX-5: "Observation Value" at a specific index
277     *
278     * @param rep The repetition index (0-indexed)
279     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
280     */
281    public Varies insertObx5_ObservationValue(int rep) throws HL7Exception { 
282        return (Varies) super.insertRepetition(5, rep);
283    }
284
285
286    /**
287     * Removes a repetition of
288     * OBX-5: "Observation Value" at a specific index
289     *
290     * @param rep The repetition index (0-indexed)
291     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
292     */
293    public Varies removeObservationValue(int rep) throws HL7Exception { 
294        return (Varies) super.removeRepetition(5, rep);
295    }
296
297
298    /**
299     * Removes a repetition of
300     * OBX-5: "Observation Value" at a specific index
301     *
302     * @param rep The repetition index (0-indexed)
303     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
304     */
305    public Varies removeObx5_ObservationValue(int rep) throws HL7Exception { 
306        return (Varies) super.removeRepetition(5, rep);
307    }
308
309
310
311
312    /**
313     * Returns
314     * OBX-6: "Units" - creates it if necessary
315     */
316    public CE getUnits() { 
317                CE retVal = this.getTypedField(6, 0);
318                return retVal;
319    }
320    
321    /**
322     * Returns
323     * OBX-6: "Units" - creates it if necessary
324     */
325    public CE getObx6_Units() { 
326                CE retVal = this.getTypedField(6, 0);
327                return retVal;
328    }
329
330
331
332    /**
333     * Returns
334     * OBX-7: "References Range" - creates it if necessary
335     */
336    public ST getReferencesRange() { 
337                ST retVal = this.getTypedField(7, 0);
338                return retVal;
339    }
340    
341    /**
342     * Returns
343     * OBX-7: "References Range" - creates it if necessary
344     */
345    public ST getObx7_ReferencesRange() { 
346                ST retVal = this.getTypedField(7, 0);
347                return retVal;
348    }
349
350
351    /**
352     * Returns all repetitions of Abnormal Flags (OBX-8).
353     */
354    public IS[] getAbnormalFlags() {
355        IS[] retVal = this.getTypedField(8, new IS[0]);
356        return retVal;
357    }
358
359
360    /**
361     * Returns all repetitions of Abnormal Flags (OBX-8).
362     */
363    public IS[] getObx8_AbnormalFlags() {
364        IS[] retVal = this.getTypedField(8, new IS[0]);
365        return retVal;
366    }
367
368
369    /**
370     * Returns a count of the current number of repetitions of Abnormal Flags (OBX-8).
371     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
372     * it will return zero.
373     */
374    public int getAbnormalFlagsReps() {
375        return this.getReps(8);
376    }
377
378
379    /**
380     * Returns a specific repetition of
381     * OBX-8: "Abnormal Flags" - creates it if necessary
382     *
383     * @param rep The repetition index (0-indexed)
384     */
385    public IS getAbnormalFlags(int rep) { 
386                IS retVal = this.getTypedField(8, rep);
387                return retVal;
388    }
389
390    /**
391     * Returns a specific repetition of
392     * OBX-8: "Abnormal Flags" - creates it if necessary
393     *
394     * @param rep The repetition index (0-indexed)
395     */
396    public IS getObx8_AbnormalFlags(int rep) { 
397                IS retVal = this.getTypedField(8, rep);
398                return retVal;
399    }
400
401    /**
402     * Returns a count of the current number of repetitions of Abnormal Flags (OBX-8).
403     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
404     * it will return zero.
405     */
406    public int getObx8_AbnormalFlagsReps() {
407        return this.getReps(8);
408    }
409
410
411    /**
412     * Inserts a repetition of
413     * OBX-8: "Abnormal Flags" at a specific index
414     *
415     * @param rep The repetition index (0-indexed)
416     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
417     */
418    public IS insertAbnormalFlags(int rep) throws HL7Exception { 
419        return (IS) super.insertRepetition(8, rep);
420    }
421
422
423    /**
424     * Inserts a repetition of
425     * OBX-8: "Abnormal Flags" at a specific index
426     *
427     * @param rep The repetition index (0-indexed)
428     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
429     */
430    public IS insertObx8_AbnormalFlags(int rep) throws HL7Exception { 
431        return (IS) super.insertRepetition(8, rep);
432    }
433
434
435    /**
436     * Removes a repetition of
437     * OBX-8: "Abnormal Flags" at a specific index
438     *
439     * @param rep The repetition index (0-indexed)
440     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
441     */
442    public IS removeAbnormalFlags(int rep) throws HL7Exception { 
443        return (IS) super.removeRepetition(8, rep);
444    }
445
446
447    /**
448     * Removes a repetition of
449     * OBX-8: "Abnormal Flags" at a specific index
450     *
451     * @param rep The repetition index (0-indexed)
452     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
453     */
454    public IS removeObx8_AbnormalFlags(int rep) throws HL7Exception { 
455        return (IS) super.removeRepetition(8, rep);
456    }
457
458
459
460
461    /**
462     * Returns
463     * OBX-9: "Probability" - creates it if necessary
464     */
465    public NM getProbability() { 
466                NM retVal = this.getTypedField(9, 0);
467                return retVal;
468    }
469    
470    /**
471     * Returns
472     * OBX-9: "Probability" - creates it if necessary
473     */
474    public NM getObx9_Probability() { 
475                NM retVal = this.getTypedField(9, 0);
476                return retVal;
477    }
478
479
480    /**
481     * Returns all repetitions of Nature of Abnormal Test (OBX-10).
482     */
483    public ID[] getNatureOfAbnormalTest() {
484        ID[] retVal = this.getTypedField(10, new ID[0]);
485        return retVal;
486    }
487
488
489    /**
490     * Returns all repetitions of Nature of Abnormal Test (OBX-10).
491     */
492    public ID[] getObx10_NatureOfAbnormalTest() {
493        ID[] retVal = this.getTypedField(10, new ID[0]);
494        return retVal;
495    }
496
497
498    /**
499     * Returns a count of the current number of repetitions of Nature of Abnormal Test (OBX-10).
500     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
501     * it will return zero.
502     */
503    public int getNatureOfAbnormalTestReps() {
504        return this.getReps(10);
505    }
506
507
508    /**
509     * Returns a specific repetition of
510     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
511     *
512     * @param rep The repetition index (0-indexed)
513     */
514    public ID getNatureOfAbnormalTest(int rep) { 
515                ID retVal = this.getTypedField(10, rep);
516                return retVal;
517    }
518
519    /**
520     * Returns a specific repetition of
521     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
522     *
523     * @param rep The repetition index (0-indexed)
524     */
525    public ID getObx10_NatureOfAbnormalTest(int rep) { 
526                ID retVal = this.getTypedField(10, rep);
527                return retVal;
528    }
529
530    /**
531     * Returns a count of the current number of repetitions of Nature of Abnormal Test (OBX-10).
532     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
533     * it will return zero.
534     */
535    public int getObx10_NatureOfAbnormalTestReps() {
536        return this.getReps(10);
537    }
538
539
540    /**
541     * Inserts a repetition of
542     * OBX-10: "Nature of Abnormal Test" at a specific index
543     *
544     * @param rep The repetition index (0-indexed)
545     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
546     */
547    public ID insertNatureOfAbnormalTest(int rep) throws HL7Exception { 
548        return (ID) super.insertRepetition(10, rep);
549    }
550
551
552    /**
553     * Inserts a repetition of
554     * OBX-10: "Nature of Abnormal Test" at a specific index
555     *
556     * @param rep The repetition index (0-indexed)
557     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
558     */
559    public ID insertObx10_NatureOfAbnormalTest(int rep) throws HL7Exception { 
560        return (ID) super.insertRepetition(10, rep);
561    }
562
563
564    /**
565     * Removes a repetition of
566     * OBX-10: "Nature of Abnormal Test" at a specific index
567     *
568     * @param rep The repetition index (0-indexed)
569     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
570     */
571    public ID removeNatureOfAbnormalTest(int rep) throws HL7Exception { 
572        return (ID) super.removeRepetition(10, rep);
573    }
574
575
576    /**
577     * Removes a repetition of
578     * OBX-10: "Nature of Abnormal Test" at a specific index
579     *
580     * @param rep The repetition index (0-indexed)
581     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
582     */
583    public ID removeObx10_NatureOfAbnormalTest(int rep) throws HL7Exception { 
584        return (ID) super.removeRepetition(10, rep);
585    }
586
587
588
589
590    /**
591     * Returns
592     * OBX-11: "Observation Result Status" - creates it if necessary
593     */
594    public ID getObservationResultStatus() { 
595                ID retVal = this.getTypedField(11, 0);
596                return retVal;
597    }
598    
599    /**
600     * Returns
601     * OBX-11: "Observation Result Status" - creates it if necessary
602     */
603    public ID getObx11_ObservationResultStatus() { 
604                ID retVal = this.getTypedField(11, 0);
605                return retVal;
606    }
607
608
609
610    /**
611     * Returns
612     * OBX-12: "Effective Date of Reference Range Values" - creates it if necessary
613     */
614    public TS getEffectiveDateOfReferenceRangeValues() { 
615                TS retVal = this.getTypedField(12, 0);
616                return retVal;
617    }
618    
619    /**
620     * Returns
621     * OBX-12: "Effective Date of Reference Range Values" - creates it if necessary
622     */
623    public TS getObx12_EffectiveDateOfReferenceRangeValues() { 
624                TS retVal = this.getTypedField(12, 0);
625                return retVal;
626    }
627
628
629
630    /**
631     * Returns
632     * OBX-13: "User Defined Access Checks" - creates it if necessary
633     */
634    public ST getUserDefinedAccessChecks() { 
635                ST retVal = this.getTypedField(13, 0);
636                return retVal;
637    }
638    
639    /**
640     * Returns
641     * OBX-13: "User Defined Access Checks" - creates it if necessary
642     */
643    public ST getObx13_UserDefinedAccessChecks() { 
644                ST retVal = this.getTypedField(13, 0);
645                return retVal;
646    }
647
648
649
650    /**
651     * Returns
652     * OBX-14: "Date/Time of the Observation" - creates it if necessary
653     */
654    public TS getDateTimeOfTheObservation() { 
655                TS retVal = this.getTypedField(14, 0);
656                return retVal;
657    }
658    
659    /**
660     * Returns
661     * OBX-14: "Date/Time of the Observation" - creates it if necessary
662     */
663    public TS getObx14_DateTimeOfTheObservation() { 
664                TS retVal = this.getTypedField(14, 0);
665                return retVal;
666    }
667
668
669
670    /**
671     * Returns
672     * OBX-15: "Producer's Reference" - creates it if necessary
673     */
674    public CE getProducerSReference() { 
675                CE retVal = this.getTypedField(15, 0);
676                return retVal;
677    }
678    
679    /**
680     * Returns
681     * OBX-15: "Producer's Reference" - creates it if necessary
682     */
683    public CE getObx15_ProducerSReference() { 
684                CE retVal = this.getTypedField(15, 0);
685                return retVal;
686    }
687
688
689    /**
690     * Returns all repetitions of Responsible Observer (OBX-16).
691     */
692    public XCN[] getResponsibleObserver() {
693        XCN[] retVal = this.getTypedField(16, new XCN[0]);
694        return retVal;
695    }
696
697
698    /**
699     * Returns all repetitions of Responsible Observer (OBX-16).
700     */
701    public XCN[] getObx16_ResponsibleObserver() {
702        XCN[] retVal = this.getTypedField(16, new XCN[0]);
703        return retVal;
704    }
705
706
707    /**
708     * Returns a count of the current number of repetitions of Responsible Observer (OBX-16).
709     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
710     * it will return zero.
711     */
712    public int getResponsibleObserverReps() {
713        return this.getReps(16);
714    }
715
716
717    /**
718     * Returns a specific repetition of
719     * OBX-16: "Responsible Observer" - creates it if necessary
720     *
721     * @param rep The repetition index (0-indexed)
722     */
723    public XCN getResponsibleObserver(int rep) { 
724                XCN retVal = this.getTypedField(16, rep);
725                return retVal;
726    }
727
728    /**
729     * Returns a specific repetition of
730     * OBX-16: "Responsible Observer" - creates it if necessary
731     *
732     * @param rep The repetition index (0-indexed)
733     */
734    public XCN getObx16_ResponsibleObserver(int rep) { 
735                XCN retVal = this.getTypedField(16, rep);
736                return retVal;
737    }
738
739    /**
740     * Returns a count of the current number of repetitions of Responsible Observer (OBX-16).
741     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
742     * it will return zero.
743     */
744    public int getObx16_ResponsibleObserverReps() {
745        return this.getReps(16);
746    }
747
748
749    /**
750     * Inserts a repetition of
751     * OBX-16: "Responsible Observer" at a specific index
752     *
753     * @param rep The repetition index (0-indexed)
754     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
755     */
756    public XCN insertResponsibleObserver(int rep) throws HL7Exception { 
757        return (XCN) super.insertRepetition(16, rep);
758    }
759
760
761    /**
762     * Inserts a repetition of
763     * OBX-16: "Responsible Observer" at a specific index
764     *
765     * @param rep The repetition index (0-indexed)
766     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
767     */
768    public XCN insertObx16_ResponsibleObserver(int rep) throws HL7Exception { 
769        return (XCN) super.insertRepetition(16, rep);
770    }
771
772
773    /**
774     * Removes a repetition of
775     * OBX-16: "Responsible Observer" at a specific index
776     *
777     * @param rep The repetition index (0-indexed)
778     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
779     */
780    public XCN removeResponsibleObserver(int rep) throws HL7Exception { 
781        return (XCN) super.removeRepetition(16, rep);
782    }
783
784
785    /**
786     * Removes a repetition of
787     * OBX-16: "Responsible Observer" at a specific index
788     *
789     * @param rep The repetition index (0-indexed)
790     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
791     */
792    public XCN removeObx16_ResponsibleObserver(int rep) throws HL7Exception { 
793        return (XCN) super.removeRepetition(16, rep);
794    }
795
796
797
798    /**
799     * Returns all repetitions of Observation Method (OBX-17).
800     */
801    public CE[] getObservationMethod() {
802        CE[] retVal = this.getTypedField(17, new CE[0]);
803        return retVal;
804    }
805
806
807    /**
808     * Returns all repetitions of Observation Method (OBX-17).
809     */
810    public CE[] getObx17_ObservationMethod() {
811        CE[] retVal = this.getTypedField(17, new CE[0]);
812        return retVal;
813    }
814
815
816    /**
817     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
818     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
819     * it will return zero.
820     */
821    public int getObservationMethodReps() {
822        return this.getReps(17);
823    }
824
825
826    /**
827     * Returns a specific repetition of
828     * OBX-17: "Observation Method" - creates it if necessary
829     *
830     * @param rep The repetition index (0-indexed)
831     */
832    public CE getObservationMethod(int rep) { 
833                CE retVal = this.getTypedField(17, rep);
834                return retVal;
835    }
836
837    /**
838     * Returns a specific repetition of
839     * OBX-17: "Observation Method" - creates it if necessary
840     *
841     * @param rep The repetition index (0-indexed)
842     */
843    public CE getObx17_ObservationMethod(int rep) { 
844                CE retVal = this.getTypedField(17, rep);
845                return retVal;
846    }
847
848    /**
849     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
850     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
851     * it will return zero.
852     */
853    public int getObx17_ObservationMethodReps() {
854        return this.getReps(17);
855    }
856
857
858    /**
859     * Inserts a repetition of
860     * OBX-17: "Observation Method" at a specific index
861     *
862     * @param rep The repetition index (0-indexed)
863     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
864     */
865    public CE insertObservationMethod(int rep) throws HL7Exception { 
866        return (CE) super.insertRepetition(17, rep);
867    }
868
869
870    /**
871     * Inserts a repetition of
872     * OBX-17: "Observation Method" at a specific index
873     *
874     * @param rep The repetition index (0-indexed)
875     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
876     */
877    public CE insertObx17_ObservationMethod(int rep) throws HL7Exception { 
878        return (CE) super.insertRepetition(17, rep);
879    }
880
881
882    /**
883     * Removes a repetition of
884     * OBX-17: "Observation Method" at a specific index
885     *
886     * @param rep The repetition index (0-indexed)
887     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
888     */
889    public CE removeObservationMethod(int rep) throws HL7Exception { 
890        return (CE) super.removeRepetition(17, rep);
891    }
892
893
894    /**
895     * Removes a repetition of
896     * OBX-17: "Observation Method" at a specific index
897     *
898     * @param rep The repetition index (0-indexed)
899     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
900     */
901    public CE removeObx17_ObservationMethod(int rep) throws HL7Exception { 
902        return (CE) super.removeRepetition(17, rep);
903    }
904
905
906
907    /**
908     * Returns all repetitions of Equipment Instance Identifier (OBX-18).
909     */
910    public EI[] getEquipmentInstanceIdentifier() {
911        EI[] retVal = this.getTypedField(18, new EI[0]);
912        return retVal;
913    }
914
915
916    /**
917     * Returns all repetitions of Equipment Instance Identifier (OBX-18).
918     */
919    public EI[] getObx18_EquipmentInstanceIdentifier() {
920        EI[] retVal = this.getTypedField(18, new EI[0]);
921        return retVal;
922    }
923
924
925    /**
926     * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
927     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
928     * it will return zero.
929     */
930    public int getEquipmentInstanceIdentifierReps() {
931        return this.getReps(18);
932    }
933
934
935    /**
936     * Returns a specific repetition of
937     * OBX-18: "Equipment Instance Identifier" - creates it if necessary
938     *
939     * @param rep The repetition index (0-indexed)
940     */
941    public EI getEquipmentInstanceIdentifier(int rep) { 
942                EI retVal = this.getTypedField(18, rep);
943                return retVal;
944    }
945
946    /**
947     * Returns a specific repetition of
948     * OBX-18: "Equipment Instance Identifier" - creates it if necessary
949     *
950     * @param rep The repetition index (0-indexed)
951     */
952    public EI getObx18_EquipmentInstanceIdentifier(int rep) { 
953                EI retVal = this.getTypedField(18, rep);
954                return retVal;
955    }
956
957    /**
958     * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
959     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
960     * it will return zero.
961     */
962    public int getObx18_EquipmentInstanceIdentifierReps() {
963        return this.getReps(18);
964    }
965
966
967    /**
968     * Inserts a repetition of
969     * OBX-18: "Equipment Instance Identifier" at a specific index
970     *
971     * @param rep The repetition index (0-indexed)
972     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
973     */
974    public EI insertEquipmentInstanceIdentifier(int rep) throws HL7Exception { 
975        return (EI) super.insertRepetition(18, rep);
976    }
977
978
979    /**
980     * Inserts a repetition of
981     * OBX-18: "Equipment Instance Identifier" at a specific index
982     *
983     * @param rep The repetition index (0-indexed)
984     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
985     */
986    public EI insertObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception { 
987        return (EI) super.insertRepetition(18, rep);
988    }
989
990
991    /**
992     * Removes a repetition of
993     * OBX-18: "Equipment Instance Identifier" at a specific index
994     *
995     * @param rep The repetition index (0-indexed)
996     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
997     */
998    public EI removeEquipmentInstanceIdentifier(int rep) throws HL7Exception { 
999        return (EI) super.removeRepetition(18, rep);
1000    }
1001
1002
1003    /**
1004     * Removes a repetition of
1005     * OBX-18: "Equipment Instance Identifier" at a specific index
1006     *
1007     * @param rep The repetition index (0-indexed)
1008     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1009     */
1010    public EI removeObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception { 
1011        return (EI) super.removeRepetition(18, rep);
1012    }
1013
1014
1015
1016
1017    /**
1018     * Returns
1019     * OBX-19: "Date/Time of the Analysis" - creates it if necessary
1020     */
1021    public TS getDateTimeOfTheAnalysis() { 
1022                TS retVal = this.getTypedField(19, 0);
1023                return retVal;
1024    }
1025    
1026    /**
1027     * Returns
1028     * OBX-19: "Date/Time of the Analysis" - creates it if necessary
1029     */
1030    public TS getObx19_DateTimeOfTheAnalysis() { 
1031                TS retVal = this.getTypedField(19, 0);
1032                return retVal;
1033    }
1034
1035
1036
1037    /**
1038     * Returns
1039     * OBX-20: "Reserved for harmonization with V2.6" - creates it if necessary
1040     */
1041    public Varies getReservedForHarmonizationWithV26() { 
1042                Varies retVal = this.getTypedField(20, 0);
1043                return retVal;
1044    }
1045    
1046    /**
1047     * Returns
1048     * OBX-20: "Reserved for harmonization with V2.6" - creates it if necessary
1049     */
1050    public Varies getObx20_ReservedForHarmonizationWithV26() { 
1051                Varies retVal = this.getTypedField(20, 0);
1052                return retVal;
1053    }
1054
1055
1056
1057    /**
1058     * Returns
1059     * OBX-21: "Reserved for harmonization with V2.6 Number 2" - creates it if necessary
1060     */
1061    public Varies getReservedForHarmonizationWithV26Number2() { 
1062                Varies retVal = this.getTypedField(21, 0);
1063                return retVal;
1064    }
1065    
1066    /**
1067     * Returns
1068     * OBX-21: "Reserved for harmonization with V2.6 Number 2" - creates it if necessary
1069     */
1070    public Varies getObx21_ReservedForHarmonizationWithV26Number2() { 
1071                Varies retVal = this.getTypedField(21, 0);
1072                return retVal;
1073    }
1074
1075
1076
1077    /**
1078     * Returns
1079     * OBX-22: "Reserved for harmonization with V2.6 Number 3" - creates it if necessary
1080     */
1081    public Varies getReservedForHarmonizationWithV26Number3() { 
1082                Varies retVal = this.getTypedField(22, 0);
1083                return retVal;
1084    }
1085    
1086    /**
1087     * Returns
1088     * OBX-22: "Reserved for harmonization with V2.6 Number 3" - creates it if necessary
1089     */
1090    public Varies getObx22_ReservedForHarmonizationWithV26Number3() { 
1091                Varies retVal = this.getTypedField(22, 0);
1092                return retVal;
1093    }
1094
1095
1096
1097    /**
1098     * Returns
1099     * OBX-23: "Performing Organization Name" - creates it if necessary
1100     */
1101    public XON getPerformingOrganizationName() { 
1102                XON retVal = this.getTypedField(23, 0);
1103                return retVal;
1104    }
1105    
1106    /**
1107     * Returns
1108     * OBX-23: "Performing Organization Name" - creates it if necessary
1109     */
1110    public XON getObx23_PerformingOrganizationName() { 
1111                XON retVal = this.getTypedField(23, 0);
1112                return retVal;
1113    }
1114
1115
1116
1117    /**
1118     * Returns
1119     * OBX-24: "Performing Organization Address" - creates it if necessary
1120     */
1121    public XAD getPerformingOrganizationAddress() { 
1122                XAD retVal = this.getTypedField(24, 0);
1123                return retVal;
1124    }
1125    
1126    /**
1127     * Returns
1128     * OBX-24: "Performing Organization Address" - creates it if necessary
1129     */
1130    public XAD getObx24_PerformingOrganizationAddress() { 
1131                XAD retVal = this.getTypedField(24, 0);
1132                return retVal;
1133    }
1134
1135
1136
1137    /**
1138     * Returns
1139     * OBX-25: "Performing Organization Medical Director" - creates it if necessary
1140     */
1141    public XCN getPerformingOrganizationMedicalDirector() { 
1142                XCN retVal = this.getTypedField(25, 0);
1143                return retVal;
1144    }
1145    
1146    /**
1147     * Returns
1148     * OBX-25: "Performing Organization Medical Director" - creates it if necessary
1149     */
1150    public XCN getObx25_PerformingOrganizationMedicalDirector() { 
1151                XCN retVal = this.getTypedField(25, 0);
1152                return retVal;
1153    }
1154
1155
1156
1157
1158
1159    /** {@inheritDoc} */   
1160    protected Type createNewTypeWithoutReflection(int field) {
1161       switch (field) {
1162          case 0: return new SI(getMessage());
1163          case 1: return new ID(getMessage(), new Integer( 125 ));
1164          case 2: return new CE(getMessage());
1165          case 3: return new ST(getMessage());
1166          case 4: return new Varies(getMessage());
1167          case 5: return new CE(getMessage());
1168          case 6: return new ST(getMessage());
1169          case 7: return new IS(getMessage(), new Integer( 78 ));
1170          case 8: return new NM(getMessage());
1171          case 9: return new ID(getMessage(), new Integer( 80 ));
1172          case 10: return new ID(getMessage(), new Integer( 85 ));
1173          case 11: return new TS(getMessage());
1174          case 12: return new ST(getMessage());
1175          case 13: return new TS(getMessage());
1176          case 14: return new CE(getMessage());
1177          case 15: return new XCN(getMessage());
1178          case 16: return new CE(getMessage());
1179          case 17: return new EI(getMessage());
1180          case 18: return new TS(getMessage());
1181          case 19: return new Varies(getMessage());
1182          case 20: return new Varies(getMessage());
1183          case 21: return new Varies(getMessage());
1184          case 22: return new XON(getMessage());
1185          case 23: return new XAD(getMessage());
1186          case 24: return new XCN(getMessage());
1187          default: return null;
1188       }
1189   }
1190
1191
1192}
1193