View Javadoc
1   /*
2    * This class is an auto-generated source file for a HAPI
3    * HL7 v2.x standard structure class.
4    *
5    * For more information, visit: http://hl7api.sourceforge.net/
6    * 
7    * The contents of this file are subject to the Mozilla Public License Version 1.1 
8    * (the "License"); you may not use this file except in compliance with the License. 
9    * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
10   * Software distributed under the License is distributed on an "AS IS" basis, 
11   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
12   * specific language governing rights and limitations under the License. 
13   * 
14   * The Original Code is "[file_name]".  Description: 
15   * "[one_line_description]" 
16   * 
17   * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
18   * 2012.  All Rights Reserved. 
19   * 
20   * Contributor(s): ______________________________________. 
21   * 
22   * Alternatively, the contents of this file may be used under the terms of the 
23   * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
24   * applicable instead of those above.  If you wish to allow use of your version of this 
25   * file only under the terms of the GPL and not to allow others to use your version 
26   * of this file under the MPL, indicate your decision by deleting  the provisions above 
27   * and replace  them with the notice and other provisions required by the GPL License.  
28   * If you do not delete the provisions above, a recipient may use your version of 
29   * this file under either the MPL or the GPL. 
30   * 
31   */
32  
33  
34  package ca.uhn.hl7v2.model.v231.segment;
35  
36  // import ca.uhn.hl7v2.model.v231.group.*;
37  import ca.uhn.hl7v2.model.v231.datatype.*;
38  import ca.uhn.hl7v2.HL7Exception;
39  import ca.uhn.hl7v2.parser.ModelClassFactory;
40  import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
41  import ca.uhn.hl7v2.model.AbstractMessage;
42  import ca.uhn.hl7v2.model.Group;
43  import ca.uhn.hl7v2.model.Type;
44  import ca.uhn.hl7v2.model.AbstractSegment;
45  import ca.uhn.hl7v2.model.Varies;
46  
47  
48  /**
49   *<p>Represents an HL7 LOC message segment (LOC - location identification segment). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>LOC-1: Primary Key Value - LOC (PL) <b> </b>
53       * <li>LOC-2: Location Description (ST) <b>optional </b>
54       * <li>LOC-3: Location Type - LOC (IS) <b> repeating</b>
55       * <li>LOC-4: Organization Name - LOC (XON) <b>optional repeating</b>
56       * <li>LOC-5: Location Address (XAD) <b>optional repeating</b>
57       * <li>LOC-6: Location Phone (XTN) <b>optional repeating</b>
58       * <li>LOC-7: License Number (CE) <b>optional repeating</b>
59       * <li>LOC-8: Location Equipment (IS) <b>optional repeating</b>
60   * </ul>
61   */
62  @SuppressWarnings("unused")
63  public class LOC extends AbstractSegment {
64  
65      /** 
66       * Creates a new LOC segment
67       */
68      public LOC(Group parent, ModelClassFactory factory) {
69         super(parent, factory);
70         init(factory);
71      }
72  
73      private void init(ModelClassFactory factory) {
74         try {
75                                    this.add(PL.class, true, 1, 200, new Object[]{ getMessage() }, "Primary Key Value - LOC");
76                                    this.add(ST.class, false, 1, 48, new Object[]{ getMessage() }, "Location Description");
77                                                this.add(IS.class, true, 0, 2, new Object[]{ getMessage(), new Integer(260) }, "Location Type - LOC");
78                                    this.add(XON.class, false, 0, 90, new Object[]{ getMessage() }, "Organization Name - LOC");
79                                    this.add(XAD.class, false, 0, 106, new Object[]{ getMessage() }, "Location Address");
80                                    this.add(XTN.class, false, 0, 40, new Object[]{ getMessage() }, "Location Phone");
81                                    this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "License Number");
82                                                this.add(IS.class, false, 0, 3, new Object[]{ getMessage(), new Integer(261) }, "Location Equipment");
83         } catch(HL7Exception e) {
84            log.error("Unexpected error creating LOC - this is probably a bug in the source code generator.", e);
85         }
86      }
87  
88  
89  
90      /**
91       * Returns
92       * LOC-1: "Primary Key Value - LOC" - creates it if necessary
93       */
94      public PL getPrimaryKeyValueLOC() { 
95  		PL retVal = this.getTypedField(1, 0);
96  		return retVal;
97      }
98      
99      /**
100      * Returns
101      * LOC-1: "Primary Key Value - LOC" - creates it if necessary
102      */
103     public PL getLoc1_PrimaryKeyValueLOC() { 
104 		PL retVal = this.getTypedField(1, 0);
105 		return retVal;
106     }
107 
108 
109 
110     /**
111      * Returns
112      * LOC-2: "Location Description" - creates it if necessary
113      */
114     public ST getLocationDescription() { 
115 		ST retVal = this.getTypedField(2, 0);
116 		return retVal;
117     }
118     
119     /**
120      * Returns
121      * LOC-2: "Location Description" - creates it if necessary
122      */
123     public ST getLoc2_LocationDescription() { 
124 		ST retVal = this.getTypedField(2, 0);
125 		return retVal;
126     }
127 
128 
129     /**
130      * Returns all repetitions of Location Type - LOC (LOC-3).
131      */
132     public IS[] getLocationTypeLOC() {
133     	IS[] retVal = this.getTypedField(3, new IS[0]);
134     	return retVal;
135     }
136 
137 
138     /**
139      * Returns all repetitions of Location Type - LOC (LOC-3).
140      */
141     public IS[] getLoc3_LocationTypeLOC() {
142     	IS[] retVal = this.getTypedField(3, new IS[0]);
143     	return retVal;
144     }
145 
146 
147     /**
148      * Returns a count of the current number of repetitions of Location Type - LOC (LOC-3).
149      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
150      * it will return zero.
151      */
152     public int getLocationTypeLOCReps() {
153     	return this.getReps(3);
154     }
155 
156 
157     /**
158      * Returns a specific repetition of
159      * LOC-3: "Location Type - LOC" - creates it if necessary
160      *
161      * @param rep The repetition index (0-indexed)
162      */
163     public IS getLocationTypeLOC(int rep) { 
164 		IS retVal = this.getTypedField(3, rep);
165 		return retVal;
166     }
167 
168     /**
169      * Returns a specific repetition of
170      * LOC-3: "Location Type - LOC" - creates it if necessary
171      *
172      * @param rep The repetition index (0-indexed)
173      */
174     public IS getLoc3_LocationTypeLOC(int rep) { 
175 		IS retVal = this.getTypedField(3, rep);
176 		return retVal;
177     }
178 
179     /**
180      * Returns a count of the current number of repetitions of Location Type - LOC (LOC-3).
181      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
182      * it will return zero.
183      */
184     public int getLoc3_LocationTypeLOCReps() {
185     	return this.getReps(3);
186     }
187 
188 
189     /**
190      * Inserts a repetition of
191      * LOC-3: "Location Type - LOC" at a specific index
192      *
193      * @param rep The repetition index (0-indexed)
194      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
195      */
196     public IS insertLocationTypeLOC(int rep) throws HL7Exception { 
197         return (IS) super.insertRepetition(3, rep);
198     }
199 
200 
201     /**
202      * Inserts a repetition of
203      * LOC-3: "Location Type - LOC" at a specific index
204      *
205      * @param rep The repetition index (0-indexed)
206      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
207      */
208     public IS insertLoc3_LocationTypeLOC(int rep) throws HL7Exception { 
209         return (IS) super.insertRepetition(3, rep);
210     }
211 
212 
213     /**
214      * Removes a repetition of
215      * LOC-3: "Location Type - LOC" at a specific index
216      *
217      * @param rep The repetition index (0-indexed)
218      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
219      */
220     public IS removeLocationTypeLOC(int rep) throws HL7Exception { 
221         return (IS) super.removeRepetition(3, rep);
222     }
223 
224 
225     /**
226      * Removes a repetition of
227      * LOC-3: "Location Type - LOC" at a specific index
228      *
229      * @param rep The repetition index (0-indexed)
230      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
231      */
232     public IS removeLoc3_LocationTypeLOC(int rep) throws HL7Exception { 
233         return (IS) super.removeRepetition(3, rep);
234     }
235 
236 
237 
238     /**
239      * Returns all repetitions of Organization Name - LOC (LOC-4).
240      */
241     public XON[] getOrganizationNameLOC() {
242     	XON[] retVal = this.getTypedField(4, new XON[0]);
243     	return retVal;
244     }
245 
246 
247     /**
248      * Returns all repetitions of Organization Name - LOC (LOC-4).
249      */
250     public XON[] getLoc4_OrganizationNameLOC() {
251     	XON[] retVal = this.getTypedField(4, new XON[0]);
252     	return retVal;
253     }
254 
255 
256     /**
257      * Returns a count of the current number of repetitions of Organization Name - LOC (LOC-4).
258      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
259      * it will return zero.
260      */
261     public int getOrganizationNameLOCReps() {
262     	return this.getReps(4);
263     }
264 
265 
266     /**
267      * Returns a specific repetition of
268      * LOC-4: "Organization Name - LOC" - creates it if necessary
269      *
270      * @param rep The repetition index (0-indexed)
271      */
272     public XON getOrganizationNameLOC(int rep) { 
273 		XON retVal = this.getTypedField(4, rep);
274 		return retVal;
275     }
276 
277     /**
278      * Returns a specific repetition of
279      * LOC-4: "Organization Name - LOC" - creates it if necessary
280      *
281      * @param rep The repetition index (0-indexed)
282      */
283     public XON getLoc4_OrganizationNameLOC(int rep) { 
284 		XON retVal = this.getTypedField(4, rep);
285 		return retVal;
286     }
287 
288     /**
289      * Returns a count of the current number of repetitions of Organization Name - LOC (LOC-4).
290      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
291      * it will return zero.
292      */
293     public int getLoc4_OrganizationNameLOCReps() {
294     	return this.getReps(4);
295     }
296 
297 
298     /**
299      * Inserts a repetition of
300      * LOC-4: "Organization Name - LOC" at a specific index
301      *
302      * @param rep The repetition index (0-indexed)
303      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
304      */
305     public XON insertOrganizationNameLOC(int rep) throws HL7Exception { 
306         return (XON) super.insertRepetition(4, rep);
307     }
308 
309 
310     /**
311      * Inserts a repetition of
312      * LOC-4: "Organization Name - LOC" at a specific index
313      *
314      * @param rep The repetition index (0-indexed)
315      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
316      */
317     public XON insertLoc4_OrganizationNameLOC(int rep) throws HL7Exception { 
318         return (XON) super.insertRepetition(4, rep);
319     }
320 
321 
322     /**
323      * Removes a repetition of
324      * LOC-4: "Organization Name - LOC" at a specific index
325      *
326      * @param rep The repetition index (0-indexed)
327      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
328      */
329     public XON removeOrganizationNameLOC(int rep) throws HL7Exception { 
330         return (XON) super.removeRepetition(4, rep);
331     }
332 
333 
334     /**
335      * Removes a repetition of
336      * LOC-4: "Organization Name - LOC" at a specific index
337      *
338      * @param rep The repetition index (0-indexed)
339      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
340      */
341     public XON removeLoc4_OrganizationNameLOC(int rep) throws HL7Exception { 
342         return (XON) super.removeRepetition(4, rep);
343     }
344 
345 
346 
347     /**
348      * Returns all repetitions of Location Address (LOC-5).
349      */
350     public XAD[] getLocationAddress() {
351     	XAD[] retVal = this.getTypedField(5, new XAD[0]);
352     	return retVal;
353     }
354 
355 
356     /**
357      * Returns all repetitions of Location Address (LOC-5).
358      */
359     public XAD[] getLoc5_LocationAddress() {
360     	XAD[] retVal = this.getTypedField(5, new XAD[0]);
361     	return retVal;
362     }
363 
364 
365     /**
366      * Returns a count of the current number of repetitions of Location Address (LOC-5).
367      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
368      * it will return zero.
369      */
370     public int getLocationAddressReps() {
371     	return this.getReps(5);
372     }
373 
374 
375     /**
376      * Returns a specific repetition of
377      * LOC-5: "Location Address" - creates it if necessary
378      *
379      * @param rep The repetition index (0-indexed)
380      */
381     public XAD getLocationAddress(int rep) { 
382 		XAD retVal = this.getTypedField(5, rep);
383 		return retVal;
384     }
385 
386     /**
387      * Returns a specific repetition of
388      * LOC-5: "Location Address" - creates it if necessary
389      *
390      * @param rep The repetition index (0-indexed)
391      */
392     public XAD getLoc5_LocationAddress(int rep) { 
393 		XAD retVal = this.getTypedField(5, rep);
394 		return retVal;
395     }
396 
397     /**
398      * Returns a count of the current number of repetitions of Location Address (LOC-5).
399      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
400      * it will return zero.
401      */
402     public int getLoc5_LocationAddressReps() {
403     	return this.getReps(5);
404     }
405 
406 
407     /**
408      * Inserts a repetition of
409      * LOC-5: "Location Address" at a specific index
410      *
411      * @param rep The repetition index (0-indexed)
412      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
413      */
414     public XAD insertLocationAddress(int rep) throws HL7Exception { 
415         return (XAD) super.insertRepetition(5, rep);
416     }
417 
418 
419     /**
420      * Inserts a repetition of
421      * LOC-5: "Location Address" at a specific index
422      *
423      * @param rep The repetition index (0-indexed)
424      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
425      */
426     public XAD insertLoc5_LocationAddress(int rep) throws HL7Exception { 
427         return (XAD) super.insertRepetition(5, rep);
428     }
429 
430 
431     /**
432      * Removes a repetition of
433      * LOC-5: "Location Address" at a specific index
434      *
435      * @param rep The repetition index (0-indexed)
436      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
437      */
438     public XAD removeLocationAddress(int rep) throws HL7Exception { 
439         return (XAD) super.removeRepetition(5, rep);
440     }
441 
442 
443     /**
444      * Removes a repetition of
445      * LOC-5: "Location Address" at a specific index
446      *
447      * @param rep The repetition index (0-indexed)
448      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
449      */
450     public XAD removeLoc5_LocationAddress(int rep) throws HL7Exception { 
451         return (XAD) super.removeRepetition(5, rep);
452     }
453 
454 
455 
456     /**
457      * Returns all repetitions of Location Phone (LOC-6).
458      */
459     public XTN[] getLocationPhone() {
460     	XTN[] retVal = this.getTypedField(6, new XTN[0]);
461     	return retVal;
462     }
463 
464 
465     /**
466      * Returns all repetitions of Location Phone (LOC-6).
467      */
468     public XTN[] getLoc6_LocationPhone() {
469     	XTN[] retVal = this.getTypedField(6, new XTN[0]);
470     	return retVal;
471     }
472 
473 
474     /**
475      * Returns a count of the current number of repetitions of Location Phone (LOC-6).
476      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
477      * it will return zero.
478      */
479     public int getLocationPhoneReps() {
480     	return this.getReps(6);
481     }
482 
483 
484     /**
485      * Returns a specific repetition of
486      * LOC-6: "Location Phone" - creates it if necessary
487      *
488      * @param rep The repetition index (0-indexed)
489      */
490     public XTN getLocationPhone(int rep) { 
491 		XTN retVal = this.getTypedField(6, rep);
492 		return retVal;
493     }
494 
495     /**
496      * Returns a specific repetition of
497      * LOC-6: "Location Phone" - creates it if necessary
498      *
499      * @param rep The repetition index (0-indexed)
500      */
501     public XTN getLoc6_LocationPhone(int rep) { 
502 		XTN retVal = this.getTypedField(6, rep);
503 		return retVal;
504     }
505 
506     /**
507      * Returns a count of the current number of repetitions of Location Phone (LOC-6).
508      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
509      * it will return zero.
510      */
511     public int getLoc6_LocationPhoneReps() {
512     	return this.getReps(6);
513     }
514 
515 
516     /**
517      * Inserts a repetition of
518      * LOC-6: "Location Phone" at a specific index
519      *
520      * @param rep The repetition index (0-indexed)
521      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
522      */
523     public XTN insertLocationPhone(int rep) throws HL7Exception { 
524         return (XTN) super.insertRepetition(6, rep);
525     }
526 
527 
528     /**
529      * Inserts a repetition of
530      * LOC-6: "Location Phone" at a specific index
531      *
532      * @param rep The repetition index (0-indexed)
533      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
534      */
535     public XTN insertLoc6_LocationPhone(int rep) throws HL7Exception { 
536         return (XTN) super.insertRepetition(6, rep);
537     }
538 
539 
540     /**
541      * Removes a repetition of
542      * LOC-6: "Location Phone" at a specific index
543      *
544      * @param rep The repetition index (0-indexed)
545      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
546      */
547     public XTN removeLocationPhone(int rep) throws HL7Exception { 
548         return (XTN) super.removeRepetition(6, rep);
549     }
550 
551 
552     /**
553      * Removes a repetition of
554      * LOC-6: "Location Phone" at a specific index
555      *
556      * @param rep The repetition index (0-indexed)
557      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
558      */
559     public XTN removeLoc6_LocationPhone(int rep) throws HL7Exception { 
560         return (XTN) super.removeRepetition(6, rep);
561     }
562 
563 
564 
565     /**
566      * Returns all repetitions of License Number (LOC-7).
567      */
568     public CE[] getLicenseNumber() {
569     	CE[] retVal = this.getTypedField(7, new CE[0]);
570     	return retVal;
571     }
572 
573 
574     /**
575      * Returns all repetitions of License Number (LOC-7).
576      */
577     public CE[] getLoc7_LicenseNumber() {
578     	CE[] retVal = this.getTypedField(7, new CE[0]);
579     	return retVal;
580     }
581 
582 
583     /**
584      * Returns a count of the current number of repetitions of License Number (LOC-7).
585      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
586      * it will return zero.
587      */
588     public int getLicenseNumberReps() {
589     	return this.getReps(7);
590     }
591 
592 
593     /**
594      * Returns a specific repetition of
595      * LOC-7: "License Number" - creates it if necessary
596      *
597      * @param rep The repetition index (0-indexed)
598      */
599     public CE getLicenseNumber(int rep) { 
600 		CE retVal = this.getTypedField(7, rep);
601 		return retVal;
602     }
603 
604     /**
605      * Returns a specific repetition of
606      * LOC-7: "License Number" - creates it if necessary
607      *
608      * @param rep The repetition index (0-indexed)
609      */
610     public CE getLoc7_LicenseNumber(int rep) { 
611 		CE retVal = this.getTypedField(7, rep);
612 		return retVal;
613     }
614 
615     /**
616      * Returns a count of the current number of repetitions of License Number (LOC-7).
617      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
618      * it will return zero.
619      */
620     public int getLoc7_LicenseNumberReps() {
621     	return this.getReps(7);
622     }
623 
624 
625     /**
626      * Inserts a repetition of
627      * LOC-7: "License Number" at a specific index
628      *
629      * @param rep The repetition index (0-indexed)
630      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
631      */
632     public CE insertLicenseNumber(int rep) throws HL7Exception { 
633         return (CE) super.insertRepetition(7, rep);
634     }
635 
636 
637     /**
638      * Inserts a repetition of
639      * LOC-7: "License Number" at a specific index
640      *
641      * @param rep The repetition index (0-indexed)
642      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
643      */
644     public CE insertLoc7_LicenseNumber(int rep) throws HL7Exception { 
645         return (CE) super.insertRepetition(7, rep);
646     }
647 
648 
649     /**
650      * Removes a repetition of
651      * LOC-7: "License Number" at a specific index
652      *
653      * @param rep The repetition index (0-indexed)
654      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
655      */
656     public CE removeLicenseNumber(int rep) throws HL7Exception { 
657         return (CE) super.removeRepetition(7, rep);
658     }
659 
660 
661     /**
662      * Removes a repetition of
663      * LOC-7: "License Number" at a specific index
664      *
665      * @param rep The repetition index (0-indexed)
666      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
667      */
668     public CE removeLoc7_LicenseNumber(int rep) throws HL7Exception { 
669         return (CE) super.removeRepetition(7, rep);
670     }
671 
672 
673 
674     /**
675      * Returns all repetitions of Location Equipment (LOC-8).
676      */
677     public IS[] getLocationEquipment() {
678     	IS[] retVal = this.getTypedField(8, new IS[0]);
679     	return retVal;
680     }
681 
682 
683     /**
684      * Returns all repetitions of Location Equipment (LOC-8).
685      */
686     public IS[] getLoc8_LocationEquipment() {
687     	IS[] retVal = this.getTypedField(8, new IS[0]);
688     	return retVal;
689     }
690 
691 
692     /**
693      * Returns a count of the current number of repetitions of Location Equipment (LOC-8).
694      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
695      * it will return zero.
696      */
697     public int getLocationEquipmentReps() {
698     	return this.getReps(8);
699     }
700 
701 
702     /**
703      * Returns a specific repetition of
704      * LOC-8: "Location Equipment" - creates it if necessary
705      *
706      * @param rep The repetition index (0-indexed)
707      */
708     public IS getLocationEquipment(int rep) { 
709 		IS retVal = this.getTypedField(8, rep);
710 		return retVal;
711     }
712 
713     /**
714      * Returns a specific repetition of
715      * LOC-8: "Location Equipment" - creates it if necessary
716      *
717      * @param rep The repetition index (0-indexed)
718      */
719     public IS getLoc8_LocationEquipment(int rep) { 
720 		IS retVal = this.getTypedField(8, rep);
721 		return retVal;
722     }
723 
724     /**
725      * Returns a count of the current number of repetitions of Location Equipment (LOC-8).
726      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
727      * it will return zero.
728      */
729     public int getLoc8_LocationEquipmentReps() {
730     	return this.getReps(8);
731     }
732 
733 
734     /**
735      * Inserts a repetition of
736      * LOC-8: "Location Equipment" at a specific index
737      *
738      * @param rep The repetition index (0-indexed)
739      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
740      */
741     public IS insertLocationEquipment(int rep) throws HL7Exception { 
742         return (IS) super.insertRepetition(8, rep);
743     }
744 
745 
746     /**
747      * Inserts a repetition of
748      * LOC-8: "Location Equipment" at a specific index
749      *
750      * @param rep The repetition index (0-indexed)
751      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
752      */
753     public IS insertLoc8_LocationEquipment(int rep) throws HL7Exception { 
754         return (IS) super.insertRepetition(8, rep);
755     }
756 
757 
758     /**
759      * Removes a repetition of
760      * LOC-8: "Location Equipment" at a specific index
761      *
762      * @param rep The repetition index (0-indexed)
763      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
764      */
765     public IS removeLocationEquipment(int rep) throws HL7Exception { 
766         return (IS) super.removeRepetition(8, rep);
767     }
768 
769 
770     /**
771      * Removes a repetition of
772      * LOC-8: "Location Equipment" at a specific index
773      *
774      * @param rep The repetition index (0-indexed)
775      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
776      */
777     public IS removeLoc8_LocationEquipment(int rep) throws HL7Exception { 
778         return (IS) super.removeRepetition(8, rep);
779     }
780 
781 
782 
783 
784 
785 
786     /** {@inheritDoc} */   
787     protected Type createNewTypeWithoutReflection(int field) {
788        switch (field) {
789           case 0: return new PL(getMessage());
790           case 1: return new ST(getMessage());
791           case 2: return new IS(getMessage(), new Integer( 260 ));
792           case 3: return new XON(getMessage());
793           case 4: return new XAD(getMessage());
794           case 5: return new XTN(getMessage());
795           case 6: return new CE(getMessage());
796           case 7: return new IS(getMessage(), new Integer( 261 ));
797           default: return null;
798        }
799    }
800 
801 
802 }
803