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.v23.segment;
035
036// import ca.uhn.hl7v2.model.v23.group.*;
037import ca.uhn.hl7v2.model.v23.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 CDM message segment (Charge Description Master). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>CDM-1: Primary Key Value (CE) <b> </b>
052     * <li>CDM-2: Charge Code Alias (CE) <b>optional repeating</b>
053     * <li>CDM-3: Charge Description Short (ST) <b> </b>
054     * <li>CDM-4: Charge Description Long (ST) <b>optional </b>
055     * <li>CDM-5: Description Override Indicator (ID) <b>optional </b>
056     * <li>CDM-6: Exploding Charges (CE) <b>optional repeating</b>
057     * <li>CDM-7: Procedure Code (CE) <b>optional repeating</b>
058     * <li>CDM-8: Active/Inactive Flag (ID) <b>optional </b>
059     * <li>CDM-9: Inventory Number (CE) <b>optional repeating</b>
060     * <li>CDM-10: Resource Load (NM) <b>optional </b>
061     * <li>CDM-11: Contract Number (CK) <b>optional repeating</b>
062     * <li>CDM-12: Contract Organization (XON) <b>optional </b>
063     * <li>CDM-13: Room Fee Indicator (ID) <b>optional </b>
064 * </ul>
065 */
066@SuppressWarnings("unused")
067public class CDM extends AbstractSegment {
068
069    /** 
070     * Creates a new CDM segment
071     */
072    public CDM(Group parent, ModelClassFactory factory) {
073       super(parent, factory);
074       init(factory);
075    }
076
077    private void init(ModelClassFactory factory) {
078       try {
079                                  this.add(CE.class, true, 1, 200, new Object[]{ getMessage() }, "Primary Key Value");
080                                  this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Charge Code Alias");
081                                  this.add(ST.class, true, 1, 20, new Object[]{ getMessage() }, "Charge Description Short");
082                                  this.add(ST.class, false, 1, 250, new Object[]{ getMessage() }, "Charge Description Long");
083                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(268) }, "Description Override Indicator");
084                                  this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Exploding Charges");
085                                  this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Procedure Code");
086                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(183) }, "Active/Inactive Flag");
087                                  this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Inventory Number");
088                                  this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "Resource Load");
089                                  this.add(CK.class, false, 0, 200, new Object[]{ getMessage() }, "Contract Number");
090                                  this.add(XON.class, false, 1, 200, new Object[]{ getMessage() }, "Contract Organization");
091                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Room Fee Indicator");
092       } catch(HL7Exception e) {
093          log.error("Unexpected error creating CDM - this is probably a bug in the source code generator.", e);
094       }
095    }
096
097
098
099    /**
100     * Returns
101     * CDM-1: "Primary Key Value" - creates it if necessary
102     */
103    public CE getPrimaryKeyValue() { 
104                CE retVal = this.getTypedField(1, 0);
105                return retVal;
106    }
107    
108    /**
109     * Returns
110     * CDM-1: "Primary Key Value" - creates it if necessary
111     */
112    public CE getCdm1_PrimaryKeyValue() { 
113                CE retVal = this.getTypedField(1, 0);
114                return retVal;
115    }
116
117
118    /**
119     * Returns all repetitions of Charge Code Alias (CDM-2).
120     */
121    public CE[] getChargeCodeAlias() {
122        CE[] retVal = this.getTypedField(2, new CE[0]);
123        return retVal;
124    }
125
126
127    /**
128     * Returns all repetitions of Charge Code Alias (CDM-2).
129     */
130    public CE[] getCdm2_ChargeCodeAlias() {
131        CE[] retVal = this.getTypedField(2, new CE[0]);
132        return retVal;
133    }
134
135
136    /**
137     * Returns a count of the current number of repetitions of Charge Code Alias (CDM-2).
138     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
139     * it will return zero.
140     */
141    public int getChargeCodeAliasReps() {
142        return this.getReps(2);
143    }
144
145
146    /**
147     * Returns a specific repetition of
148     * CDM-2: "Charge Code Alias" - creates it if necessary
149     *
150     * @param rep The repetition index (0-indexed)
151     */
152    public CE getChargeCodeAlias(int rep) { 
153                CE retVal = this.getTypedField(2, rep);
154                return retVal;
155    }
156
157    /**
158     * Returns a specific repetition of
159     * CDM-2: "Charge Code Alias" - creates it if necessary
160     *
161     * @param rep The repetition index (0-indexed)
162     */
163    public CE getCdm2_ChargeCodeAlias(int rep) { 
164                CE retVal = this.getTypedField(2, rep);
165                return retVal;
166    }
167
168    /**
169     * Returns a count of the current number of repetitions of Charge Code Alias (CDM-2).
170     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
171     * it will return zero.
172     */
173    public int getCdm2_ChargeCodeAliasReps() {
174        return this.getReps(2);
175    }
176
177
178    /**
179     * Inserts a repetition of
180     * CDM-2: "Charge Code Alias" at a specific index
181     *
182     * @param rep The repetition index (0-indexed)
183     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
184     */
185    public CE insertChargeCodeAlias(int rep) throws HL7Exception { 
186        return (CE) super.insertRepetition(2, rep);
187    }
188
189
190    /**
191     * Inserts a repetition of
192     * CDM-2: "Charge Code Alias" at a specific index
193     *
194     * @param rep The repetition index (0-indexed)
195     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
196     */
197    public CE insertCdm2_ChargeCodeAlias(int rep) throws HL7Exception { 
198        return (CE) super.insertRepetition(2, rep);
199    }
200
201
202    /**
203     * Removes a repetition of
204     * CDM-2: "Charge Code Alias" at a specific index
205     *
206     * @param rep The repetition index (0-indexed)
207     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
208     */
209    public CE removeChargeCodeAlias(int rep) throws HL7Exception { 
210        return (CE) super.removeRepetition(2, rep);
211    }
212
213
214    /**
215     * Removes a repetition of
216     * CDM-2: "Charge Code Alias" at a specific index
217     *
218     * @param rep The repetition index (0-indexed)
219     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
220     */
221    public CE removeCdm2_ChargeCodeAlias(int rep) throws HL7Exception { 
222        return (CE) super.removeRepetition(2, rep);
223    }
224
225
226
227
228    /**
229     * Returns
230     * CDM-3: "Charge Description Short" - creates it if necessary
231     */
232    public ST getChargeDescriptionShort() { 
233                ST retVal = this.getTypedField(3, 0);
234                return retVal;
235    }
236    
237    /**
238     * Returns
239     * CDM-3: "Charge Description Short" - creates it if necessary
240     */
241    public ST getCdm3_ChargeDescriptionShort() { 
242                ST retVal = this.getTypedField(3, 0);
243                return retVal;
244    }
245
246
247
248    /**
249     * Returns
250     * CDM-4: "Charge Description Long" - creates it if necessary
251     */
252    public ST getChargeDescriptionLong() { 
253                ST retVal = this.getTypedField(4, 0);
254                return retVal;
255    }
256    
257    /**
258     * Returns
259     * CDM-4: "Charge Description Long" - creates it if necessary
260     */
261    public ST getCdm4_ChargeDescriptionLong() { 
262                ST retVal = this.getTypedField(4, 0);
263                return retVal;
264    }
265
266
267
268    /**
269     * Returns
270     * CDM-5: "Description Override Indicator" - creates it if necessary
271     */
272    public ID getDescriptionOverrideIndicator() { 
273                ID retVal = this.getTypedField(5, 0);
274                return retVal;
275    }
276    
277    /**
278     * Returns
279     * CDM-5: "Description Override Indicator" - creates it if necessary
280     */
281    public ID getCdm5_DescriptionOverrideIndicator() { 
282                ID retVal = this.getTypedField(5, 0);
283                return retVal;
284    }
285
286
287    /**
288     * Returns all repetitions of Exploding Charges (CDM-6).
289     */
290    public CE[] getExplodingCharges() {
291        CE[] retVal = this.getTypedField(6, new CE[0]);
292        return retVal;
293    }
294
295
296    /**
297     * Returns all repetitions of Exploding Charges (CDM-6).
298     */
299    public CE[] getCdm6_ExplodingCharges() {
300        CE[] retVal = this.getTypedField(6, new CE[0]);
301        return retVal;
302    }
303
304
305    /**
306     * Returns a count of the current number of repetitions of Exploding Charges (CDM-6).
307     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
308     * it will return zero.
309     */
310    public int getExplodingChargesReps() {
311        return this.getReps(6);
312    }
313
314
315    /**
316     * Returns a specific repetition of
317     * CDM-6: "Exploding Charges" - creates it if necessary
318     *
319     * @param rep The repetition index (0-indexed)
320     */
321    public CE getExplodingCharges(int rep) { 
322                CE retVal = this.getTypedField(6, rep);
323                return retVal;
324    }
325
326    /**
327     * Returns a specific repetition of
328     * CDM-6: "Exploding Charges" - creates it if necessary
329     *
330     * @param rep The repetition index (0-indexed)
331     */
332    public CE getCdm6_ExplodingCharges(int rep) { 
333                CE retVal = this.getTypedField(6, rep);
334                return retVal;
335    }
336
337    /**
338     * Returns a count of the current number of repetitions of Exploding Charges (CDM-6).
339     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
340     * it will return zero.
341     */
342    public int getCdm6_ExplodingChargesReps() {
343        return this.getReps(6);
344    }
345
346
347    /**
348     * Inserts a repetition of
349     * CDM-6: "Exploding Charges" at a specific index
350     *
351     * @param rep The repetition index (0-indexed)
352     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
353     */
354    public CE insertExplodingCharges(int rep) throws HL7Exception { 
355        return (CE) super.insertRepetition(6, rep);
356    }
357
358
359    /**
360     * Inserts a repetition of
361     * CDM-6: "Exploding Charges" at a specific index
362     *
363     * @param rep The repetition index (0-indexed)
364     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
365     */
366    public CE insertCdm6_ExplodingCharges(int rep) throws HL7Exception { 
367        return (CE) super.insertRepetition(6, rep);
368    }
369
370
371    /**
372     * Removes a repetition of
373     * CDM-6: "Exploding Charges" at a specific index
374     *
375     * @param rep The repetition index (0-indexed)
376     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
377     */
378    public CE removeExplodingCharges(int rep) throws HL7Exception { 
379        return (CE) super.removeRepetition(6, rep);
380    }
381
382
383    /**
384     * Removes a repetition of
385     * CDM-6: "Exploding Charges" at a specific index
386     *
387     * @param rep The repetition index (0-indexed)
388     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
389     */
390    public CE removeCdm6_ExplodingCharges(int rep) throws HL7Exception { 
391        return (CE) super.removeRepetition(6, rep);
392    }
393
394
395
396    /**
397     * Returns all repetitions of Procedure Code (CDM-7).
398     */
399    public CE[] getProcedureCode() {
400        CE[] retVal = this.getTypedField(7, new CE[0]);
401        return retVal;
402    }
403
404
405    /**
406     * Returns all repetitions of Procedure Code (CDM-7).
407     */
408    public CE[] getCdm7_ProcedureCode() {
409        CE[] retVal = this.getTypedField(7, new CE[0]);
410        return retVal;
411    }
412
413
414    /**
415     * Returns a count of the current number of repetitions of Procedure Code (CDM-7).
416     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
417     * it will return zero.
418     */
419    public int getProcedureCodeReps() {
420        return this.getReps(7);
421    }
422
423
424    /**
425     * Returns a specific repetition of
426     * CDM-7: "Procedure Code" - creates it if necessary
427     *
428     * @param rep The repetition index (0-indexed)
429     */
430    public CE getProcedureCode(int rep) { 
431                CE retVal = this.getTypedField(7, rep);
432                return retVal;
433    }
434
435    /**
436     * Returns a specific repetition of
437     * CDM-7: "Procedure Code" - creates it if necessary
438     *
439     * @param rep The repetition index (0-indexed)
440     */
441    public CE getCdm7_ProcedureCode(int rep) { 
442                CE retVal = this.getTypedField(7, rep);
443                return retVal;
444    }
445
446    /**
447     * Returns a count of the current number of repetitions of Procedure Code (CDM-7).
448     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
449     * it will return zero.
450     */
451    public int getCdm7_ProcedureCodeReps() {
452        return this.getReps(7);
453    }
454
455
456    /**
457     * Inserts a repetition of
458     * CDM-7: "Procedure Code" at a specific index
459     *
460     * @param rep The repetition index (0-indexed)
461     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
462     */
463    public CE insertProcedureCode(int rep) throws HL7Exception { 
464        return (CE) super.insertRepetition(7, rep);
465    }
466
467
468    /**
469     * Inserts a repetition of
470     * CDM-7: "Procedure Code" at a specific index
471     *
472     * @param rep The repetition index (0-indexed)
473     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
474     */
475    public CE insertCdm7_ProcedureCode(int rep) throws HL7Exception { 
476        return (CE) super.insertRepetition(7, rep);
477    }
478
479
480    /**
481     * Removes a repetition of
482     * CDM-7: "Procedure Code" at a specific index
483     *
484     * @param rep The repetition index (0-indexed)
485     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
486     */
487    public CE removeProcedureCode(int rep) throws HL7Exception { 
488        return (CE) super.removeRepetition(7, rep);
489    }
490
491
492    /**
493     * Removes a repetition of
494     * CDM-7: "Procedure Code" at a specific index
495     *
496     * @param rep The repetition index (0-indexed)
497     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
498     */
499    public CE removeCdm7_ProcedureCode(int rep) throws HL7Exception { 
500        return (CE) super.removeRepetition(7, rep);
501    }
502
503
504
505
506    /**
507     * Returns
508     * CDM-8: "Active/Inactive Flag" - creates it if necessary
509     */
510    public ID getActiveInactiveFlag() { 
511                ID retVal = this.getTypedField(8, 0);
512                return retVal;
513    }
514    
515    /**
516     * Returns
517     * CDM-8: "Active/Inactive Flag" - creates it if necessary
518     */
519    public ID getCdm8_ActiveInactiveFlag() { 
520                ID retVal = this.getTypedField(8, 0);
521                return retVal;
522    }
523
524
525    /**
526     * Returns all repetitions of Inventory Number (CDM-9).
527     */
528    public CE[] getInventoryNumber() {
529        CE[] retVal = this.getTypedField(9, new CE[0]);
530        return retVal;
531    }
532
533
534    /**
535     * Returns all repetitions of Inventory Number (CDM-9).
536     */
537    public CE[] getCdm9_InventoryNumber() {
538        CE[] retVal = this.getTypedField(9, new CE[0]);
539        return retVal;
540    }
541
542
543    /**
544     * Returns a count of the current number of repetitions of Inventory Number (CDM-9).
545     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
546     * it will return zero.
547     */
548    public int getInventoryNumberReps() {
549        return this.getReps(9);
550    }
551
552
553    /**
554     * Returns a specific repetition of
555     * CDM-9: "Inventory Number" - creates it if necessary
556     *
557     * @param rep The repetition index (0-indexed)
558     */
559    public CE getInventoryNumber(int rep) { 
560                CE retVal = this.getTypedField(9, rep);
561                return retVal;
562    }
563
564    /**
565     * Returns a specific repetition of
566     * CDM-9: "Inventory Number" - creates it if necessary
567     *
568     * @param rep The repetition index (0-indexed)
569     */
570    public CE getCdm9_InventoryNumber(int rep) { 
571                CE retVal = this.getTypedField(9, rep);
572                return retVal;
573    }
574
575    /**
576     * Returns a count of the current number of repetitions of Inventory Number (CDM-9).
577     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
578     * it will return zero.
579     */
580    public int getCdm9_InventoryNumberReps() {
581        return this.getReps(9);
582    }
583
584
585    /**
586     * Inserts a repetition of
587     * CDM-9: "Inventory Number" at a specific index
588     *
589     * @param rep The repetition index (0-indexed)
590     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
591     */
592    public CE insertInventoryNumber(int rep) throws HL7Exception { 
593        return (CE) super.insertRepetition(9, rep);
594    }
595
596
597    /**
598     * Inserts a repetition of
599     * CDM-9: "Inventory Number" at a specific index
600     *
601     * @param rep The repetition index (0-indexed)
602     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
603     */
604    public CE insertCdm9_InventoryNumber(int rep) throws HL7Exception { 
605        return (CE) super.insertRepetition(9, rep);
606    }
607
608
609    /**
610     * Removes a repetition of
611     * CDM-9: "Inventory Number" at a specific index
612     *
613     * @param rep The repetition index (0-indexed)
614     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
615     */
616    public CE removeInventoryNumber(int rep) throws HL7Exception { 
617        return (CE) super.removeRepetition(9, rep);
618    }
619
620
621    /**
622     * Removes a repetition of
623     * CDM-9: "Inventory Number" at a specific index
624     *
625     * @param rep The repetition index (0-indexed)
626     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
627     */
628    public CE removeCdm9_InventoryNumber(int rep) throws HL7Exception { 
629        return (CE) super.removeRepetition(9, rep);
630    }
631
632
633
634
635    /**
636     * Returns
637     * CDM-10: "Resource Load" - creates it if necessary
638     */
639    public NM getResourceLoad() { 
640                NM retVal = this.getTypedField(10, 0);
641                return retVal;
642    }
643    
644    /**
645     * Returns
646     * CDM-10: "Resource Load" - creates it if necessary
647     */
648    public NM getCdm10_ResourceLoad() { 
649                NM retVal = this.getTypedField(10, 0);
650                return retVal;
651    }
652
653
654    /**
655     * Returns all repetitions of Contract Number (CDM-11).
656     */
657    public CK[] getContractNumber() {
658        CK[] retVal = this.getTypedField(11, new CK[0]);
659        return retVal;
660    }
661
662
663    /**
664     * Returns all repetitions of Contract Number (CDM-11).
665     */
666    public CK[] getCdm11_ContractNumber() {
667        CK[] retVal = this.getTypedField(11, new CK[0]);
668        return retVal;
669    }
670
671
672    /**
673     * Returns a count of the current number of repetitions of Contract Number (CDM-11).
674     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
675     * it will return zero.
676     */
677    public int getContractNumberReps() {
678        return this.getReps(11);
679    }
680
681
682    /**
683     * Returns a specific repetition of
684     * CDM-11: "Contract Number" - creates it if necessary
685     *
686     * @param rep The repetition index (0-indexed)
687     */
688    public CK getContractNumber(int rep) { 
689                CK retVal = this.getTypedField(11, rep);
690                return retVal;
691    }
692
693    /**
694     * Returns a specific repetition of
695     * CDM-11: "Contract Number" - creates it if necessary
696     *
697     * @param rep The repetition index (0-indexed)
698     */
699    public CK getCdm11_ContractNumber(int rep) { 
700                CK retVal = this.getTypedField(11, rep);
701                return retVal;
702    }
703
704    /**
705     * Returns a count of the current number of repetitions of Contract Number (CDM-11).
706     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
707     * it will return zero.
708     */
709    public int getCdm11_ContractNumberReps() {
710        return this.getReps(11);
711    }
712
713
714    /**
715     * Inserts a repetition of
716     * CDM-11: "Contract Number" at a specific index
717     *
718     * @param rep The repetition index (0-indexed)
719     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
720     */
721    public CK insertContractNumber(int rep) throws HL7Exception { 
722        return (CK) super.insertRepetition(11, rep);
723    }
724
725
726    /**
727     * Inserts a repetition of
728     * CDM-11: "Contract Number" at a specific index
729     *
730     * @param rep The repetition index (0-indexed)
731     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
732     */
733    public CK insertCdm11_ContractNumber(int rep) throws HL7Exception { 
734        return (CK) super.insertRepetition(11, rep);
735    }
736
737
738    /**
739     * Removes a repetition of
740     * CDM-11: "Contract Number" at a specific index
741     *
742     * @param rep The repetition index (0-indexed)
743     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
744     */
745    public CK removeContractNumber(int rep) throws HL7Exception { 
746        return (CK) super.removeRepetition(11, rep);
747    }
748
749
750    /**
751     * Removes a repetition of
752     * CDM-11: "Contract Number" at a specific index
753     *
754     * @param rep The repetition index (0-indexed)
755     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
756     */
757    public CK removeCdm11_ContractNumber(int rep) throws HL7Exception { 
758        return (CK) super.removeRepetition(11, rep);
759    }
760
761
762
763
764    /**
765     * Returns
766     * CDM-12: "Contract Organization" - creates it if necessary
767     */
768    public XON getContractOrganization() { 
769                XON retVal = this.getTypedField(12, 0);
770                return retVal;
771    }
772    
773    /**
774     * Returns
775     * CDM-12: "Contract Organization" - creates it if necessary
776     */
777    public XON getCdm12_ContractOrganization() { 
778                XON retVal = this.getTypedField(12, 0);
779                return retVal;
780    }
781
782
783
784    /**
785     * Returns
786     * CDM-13: "Room Fee Indicator" - creates it if necessary
787     */
788    public ID getRoomFeeIndicator() { 
789                ID retVal = this.getTypedField(13, 0);
790                return retVal;
791    }
792    
793    /**
794     * Returns
795     * CDM-13: "Room Fee Indicator" - creates it if necessary
796     */
797    public ID getCdm13_RoomFeeIndicator() { 
798                ID retVal = this.getTypedField(13, 0);
799                return retVal;
800    }
801
802
803
804
805
806    /** {@inheritDoc} */   
807    protected Type createNewTypeWithoutReflection(int field) {
808       switch (field) {
809          case 0: return new CE(getMessage());
810          case 1: return new CE(getMessage());
811          case 2: return new ST(getMessage());
812          case 3: return new ST(getMessage());
813          case 4: return new ID(getMessage(), new Integer( 268 ));
814          case 5: return new CE(getMessage());
815          case 6: return new CE(getMessage());
816          case 7: return new ID(getMessage(), new Integer( 183 ));
817          case 8: return new CE(getMessage());
818          case 9: return new NM(getMessage());
819          case 10: return new CK(getMessage());
820          case 11: return new XON(getMessage());
821          case 12: return new ID(getMessage(), new Integer( 136 ));
822          default: return null;
823       }
824   }
825
826
827}
828