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