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.v231.segment;
035
036// import ca.uhn.hl7v2.model.v231.group.*;
037import ca.uhn.hl7v2.model.v231.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 (OBX - observation/result segment). 
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> </b>
053     * <li>OBX-3: Observation Identifier (CE) <b> </b>
054     * <li>OBX-4: Observation Sub-ID (ST) <b> </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 (ID) <b>optional repeating</b>
059     * <li>OBX-9: Probability (NM) <b>optional repeating</b>
060     * <li>OBX-10: Nature of Abnormal Test (ID) <b>optional </b>
061     * <li>OBX-11: Observation Result Status (ID) <b> </b>
062     * <li>OBX-12: Date Last Obs Normal 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 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 * </ul>
069 */
070@SuppressWarnings("unused")
071public class OBX extends AbstractSegment {
072
073    /** 
074     * Creates a new OBX segment
075     */
076    public OBX(Group parent, ModelClassFactory factory) {
077       super(parent, factory);
078       init(factory);
079    }
080
081    private void init(ModelClassFactory factory) {
082       try {
083                                  this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - OBX");
084                                              this.add(ID.class, true, 1, 3, new Object[]{ getMessage(), new Integer(125) }, "Value Type");
085                                  this.add(CE.class, true, 1, 80, new Object[]{ getMessage() }, "Observation Identifier");
086                                  this.add(ST.class, true, 1, 20, new Object[]{ getMessage() }, "Observation Sub-ID");
087                                  this.add(Varies.class, false, 0, 65536, new Object[]{ getMessage() }, "Observation Value");
088                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Units");
089                                  this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "References Range");
090                                              this.add(ID.class, false, 5, 5, new Object[]{ getMessage(), new Integer(78) }, "Abnormal Flags");
091                                  this.add(NM.class, false, 5, 5, new Object[]{ getMessage() }, "Probability");
092                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(80) }, "Nature of Abnormal Test");
093                                              this.add(ID.class, true, 1, 1, new Object[]{ getMessage(), new Integer(85) }, "Observation Result Status");
094                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date Last Obs Normal Values");
095                                  this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "User Defined Access Checks");
096                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time of the Observation");
097                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Producer's ID");
098                                  this.add(XCN.class, false, 0, 80, new Object[]{ getMessage() }, "Responsible Observer");
099                                  this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Observation Method");
100       } catch(HL7Exception e) {
101          log.error("Unexpected error creating OBX - this is probably a bug in the source code generator.", e);
102       }
103    }
104
105
106
107    /**
108     * Returns
109     * OBX-1: "Set ID - OBX" - creates it if necessary
110     */
111    public SI getSetIDOBX() { 
112                SI retVal = this.getTypedField(1, 0);
113                return retVal;
114    }
115    
116    /**
117     * Returns
118     * OBX-1: "Set ID - OBX" - creates it if necessary
119     */
120    public SI getObx1_SetIDOBX() { 
121                SI retVal = this.getTypedField(1, 0);
122                return retVal;
123    }
124
125
126
127    /**
128     * Returns
129     * OBX-2: "Value Type" - creates it if necessary
130     */
131    public ID getValueType() { 
132                ID retVal = this.getTypedField(2, 0);
133                return retVal;
134    }
135    
136    /**
137     * Returns
138     * OBX-2: "Value Type" - creates it if necessary
139     */
140    public ID getObx2_ValueType() { 
141                ID retVal = this.getTypedField(2, 0);
142                return retVal;
143    }
144
145
146
147    /**
148     * Returns
149     * OBX-3: "Observation Identifier" - creates it if necessary
150     */
151    public CE getObservationIdentifier() { 
152                CE retVal = this.getTypedField(3, 0);
153                return retVal;
154    }
155    
156    /**
157     * Returns
158     * OBX-3: "Observation Identifier" - creates it if necessary
159     */
160    public CE getObx3_ObservationIdentifier() { 
161                CE retVal = this.getTypedField(3, 0);
162                return retVal;
163    }
164
165
166
167    /**
168     * Returns
169     * OBX-4: "Observation Sub-ID" - creates it if necessary
170     */
171    public ST getObservationSubID() { 
172                ST retVal = this.getTypedField(4, 0);
173                return retVal;
174    }
175    
176    /**
177     * Returns
178     * OBX-4: "Observation Sub-ID" - creates it if necessary
179     */
180    public ST getObx4_ObservationSubID() { 
181                ST retVal = this.getTypedField(4, 0);
182                return retVal;
183    }
184
185
186    /**
187     * Returns all repetitions of Observation Value (OBX-5).
188     */
189    public Varies[] getObservationValue() {
190        Varies[] retVal = this.getTypedField(5, new Varies[0]);
191        return retVal;
192    }
193
194
195    /**
196     * Returns all repetitions of Observation Value (OBX-5).
197     */
198    public Varies[] getObx5_ObservationValue() {
199        Varies[] retVal = this.getTypedField(5, new Varies[0]);
200        return retVal;
201    }
202
203
204    /**
205     * Returns a count of the current number of repetitions of Observation Value (OBX-5).
206     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
207     * it will return zero.
208     */
209    public int getObservationValueReps() {
210        return this.getReps(5);
211    }
212
213
214    /**
215     * Returns a specific repetition of
216     * OBX-5: "Observation Value" - creates it if necessary
217     *
218     * @param rep The repetition index (0-indexed)
219     */
220    public Varies getObservationValue(int rep) { 
221                Varies retVal = this.getTypedField(5, rep);
222                return retVal;
223    }
224
225    /**
226     * Returns a specific repetition of
227     * OBX-5: "Observation Value" - creates it if necessary
228     *
229     * @param rep The repetition index (0-indexed)
230     */
231    public Varies getObx5_ObservationValue(int rep) { 
232                Varies retVal = this.getTypedField(5, rep);
233                return retVal;
234    }
235
236    /**
237     * Returns a count of the current number of repetitions of Observation Value (OBX-5).
238     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
239     * it will return zero.
240     */
241    public int getObx5_ObservationValueReps() {
242        return this.getReps(5);
243    }
244
245
246    /**
247     * Inserts a repetition of
248     * OBX-5: "Observation Value" at a specific index
249     *
250     * @param rep The repetition index (0-indexed)
251     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
252     */
253    public Varies insertObservationValue(int rep) throws HL7Exception { 
254        return (Varies) super.insertRepetition(5, rep);
255    }
256
257
258    /**
259     * Inserts a repetition of
260     * OBX-5: "Observation Value" at a specific index
261     *
262     * @param rep The repetition index (0-indexed)
263     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
264     */
265    public Varies insertObx5_ObservationValue(int rep) throws HL7Exception { 
266        return (Varies) super.insertRepetition(5, rep);
267    }
268
269
270    /**
271     * Removes a repetition of
272     * OBX-5: "Observation Value" at a specific index
273     *
274     * @param rep The repetition index (0-indexed)
275     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
276     */
277    public Varies removeObservationValue(int rep) throws HL7Exception { 
278        return (Varies) super.removeRepetition(5, rep);
279    }
280
281
282    /**
283     * Removes a repetition of
284     * OBX-5: "Observation Value" at a specific index
285     *
286     * @param rep The repetition index (0-indexed)
287     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
288     */
289    public Varies removeObx5_ObservationValue(int rep) throws HL7Exception { 
290        return (Varies) super.removeRepetition(5, rep);
291    }
292
293
294
295
296    /**
297     * Returns
298     * OBX-6: "Units" - creates it if necessary
299     */
300    public CE getUnits() { 
301                CE retVal = this.getTypedField(6, 0);
302                return retVal;
303    }
304    
305    /**
306     * Returns
307     * OBX-6: "Units" - creates it if necessary
308     */
309    public CE getObx6_Units() { 
310                CE retVal = this.getTypedField(6, 0);
311                return retVal;
312    }
313
314
315
316    /**
317     * Returns
318     * OBX-7: "References Range" - creates it if necessary
319     */
320    public ST getReferencesRange() { 
321                ST retVal = this.getTypedField(7, 0);
322                return retVal;
323    }
324    
325    /**
326     * Returns
327     * OBX-7: "References Range" - creates it if necessary
328     */
329    public ST getObx7_ReferencesRange() { 
330                ST retVal = this.getTypedField(7, 0);
331                return retVal;
332    }
333
334
335    /**
336     * Returns all repetitions of Abnormal Flags (OBX-8).
337     */
338    public ID[] getAbnormalFlags() {
339        ID[] retVal = this.getTypedField(8, new ID[0]);
340        return retVal;
341    }
342
343
344    /**
345     * Returns all repetitions of Abnormal Flags (OBX-8).
346     */
347    public ID[] getObx8_AbnormalFlags() {
348        ID[] retVal = this.getTypedField(8, new ID[0]);
349        return retVal;
350    }
351
352
353    /**
354     * Returns a count of the current number of repetitions of Abnormal Flags (OBX-8).
355     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
356     * it will return zero.
357     */
358    public int getAbnormalFlagsReps() {
359        return this.getReps(8);
360    }
361
362
363    /**
364     * Returns a specific repetition of
365     * OBX-8: "Abnormal Flags" - creates it if necessary
366     *
367     * @param rep The repetition index (0-indexed)
368     */
369    public ID getAbnormalFlags(int rep) { 
370                ID retVal = this.getTypedField(8, rep);
371                return retVal;
372    }
373
374    /**
375     * Returns a specific repetition of
376     * OBX-8: "Abnormal Flags" - creates it if necessary
377     *
378     * @param rep The repetition index (0-indexed)
379     */
380    public ID getObx8_AbnormalFlags(int rep) { 
381                ID retVal = this.getTypedField(8, rep);
382                return retVal;
383    }
384
385    /**
386     * Returns a count of the current number of repetitions of Abnormal Flags (OBX-8).
387     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
388     * it will return zero.
389     */
390    public int getObx8_AbnormalFlagsReps() {
391        return this.getReps(8);
392    }
393
394
395    /**
396     * Inserts a repetition of
397     * OBX-8: "Abnormal Flags" at a specific index
398     *
399     * @param rep The repetition index (0-indexed)
400     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
401     */
402    public ID insertAbnormalFlags(int rep) throws HL7Exception { 
403        return (ID) super.insertRepetition(8, rep);
404    }
405
406
407    /**
408     * Inserts a repetition of
409     * OBX-8: "Abnormal Flags" at a specific index
410     *
411     * @param rep The repetition index (0-indexed)
412     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
413     */
414    public ID insertObx8_AbnormalFlags(int rep) throws HL7Exception { 
415        return (ID) super.insertRepetition(8, rep);
416    }
417
418
419    /**
420     * Removes a repetition of
421     * OBX-8: "Abnormal Flags" at a specific index
422     *
423     * @param rep The repetition index (0-indexed)
424     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
425     */
426    public ID removeAbnormalFlags(int rep) throws HL7Exception { 
427        return (ID) super.removeRepetition(8, rep);
428    }
429
430
431    /**
432     * Removes a repetition of
433     * OBX-8: "Abnormal Flags" at a specific index
434     *
435     * @param rep The repetition index (0-indexed)
436     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
437     */
438    public ID removeObx8_AbnormalFlags(int rep) throws HL7Exception { 
439        return (ID) super.removeRepetition(8, rep);
440    }
441
442
443
444    /**
445     * Returns all repetitions of Probability (OBX-9).
446     */
447    public NM[] getProbability() {
448        NM[] retVal = this.getTypedField(9, new NM[0]);
449        return retVal;
450    }
451
452
453    /**
454     * Returns all repetitions of Probability (OBX-9).
455     */
456    public NM[] getObx9_Probability() {
457        NM[] retVal = this.getTypedField(9, new NM[0]);
458        return retVal;
459    }
460
461
462    /**
463     * Returns a count of the current number of repetitions of Probability (OBX-9).
464     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
465     * it will return zero.
466     */
467    public int getProbabilityReps() {
468        return this.getReps(9);
469    }
470
471
472    /**
473     * Returns a specific repetition of
474     * OBX-9: "Probability" - creates it if necessary
475     *
476     * @param rep The repetition index (0-indexed)
477     */
478    public NM getProbability(int rep) { 
479                NM retVal = this.getTypedField(9, rep);
480                return retVal;
481    }
482
483    /**
484     * Returns a specific repetition of
485     * OBX-9: "Probability" - creates it if necessary
486     *
487     * @param rep The repetition index (0-indexed)
488     */
489    public NM getObx9_Probability(int rep) { 
490                NM retVal = this.getTypedField(9, rep);
491                return retVal;
492    }
493
494    /**
495     * Returns a count of the current number of repetitions of Probability (OBX-9).
496     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
497     * it will return zero.
498     */
499    public int getObx9_ProbabilityReps() {
500        return this.getReps(9);
501    }
502
503
504    /**
505     * Inserts a repetition of
506     * OBX-9: "Probability" at a specific index
507     *
508     * @param rep The repetition index (0-indexed)
509     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
510     */
511    public NM insertProbability(int rep) throws HL7Exception { 
512        return (NM) super.insertRepetition(9, rep);
513    }
514
515
516    /**
517     * Inserts a repetition of
518     * OBX-9: "Probability" at a specific index
519     *
520     * @param rep The repetition index (0-indexed)
521     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
522     */
523    public NM insertObx9_Probability(int rep) throws HL7Exception { 
524        return (NM) super.insertRepetition(9, rep);
525    }
526
527
528    /**
529     * Removes a repetition of
530     * OBX-9: "Probability" 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 NM removeProbability(int rep) throws HL7Exception { 
536        return (NM) super.removeRepetition(9, rep);
537    }
538
539
540    /**
541     * Removes a repetition of
542     * OBX-9: "Probability" 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 NM removeObx9_Probability(int rep) throws HL7Exception { 
548        return (NM) super.removeRepetition(9, rep);
549    }
550
551
552
553
554    /**
555     * Returns
556     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
557     */
558    public ID getNatureOfAbnormalTest() { 
559                ID retVal = this.getTypedField(10, 0);
560                return retVal;
561    }
562    
563    /**
564     * Returns
565     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
566     */
567    public ID getObx10_NatureOfAbnormalTest() { 
568                ID retVal = this.getTypedField(10, 0);
569                return retVal;
570    }
571
572
573
574    /**
575     * Returns
576     * OBX-11: "Observation Result Status" - creates it if necessary
577     */
578    public ID getObservationResultStatus() { 
579                ID retVal = this.getTypedField(11, 0);
580                return retVal;
581    }
582    
583    /**
584     * Returns
585     * OBX-11: "Observation Result Status" - creates it if necessary
586     */
587    public ID getObx11_ObservationResultStatus() { 
588                ID retVal = this.getTypedField(11, 0);
589                return retVal;
590    }
591
592
593
594    /**
595     * Returns
596     * OBX-12: "Date Last Obs Normal Values" - creates it if necessary
597     */
598    public TS getDateLastObsNormalValues() { 
599                TS retVal = this.getTypedField(12, 0);
600                return retVal;
601    }
602    
603    /**
604     * Returns
605     * OBX-12: "Date Last Obs Normal Values" - creates it if necessary
606     */
607    public TS getObx12_DateLastObsNormalValues() { 
608                TS retVal = this.getTypedField(12, 0);
609                return retVal;
610    }
611
612
613
614    /**
615     * Returns
616     * OBX-13: "User Defined Access Checks" - creates it if necessary
617     */
618    public ST getUserDefinedAccessChecks() { 
619                ST retVal = this.getTypedField(13, 0);
620                return retVal;
621    }
622    
623    /**
624     * Returns
625     * OBX-13: "User Defined Access Checks" - creates it if necessary
626     */
627    public ST getObx13_UserDefinedAccessChecks() { 
628                ST retVal = this.getTypedField(13, 0);
629                return retVal;
630    }
631
632
633
634    /**
635     * Returns
636     * OBX-14: "Date/Time of the Observation" - creates it if necessary
637     */
638    public TS getDateTimeOfTheObservation() { 
639                TS retVal = this.getTypedField(14, 0);
640                return retVal;
641    }
642    
643    /**
644     * Returns
645     * OBX-14: "Date/Time of the Observation" - creates it if necessary
646     */
647    public TS getObx14_DateTimeOfTheObservation() { 
648                TS retVal = this.getTypedField(14, 0);
649                return retVal;
650    }
651
652
653
654    /**
655     * Returns
656     * OBX-15: "Producer's ID" - creates it if necessary
657     */
658    public CE getProducerSID() { 
659                CE retVal = this.getTypedField(15, 0);
660                return retVal;
661    }
662    
663    /**
664     * Returns
665     * OBX-15: "Producer's ID" - creates it if necessary
666     */
667    public CE getObx15_ProducerSID() { 
668                CE retVal = this.getTypedField(15, 0);
669                return retVal;
670    }
671
672
673    /**
674     * Returns all repetitions of Responsible Observer (OBX-16).
675     */
676    public XCN[] getResponsibleObserver() {
677        XCN[] retVal = this.getTypedField(16, new XCN[0]);
678        return retVal;
679    }
680
681
682    /**
683     * Returns all repetitions of Responsible Observer (OBX-16).
684     */
685    public XCN[] getObx16_ResponsibleObserver() {
686        XCN[] retVal = this.getTypedField(16, new XCN[0]);
687        return retVal;
688    }
689
690
691    /**
692     * Returns a count of the current number of repetitions of Responsible Observer (OBX-16).
693     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
694     * it will return zero.
695     */
696    public int getResponsibleObserverReps() {
697        return this.getReps(16);
698    }
699
700
701    /**
702     * Returns a specific repetition of
703     * OBX-16: "Responsible Observer" - creates it if necessary
704     *
705     * @param rep The repetition index (0-indexed)
706     */
707    public XCN getResponsibleObserver(int rep) { 
708                XCN retVal = this.getTypedField(16, rep);
709                return retVal;
710    }
711
712    /**
713     * Returns a specific repetition of
714     * OBX-16: "Responsible Observer" - creates it if necessary
715     *
716     * @param rep The repetition index (0-indexed)
717     */
718    public XCN getObx16_ResponsibleObserver(int rep) { 
719                XCN retVal = this.getTypedField(16, rep);
720                return retVal;
721    }
722
723    /**
724     * Returns a count of the current number of repetitions of Responsible Observer (OBX-16).
725     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
726     * it will return zero.
727     */
728    public int getObx16_ResponsibleObserverReps() {
729        return this.getReps(16);
730    }
731
732
733    /**
734     * Inserts a repetition of
735     * OBX-16: "Responsible Observer" at a specific index
736     *
737     * @param rep The repetition index (0-indexed)
738     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
739     */
740    public XCN insertResponsibleObserver(int rep) throws HL7Exception { 
741        return (XCN) super.insertRepetition(16, rep);
742    }
743
744
745    /**
746     * Inserts a repetition of
747     * OBX-16: "Responsible Observer" at a specific index
748     *
749     * @param rep The repetition index (0-indexed)
750     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
751     */
752    public XCN insertObx16_ResponsibleObserver(int rep) throws HL7Exception { 
753        return (XCN) super.insertRepetition(16, rep);
754    }
755
756
757    /**
758     * Removes a repetition of
759     * OBX-16: "Responsible Observer" at a specific index
760     *
761     * @param rep The repetition index (0-indexed)
762     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
763     */
764    public XCN removeResponsibleObserver(int rep) throws HL7Exception { 
765        return (XCN) super.removeRepetition(16, rep);
766    }
767
768
769    /**
770     * Removes a repetition of
771     * OBX-16: "Responsible Observer" at a specific index
772     *
773     * @param rep The repetition index (0-indexed)
774     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
775     */
776    public XCN removeObx16_ResponsibleObserver(int rep) throws HL7Exception { 
777        return (XCN) super.removeRepetition(16, rep);
778    }
779
780
781
782    /**
783     * Returns all repetitions of Observation Method (OBX-17).
784     */
785    public CE[] getObservationMethod() {
786        CE[] retVal = this.getTypedField(17, new CE[0]);
787        return retVal;
788    }
789
790
791    /**
792     * Returns all repetitions of Observation Method (OBX-17).
793     */
794    public CE[] getObx17_ObservationMethod() {
795        CE[] retVal = this.getTypedField(17, new CE[0]);
796        return retVal;
797    }
798
799
800    /**
801     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
802     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
803     * it will return zero.
804     */
805    public int getObservationMethodReps() {
806        return this.getReps(17);
807    }
808
809
810    /**
811     * Returns a specific repetition of
812     * OBX-17: "Observation Method" - creates it if necessary
813     *
814     * @param rep The repetition index (0-indexed)
815     */
816    public CE getObservationMethod(int rep) { 
817                CE retVal = this.getTypedField(17, rep);
818                return retVal;
819    }
820
821    /**
822     * Returns a specific repetition of
823     * OBX-17: "Observation Method" - creates it if necessary
824     *
825     * @param rep The repetition index (0-indexed)
826     */
827    public CE getObx17_ObservationMethod(int rep) { 
828                CE retVal = this.getTypedField(17, rep);
829                return retVal;
830    }
831
832    /**
833     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
834     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
835     * it will return zero.
836     */
837    public int getObx17_ObservationMethodReps() {
838        return this.getReps(17);
839    }
840
841
842    /**
843     * Inserts a repetition of
844     * OBX-17: "Observation Method" at a specific index
845     *
846     * @param rep The repetition index (0-indexed)
847     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
848     */
849    public CE insertObservationMethod(int rep) throws HL7Exception { 
850        return (CE) super.insertRepetition(17, rep);
851    }
852
853
854    /**
855     * Inserts a repetition of
856     * OBX-17: "Observation Method" at a specific index
857     *
858     * @param rep The repetition index (0-indexed)
859     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
860     */
861    public CE insertObx17_ObservationMethod(int rep) throws HL7Exception { 
862        return (CE) super.insertRepetition(17, rep);
863    }
864
865
866    /**
867     * Removes a repetition of
868     * OBX-17: "Observation Method" at a specific index
869     *
870     * @param rep The repetition index (0-indexed)
871     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
872     */
873    public CE removeObservationMethod(int rep) throws HL7Exception { 
874        return (CE) super.removeRepetition(17, rep);
875    }
876
877
878    /**
879     * Removes a repetition of
880     * OBX-17: "Observation Method" at a specific index
881     *
882     * @param rep The repetition index (0-indexed)
883     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
884     */
885    public CE removeObx17_ObservationMethod(int rep) throws HL7Exception { 
886        return (CE) super.removeRepetition(17, rep);
887    }
888
889
890
891
892
893
894    /** {@inheritDoc} */   
895    protected Type createNewTypeWithoutReflection(int field) {
896       switch (field) {
897          case 0: return new SI(getMessage());
898          case 1: return new ID(getMessage(), new Integer( 125 ));
899          case 2: return new CE(getMessage());
900          case 3: return new ST(getMessage());
901          case 4: return new Varies(getMessage());
902          case 5: return new CE(getMessage());
903          case 6: return new ST(getMessage());
904          case 7: return new ID(getMessage(), new Integer( 78 ));
905          case 8: return new NM(getMessage());
906          case 9: return new ID(getMessage(), new Integer( 80 ));
907          case 10: return new ID(getMessage(), new Integer( 85 ));
908          case 11: return new TS(getMessage());
909          case 12: return new ST(getMessage());
910          case 13: return new TS(getMessage());
911          case 14: return new CE(getMessage());
912          case 15: return new XCN(getMessage());
913          case 16: return new CE(getMessage());
914          default: return null;
915       }
916   }
917
918
919}
920