View Javadoc
1   /*
2    * This class is an auto-generated source file for a HAPI
3    * HL7 v2.x standard structure class.
4    *
5    * For more information, visit: http://hl7api.sourceforge.net/
6    * 
7    * The contents of this file are subject to the Mozilla Public License Version 1.1 
8    * (the "License"); you may not use this file except in compliance with the License. 
9    * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
10   * Software distributed under the License is distributed on an "AS IS" basis, 
11   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
12   * specific language governing rights and limitations under the License. 
13   * 
14   * The Original Code is "[file_name]".  Description: 
15   * "[one_line_description]" 
16   * 
17   * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
18   * 2012.  All Rights Reserved. 
19   * 
20   * Contributor(s): ______________________________________. 
21   * 
22   * Alternatively, the contents of this file may be used under the terms of the 
23   * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
24   * applicable instead of those above.  If you wish to allow use of your version of this 
25   * file only under the terms of the GPL and not to allow others to use your version 
26   * of this file under the MPL, indicate your decision by deleting  the provisions above 
27   * and replace  them with the notice and other provisions required by the GPL License.  
28   * If you do not delete the provisions above, a recipient may use your version of 
29   * this file under either the MPL or the GPL. 
30   * 
31   */
32  
33  
34  package ca.uhn.hl7v2.model.v27.segment;
35  
36  // import ca.uhn.hl7v2.model.v27.group.*;
37  import ca.uhn.hl7v2.model.v27.datatype.*;
38  import ca.uhn.hl7v2.HL7Exception;
39  import ca.uhn.hl7v2.parser.ModelClassFactory;
40  import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
41  import ca.uhn.hl7v2.model.AbstractMessage;
42  import ca.uhn.hl7v2.model.Group;
43  import ca.uhn.hl7v2.model.Type;
44  import ca.uhn.hl7v2.model.AbstractSegment;
45  import ca.uhn.hl7v2.model.Varies;
46  
47  
48  /**
49   *<p>Represents an HL7 CDM message segment (Charge Description Master). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>CDM-1: Primary Key Value - CDM (CWE) <b> </b>
53       * <li>CDM-2: Charge Code Alias (CWE) <b>optional repeating</b>
54       * <li>CDM-3: Charge Description Short (ST) <b> </b>
55       * <li>CDM-4: Charge Description Long (ST) <b>optional </b>
56       * <li>CDM-5: Description Override Indicator (CWE) <b>optional </b>
57       * <li>CDM-6: Exploding Charges (CWE) <b>optional repeating</b>
58       * <li>CDM-7: Procedure Code (CNE) <b>optional repeating</b>
59       * <li>CDM-8: Active/Inactive Flag (ID) <b>optional </b>
60       * <li>CDM-9: Inventory Number (CWE) <b>optional repeating</b>
61       * <li>CDM-10: Resource Load (NM) <b>optional </b>
62       * <li>CDM-11: Contract Number (CX) <b>optional repeating</b>
63       * <li>CDM-12: Contract Organization (XON) <b>optional repeating</b>
64       * <li>CDM-13: Room Fee Indicator (ID) <b>optional </b>
65   * </ul>
66   */
67  @SuppressWarnings("unused")
68  public class CDM extends AbstractSegment {
69  
70      /** 
71       * Creates a new CDM segment
72       */
73      public CDM(Group parent, ModelClassFactory factory) {
74         super(parent, factory);
75         init(factory);
76      }
77  
78      private void init(ModelClassFactory factory) {
79         try {
80                                    this.add(CWE.class, true, 1, 0, new Object[]{ getMessage() }, "Primary Key Value - CDM");
81                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Charge Code Alias");
82                                    this.add(ST.class, true, 1, 0, new Object[]{ getMessage() }, "Charge Description Short");
83                                    this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Charge Description Long");
84                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Description Override Indicator");
85                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Exploding Charges");
86                                    this.add(CNE.class, false, 0, 0, new Object[]{ getMessage() }, "Procedure Code");
87                                                this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(183) }, "Active/Inactive Flag");
88                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Inventory Number");
89                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Resource Load");
90                                    this.add(CX.class, false, 0, 0, new Object[]{ getMessage() }, "Contract Number");
91                                    this.add(XON.class, false, 0, 0, new Object[]{ getMessage() }, "Contract Organization");
92                                                this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Room Fee Indicator");
93         } catch(HL7Exception e) {
94            log.error("Unexpected error creating CDM - this is probably a bug in the source code generator.", e);
95         }
96      }
97  
98  
99  
100     /**
101      * Returns
102      * CDM-1: "Primary Key Value - CDM" - creates it if necessary
103      */
104     public CWE getPrimaryKeyValueCDM() { 
105 		CWE 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 CWE getCdm1_PrimaryKeyValueCDM() { 
114 		CWE 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 CWE[] getChargeCodeAlias() {
123     	CWE[] retVal = this.getTypedField(2, new CWE[0]);
124     	return retVal;
125     }
126 
127 
128     /**
129      * Returns all repetitions of Charge Code Alias (CDM-2).
130      */
131     public CWE[] getCdm2_ChargeCodeAlias() {
132     	CWE[] retVal = this.getTypedField(2, new CWE[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 CWE getChargeCodeAlias(int rep) { 
154 		CWE 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 CWE getCdm2_ChargeCodeAlias(int rep) { 
165 		CWE 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 CWE insertChargeCodeAlias(int rep) throws HL7Exception { 
187         return (CWE) 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 CWE insertCdm2_ChargeCodeAlias(int rep) throws HL7Exception { 
199         return (CWE) 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 CWE removeChargeCodeAlias(int rep) throws HL7Exception { 
211         return (CWE) 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 CWE removeCdm2_ChargeCodeAlias(int rep) throws HL7Exception { 
223         return (CWE) 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 CWE getDescriptionOverrideIndicator() { 
274 		CWE 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 CWE getCdm5_DescriptionOverrideIndicator() { 
283 		CWE retVal = this.getTypedField(5, 0);
284 		return retVal;
285     }
286 
287 
288     /**
289      * Returns all repetitions of Exploding Charges (CDM-6).
290      */
291     public CWE[] getExplodingCharges() {
292     	CWE[] retVal = this.getTypedField(6, new CWE[0]);
293     	return retVal;
294     }
295 
296 
297     /**
298      * Returns all repetitions of Exploding Charges (CDM-6).
299      */
300     public CWE[] getCdm6_ExplodingCharges() {
301     	CWE[] retVal = this.getTypedField(6, new CWE[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 CWE getExplodingCharges(int rep) { 
323 		CWE 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 CWE getCdm6_ExplodingCharges(int rep) { 
334 		CWE 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 CWE insertExplodingCharges(int rep) throws HL7Exception { 
356         return (CWE) 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 CWE insertCdm6_ExplodingCharges(int rep) throws HL7Exception { 
368         return (CWE) 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 CWE removeExplodingCharges(int rep) throws HL7Exception { 
380         return (CWE) 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 CWE removeCdm6_ExplodingCharges(int rep) throws HL7Exception { 
392         return (CWE) super.removeRepetition(6, rep);
393     }
394 
395 
396 
397     /**
398      * Returns all repetitions of Procedure Code (CDM-7).
399      */
400     public CNE[] getProcedureCode() {
401     	CNE[] retVal = this.getTypedField(7, new CNE[0]);
402     	return retVal;
403     }
404 
405 
406     /**
407      * Returns all repetitions of Procedure Code (CDM-7).
408      */
409     public CNE[] getCdm7_ProcedureCode() {
410     	CNE[] retVal = this.getTypedField(7, new CNE[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 CNE getProcedureCode(int rep) { 
432 		CNE 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 CNE getCdm7_ProcedureCode(int rep) { 
443 		CNE 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 CNE insertProcedureCode(int rep) throws HL7Exception { 
465         return (CNE) 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 CNE insertCdm7_ProcedureCode(int rep) throws HL7Exception { 
477         return (CNE) 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 CNE removeProcedureCode(int rep) throws HL7Exception { 
489         return (CNE) 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 CNE removeCdm7_ProcedureCode(int rep) throws HL7Exception { 
501         return (CNE) 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 CWE[] getInventoryNumber() {
530     	CWE[] retVal = this.getTypedField(9, new CWE[0]);
531     	return retVal;
532     }
533 
534 
535     /**
536      * Returns all repetitions of Inventory Number (CDM-9).
537      */
538     public CWE[] getCdm9_InventoryNumber() {
539     	CWE[] retVal = this.getTypedField(9, new CWE[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 CWE getInventoryNumber(int rep) { 
561 		CWE 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 CWE getCdm9_InventoryNumber(int rep) { 
572 		CWE 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 CWE insertInventoryNumber(int rep) throws HL7Exception { 
594         return (CWE) 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 CWE insertCdm9_InventoryNumber(int rep) throws HL7Exception { 
606         return (CWE) 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 CWE removeInventoryNumber(int rep) throws HL7Exception { 
618         return (CWE) 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 CWE removeCdm9_InventoryNumber(int rep) throws HL7Exception { 
630         return (CWE) 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 CWE(getMessage());
900           case 1: return new CWE(getMessage());
901           case 2: return new ST(getMessage());
902           case 3: return new ST(getMessage());
903           case 4: return new CWE(getMessage());
904           case 5: return new CWE(getMessage());
905           case 6: return new CNE(getMessage());
906           case 7: return new ID(getMessage(), new Integer( 183 ));
907           case 8: return new CWE(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