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