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 SCH message segment (SCH - schedule activity information segment). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>SCH-1: Placer Appointment ID (EI) <b>optional </b>
052     * <li>SCH-2: Filler Appointment ID (EI) <b>optional </b>
053     * <li>SCH-3: Occurrence Number (NM) <b>optional </b>
054     * <li>SCH-4: Placer Group Number (EI) <b>optional </b>
055     * <li>SCH-5: Schedule ID (CE) <b>optional </b>
056     * <li>SCH-6: Event Reason (CE) <b> </b>
057     * <li>SCH-7: Appointment Reason (CE) <b>optional </b>
058     * <li>SCH-8: Appointment Type (CE) <b>optional </b>
059     * <li>SCH-9: Appointment Duration (NM) <b>optional </b>
060     * <li>SCH-10: Appointment Duration Units (CE) <b>optional </b>
061     * <li>SCH-11: Appointment Timing Quantity (TQ) <b> repeating</b>
062     * <li>SCH-12: Placer Contact Person (XCN) <b>optional repeating</b>
063     * <li>SCH-13: Placer Contact Phone Number (XTN) <b>optional </b>
064     * <li>SCH-14: Placer Contact Address (XAD) <b>optional repeating</b>
065     * <li>SCH-15: Placer Contact Location (PL) <b>optional </b>
066     * <li>SCH-16: Filler Contact Person (XCN) <b> repeating</b>
067     * <li>SCH-17: Filler Contact Phone Number (XTN) <b>optional </b>
068     * <li>SCH-18: Filler Contact Address (XAD) <b>optional repeating</b>
069     * <li>SCH-19: Filler Contact Location (PL) <b>optional </b>
070     * <li>SCH-20: Entered by Person (XCN) <b> repeating</b>
071     * <li>SCH-21: Entered by Phone Number (XTN) <b>optional repeating</b>
072     * <li>SCH-22: Entered by Location (PL) <b>optional </b>
073     * <li>SCH-23: Parent Placer Appointment ID (EI) <b>optional </b>
074     * <li>SCH-24: Parent Filler Appointment ID (EI) <b>optional </b>
075     * <li>SCH-25: Filler Status Code (CE) <b>optional </b>
076 * </ul>
077 */
078@SuppressWarnings("unused")
079public class SCH extends AbstractSegment {
080
081    /** 
082     * Creates a new SCH segment
083     */
084    public SCH(Group parent, ModelClassFactory factory) {
085       super(parent, factory);
086       init(factory);
087    }
088
089    private void init(ModelClassFactory factory) {
090       try {
091                                  this.add(EI.class, false, 1, 75, new Object[]{ getMessage() }, "Placer Appointment ID");
092                                  this.add(EI.class, false, 1, 75, new Object[]{ getMessage() }, "Filler Appointment ID");
093                                  this.add(NM.class, false, 1, 5, new Object[]{ getMessage() }, "Occurrence Number");
094                                  this.add(EI.class, false, 1, 22, new Object[]{ getMessage() }, "Placer Group Number");
095                                  this.add(CE.class, false, 1, 200, new Object[]{ getMessage() }, "Schedule ID");
096                                  this.add(CE.class, true, 1, 200, new Object[]{ getMessage() }, "Event Reason");
097                                  this.add(CE.class, false, 1, 200, new Object[]{ getMessage() }, "Appointment Reason");
098                                  this.add(CE.class, false, 1, 200, new Object[]{ getMessage() }, "Appointment Type");
099                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Appointment Duration");
100                                  this.add(CE.class, false, 1, 200, new Object[]{ getMessage() }, "Appointment Duration Units");
101                                  this.add(TQ.class, true, 0, 200, new Object[]{ getMessage() }, "Appointment Timing Quantity");
102                                  this.add(XCN.class, false, 0, 48, new Object[]{ getMessage() }, "Placer Contact Person");
103                                  this.add(XTN.class, false, 1, 40, new Object[]{ getMessage() }, "Placer Contact Phone Number");
104                                  this.add(XAD.class, false, 0, 106, new Object[]{ getMessage() }, "Placer Contact Address");
105                                  this.add(PL.class, false, 1, 80, new Object[]{ getMessage() }, "Placer Contact Location");
106                                  this.add(XCN.class, true, 0, 38, new Object[]{ getMessage() }, "Filler Contact Person");
107                                  this.add(XTN.class, false, 1, 40, new Object[]{ getMessage() }, "Filler Contact Phone Number");
108                                  this.add(XAD.class, false, 0, 106, new Object[]{ getMessage() }, "Filler Contact Address");
109                                  this.add(PL.class, false, 1, 80, new Object[]{ getMessage() }, "Filler Contact Location");
110                                  this.add(XCN.class, true, 0, 48, new Object[]{ getMessage() }, "Entered by Person");
111                                  this.add(XTN.class, false, 0, 40, new Object[]{ getMessage() }, "Entered by Phone Number");
112                                  this.add(PL.class, false, 1, 80, new Object[]{ getMessage() }, "Entered by Location");
113                                  this.add(EI.class, false, 1, 75, new Object[]{ getMessage() }, "Parent Placer Appointment ID");
114                                  this.add(EI.class, false, 1, 75, new Object[]{ getMessage() }, "Parent Filler Appointment ID");
115                                  this.add(CE.class, false, 1, 200, new Object[]{ getMessage() }, "Filler Status Code");
116       } catch(HL7Exception e) {
117          log.error("Unexpected error creating SCH - this is probably a bug in the source code generator.", e);
118       }
119    }
120
121
122
123    /**
124     * Returns
125     * SCH-1: "Placer Appointment ID" - creates it if necessary
126     */
127    public EI getPlacerAppointmentID() { 
128                EI retVal = this.getTypedField(1, 0);
129                return retVal;
130    }
131    
132    /**
133     * Returns
134     * SCH-1: "Placer Appointment ID" - creates it if necessary
135     */
136    public EI getSch1_PlacerAppointmentID() { 
137                EI retVal = this.getTypedField(1, 0);
138                return retVal;
139    }
140
141
142
143    /**
144     * Returns
145     * SCH-2: "Filler Appointment ID" - creates it if necessary
146     */
147    public EI getFillerAppointmentID() { 
148                EI retVal = this.getTypedField(2, 0);
149                return retVal;
150    }
151    
152    /**
153     * Returns
154     * SCH-2: "Filler Appointment ID" - creates it if necessary
155     */
156    public EI getSch2_FillerAppointmentID() { 
157                EI retVal = this.getTypedField(2, 0);
158                return retVal;
159    }
160
161
162
163    /**
164     * Returns
165     * SCH-3: "Occurrence Number" - creates it if necessary
166     */
167    public NM getOccurrenceNumber() { 
168                NM retVal = this.getTypedField(3, 0);
169                return retVal;
170    }
171    
172    /**
173     * Returns
174     * SCH-3: "Occurrence Number" - creates it if necessary
175     */
176    public NM getSch3_OccurrenceNumber() { 
177                NM retVal = this.getTypedField(3, 0);
178                return retVal;
179    }
180
181
182
183    /**
184     * Returns
185     * SCH-4: "Placer Group Number" - creates it if necessary
186     */
187    public EI getPlacerGroupNumber() { 
188                EI retVal = this.getTypedField(4, 0);
189                return retVal;
190    }
191    
192    /**
193     * Returns
194     * SCH-4: "Placer Group Number" - creates it if necessary
195     */
196    public EI getSch4_PlacerGroupNumber() { 
197                EI retVal = this.getTypedField(4, 0);
198                return retVal;
199    }
200
201
202
203    /**
204     * Returns
205     * SCH-5: "Schedule ID" - creates it if necessary
206     */
207    public CE getScheduleID() { 
208                CE retVal = this.getTypedField(5, 0);
209                return retVal;
210    }
211    
212    /**
213     * Returns
214     * SCH-5: "Schedule ID" - creates it if necessary
215     */
216    public CE getSch5_ScheduleID() { 
217                CE retVal = this.getTypedField(5, 0);
218                return retVal;
219    }
220
221
222
223    /**
224     * Returns
225     * SCH-6: "Event Reason" - creates it if necessary
226     */
227    public CE getEventReason() { 
228                CE retVal = this.getTypedField(6, 0);
229                return retVal;
230    }
231    
232    /**
233     * Returns
234     * SCH-6: "Event Reason" - creates it if necessary
235     */
236    public CE getSch6_EventReason() { 
237                CE retVal = this.getTypedField(6, 0);
238                return retVal;
239    }
240
241
242
243    /**
244     * Returns
245     * SCH-7: "Appointment Reason" - creates it if necessary
246     */
247    public CE getAppointmentReason() { 
248                CE retVal = this.getTypedField(7, 0);
249                return retVal;
250    }
251    
252    /**
253     * Returns
254     * SCH-7: "Appointment Reason" - creates it if necessary
255     */
256    public CE getSch7_AppointmentReason() { 
257                CE retVal = this.getTypedField(7, 0);
258                return retVal;
259    }
260
261
262
263    /**
264     * Returns
265     * SCH-8: "Appointment Type" - creates it if necessary
266     */
267    public CE getAppointmentType() { 
268                CE retVal = this.getTypedField(8, 0);
269                return retVal;
270    }
271    
272    /**
273     * Returns
274     * SCH-8: "Appointment Type" - creates it if necessary
275     */
276    public CE getSch8_AppointmentType() { 
277                CE retVal = this.getTypedField(8, 0);
278                return retVal;
279    }
280
281
282
283    /**
284     * Returns
285     * SCH-9: "Appointment Duration" - creates it if necessary
286     */
287    public NM getAppointmentDuration() { 
288                NM retVal = this.getTypedField(9, 0);
289                return retVal;
290    }
291    
292    /**
293     * Returns
294     * SCH-9: "Appointment Duration" - creates it if necessary
295     */
296    public NM getSch9_AppointmentDuration() { 
297                NM retVal = this.getTypedField(9, 0);
298                return retVal;
299    }
300
301
302
303    /**
304     * Returns
305     * SCH-10: "Appointment Duration Units" - creates it if necessary
306     */
307    public CE getAppointmentDurationUnits() { 
308                CE retVal = this.getTypedField(10, 0);
309                return retVal;
310    }
311    
312    /**
313     * Returns
314     * SCH-10: "Appointment Duration Units" - creates it if necessary
315     */
316    public CE getSch10_AppointmentDurationUnits() { 
317                CE retVal = this.getTypedField(10, 0);
318                return retVal;
319    }
320
321
322    /**
323     * Returns all repetitions of Appointment Timing Quantity (SCH-11).
324     */
325    public TQ[] getAppointmentTimingQuantity() {
326        TQ[] retVal = this.getTypedField(11, new TQ[0]);
327        return retVal;
328    }
329
330
331    /**
332     * Returns all repetitions of Appointment Timing Quantity (SCH-11).
333     */
334    public TQ[] getSch11_AppointmentTimingQuantity() {
335        TQ[] retVal = this.getTypedField(11, new TQ[0]);
336        return retVal;
337    }
338
339
340    /**
341     * Returns a count of the current number of repetitions of Appointment Timing Quantity (SCH-11).
342     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
343     * it will return zero.
344     */
345    public int getAppointmentTimingQuantityReps() {
346        return this.getReps(11);
347    }
348
349
350    /**
351     * Returns a specific repetition of
352     * SCH-11: "Appointment Timing Quantity" - creates it if necessary
353     *
354     * @param rep The repetition index (0-indexed)
355     */
356    public TQ getAppointmentTimingQuantity(int rep) { 
357                TQ retVal = this.getTypedField(11, rep);
358                return retVal;
359    }
360
361    /**
362     * Returns a specific repetition of
363     * SCH-11: "Appointment Timing Quantity" - creates it if necessary
364     *
365     * @param rep The repetition index (0-indexed)
366     */
367    public TQ getSch11_AppointmentTimingQuantity(int rep) { 
368                TQ retVal = this.getTypedField(11, rep);
369                return retVal;
370    }
371
372    /**
373     * Returns a count of the current number of repetitions of Appointment Timing Quantity (SCH-11).
374     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
375     * it will return zero.
376     */
377    public int getSch11_AppointmentTimingQuantityReps() {
378        return this.getReps(11);
379    }
380
381
382    /**
383     * Inserts a repetition of
384     * SCH-11: "Appointment Timing Quantity" at a specific index
385     *
386     * @param rep The repetition index (0-indexed)
387     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
388     */
389    public TQ insertAppointmentTimingQuantity(int rep) throws HL7Exception { 
390        return (TQ) super.insertRepetition(11, rep);
391    }
392
393
394    /**
395     * Inserts a repetition of
396     * SCH-11: "Appointment Timing Quantity" at a specific index
397     *
398     * @param rep The repetition index (0-indexed)
399     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
400     */
401    public TQ insertSch11_AppointmentTimingQuantity(int rep) throws HL7Exception { 
402        return (TQ) super.insertRepetition(11, rep);
403    }
404
405
406    /**
407     * Removes a repetition of
408     * SCH-11: "Appointment Timing Quantity" at a specific index
409     *
410     * @param rep The repetition index (0-indexed)
411     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
412     */
413    public TQ removeAppointmentTimingQuantity(int rep) throws HL7Exception { 
414        return (TQ) super.removeRepetition(11, rep);
415    }
416
417
418    /**
419     * Removes a repetition of
420     * SCH-11: "Appointment Timing Quantity" at a specific index
421     *
422     * @param rep The repetition index (0-indexed)
423     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
424     */
425    public TQ removeSch11_AppointmentTimingQuantity(int rep) throws HL7Exception { 
426        return (TQ) super.removeRepetition(11, rep);
427    }
428
429
430
431    /**
432     * Returns all repetitions of Placer Contact Person (SCH-12).
433     */
434    public XCN[] getPlacerContactPerson() {
435        XCN[] retVal = this.getTypedField(12, new XCN[0]);
436        return retVal;
437    }
438
439
440    /**
441     * Returns all repetitions of Placer Contact Person (SCH-12).
442     */
443    public XCN[] getSch12_PlacerContactPerson() {
444        XCN[] retVal = this.getTypedField(12, new XCN[0]);
445        return retVal;
446    }
447
448
449    /**
450     * Returns a count of the current number of repetitions of Placer Contact Person (SCH-12).
451     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
452     * it will return zero.
453     */
454    public int getPlacerContactPersonReps() {
455        return this.getReps(12);
456    }
457
458
459    /**
460     * Returns a specific repetition of
461     * SCH-12: "Placer Contact Person" - creates it if necessary
462     *
463     * @param rep The repetition index (0-indexed)
464     */
465    public XCN getPlacerContactPerson(int rep) { 
466                XCN retVal = this.getTypedField(12, rep);
467                return retVal;
468    }
469
470    /**
471     * Returns a specific repetition of
472     * SCH-12: "Placer Contact Person" - creates it if necessary
473     *
474     * @param rep The repetition index (0-indexed)
475     */
476    public XCN getSch12_PlacerContactPerson(int rep) { 
477                XCN retVal = this.getTypedField(12, rep);
478                return retVal;
479    }
480
481    /**
482     * Returns a count of the current number of repetitions of Placer Contact Person (SCH-12).
483     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
484     * it will return zero.
485     */
486    public int getSch12_PlacerContactPersonReps() {
487        return this.getReps(12);
488    }
489
490
491    /**
492     * Inserts a repetition of
493     * SCH-12: "Placer Contact Person" at a specific index
494     *
495     * @param rep The repetition index (0-indexed)
496     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
497     */
498    public XCN insertPlacerContactPerson(int rep) throws HL7Exception { 
499        return (XCN) super.insertRepetition(12, rep);
500    }
501
502
503    /**
504     * Inserts a repetition of
505     * SCH-12: "Placer Contact Person" at a specific index
506     *
507     * @param rep The repetition index (0-indexed)
508     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
509     */
510    public XCN insertSch12_PlacerContactPerson(int rep) throws HL7Exception { 
511        return (XCN) super.insertRepetition(12, rep);
512    }
513
514
515    /**
516     * Removes a repetition of
517     * SCH-12: "Placer Contact Person" at a specific index
518     *
519     * @param rep The repetition index (0-indexed)
520     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
521     */
522    public XCN removePlacerContactPerson(int rep) throws HL7Exception { 
523        return (XCN) super.removeRepetition(12, rep);
524    }
525
526
527    /**
528     * Removes a repetition of
529     * SCH-12: "Placer Contact Person" at a specific index
530     *
531     * @param rep The repetition index (0-indexed)
532     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
533     */
534    public XCN removeSch12_PlacerContactPerson(int rep) throws HL7Exception { 
535        return (XCN) super.removeRepetition(12, rep);
536    }
537
538
539
540
541    /**
542     * Returns
543     * SCH-13: "Placer Contact Phone Number" - creates it if necessary
544     */
545    public XTN getPlacerContactPhoneNumber() { 
546                XTN retVal = this.getTypedField(13, 0);
547                return retVal;
548    }
549    
550    /**
551     * Returns
552     * SCH-13: "Placer Contact Phone Number" - creates it if necessary
553     */
554    public XTN getSch13_PlacerContactPhoneNumber() { 
555                XTN retVal = this.getTypedField(13, 0);
556                return retVal;
557    }
558
559
560    /**
561     * Returns all repetitions of Placer Contact Address (SCH-14).
562     */
563    public XAD[] getPlacerContactAddress() {
564        XAD[] retVal = this.getTypedField(14, new XAD[0]);
565        return retVal;
566    }
567
568
569    /**
570     * Returns all repetitions of Placer Contact Address (SCH-14).
571     */
572    public XAD[] getSch14_PlacerContactAddress() {
573        XAD[] retVal = this.getTypedField(14, new XAD[0]);
574        return retVal;
575    }
576
577
578    /**
579     * Returns a count of the current number of repetitions of Placer Contact Address (SCH-14).
580     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
581     * it will return zero.
582     */
583    public int getPlacerContactAddressReps() {
584        return this.getReps(14);
585    }
586
587
588    /**
589     * Returns a specific repetition of
590     * SCH-14: "Placer Contact Address" - creates it if necessary
591     *
592     * @param rep The repetition index (0-indexed)
593     */
594    public XAD getPlacerContactAddress(int rep) { 
595                XAD retVal = this.getTypedField(14, rep);
596                return retVal;
597    }
598
599    /**
600     * Returns a specific repetition of
601     * SCH-14: "Placer Contact Address" - creates it if necessary
602     *
603     * @param rep The repetition index (0-indexed)
604     */
605    public XAD getSch14_PlacerContactAddress(int rep) { 
606                XAD retVal = this.getTypedField(14, rep);
607                return retVal;
608    }
609
610    /**
611     * Returns a count of the current number of repetitions of Placer Contact Address (SCH-14).
612     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
613     * it will return zero.
614     */
615    public int getSch14_PlacerContactAddressReps() {
616        return this.getReps(14);
617    }
618
619
620    /**
621     * Inserts a repetition of
622     * SCH-14: "Placer Contact Address" at a specific index
623     *
624     * @param rep The repetition index (0-indexed)
625     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
626     */
627    public XAD insertPlacerContactAddress(int rep) throws HL7Exception { 
628        return (XAD) super.insertRepetition(14, rep);
629    }
630
631
632    /**
633     * Inserts a repetition of
634     * SCH-14: "Placer Contact Address" at a specific index
635     *
636     * @param rep The repetition index (0-indexed)
637     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
638     */
639    public XAD insertSch14_PlacerContactAddress(int rep) throws HL7Exception { 
640        return (XAD) super.insertRepetition(14, rep);
641    }
642
643
644    /**
645     * Removes a repetition of
646     * SCH-14: "Placer Contact Address" at a specific index
647     *
648     * @param rep The repetition index (0-indexed)
649     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
650     */
651    public XAD removePlacerContactAddress(int rep) throws HL7Exception { 
652        return (XAD) super.removeRepetition(14, rep);
653    }
654
655
656    /**
657     * Removes a repetition of
658     * SCH-14: "Placer Contact Address" at a specific index
659     *
660     * @param rep The repetition index (0-indexed)
661     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
662     */
663    public XAD removeSch14_PlacerContactAddress(int rep) throws HL7Exception { 
664        return (XAD) super.removeRepetition(14, rep);
665    }
666
667
668
669
670    /**
671     * Returns
672     * SCH-15: "Placer Contact Location" - creates it if necessary
673     */
674    public PL getPlacerContactLocation() { 
675                PL retVal = this.getTypedField(15, 0);
676                return retVal;
677    }
678    
679    /**
680     * Returns
681     * SCH-15: "Placer Contact Location" - creates it if necessary
682     */
683    public PL getSch15_PlacerContactLocation() { 
684                PL retVal = this.getTypedField(15, 0);
685                return retVal;
686    }
687
688
689    /**
690     * Returns all repetitions of Filler Contact Person (SCH-16).
691     */
692    public XCN[] getFillerContactPerson() {
693        XCN[] retVal = this.getTypedField(16, new XCN[0]);
694        return retVal;
695    }
696
697
698    /**
699     * Returns all repetitions of Filler Contact Person (SCH-16).
700     */
701    public XCN[] getSch16_FillerContactPerson() {
702        XCN[] retVal = this.getTypedField(16, new XCN[0]);
703        return retVal;
704    }
705
706
707    /**
708     * Returns a count of the current number of repetitions of Filler Contact Person (SCH-16).
709     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
710     * it will return zero.
711     */
712    public int getFillerContactPersonReps() {
713        return this.getReps(16);
714    }
715
716
717    /**
718     * Returns a specific repetition of
719     * SCH-16: "Filler Contact Person" - creates it if necessary
720     *
721     * @param rep The repetition index (0-indexed)
722     */
723    public XCN getFillerContactPerson(int rep) { 
724                XCN retVal = this.getTypedField(16, rep);
725                return retVal;
726    }
727
728    /**
729     * Returns a specific repetition of
730     * SCH-16: "Filler Contact Person" - creates it if necessary
731     *
732     * @param rep The repetition index (0-indexed)
733     */
734    public XCN getSch16_FillerContactPerson(int rep) { 
735                XCN retVal = this.getTypedField(16, rep);
736                return retVal;
737    }
738
739    /**
740     * Returns a count of the current number of repetitions of Filler Contact Person (SCH-16).
741     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
742     * it will return zero.
743     */
744    public int getSch16_FillerContactPersonReps() {
745        return this.getReps(16);
746    }
747
748
749    /**
750     * Inserts a repetition of
751     * SCH-16: "Filler Contact Person" at a specific index
752     *
753     * @param rep The repetition index (0-indexed)
754     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
755     */
756    public XCN insertFillerContactPerson(int rep) throws HL7Exception { 
757        return (XCN) super.insertRepetition(16, rep);
758    }
759
760
761    /**
762     * Inserts a repetition of
763     * SCH-16: "Filler Contact Person" at a specific index
764     *
765     * @param rep The repetition index (0-indexed)
766     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
767     */
768    public XCN insertSch16_FillerContactPerson(int rep) throws HL7Exception { 
769        return (XCN) super.insertRepetition(16, rep);
770    }
771
772
773    /**
774     * Removes a repetition of
775     * SCH-16: "Filler Contact Person" at a specific index
776     *
777     * @param rep The repetition index (0-indexed)
778     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
779     */
780    public XCN removeFillerContactPerson(int rep) throws HL7Exception { 
781        return (XCN) super.removeRepetition(16, rep);
782    }
783
784
785    /**
786     * Removes a repetition of
787     * SCH-16: "Filler Contact Person" at a specific index
788     *
789     * @param rep The repetition index (0-indexed)
790     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
791     */
792    public XCN removeSch16_FillerContactPerson(int rep) throws HL7Exception { 
793        return (XCN) super.removeRepetition(16, rep);
794    }
795
796
797
798
799    /**
800     * Returns
801     * SCH-17: "Filler Contact Phone Number" - creates it if necessary
802     */
803    public XTN getFillerContactPhoneNumber() { 
804                XTN retVal = this.getTypedField(17, 0);
805                return retVal;
806    }
807    
808    /**
809     * Returns
810     * SCH-17: "Filler Contact Phone Number" - creates it if necessary
811     */
812    public XTN getSch17_FillerContactPhoneNumber() { 
813                XTN retVal = this.getTypedField(17, 0);
814                return retVal;
815    }
816
817
818    /**
819     * Returns all repetitions of Filler Contact Address (SCH-18).
820     */
821    public XAD[] getFillerContactAddress() {
822        XAD[] retVal = this.getTypedField(18, new XAD[0]);
823        return retVal;
824    }
825
826
827    /**
828     * Returns all repetitions of Filler Contact Address (SCH-18).
829     */
830    public XAD[] getSch18_FillerContactAddress() {
831        XAD[] retVal = this.getTypedField(18, new XAD[0]);
832        return retVal;
833    }
834
835
836    /**
837     * Returns a count of the current number of repetitions of Filler Contact Address (SCH-18).
838     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
839     * it will return zero.
840     */
841    public int getFillerContactAddressReps() {
842        return this.getReps(18);
843    }
844
845
846    /**
847     * Returns a specific repetition of
848     * SCH-18: "Filler Contact Address" - creates it if necessary
849     *
850     * @param rep The repetition index (0-indexed)
851     */
852    public XAD getFillerContactAddress(int rep) { 
853                XAD retVal = this.getTypedField(18, rep);
854                return retVal;
855    }
856
857    /**
858     * Returns a specific repetition of
859     * SCH-18: "Filler Contact Address" - creates it if necessary
860     *
861     * @param rep The repetition index (0-indexed)
862     */
863    public XAD getSch18_FillerContactAddress(int rep) { 
864                XAD retVal = this.getTypedField(18, rep);
865                return retVal;
866    }
867
868    /**
869     * Returns a count of the current number of repetitions of Filler Contact Address (SCH-18).
870     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
871     * it will return zero.
872     */
873    public int getSch18_FillerContactAddressReps() {
874        return this.getReps(18);
875    }
876
877
878    /**
879     * Inserts a repetition of
880     * SCH-18: "Filler Contact Address" at a specific index
881     *
882     * @param rep The repetition index (0-indexed)
883     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
884     */
885    public XAD insertFillerContactAddress(int rep) throws HL7Exception { 
886        return (XAD) super.insertRepetition(18, rep);
887    }
888
889
890    /**
891     * Inserts a repetition of
892     * SCH-18: "Filler Contact Address" at a specific index
893     *
894     * @param rep The repetition index (0-indexed)
895     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
896     */
897    public XAD insertSch18_FillerContactAddress(int rep) throws HL7Exception { 
898        return (XAD) super.insertRepetition(18, rep);
899    }
900
901
902    /**
903     * Removes a repetition of
904     * SCH-18: "Filler Contact Address" at a specific index
905     *
906     * @param rep The repetition index (0-indexed)
907     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
908     */
909    public XAD removeFillerContactAddress(int rep) throws HL7Exception { 
910        return (XAD) super.removeRepetition(18, rep);
911    }
912
913
914    /**
915     * Removes a repetition of
916     * SCH-18: "Filler Contact Address" at a specific index
917     *
918     * @param rep The repetition index (0-indexed)
919     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
920     */
921    public XAD removeSch18_FillerContactAddress(int rep) throws HL7Exception { 
922        return (XAD) super.removeRepetition(18, rep);
923    }
924
925
926
927
928    /**
929     * Returns
930     * SCH-19: "Filler Contact Location" - creates it if necessary
931     */
932    public PL getFillerContactLocation() { 
933                PL retVal = this.getTypedField(19, 0);
934                return retVal;
935    }
936    
937    /**
938     * Returns
939     * SCH-19: "Filler Contact Location" - creates it if necessary
940     */
941    public PL getSch19_FillerContactLocation() { 
942                PL retVal = this.getTypedField(19, 0);
943                return retVal;
944    }
945
946
947    /**
948     * Returns all repetitions of Entered by Person (SCH-20).
949     */
950    public XCN[] getEnteredByPerson() {
951        XCN[] retVal = this.getTypedField(20, new XCN[0]);
952        return retVal;
953    }
954
955
956    /**
957     * Returns all repetitions of Entered by Person (SCH-20).
958     */
959    public XCN[] getSch20_EnteredByPerson() {
960        XCN[] retVal = this.getTypedField(20, new XCN[0]);
961        return retVal;
962    }
963
964
965    /**
966     * Returns a count of the current number of repetitions of Entered by Person (SCH-20).
967     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
968     * it will return zero.
969     */
970    public int getEnteredByPersonReps() {
971        return this.getReps(20);
972    }
973
974
975    /**
976     * Returns a specific repetition of
977     * SCH-20: "Entered by Person" - creates it if necessary
978     *
979     * @param rep The repetition index (0-indexed)
980     */
981    public XCN getEnteredByPerson(int rep) { 
982                XCN retVal = this.getTypedField(20, rep);
983                return retVal;
984    }
985
986    /**
987     * Returns a specific repetition of
988     * SCH-20: "Entered by Person" - creates it if necessary
989     *
990     * @param rep The repetition index (0-indexed)
991     */
992    public XCN getSch20_EnteredByPerson(int rep) { 
993                XCN retVal = this.getTypedField(20, rep);
994                return retVal;
995    }
996
997    /**
998     * Returns a count of the current number of repetitions of Entered by Person (SCH-20).
999     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1000     * it will return zero.
1001     */
1002    public int getSch20_EnteredByPersonReps() {
1003        return this.getReps(20);
1004    }
1005
1006
1007    /**
1008     * Inserts a repetition of
1009     * SCH-20: "Entered by Person" at a specific index
1010     *
1011     * @param rep The repetition index (0-indexed)
1012     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1013     */
1014    public XCN insertEnteredByPerson(int rep) throws HL7Exception { 
1015        return (XCN) super.insertRepetition(20, rep);
1016    }
1017
1018
1019    /**
1020     * Inserts a repetition of
1021     * SCH-20: "Entered by Person" at a specific index
1022     *
1023     * @param rep The repetition index (0-indexed)
1024     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1025     */
1026    public XCN insertSch20_EnteredByPerson(int rep) throws HL7Exception { 
1027        return (XCN) super.insertRepetition(20, rep);
1028    }
1029
1030
1031    /**
1032     * Removes a repetition of
1033     * SCH-20: "Entered by Person" at a specific index
1034     *
1035     * @param rep The repetition index (0-indexed)
1036     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1037     */
1038    public XCN removeEnteredByPerson(int rep) throws HL7Exception { 
1039        return (XCN) super.removeRepetition(20, rep);
1040    }
1041
1042
1043    /**
1044     * Removes a repetition of
1045     * SCH-20: "Entered by Person" at a specific index
1046     *
1047     * @param rep The repetition index (0-indexed)
1048     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1049     */
1050    public XCN removeSch20_EnteredByPerson(int rep) throws HL7Exception { 
1051        return (XCN) super.removeRepetition(20, rep);
1052    }
1053
1054
1055
1056    /**
1057     * Returns all repetitions of Entered by Phone Number (SCH-21).
1058     */
1059    public XTN[] getEnteredByPhoneNumber() {
1060        XTN[] retVal = this.getTypedField(21, new XTN[0]);
1061        return retVal;
1062    }
1063
1064
1065    /**
1066     * Returns all repetitions of Entered by Phone Number (SCH-21).
1067     */
1068    public XTN[] getSch21_EnteredByPhoneNumber() {
1069        XTN[] retVal = this.getTypedField(21, new XTN[0]);
1070        return retVal;
1071    }
1072
1073
1074    /**
1075     * Returns a count of the current number of repetitions of Entered by Phone Number (SCH-21).
1076     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1077     * it will return zero.
1078     */
1079    public int getEnteredByPhoneNumberReps() {
1080        return this.getReps(21);
1081    }
1082
1083
1084    /**
1085     * Returns a specific repetition of
1086     * SCH-21: "Entered by Phone Number" - creates it if necessary
1087     *
1088     * @param rep The repetition index (0-indexed)
1089     */
1090    public XTN getEnteredByPhoneNumber(int rep) { 
1091                XTN retVal = this.getTypedField(21, rep);
1092                return retVal;
1093    }
1094
1095    /**
1096     * Returns a specific repetition of
1097     * SCH-21: "Entered by Phone Number" - creates it if necessary
1098     *
1099     * @param rep The repetition index (0-indexed)
1100     */
1101    public XTN getSch21_EnteredByPhoneNumber(int rep) { 
1102                XTN retVal = this.getTypedField(21, rep);
1103                return retVal;
1104    }
1105
1106    /**
1107     * Returns a count of the current number of repetitions of Entered by Phone Number (SCH-21).
1108     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1109     * it will return zero.
1110     */
1111    public int getSch21_EnteredByPhoneNumberReps() {
1112        return this.getReps(21);
1113    }
1114
1115
1116    /**
1117     * Inserts a repetition of
1118     * SCH-21: "Entered by Phone Number" at a specific index
1119     *
1120     * @param rep The repetition index (0-indexed)
1121     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1122     */
1123    public XTN insertEnteredByPhoneNumber(int rep) throws HL7Exception { 
1124        return (XTN) super.insertRepetition(21, rep);
1125    }
1126
1127
1128    /**
1129     * Inserts a repetition of
1130     * SCH-21: "Entered by Phone Number" at a specific index
1131     *
1132     * @param rep The repetition index (0-indexed)
1133     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1134     */
1135    public XTN insertSch21_EnteredByPhoneNumber(int rep) throws HL7Exception { 
1136        return (XTN) super.insertRepetition(21, rep);
1137    }
1138
1139
1140    /**
1141     * Removes a repetition of
1142     * SCH-21: "Entered by Phone Number" at a specific index
1143     *
1144     * @param rep The repetition index (0-indexed)
1145     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1146     */
1147    public XTN removeEnteredByPhoneNumber(int rep) throws HL7Exception { 
1148        return (XTN) super.removeRepetition(21, rep);
1149    }
1150
1151
1152    /**
1153     * Removes a repetition of
1154     * SCH-21: "Entered by Phone Number" at a specific index
1155     *
1156     * @param rep The repetition index (0-indexed)
1157     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1158     */
1159    public XTN removeSch21_EnteredByPhoneNumber(int rep) throws HL7Exception { 
1160        return (XTN) super.removeRepetition(21, rep);
1161    }
1162
1163
1164
1165
1166    /**
1167     * Returns
1168     * SCH-22: "Entered by Location" - creates it if necessary
1169     */
1170    public PL getEnteredByLocation() { 
1171                PL retVal = this.getTypedField(22, 0);
1172                return retVal;
1173    }
1174    
1175    /**
1176     * Returns
1177     * SCH-22: "Entered by Location" - creates it if necessary
1178     */
1179    public PL getSch22_EnteredByLocation() { 
1180                PL retVal = this.getTypedField(22, 0);
1181                return retVal;
1182    }
1183
1184
1185
1186    /**
1187     * Returns
1188     * SCH-23: "Parent Placer Appointment ID" - creates it if necessary
1189     */
1190    public EI getParentPlacerAppointmentID() { 
1191                EI retVal = this.getTypedField(23, 0);
1192                return retVal;
1193    }
1194    
1195    /**
1196     * Returns
1197     * SCH-23: "Parent Placer Appointment ID" - creates it if necessary
1198     */
1199    public EI getSch23_ParentPlacerAppointmentID() { 
1200                EI retVal = this.getTypedField(23, 0);
1201                return retVal;
1202    }
1203
1204
1205
1206    /**
1207     * Returns
1208     * SCH-24: "Parent Filler Appointment ID" - creates it if necessary
1209     */
1210    public EI getParentFillerAppointmentID() { 
1211                EI retVal = this.getTypedField(24, 0);
1212                return retVal;
1213    }
1214    
1215    /**
1216     * Returns
1217     * SCH-24: "Parent Filler Appointment ID" - creates it if necessary
1218     */
1219    public EI getSch24_ParentFillerAppointmentID() { 
1220                EI retVal = this.getTypedField(24, 0);
1221                return retVal;
1222    }
1223
1224
1225
1226    /**
1227     * Returns
1228     * SCH-25: "Filler Status Code" - creates it if necessary
1229     */
1230    public CE getFillerStatusCode() { 
1231                CE retVal = this.getTypedField(25, 0);
1232                return retVal;
1233    }
1234    
1235    /**
1236     * Returns
1237     * SCH-25: "Filler Status Code" - creates it if necessary
1238     */
1239    public CE getSch25_FillerStatusCode() { 
1240                CE retVal = this.getTypedField(25, 0);
1241                return retVal;
1242    }
1243
1244
1245
1246
1247
1248    /** {@inheritDoc} */   
1249    protected Type createNewTypeWithoutReflection(int field) {
1250       switch (field) {
1251          case 0: return new EI(getMessage());
1252          case 1: return new EI(getMessage());
1253          case 2: return new NM(getMessage());
1254          case 3: return new EI(getMessage());
1255          case 4: return new CE(getMessage());
1256          case 5: return new CE(getMessage());
1257          case 6: return new CE(getMessage());
1258          case 7: return new CE(getMessage());
1259          case 8: return new NM(getMessage());
1260          case 9: return new CE(getMessage());
1261          case 10: return new TQ(getMessage());
1262          case 11: return new XCN(getMessage());
1263          case 12: return new XTN(getMessage());
1264          case 13: return new XAD(getMessage());
1265          case 14: return new PL(getMessage());
1266          case 15: return new XCN(getMessage());
1267          case 16: return new XTN(getMessage());
1268          case 17: return new XAD(getMessage());
1269          case 18: return new PL(getMessage());
1270          case 19: return new XCN(getMessage());
1271          case 20: return new XTN(getMessage());
1272          case 21: return new PL(getMessage());
1273          case 22: return new EI(getMessage());
1274          case 23: return new EI(getMessage());
1275          case 24: return new CE(getMessage());
1276          default: return null;
1277       }
1278   }
1279
1280
1281}
1282