001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v24.segment;
035
036// import ca.uhn.hl7v2.model.v24.group.*;
037import ca.uhn.hl7v2.model.v24.datatype.*;
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
041import ca.uhn.hl7v2.model.AbstractMessage;
042import ca.uhn.hl7v2.model.Group;
043import ca.uhn.hl7v2.model.Type;
044import ca.uhn.hl7v2.model.AbstractSegment;
045import ca.uhn.hl7v2.model.Varies;
046
047/**
048 *<p>Represents an HL7 PR1 message segment (Procedures). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>PR1-1: Set ID - PR1 (SI) <b> </b>
052     * <li>PR1-2: Procedure Coding Method (IS) <b>optional </b>
053     * <li>PR1-3: Procedure Code (CE) <b> </b>
054     * <li>PR1-4: Procedure Description (ST) <b>optional </b>
055     * <li>PR1-5: Procedure Date/Time (TS) <b> </b>
056     * <li>PR1-6: Procedure Functional Type (IS) <b>optional </b>
057     * <li>PR1-7: Procedure Minutes (NM) <b>optional </b>
058     * <li>PR1-8: Anesthesiologist (XCN) <b>optional repeating</b>
059     * <li>PR1-9: Anesthesia Code (IS) <b>optional </b>
060     * <li>PR1-10: Anesthesia Minutes (NM) <b>optional </b>
061     * <li>PR1-11: Surgeon (XCN) <b>optional repeating</b>
062     * <li>PR1-12: Procedure Practitioner (XCN) <b>optional repeating</b>
063     * <li>PR1-13: Consent Code (CE) <b>optional </b>
064     * <li>PR1-14: Procedure Priority (ID) <b>optional </b>
065     * <li>PR1-15: Associated Diagnosis Code (CE) <b>optional </b>
066     * <li>PR1-16: Procedure Code Modifier (CE) <b>optional repeating</b>
067     * <li>PR1-17: Procedure DRG Type (IS) <b>optional </b>
068     * <li>PR1-18: Tissue Type Code (CE) <b>optional repeating</b>
069 * </ul>
070 */
071@SuppressWarnings("unused")
072public class PR1 extends AbstractSegment {
073
074    /** 
075     * Creates a new PR1 segment
076     */
077    public PR1(Group parent, ModelClassFactory factory) {
078       super(parent, factory);
079       init(factory);
080    }
081
082    private void init(ModelClassFactory factory) {
083       try {
084                                  this.add(SI.class, true, 1, 4, new Object[]{ getMessage() }, "Set ID - PR1");
085                                              this.add(IS.class, false, 1, 3, new Object[]{ getMessage(), new Integer(89) }, "Procedure Coding Method");
086                                  this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Procedure Code");
087                                  this.add(ST.class, false, 1, 40, new Object[]{ getMessage() }, "Procedure Description");
088                                  this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Procedure Date/Time");
089                                              this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(230) }, "Procedure Functional Type");
090                                  this.add(NM.class, false, 1, 4, new Object[]{ getMessage() }, "Procedure Minutes");
091                                  this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Anesthesiologist");
092                                              this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(19) }, "Anesthesia Code");
093                                  this.add(NM.class, false, 1, 4, new Object[]{ getMessage() }, "Anesthesia Minutes");
094                                  this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Surgeon");
095                                  this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Procedure Practitioner");
096                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Consent Code");
097                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(418) }, "Procedure Priority");
098                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Associated Diagnosis Code");
099                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Procedure Code Modifier");
100                                              this.add(IS.class, false, 1, 20, new Object[]{ getMessage(), new Integer(416) }, "Procedure DRG Type");
101                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Tissue Type Code");
102       } catch(HL7Exception e) {
103          log.error("Unexpected error creating PR1 - this is probably a bug in the source code generator.", e);
104       }
105    }
106
107
108
109    /**
110     * Returns
111     * PR1-1: "Set ID - PR1" - creates it if necessary
112     */
113    public SI getSetIDPR1() { 
114                SI retVal = this.getTypedField(1, 0);
115                return retVal;
116    }
117    
118    /**
119     * Returns
120     * PR1-1: "Set ID - PR1" - creates it if necessary
121     */
122    public SI getPr11_SetIDPR1() { 
123                SI retVal = this.getTypedField(1, 0);
124                return retVal;
125    }
126
127
128
129    /**
130     * Returns
131     * PR1-2: "Procedure Coding Method" - creates it if necessary
132     */
133    public IS getProcedureCodingMethod() { 
134                IS retVal = this.getTypedField(2, 0);
135                return retVal;
136    }
137    
138    /**
139     * Returns
140     * PR1-2: "Procedure Coding Method" - creates it if necessary
141     */
142    public IS getPr12_ProcedureCodingMethod() { 
143                IS retVal = this.getTypedField(2, 0);
144                return retVal;
145    }
146
147
148
149    /**
150     * Returns
151     * PR1-3: "Procedure Code" - creates it if necessary
152     */
153    public CE getProcedureCode() { 
154                CE retVal = this.getTypedField(3, 0);
155                return retVal;
156    }
157    
158    /**
159     * Returns
160     * PR1-3: "Procedure Code" - creates it if necessary
161     */
162    public CE getPr13_ProcedureCode() { 
163                CE retVal = this.getTypedField(3, 0);
164                return retVal;
165    }
166
167
168
169    /**
170     * Returns
171     * PR1-4: "Procedure Description" - creates it if necessary
172     */
173    public ST getProcedureDescription() { 
174                ST retVal = this.getTypedField(4, 0);
175                return retVal;
176    }
177    
178    /**
179     * Returns
180     * PR1-4: "Procedure Description" - creates it if necessary
181     */
182    public ST getPr14_ProcedureDescription() { 
183                ST retVal = this.getTypedField(4, 0);
184                return retVal;
185    }
186
187
188
189    /**
190     * Returns
191     * PR1-5: "Procedure Date/Time" - creates it if necessary
192     */
193    public TS getProcedureDateTime() { 
194                TS retVal = this.getTypedField(5, 0);
195                return retVal;
196    }
197    
198    /**
199     * Returns
200     * PR1-5: "Procedure Date/Time" - creates it if necessary
201     */
202    public TS getPr15_ProcedureDateTime() { 
203                TS retVal = this.getTypedField(5, 0);
204                return retVal;
205    }
206
207
208
209    /**
210     * Returns
211     * PR1-6: "Procedure Functional Type" - creates it if necessary
212     */
213    public IS getProcedureFunctionalType() { 
214                IS retVal = this.getTypedField(6, 0);
215                return retVal;
216    }
217    
218    /**
219     * Returns
220     * PR1-6: "Procedure Functional Type" - creates it if necessary
221     */
222    public IS getPr16_ProcedureFunctionalType() { 
223                IS retVal = this.getTypedField(6, 0);
224                return retVal;
225    }
226
227
228
229    /**
230     * Returns
231     * PR1-7: "Procedure Minutes" - creates it if necessary
232     */
233    public NM getProcedureMinutes() { 
234                NM retVal = this.getTypedField(7, 0);
235                return retVal;
236    }
237    
238    /**
239     * Returns
240     * PR1-7: "Procedure Minutes" - creates it if necessary
241     */
242    public NM getPr17_ProcedureMinutes() { 
243                NM retVal = this.getTypedField(7, 0);
244                return retVal;
245    }
246
247
248    /**
249     * Returns all repetitions of Anesthesiologist (PR1-8).
250     */
251    public XCN[] getAnesthesiologist() {
252        XCN[] retVal = this.getTypedField(8, new XCN[0]);
253        return retVal;
254    }
255
256
257    /**
258     * Returns all repetitions of Anesthesiologist (PR1-8).
259     */
260    public XCN[] getPr18_Anesthesiologist() {
261        XCN[] retVal = this.getTypedField(8, new XCN[0]);
262        return retVal;
263    }
264
265
266    /**
267     * Returns a count of the current number of repetitions of Anesthesiologist (PR1-8).
268     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
269     * it will return zero.
270     */
271    public int getAnesthesiologistReps() {
272        return this.getReps(8);
273    }
274
275
276    /**
277     * Returns a specific repetition of
278     * PR1-8: "Anesthesiologist" - creates it if necessary
279     *
280     * @param rep The repetition index (0-indexed)
281     */
282    public XCN getAnesthesiologist(int rep) { 
283                XCN retVal = this.getTypedField(8, rep);
284                return retVal;
285    }
286
287    /**
288     * Returns a specific repetition of
289     * PR1-8: "Anesthesiologist" - creates it if necessary
290     *
291     * @param rep The repetition index (0-indexed)
292     */
293    public XCN getPr18_Anesthesiologist(int rep) { 
294                XCN retVal = this.getTypedField(8, rep);
295                return retVal;
296    }
297
298    /**
299     * Returns a count of the current number of repetitions of Anesthesiologist (PR1-8).
300     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
301     * it will return zero.
302     */
303    public int getPr18_AnesthesiologistReps() {
304        return this.getReps(8);
305    }
306
307
308    /**
309     * Inserts a repetition of
310     * PR1-8: "Anesthesiologist" at a specific index
311     *
312     * @param rep The repetition index (0-indexed)
313     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
314     */
315    public XCN insertAnesthesiologist(int rep) throws HL7Exception { 
316        return (XCN) super.insertRepetition(8, rep);
317    }
318
319
320    /**
321     * Inserts a repetition of
322     * PR1-8: "Anesthesiologist" at a specific index
323     *
324     * @param rep The repetition index (0-indexed)
325     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
326     */
327    public XCN insertPr18_Anesthesiologist(int rep) throws HL7Exception { 
328        return (XCN) super.insertRepetition(8, rep);
329    }
330
331
332    /**
333     * Removes a repetition of
334     * PR1-8: "Anesthesiologist" at a specific index
335     *
336     * @param rep The repetition index (0-indexed)
337     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
338     */
339    public XCN removeAnesthesiologist(int rep) throws HL7Exception { 
340        return (XCN) super.removeRepetition(8, rep);
341    }
342
343
344    /**
345     * Removes a repetition of
346     * PR1-8: "Anesthesiologist" at a specific index
347     *
348     * @param rep The repetition index (0-indexed)
349     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
350     */
351    public XCN removePr18_Anesthesiologist(int rep) throws HL7Exception { 
352        return (XCN) super.removeRepetition(8, rep);
353    }
354
355
356
357
358    /**
359     * Returns
360     * PR1-9: "Anesthesia Code" - creates it if necessary
361     */
362    public IS getAnesthesiaCode() { 
363                IS retVal = this.getTypedField(9, 0);
364                return retVal;
365    }
366    
367    /**
368     * Returns
369     * PR1-9: "Anesthesia Code" - creates it if necessary
370     */
371    public IS getPr19_AnesthesiaCode() { 
372                IS retVal = this.getTypedField(9, 0);
373                return retVal;
374    }
375
376
377
378    /**
379     * Returns
380     * PR1-10: "Anesthesia Minutes" - creates it if necessary
381     */
382    public NM getAnesthesiaMinutes() { 
383                NM retVal = this.getTypedField(10, 0);
384                return retVal;
385    }
386    
387    /**
388     * Returns
389     * PR1-10: "Anesthesia Minutes" - creates it if necessary
390     */
391    public NM getPr110_AnesthesiaMinutes() { 
392                NM retVal = this.getTypedField(10, 0);
393                return retVal;
394    }
395
396
397    /**
398     * Returns all repetitions of Surgeon (PR1-11).
399     */
400    public XCN[] getSurgeon() {
401        XCN[] retVal = this.getTypedField(11, new XCN[0]);
402        return retVal;
403    }
404
405
406    /**
407     * Returns all repetitions of Surgeon (PR1-11).
408     */
409    public XCN[] getPr111_Surgeon() {
410        XCN[] retVal = this.getTypedField(11, new XCN[0]);
411        return retVal;
412    }
413
414
415    /**
416     * Returns a count of the current number of repetitions of Surgeon (PR1-11).
417     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
418     * it will return zero.
419     */
420    public int getSurgeonReps() {
421        return this.getReps(11);
422    }
423
424
425    /**
426     * Returns a specific repetition of
427     * PR1-11: "Surgeon" - creates it if necessary
428     *
429     * @param rep The repetition index (0-indexed)
430     */
431    public XCN getSurgeon(int rep) { 
432                XCN retVal = this.getTypedField(11, rep);
433                return retVal;
434    }
435
436    /**
437     * Returns a specific repetition of
438     * PR1-11: "Surgeon" - creates it if necessary
439     *
440     * @param rep The repetition index (0-indexed)
441     */
442    public XCN getPr111_Surgeon(int rep) { 
443                XCN retVal = this.getTypedField(11, rep);
444                return retVal;
445    }
446
447    /**
448     * Returns a count of the current number of repetitions of Surgeon (PR1-11).
449     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
450     * it will return zero.
451     */
452    public int getPr111_SurgeonReps() {
453        return this.getReps(11);
454    }
455
456
457    /**
458     * Inserts a repetition of
459     * PR1-11: "Surgeon" at a specific index
460     *
461     * @param rep The repetition index (0-indexed)
462     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
463     */
464    public XCN insertSurgeon(int rep) throws HL7Exception { 
465        return (XCN) super.insertRepetition(11, rep);
466    }
467
468
469    /**
470     * Inserts a repetition of
471     * PR1-11: "Surgeon" at a specific index
472     *
473     * @param rep The repetition index (0-indexed)
474     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
475     */
476    public XCN insertPr111_Surgeon(int rep) throws HL7Exception { 
477        return (XCN) super.insertRepetition(11, rep);
478    }
479
480
481    /**
482     * Removes a repetition of
483     * PR1-11: "Surgeon" at a specific index
484     *
485     * @param rep The repetition index (0-indexed)
486     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
487     */
488    public XCN removeSurgeon(int rep) throws HL7Exception { 
489        return (XCN) super.removeRepetition(11, rep);
490    }
491
492
493    /**
494     * Removes a repetition of
495     * PR1-11: "Surgeon" at a specific index
496     *
497     * @param rep The repetition index (0-indexed)
498     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
499     */
500    public XCN removePr111_Surgeon(int rep) throws HL7Exception { 
501        return (XCN) super.removeRepetition(11, rep);
502    }
503
504
505
506    /**
507     * Returns all repetitions of Procedure Practitioner (PR1-12).
508     */
509    public XCN[] getProcedurePractitioner() {
510        XCN[] retVal = this.getTypedField(12, new XCN[0]);
511        return retVal;
512    }
513
514
515    /**
516     * Returns all repetitions of Procedure Practitioner (PR1-12).
517     */
518    public XCN[] getPr112_ProcedurePractitioner() {
519        XCN[] retVal = this.getTypedField(12, new XCN[0]);
520        return retVal;
521    }
522
523
524    /**
525     * Returns a count of the current number of repetitions of Procedure Practitioner (PR1-12).
526     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
527     * it will return zero.
528     */
529    public int getProcedurePractitionerReps() {
530        return this.getReps(12);
531    }
532
533
534    /**
535     * Returns a specific repetition of
536     * PR1-12: "Procedure Practitioner" - creates it if necessary
537     *
538     * @param rep The repetition index (0-indexed)
539     */
540    public XCN getProcedurePractitioner(int rep) { 
541                XCN retVal = this.getTypedField(12, rep);
542                return retVal;
543    }
544
545    /**
546     * Returns a specific repetition of
547     * PR1-12: "Procedure Practitioner" - creates it if necessary
548     *
549     * @param rep The repetition index (0-indexed)
550     */
551    public XCN getPr112_ProcedurePractitioner(int rep) { 
552                XCN retVal = this.getTypedField(12, rep);
553                return retVal;
554    }
555
556    /**
557     * Returns a count of the current number of repetitions of Procedure Practitioner (PR1-12).
558     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
559     * it will return zero.
560     */
561    public int getPr112_ProcedurePractitionerReps() {
562        return this.getReps(12);
563    }
564
565
566    /**
567     * Inserts a repetition of
568     * PR1-12: "Procedure Practitioner" at a specific index
569     *
570     * @param rep The repetition index (0-indexed)
571     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
572     */
573    public XCN insertProcedurePractitioner(int rep) throws HL7Exception { 
574        return (XCN) super.insertRepetition(12, rep);
575    }
576
577
578    /**
579     * Inserts a repetition of
580     * PR1-12: "Procedure Practitioner" at a specific index
581     *
582     * @param rep The repetition index (0-indexed)
583     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
584     */
585    public XCN insertPr112_ProcedurePractitioner(int rep) throws HL7Exception { 
586        return (XCN) super.insertRepetition(12, rep);
587    }
588
589
590    /**
591     * Removes a repetition of
592     * PR1-12: "Procedure Practitioner" at a specific index
593     *
594     * @param rep The repetition index (0-indexed)
595     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
596     */
597    public XCN removeProcedurePractitioner(int rep) throws HL7Exception { 
598        return (XCN) super.removeRepetition(12, rep);
599    }
600
601
602    /**
603     * Removes a repetition of
604     * PR1-12: "Procedure Practitioner" at a specific index
605     *
606     * @param rep The repetition index (0-indexed)
607     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
608     */
609    public XCN removePr112_ProcedurePractitioner(int rep) throws HL7Exception { 
610        return (XCN) super.removeRepetition(12, rep);
611    }
612
613
614
615
616    /**
617     * Returns
618     * PR1-13: "Consent Code" - creates it if necessary
619     */
620    public CE getConsentCode() { 
621                CE retVal = this.getTypedField(13, 0);
622                return retVal;
623    }
624    
625    /**
626     * Returns
627     * PR1-13: "Consent Code" - creates it if necessary
628     */
629    public CE getPr113_ConsentCode() { 
630                CE retVal = this.getTypedField(13, 0);
631                return retVal;
632    }
633
634
635
636    /**
637     * Returns
638     * PR1-14: "Procedure Priority" - creates it if necessary
639     */
640    public ID getProcedurePriority() { 
641                ID retVal = this.getTypedField(14, 0);
642                return retVal;
643    }
644    
645    /**
646     * Returns
647     * PR1-14: "Procedure Priority" - creates it if necessary
648     */
649    public ID getPr114_ProcedurePriority() { 
650                ID retVal = this.getTypedField(14, 0);
651                return retVal;
652    }
653
654
655
656    /**
657     * Returns
658     * PR1-15: "Associated Diagnosis Code" - creates it if necessary
659     */
660    public CE getAssociatedDiagnosisCode() { 
661                CE retVal = this.getTypedField(15, 0);
662                return retVal;
663    }
664    
665    /**
666     * Returns
667     * PR1-15: "Associated Diagnosis Code" - creates it if necessary
668     */
669    public CE getPr115_AssociatedDiagnosisCode() { 
670                CE retVal = this.getTypedField(15, 0);
671                return retVal;
672    }
673
674
675    /**
676     * Returns all repetitions of Procedure Code Modifier (PR1-16).
677     */
678    public CE[] getProcedureCodeModifier() {
679        CE[] retVal = this.getTypedField(16, new CE[0]);
680        return retVal;
681    }
682
683
684    /**
685     * Returns all repetitions of Procedure Code Modifier (PR1-16).
686     */
687    public CE[] getPr116_ProcedureCodeModifier() {
688        CE[] retVal = this.getTypedField(16, new CE[0]);
689        return retVal;
690    }
691
692
693    /**
694     * Returns a count of the current number of repetitions of Procedure Code Modifier (PR1-16).
695     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
696     * it will return zero.
697     */
698    public int getProcedureCodeModifierReps() {
699        return this.getReps(16);
700    }
701
702
703    /**
704     * Returns a specific repetition of
705     * PR1-16: "Procedure Code Modifier" - creates it if necessary
706     *
707     * @param rep The repetition index (0-indexed)
708     */
709    public CE getProcedureCodeModifier(int rep) { 
710                CE retVal = this.getTypedField(16, rep);
711                return retVal;
712    }
713
714    /**
715     * Returns a specific repetition of
716     * PR1-16: "Procedure Code Modifier" - creates it if necessary
717     *
718     * @param rep The repetition index (0-indexed)
719     */
720    public CE getPr116_ProcedureCodeModifier(int rep) { 
721                CE retVal = this.getTypedField(16, rep);
722                return retVal;
723    }
724
725    /**
726     * Returns a count of the current number of repetitions of Procedure Code Modifier (PR1-16).
727     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
728     * it will return zero.
729     */
730    public int getPr116_ProcedureCodeModifierReps() {
731        return this.getReps(16);
732    }
733
734
735    /**
736     * Inserts a repetition of
737     * PR1-16: "Procedure Code Modifier" at a specific index
738     *
739     * @param rep The repetition index (0-indexed)
740     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
741     */
742    public CE insertProcedureCodeModifier(int rep) throws HL7Exception { 
743        return (CE) super.insertRepetition(16, rep);
744    }
745
746
747    /**
748     * Inserts a repetition of
749     * PR1-16: "Procedure Code Modifier" at a specific index
750     *
751     * @param rep The repetition index (0-indexed)
752     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
753     */
754    public CE insertPr116_ProcedureCodeModifier(int rep) throws HL7Exception { 
755        return (CE) super.insertRepetition(16, rep);
756    }
757
758
759    /**
760     * Removes a repetition of
761     * PR1-16: "Procedure Code Modifier" at a specific index
762     *
763     * @param rep The repetition index (0-indexed)
764     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
765     */
766    public CE removeProcedureCodeModifier(int rep) throws HL7Exception { 
767        return (CE) super.removeRepetition(16, rep);
768    }
769
770
771    /**
772     * Removes a repetition of
773     * PR1-16: "Procedure Code Modifier" at a specific index
774     *
775     * @param rep The repetition index (0-indexed)
776     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
777     */
778    public CE removePr116_ProcedureCodeModifier(int rep) throws HL7Exception { 
779        return (CE) super.removeRepetition(16, rep);
780    }
781
782
783
784
785    /**
786     * Returns
787     * PR1-17: "Procedure DRG Type" - creates it if necessary
788     */
789    public IS getProcedureDRGType() { 
790                IS retVal = this.getTypedField(17, 0);
791                return retVal;
792    }
793    
794    /**
795     * Returns
796     * PR1-17: "Procedure DRG Type" - creates it if necessary
797     */
798    public IS getPr117_ProcedureDRGType() { 
799                IS retVal = this.getTypedField(17, 0);
800                return retVal;
801    }
802
803
804    /**
805     * Returns all repetitions of Tissue Type Code (PR1-18).
806     */
807    public CE[] getTissueTypeCode() {
808        CE[] retVal = this.getTypedField(18, new CE[0]);
809        return retVal;
810    }
811
812
813    /**
814     * Returns all repetitions of Tissue Type Code (PR1-18).
815     */
816    public CE[] getPr118_TissueTypeCode() {
817        CE[] retVal = this.getTypedField(18, new CE[0]);
818        return retVal;
819    }
820
821
822    /**
823     * Returns a count of the current number of repetitions of Tissue Type Code (PR1-18).
824     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
825     * it will return zero.
826     */
827    public int getTissueTypeCodeReps() {
828        return this.getReps(18);
829    }
830
831
832    /**
833     * Returns a specific repetition of
834     * PR1-18: "Tissue Type Code" - creates it if necessary
835     *
836     * @param rep The repetition index (0-indexed)
837     */
838    public CE getTissueTypeCode(int rep) { 
839                CE retVal = this.getTypedField(18, rep);
840                return retVal;
841    }
842
843    /**
844     * Returns a specific repetition of
845     * PR1-18: "Tissue Type Code" - creates it if necessary
846     *
847     * @param rep The repetition index (0-indexed)
848     */
849    public CE getPr118_TissueTypeCode(int rep) { 
850                CE retVal = this.getTypedField(18, rep);
851                return retVal;
852    }
853
854    /**
855     * Returns a count of the current number of repetitions of Tissue Type Code (PR1-18).
856     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
857     * it will return zero.
858     */
859    public int getPr118_TissueTypeCodeReps() {
860        return this.getReps(18);
861    }
862
863
864    /**
865     * Inserts a repetition of
866     * PR1-18: "Tissue Type Code" at a specific index
867     *
868     * @param rep The repetition index (0-indexed)
869     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
870     */
871    public CE insertTissueTypeCode(int rep) throws HL7Exception { 
872        return (CE) super.insertRepetition(18, rep);
873    }
874
875
876    /**
877     * Inserts a repetition of
878     * PR1-18: "Tissue Type Code" at a specific index
879     *
880     * @param rep The repetition index (0-indexed)
881     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
882     */
883    public CE insertPr118_TissueTypeCode(int rep) throws HL7Exception { 
884        return (CE) super.insertRepetition(18, rep);
885    }
886
887
888    /**
889     * Removes a repetition of
890     * PR1-18: "Tissue Type Code" at a specific index
891     *
892     * @param rep The repetition index (0-indexed)
893     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
894     */
895    public CE removeTissueTypeCode(int rep) throws HL7Exception { 
896        return (CE) super.removeRepetition(18, rep);
897    }
898
899
900    /**
901     * Removes a repetition of
902     * PR1-18: "Tissue Type Code" at a specific index
903     *
904     * @param rep The repetition index (0-indexed)
905     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
906     */
907    public CE removePr118_TissueTypeCode(int rep) throws HL7Exception { 
908        return (CE) super.removeRepetition(18, rep);
909    }
910
911
912
913
914
915
916    /** {@inheritDoc} */   
917    protected Type createNewTypeWithoutReflection(int field) {
918       switch (field) {
919          case 0: return new SI(getMessage());
920          case 1: return new IS(getMessage(), new Integer( 89 ));
921          case 2: return new CE(getMessage());
922          case 3: return new ST(getMessage());
923          case 4: return new TS(getMessage());
924          case 5: return new IS(getMessage(), new Integer( 230 ));
925          case 6: return new NM(getMessage());
926          case 7: return new XCN(getMessage());
927          case 8: return new IS(getMessage(), new Integer( 19 ));
928          case 9: return new NM(getMessage());
929          case 10: return new XCN(getMessage());
930          case 11: return new XCN(getMessage());
931          case 12: return new CE(getMessage());
932          case 13: return new ID(getMessage(), new Integer( 418 ));
933          case 14: return new CE(getMessage());
934          case 15: return new CE(getMessage());
935          case 16: return new IS(getMessage(), new Integer( 416 ));
936          case 17: return new CE(getMessage());
937          default: return null;
938       }
939   }
940
941
942}
943