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.v24.segment;
035
036// import ca.uhn.hl7v2.model.v24.group.*;
037import ca.uhn.hl7v2.model.v24.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 </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 Observation Normal Value (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 </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, 65536, 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, 1, 5, new Object[]{ getMessage(), new Integer(78) }, "Abnormal Flags");
093                                  this.add(NM.class, false, 5, 5, new Object[]{ getMessage() }, "Probability");
094                                              this.add(ID.class, false, 1, 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() }, "Date Last Observation Normal Value");
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, 1, 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    /**
341     * Returns
342     * OBX-8: "Abnormal Flags" - creates it if necessary
343     */
344    public IS getAbnormalFlags() { 
345                IS retVal = this.getTypedField(8, 0);
346                return retVal;
347    }
348    
349    /**
350     * Returns
351     * OBX-8: "Abnormal Flags" - creates it if necessary
352     */
353    public IS getObx8_AbnormalFlags() { 
354                IS retVal = this.getTypedField(8, 0);
355                return retVal;
356    }
357
358
359    /**
360     * Returns all repetitions of Probability (OBX-9).
361     */
362    public NM[] getProbability() {
363        NM[] retVal = this.getTypedField(9, new NM[0]);
364        return retVal;
365    }
366
367
368    /**
369     * Returns all repetitions of Probability (OBX-9).
370     */
371    public NM[] getObx9_Probability() {
372        NM[] retVal = this.getTypedField(9, new NM[0]);
373        return retVal;
374    }
375
376
377    /**
378     * Returns a count of the current number of repetitions of Probability (OBX-9).
379     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
380     * it will return zero.
381     */
382    public int getProbabilityReps() {
383        return this.getReps(9);
384    }
385
386
387    /**
388     * Returns a specific repetition of
389     * OBX-9: "Probability" - creates it if necessary
390     *
391     * @param rep The repetition index (0-indexed)
392     */
393    public NM getProbability(int rep) { 
394                NM retVal = this.getTypedField(9, rep);
395                return retVal;
396    }
397
398    /**
399     * Returns a specific repetition of
400     * OBX-9: "Probability" - creates it if necessary
401     *
402     * @param rep The repetition index (0-indexed)
403     */
404    public NM getObx9_Probability(int rep) { 
405                NM retVal = this.getTypedField(9, rep);
406                return retVal;
407    }
408
409    /**
410     * Returns a count of the current number of repetitions of Probability (OBX-9).
411     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
412     * it will return zero.
413     */
414    public int getObx9_ProbabilityReps() {
415        return this.getReps(9);
416    }
417
418
419    /**
420     * Inserts a repetition of
421     * OBX-9: "Probability" 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 NM insertProbability(int rep) throws HL7Exception { 
427        return (NM) super.insertRepetition(9, rep);
428    }
429
430
431    /**
432     * Inserts a repetition of
433     * OBX-9: "Probability" 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 NM insertObx9_Probability(int rep) throws HL7Exception { 
439        return (NM) super.insertRepetition(9, rep);
440    }
441
442
443    /**
444     * Removes a repetition of
445     * OBX-9: "Probability" at a specific index
446     *
447     * @param rep The repetition index (0-indexed)
448     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
449     */
450    public NM removeProbability(int rep) throws HL7Exception { 
451        return (NM) super.removeRepetition(9, rep);
452    }
453
454
455    /**
456     * Removes a repetition of
457     * OBX-9: "Probability" at a specific index
458     *
459     * @param rep The repetition index (0-indexed)
460     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
461     */
462    public NM removeObx9_Probability(int rep) throws HL7Exception { 
463        return (NM) super.removeRepetition(9, rep);
464    }
465
466
467
468
469    /**
470     * Returns
471     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
472     */
473    public ID getNatureOfAbnormalTest() { 
474                ID retVal = this.getTypedField(10, 0);
475                return retVal;
476    }
477    
478    /**
479     * Returns
480     * OBX-10: "Nature of Abnormal Test" - creates it if necessary
481     */
482    public ID getObx10_NatureOfAbnormalTest() { 
483                ID retVal = this.getTypedField(10, 0);
484                return retVal;
485    }
486
487
488
489    /**
490     * Returns
491     * OBX-11: "Observation Result Status" - creates it if necessary
492     */
493    public ID getObservationResultStatus() { 
494                ID retVal = this.getTypedField(11, 0);
495                return retVal;
496    }
497    
498    /**
499     * Returns
500     * OBX-11: "Observation Result Status" - creates it if necessary
501     */
502    public ID getObx11_ObservationResultStatus() { 
503                ID retVal = this.getTypedField(11, 0);
504                return retVal;
505    }
506
507
508
509    /**
510     * Returns
511     * OBX-12: "Date Last Observation Normal Value" - creates it if necessary
512     */
513    public TS getDateLastObservationNormalValue() { 
514                TS retVal = this.getTypedField(12, 0);
515                return retVal;
516    }
517    
518    /**
519     * Returns
520     * OBX-12: "Date Last Observation Normal Value" - creates it if necessary
521     */
522    public TS getObx12_DateLastObservationNormalValue() { 
523                TS retVal = this.getTypedField(12, 0);
524                return retVal;
525    }
526
527
528
529    /**
530     * Returns
531     * OBX-13: "User Defined Access Checks" - creates it if necessary
532     */
533    public ST getUserDefinedAccessChecks() { 
534                ST retVal = this.getTypedField(13, 0);
535                return retVal;
536    }
537    
538    /**
539     * Returns
540     * OBX-13: "User Defined Access Checks" - creates it if necessary
541     */
542    public ST getObx13_UserDefinedAccessChecks() { 
543                ST retVal = this.getTypedField(13, 0);
544                return retVal;
545    }
546
547
548
549    /**
550     * Returns
551     * OBX-14: "Date/Time of the Observation" - creates it if necessary
552     */
553    public TS getDateTimeOfTheObservation() { 
554                TS retVal = this.getTypedField(14, 0);
555                return retVal;
556    }
557    
558    /**
559     * Returns
560     * OBX-14: "Date/Time of the Observation" - creates it if necessary
561     */
562    public TS getObx14_DateTimeOfTheObservation() { 
563                TS retVal = this.getTypedField(14, 0);
564                return retVal;
565    }
566
567
568
569    /**
570     * Returns
571     * OBX-15: "Producer's ID" - creates it if necessary
572     */
573    public CE getProducerSID() { 
574                CE retVal = this.getTypedField(15, 0);
575                return retVal;
576    }
577    
578    /**
579     * Returns
580     * OBX-15: "Producer's ID" - creates it if necessary
581     */
582    public CE getObx15_ProducerSID() { 
583                CE retVal = this.getTypedField(15, 0);
584                return retVal;
585    }
586
587
588
589    /**
590     * Returns
591     * OBX-16: "Responsible Observer" - creates it if necessary
592     */
593    public XCN getResponsibleObserver() { 
594                XCN retVal = this.getTypedField(16, 0);
595                return retVal;
596    }
597    
598    /**
599     * Returns
600     * OBX-16: "Responsible Observer" - creates it if necessary
601     */
602    public XCN getObx16_ResponsibleObserver() { 
603                XCN retVal = this.getTypedField(16, 0);
604                return retVal;
605    }
606
607
608    /**
609     * Returns all repetitions of Observation Method (OBX-17).
610     */
611    public CE[] getObservationMethod() {
612        CE[] retVal = this.getTypedField(17, new CE[0]);
613        return retVal;
614    }
615
616
617    /**
618     * Returns all repetitions of Observation Method (OBX-17).
619     */
620    public CE[] getObx17_ObservationMethod() {
621        CE[] retVal = this.getTypedField(17, new CE[0]);
622        return retVal;
623    }
624
625
626    /**
627     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
628     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
629     * it will return zero.
630     */
631    public int getObservationMethodReps() {
632        return this.getReps(17);
633    }
634
635
636    /**
637     * Returns a specific repetition of
638     * OBX-17: "Observation Method" - creates it if necessary
639     *
640     * @param rep The repetition index (0-indexed)
641     */
642    public CE getObservationMethod(int rep) { 
643                CE retVal = this.getTypedField(17, rep);
644                return retVal;
645    }
646
647    /**
648     * Returns a specific repetition of
649     * OBX-17: "Observation Method" - creates it if necessary
650     *
651     * @param rep The repetition index (0-indexed)
652     */
653    public CE getObx17_ObservationMethod(int rep) { 
654                CE retVal = this.getTypedField(17, rep);
655                return retVal;
656    }
657
658    /**
659     * Returns a count of the current number of repetitions of Observation Method (OBX-17).
660     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
661     * it will return zero.
662     */
663    public int getObx17_ObservationMethodReps() {
664        return this.getReps(17);
665    }
666
667
668    /**
669     * Inserts a repetition of
670     * OBX-17: "Observation Method" at a specific index
671     *
672     * @param rep The repetition index (0-indexed)
673     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
674     */
675    public CE insertObservationMethod(int rep) throws HL7Exception { 
676        return (CE) super.insertRepetition(17, rep);
677    }
678
679
680    /**
681     * Inserts a repetition of
682     * OBX-17: "Observation Method" at a specific index
683     *
684     * @param rep The repetition index (0-indexed)
685     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
686     */
687    public CE insertObx17_ObservationMethod(int rep) throws HL7Exception { 
688        return (CE) super.insertRepetition(17, rep);
689    }
690
691
692    /**
693     * Removes a repetition of
694     * OBX-17: "Observation Method" at a specific index
695     *
696     * @param rep The repetition index (0-indexed)
697     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
698     */
699    public CE removeObservationMethod(int rep) throws HL7Exception { 
700        return (CE) super.removeRepetition(17, rep);
701    }
702
703
704    /**
705     * Removes a repetition of
706     * OBX-17: "Observation Method" at a specific index
707     *
708     * @param rep The repetition index (0-indexed)
709     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
710     */
711    public CE removeObx17_ObservationMethod(int rep) throws HL7Exception { 
712        return (CE) super.removeRepetition(17, rep);
713    }
714
715
716
717    /**
718     * Returns all repetitions of Equipment Instance Identifier (OBX-18).
719     */
720    public EI[] getEquipmentInstanceIdentifier() {
721        EI[] retVal = this.getTypedField(18, new EI[0]);
722        return retVal;
723    }
724
725
726    /**
727     * Returns all repetitions of Equipment Instance Identifier (OBX-18).
728     */
729    public EI[] getObx18_EquipmentInstanceIdentifier() {
730        EI[] retVal = this.getTypedField(18, new EI[0]);
731        return retVal;
732    }
733
734
735    /**
736     * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
737     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
738     * it will return zero.
739     */
740    public int getEquipmentInstanceIdentifierReps() {
741        return this.getReps(18);
742    }
743
744
745    /**
746     * Returns a specific repetition of
747     * OBX-18: "Equipment Instance Identifier" - creates it if necessary
748     *
749     * @param rep The repetition index (0-indexed)
750     */
751    public EI getEquipmentInstanceIdentifier(int rep) { 
752                EI retVal = this.getTypedField(18, rep);
753                return retVal;
754    }
755
756    /**
757     * Returns a specific repetition of
758     * OBX-18: "Equipment Instance Identifier" - creates it if necessary
759     *
760     * @param rep The repetition index (0-indexed)
761     */
762    public EI getObx18_EquipmentInstanceIdentifier(int rep) { 
763                EI retVal = this.getTypedField(18, rep);
764                return retVal;
765    }
766
767    /**
768     * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
769     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
770     * it will return zero.
771     */
772    public int getObx18_EquipmentInstanceIdentifierReps() {
773        return this.getReps(18);
774    }
775
776
777    /**
778     * Inserts a repetition of
779     * OBX-18: "Equipment Instance Identifier" at a specific index
780     *
781     * @param rep The repetition index (0-indexed)
782     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
783     */
784    public EI insertEquipmentInstanceIdentifier(int rep) throws HL7Exception { 
785        return (EI) super.insertRepetition(18, rep);
786    }
787
788
789    /**
790     * Inserts a repetition of
791     * OBX-18: "Equipment Instance Identifier" at a specific index
792     *
793     * @param rep The repetition index (0-indexed)
794     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
795     */
796    public EI insertObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception { 
797        return (EI) super.insertRepetition(18, rep);
798    }
799
800
801    /**
802     * Removes a repetition of
803     * OBX-18: "Equipment Instance Identifier" at a specific index
804     *
805     * @param rep The repetition index (0-indexed)
806     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
807     */
808    public EI removeEquipmentInstanceIdentifier(int rep) throws HL7Exception { 
809        return (EI) super.removeRepetition(18, rep);
810    }
811
812
813    /**
814     * Removes a repetition of
815     * OBX-18: "Equipment Instance Identifier" at a specific index
816     *
817     * @param rep The repetition index (0-indexed)
818     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
819     */
820    public EI removeObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception { 
821        return (EI) super.removeRepetition(18, rep);
822    }
823
824
825
826
827    /**
828     * Returns
829     * OBX-19: "Date/Time of the Analysis" - creates it if necessary
830     */
831    public TS getDateTimeOfTheAnalysis() { 
832                TS retVal = this.getTypedField(19, 0);
833                return retVal;
834    }
835    
836    /**
837     * Returns
838     * OBX-19: "Date/Time of the Analysis" - creates it if necessary
839     */
840    public TS getObx19_DateTimeOfTheAnalysis() { 
841                TS retVal = this.getTypedField(19, 0);
842                return retVal;
843    }
844
845
846
847
848
849    /** {@inheritDoc} */   
850    protected Type createNewTypeWithoutReflection(int field) {
851       switch (field) {
852          case 0: return new SI(getMessage());
853          case 1: return new ID(getMessage(), new Integer( 125 ));
854          case 2: return new CE(getMessage());
855          case 3: return new ST(getMessage());
856          case 4: return new Varies(getMessage());
857          case 5: return new CE(getMessage());
858          case 6: return new ST(getMessage());
859          case 7: return new IS(getMessage(), new Integer( 78 ));
860          case 8: return new NM(getMessage());
861          case 9: return new ID(getMessage(), new Integer( 80 ));
862          case 10: return new ID(getMessage(), new Integer( 85 ));
863          case 11: return new TS(getMessage());
864          case 12: return new ST(getMessage());
865          case 13: return new TS(getMessage());
866          case 14: return new CE(getMessage());
867          case 15: return new XCN(getMessage());
868          case 16: return new CE(getMessage());
869          case 17: return new EI(getMessage());
870          case 18: return new TS(getMessage());
871          default: return null;
872       }
873   }
874
875
876}
877