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