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.v25.segment;
035
036// import ca.uhn.hl7v2.model.v25.group.*;
037import ca.uhn.hl7v2.model.v25.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 (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 ID (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 * </ul>
071 */
072@SuppressWarnings("unused")
073public class OBX extends AbstractSegment {
074
075    /** 
076     * Creates a new OBX segment
077     */
078    public OBX(Group parent, ModelClassFactory factory) {
079       super(parent, factory);
080       init(factory);
081    }
082
083    private void init(ModelClassFactory factory) {
084       try {
085                                  this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - OBX");
086                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(125) }, "Value Type");
087                                  this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Observation Identifier");
088                                  this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Observation Sub-ID");
089                                  this.add(Varies.class, false, 0, 99999, new Object[]{ getMessage() }, "Observation Value");
090                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Units");
091                                  this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "References Range");
092                                              this.add(IS.class, false, 0, 5, new Object[]{ getMessage(), new Integer(78) }, "Abnormal Flags");
093                                  this.add(NM.class, false, 1, 5, new Object[]{ getMessage() }, "Probability");
094                                              this.add(ID.class, false, 0, 2, new Object[]{ getMessage(), new Integer(80) }, "Nature of Abnormal Test");
095                                              this.add(ID.class, true, 1, 1, new Object[]{ getMessage(), new Integer(85) }, "Observation Result Status");
096                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Effective Date of Reference Range");
097                                  this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "User Defined Access Checks");
098                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time of the Observation");
099                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Producer's ID");
100                                  this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Responsible Observer");
101                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Observation Method");
102                                  this.add(EI.class, false, 0, 22, new Object[]{ getMessage() }, "Equipment Instance Identifier");
103                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time of the Analysis");
104       } catch(HL7Exception e) {
105          log.error("Unexpected error creating OBX - this is probably a bug in the source code generator.", e);
106       }
107    }
108
109
110
111    /**
112     * Returns
113     * OBX-1: "Set ID - OBX" - creates it if necessary
114     */
115    public SI getSetIDOBX() { 
116                SI retVal = this.getTypedField(1, 0);
117                return retVal;
118    }
119    
120    /**
121     * Returns
122     * OBX-1: "Set ID - OBX" - creates it if necessary
123     */
124    public SI getObx1_SetIDOBX() { 
125                SI retVal = this.getTypedField(1, 0);
126                return retVal;
127    }
128
129
130
131    /**
132     * Returns
133     * OBX-2: "Value Type" - creates it if necessary
134     */
135    public ID getValueType() { 
136                ID retVal = this.getTypedField(2, 0);
137                return retVal;
138    }
139    
140    /**
141     * Returns
142     * OBX-2: "Value Type" - creates it if necessary
143     */
144    public ID getObx2_ValueType() { 
145                ID retVal = this.getTypedField(2, 0);
146                return retVal;
147    }
148
149
150
151    /**
152     * Returns
153     * OBX-3: "Observation Identifier" - creates it if necessary
154     */
155    public CE getObservationIdentifier() { 
156                CE retVal = this.getTypedField(3, 0);
157                return retVal;
158    }
159    
160    /**
161     * Returns
162     * OBX-3: "Observation Identifier" - creates it if necessary
163     */
164    public CE getObx3_ObservationIdentifier() { 
165                CE retVal = this.getTypedField(3, 0);
166                return retVal;
167    }
168
169
170
171    /**
172     * Returns
173     * OBX-4: "Observation Sub-ID" - creates it if necessary
174     */
175    public ST getObservationSubID() { 
176                ST retVal = this.getTypedField(4, 0);
177                return retVal;
178    }
179    
180    /**
181     * Returns
182     * OBX-4: "Observation Sub-ID" - creates it if necessary
183     */
184    public ST getObx4_ObservationSubID() { 
185                ST retVal = this.getTypedField(4, 0);
186                return retVal;
187    }
188
189
190    /**
191     * Returns all repetitions of Observation Value (OBX-5).
192     */
193    public Varies[] getObservationValue() {
194        Varies[] retVal = this.getTypedField(5, new Varies[0]);
195        return retVal;
196    }
197
198
199    /**
200     * Returns all repetitions of Observation Value (OBX-5).
201     */
202    public Varies[] getObx5_ObservationValue() {
203        Varies[] retVal = this.getTypedField(5, new Varies[0]);
204        return retVal;
205    }
206
207
208    /**
209     * Returns a count of the current number of repetitions of Observation Value (OBX-5).
210     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
211     * it will return zero.
212     */
213    public int getObservationValueReps() {
214        return this.getReps(5);
215    }
216
217
218    /**
219     * Returns a specific repetition of
220     * OBX-5: "Observation Value" - creates it if necessary
221     *
222     * @param rep The repetition index (0-indexed)
223     */
224    public Varies getObservationValue(int rep) { 
225                Varies retVal = this.getTypedField(5, rep);
226                return retVal;
227    }
228
229    /**
230     * Returns a specific repetition of
231     * OBX-5: "Observation Value" - creates it if necessary
232     *
233     * @param rep The repetition index (0-indexed)
234     */
235    public Varies getObx5_ObservationValue(int rep) { 
236                Varies retVal = this.getTypedField(5, rep);
237                return retVal;
238    }
239
240    /**
241     * Returns a count of the current number of repetitions of Observation Value (OBX-5).
242     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
243     * it will return zero.
244     */
245    public int getObx5_ObservationValueReps() {
246        return this.getReps(5);
247    }
248
249
250    /**
251     * Inserts a repetition of
252     * OBX-5: "Observation Value" at a specific index
253     *
254     * @param rep The repetition index (0-indexed)
255     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
256     */
257    public Varies insertObservationValue(int rep) throws HL7Exception { 
258        return (Varies) super.insertRepetition(5, rep);
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 insertObx5_ObservationValue(int rep) throws HL7Exception { 
270        return (Varies) super.insertRepetition(5, rep);
271    }
272
273
274    /**
275     * Removes 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 removeObservationValue(int rep) throws HL7Exception { 
282        return (Varies) super.removeRepetition(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 removeObx5_ObservationValue(int rep) throws HL7Exception { 
294        return (Varies) super.removeRepetition(5, rep);
295    }
296
297
298
299
300    /**
301     * Returns
302     * OBX-6: "Units" - creates it if necessary
303     */
304    public CE getUnits() { 
305                CE retVal = this.getTypedField(6, 0);
306                return retVal;
307    }
308    
309    /**
310     * Returns
311     * OBX-6: "Units" - creates it if necessary
312     */
313    public CE getObx6_Units() { 
314                CE retVal = this.getTypedField(6, 0);
315                return retVal;
316    }
317
318
319
320    /**
321     * Returns
322     * OBX-7: "References Range" - creates it if necessary
323     */
324    public ST getReferencesRange() { 
325                ST retVal = this.getTypedField(7, 0);
326                return retVal;
327    }
328    
329    /**
330     * Returns
331     * OBX-7: "References Range" - creates it if necessary
332     */
333    public ST getObx7_ReferencesRange() { 
334                ST retVal = this.getTypedField(7, 0);
335                return retVal;
336    }
337
338
339    /**
340     * Returns all repetitions of Abnormal Flags (OBX-8).
341     */
342    public IS[] getAbnormalFlags() {
343        IS[] retVal = this.getTypedField(8, new IS[0]);
344        return retVal;
345    }
346
347
348    /**
349     * Returns all repetitions of Abnormal Flags (OBX-8).
350     */
351    public IS[] getObx8_AbnormalFlags() {
352        IS[] retVal = this.getTypedField(8, new IS[0]);
353        return retVal;
354    }
355
356
357    /**
358     * Returns a count of the current number of repetitions of Abnormal Flags (OBX-8).
359     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
360     * it will return zero.
361     */
362    public int getAbnormalFlagsReps() {
363        return this.getReps(8);
364    }
365
366
367    /**
368     * Returns a specific repetition of
369     * OBX-8: "Abnormal Flags" - creates it if necessary
370     *
371     * @param rep The repetition index (0-indexed)
372     */
373    public IS getAbnormalFlags(int rep) { 
374                IS retVal = this.getTypedField(8, rep);
375                return retVal;
376    }
377
378    /**
379     * Returns a specific repetition of
380     * OBX-8: "Abnormal Flags" - creates it if necessary
381     *
382     * @param rep The repetition index (0-indexed)
383     */
384    public IS getObx8_AbnormalFlags(int rep) { 
385                IS retVal = this.getTypedField(8, rep);
386                return retVal;
387    }
388
389    /**
390     * Returns a count of the current number of repetitions of Abnormal Flags (OBX-8).
391     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
392     * it will return zero.
393     */
394    public int getObx8_AbnormalFlagsReps() {
395        return this.getReps(8);
396    }
397
398
399    /**
400     * Inserts a repetition of
401     * OBX-8: "Abnormal Flags" at a specific index
402     *
403     * @param rep The repetition index (0-indexed)
404     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
405     */
406    public IS insertAbnormalFlags(int rep) throws HL7Exception { 
407        return (IS) super.insertRepetition(8, rep);
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 insertObx8_AbnormalFlags(int rep) throws HL7Exception { 
419        return (IS) super.insertRepetition(8, rep);
420    }
421
422
423    /**
424     * Removes 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 removeAbnormalFlags(int rep) throws HL7Exception { 
431        return (IS) super.removeRepetition(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 removeObx8_AbnormalFlags(int rep) throws HL7Exception { 
443        return (IS) super.removeRepetition(8, rep);
444    }
445
446
447
448
449    /**
450     * Returns
451     * OBX-9: "Probability" - creates it if necessary
452     */
453    public NM getProbability() { 
454                NM retVal = this.getTypedField(9, 0);
455                return retVal;
456    }
457    
458    /**
459     * Returns
460     * OBX-9: "Probability" - creates it if necessary
461     */
462    public NM getObx9_Probability() { 
463                NM retVal = this.getTypedField(9, 0);
464                return retVal;
465    }
466
467
468    /**
469     * Returns all repetitions of Nature of Abnormal Test (OBX-10).
470     */
471    public ID[] getNatureOfAbnormalTest() {
472        ID[] retVal = this.getTypedField(10, new ID[0]);
473        return retVal;
474    }
475
476
477    /**
478     * Returns all repetitions of Nature of Abnormal Test (OBX-10).
479     */
480    public ID[] getObx10_NatureOfAbnormalTest() {
481        ID[] retVal = this.getTypedField(10, new ID[0]);
482        return retVal;
483    }
484
485
486    /**
487     * Returns a count of the current number of repetitions of Nature of Abnormal Test (OBX-10).
488     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
489     * it will return zero.
490     */
491    public int getNatureOfAbnormalTestReps() {
492        return this.getReps(10);
493    }
494
495
496    /**
497     * Returns a specific repetition of
498     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
499     *
500     * @param rep The repetition index (0-indexed)
501     */
502    public ID getNatureOfAbnormalTest(int rep) { 
503                ID retVal = this.getTypedField(10, rep);
504                return retVal;
505    }
506
507    /**
508     * Returns a specific repetition of
509     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
510     *
511     * @param rep The repetition index (0-indexed)
512     */
513    public ID getObx10_NatureOfAbnormalTest(int rep) { 
514                ID retVal = this.getTypedField(10, rep);
515                return retVal;
516    }
517
518    /**
519     * Returns a count of the current number of repetitions of Nature of Abnormal Test (OBX-10).
520     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
521     * it will return zero.
522     */
523    public int getObx10_NatureOfAbnormalTestReps() {
524        return this.getReps(10);
525    }
526
527
528    /**
529     * Inserts a repetition of
530     * OBX-10: "Nature of Abnormal Test" at a specific index
531     *
532     * @param rep The repetition index (0-indexed)
533     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
534     */
535    public ID insertNatureOfAbnormalTest(int rep) throws HL7Exception { 
536        return (ID) super.insertRepetition(10, rep);
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 insertObx10_NatureOfAbnormalTest(int rep) throws HL7Exception { 
548        return (ID) super.insertRepetition(10, rep);
549    }
550
551
552    /**
553     * Removes 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 removeNatureOfAbnormalTest(int rep) throws HL7Exception { 
560        return (ID) super.removeRepetition(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 removeObx10_NatureOfAbnormalTest(int rep) throws HL7Exception { 
572        return (ID) super.removeRepetition(10, rep);
573    }
574
575
576
577
578    /**
579     * Returns
580     * OBX-11: "Observation Result Status" - creates it if necessary
581     */
582    public ID getObservationResultStatus() { 
583                ID retVal = this.getTypedField(11, 0);
584                return retVal;
585    }
586    
587    /**
588     * Returns
589     * OBX-11: "Observation Result Status" - creates it if necessary
590     */
591    public ID getObx11_ObservationResultStatus() { 
592                ID retVal = this.getTypedField(11, 0);
593                return retVal;
594    }
595
596
597
598    /**
599     * Returns
600     * OBX-12: "Effective Date of Reference Range" - creates it if necessary
601     */
602    public TS getEffectiveDateOfReferenceRange() { 
603                TS retVal = this.getTypedField(12, 0);
604                return retVal;
605    }
606    
607    /**
608     * Returns
609     * OBX-12: "Effective Date of Reference Range" - creates it if necessary
610     */
611    public TS getObx12_EffectiveDateOfReferenceRange() { 
612                TS retVal = this.getTypedField(12, 0);
613                return retVal;
614    }
615
616
617
618    /**
619     * Returns
620     * OBX-13: "User Defined Access Checks" - creates it if necessary
621     */
622    public ST getUserDefinedAccessChecks() { 
623                ST retVal = this.getTypedField(13, 0);
624                return retVal;
625    }
626    
627    /**
628     * Returns
629     * OBX-13: "User Defined Access Checks" - creates it if necessary
630     */
631    public ST getObx13_UserDefinedAccessChecks() { 
632                ST retVal = this.getTypedField(13, 0);
633                return retVal;
634    }
635
636
637
638    /**
639     * Returns
640     * OBX-14: "Date/Time of the Observation" - creates it if necessary
641     */
642    public TS getDateTimeOfTheObservation() { 
643                TS retVal = this.getTypedField(14, 0);
644                return retVal;
645    }
646    
647    /**
648     * Returns
649     * OBX-14: "Date/Time of the Observation" - creates it if necessary
650     */
651    public TS getObx14_DateTimeOfTheObservation() { 
652                TS retVal = this.getTypedField(14, 0);
653                return retVal;
654    }
655
656
657
658    /**
659     * Returns
660     * OBX-15: "Producer's ID" - creates it if necessary
661     */
662    public CE getProducerSID() { 
663                CE retVal = this.getTypedField(15, 0);
664                return retVal;
665    }
666    
667    /**
668     * Returns
669     * OBX-15: "Producer's ID" - creates it if necessary
670     */
671    public CE getObx15_ProducerSID() { 
672                CE retVal = this.getTypedField(15, 0);
673                return retVal;
674    }
675
676
677    /**
678     * Returns all repetitions of Responsible Observer (OBX-16).
679     */
680    public XCN[] getResponsibleObserver() {
681        XCN[] retVal = this.getTypedField(16, new XCN[0]);
682        return retVal;
683    }
684
685
686    /**
687     * Returns all repetitions of Responsible Observer (OBX-16).
688     */
689    public XCN[] getObx16_ResponsibleObserver() {
690        XCN[] retVal = this.getTypedField(16, new XCN[0]);
691        return retVal;
692    }
693
694
695    /**
696     * Returns a count of the current number of repetitions of Responsible Observer (OBX-16).
697     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
698     * it will return zero.
699     */
700    public int getResponsibleObserverReps() {
701        return this.getReps(16);
702    }
703
704
705    /**
706     * Returns a specific repetition of
707     * OBX-16: "Responsible Observer" - creates it if necessary
708     *
709     * @param rep The repetition index (0-indexed)
710     */
711    public XCN getResponsibleObserver(int rep) { 
712                XCN retVal = this.getTypedField(16, rep);
713                return retVal;
714    }
715
716    /**
717     * Returns a specific repetition of
718     * OBX-16: "Responsible Observer" - creates it if necessary
719     *
720     * @param rep The repetition index (0-indexed)
721     */
722    public XCN getObx16_ResponsibleObserver(int rep) { 
723                XCN retVal = this.getTypedField(16, rep);
724                return retVal;
725    }
726
727    /**
728     * Returns a count of the current number of repetitions of Responsible Observer (OBX-16).
729     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
730     * it will return zero.
731     */
732    public int getObx16_ResponsibleObserverReps() {
733        return this.getReps(16);
734    }
735
736
737    /**
738     * Inserts a repetition of
739     * OBX-16: "Responsible Observer" at a specific index
740     *
741     * @param rep The repetition index (0-indexed)
742     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
743     */
744    public XCN insertResponsibleObserver(int rep) throws HL7Exception { 
745        return (XCN) super.insertRepetition(16, rep);
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 insertObx16_ResponsibleObserver(int rep) throws HL7Exception { 
757        return (XCN) super.insertRepetition(16, rep);
758    }
759
760
761    /**
762     * Removes 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 removeResponsibleObserver(int rep) throws HL7Exception { 
769        return (XCN) super.removeRepetition(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 removeObx16_ResponsibleObserver(int rep) throws HL7Exception { 
781        return (XCN) super.removeRepetition(16, rep);
782    }
783
784
785
786    /**
787     * Returns all repetitions of Observation Method (OBX-17).
788     */
789    public CE[] getObservationMethod() {
790        CE[] retVal = this.getTypedField(17, new CE[0]);
791        return retVal;
792    }
793
794
795    /**
796     * Returns all repetitions of Observation Method (OBX-17).
797     */
798    public CE[] getObx17_ObservationMethod() {
799        CE[] retVal = this.getTypedField(17, new CE[0]);
800        return retVal;
801    }
802
803
804    /**
805     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
806     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
807     * it will return zero.
808     */
809    public int getObservationMethodReps() {
810        return this.getReps(17);
811    }
812
813
814    /**
815     * Returns a specific repetition of
816     * OBX-17: "Observation Method" - creates it if necessary
817     *
818     * @param rep The repetition index (0-indexed)
819     */
820    public CE getObservationMethod(int rep) { 
821                CE retVal = this.getTypedField(17, rep);
822                return retVal;
823    }
824
825    /**
826     * Returns a specific repetition of
827     * OBX-17: "Observation Method" - creates it if necessary
828     *
829     * @param rep The repetition index (0-indexed)
830     */
831    public CE getObx17_ObservationMethod(int rep) { 
832                CE retVal = this.getTypedField(17, rep);
833                return retVal;
834    }
835
836    /**
837     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
838     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
839     * it will return zero.
840     */
841    public int getObx17_ObservationMethodReps() {
842        return this.getReps(17);
843    }
844
845
846    /**
847     * Inserts a repetition of
848     * OBX-17: "Observation Method" at a specific index
849     *
850     * @param rep The repetition index (0-indexed)
851     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
852     */
853    public CE insertObservationMethod(int rep) throws HL7Exception { 
854        return (CE) super.insertRepetition(17, rep);
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 insertObx17_ObservationMethod(int rep) throws HL7Exception { 
866        return (CE) super.insertRepetition(17, rep);
867    }
868
869
870    /**
871     * Removes 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 removeObservationMethod(int rep) throws HL7Exception { 
878        return (CE) super.removeRepetition(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 removeObx17_ObservationMethod(int rep) throws HL7Exception { 
890        return (CE) super.removeRepetition(17, rep);
891    }
892
893
894
895    /**
896     * Returns all repetitions of Equipment Instance Identifier (OBX-18).
897     */
898    public EI[] getEquipmentInstanceIdentifier() {
899        EI[] retVal = this.getTypedField(18, new EI[0]);
900        return retVal;
901    }
902
903
904    /**
905     * Returns all repetitions of Equipment Instance Identifier (OBX-18).
906     */
907    public EI[] getObx18_EquipmentInstanceIdentifier() {
908        EI[] retVal = this.getTypedField(18, new EI[0]);
909        return retVal;
910    }
911
912
913    /**
914     * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
915     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
916     * it will return zero.
917     */
918    public int getEquipmentInstanceIdentifierReps() {
919        return this.getReps(18);
920    }
921
922
923    /**
924     * Returns a specific repetition of
925     * OBX-18: "Equipment Instance Identifier" - creates it if necessary
926     *
927     * @param rep The repetition index (0-indexed)
928     */
929    public EI getEquipmentInstanceIdentifier(int rep) { 
930                EI retVal = this.getTypedField(18, rep);
931                return retVal;
932    }
933
934    /**
935     * Returns a specific repetition of
936     * OBX-18: "Equipment Instance Identifier" - creates it if necessary
937     *
938     * @param rep The repetition index (0-indexed)
939     */
940    public EI getObx18_EquipmentInstanceIdentifier(int rep) { 
941                EI retVal = this.getTypedField(18, rep);
942                return retVal;
943    }
944
945    /**
946     * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
947     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
948     * it will return zero.
949     */
950    public int getObx18_EquipmentInstanceIdentifierReps() {
951        return this.getReps(18);
952    }
953
954
955    /**
956     * Inserts a repetition of
957     * OBX-18: "Equipment Instance Identifier" at a specific index
958     *
959     * @param rep The repetition index (0-indexed)
960     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
961     */
962    public EI insertEquipmentInstanceIdentifier(int rep) throws HL7Exception { 
963        return (EI) super.insertRepetition(18, rep);
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 insertObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception { 
975        return (EI) super.insertRepetition(18, rep);
976    }
977
978
979    /**
980     * Removes 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 removeEquipmentInstanceIdentifier(int rep) throws HL7Exception { 
987        return (EI) super.removeRepetition(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 removeObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception { 
999        return (EI) super.removeRepetition(18, rep);
1000    }
1001
1002
1003
1004
1005    /**
1006     * Returns
1007     * OBX-19: "Date/Time of the Analysis" - creates it if necessary
1008     */
1009    public TS getDateTimeOfTheAnalysis() { 
1010                TS retVal = this.getTypedField(19, 0);
1011                return retVal;
1012    }
1013    
1014    /**
1015     * Returns
1016     * OBX-19: "Date/Time of the Analysis" - creates it if necessary
1017     */
1018    public TS getObx19_DateTimeOfTheAnalysis() { 
1019                TS retVal = this.getTypedField(19, 0);
1020                return retVal;
1021    }
1022
1023
1024
1025
1026
1027    /** {@inheritDoc} */   
1028    protected Type createNewTypeWithoutReflection(int field) {
1029       switch (field) {
1030          case 0: return new SI(getMessage());
1031          case 1: return new ID(getMessage(), new Integer( 125 ));
1032          case 2: return new CE(getMessage());
1033          case 3: return new ST(getMessage());
1034          case 4: return new Varies(getMessage());
1035          case 5: return new CE(getMessage());
1036          case 6: return new ST(getMessage());
1037          case 7: return new IS(getMessage(), new Integer( 78 ));
1038          case 8: return new NM(getMessage());
1039          case 9: return new ID(getMessage(), new Integer( 80 ));
1040          case 10: return new ID(getMessage(), new Integer( 85 ));
1041          case 11: return new TS(getMessage());
1042          case 12: return new ST(getMessage());
1043          case 13: return new TS(getMessage());
1044          case 14: return new CE(getMessage());
1045          case 15: return new XCN(getMessage());
1046          case 16: return new CE(getMessage());
1047          case 17: return new EI(getMessage());
1048          case 18: return new TS(getMessage());
1049          default: return null;
1050       }
1051   }
1052
1053
1054}
1055