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