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.v281.segment;
35  
36  // import ca.uhn.hl7v2.model.v281.group.*;
37  import ca.uhn.hl7v2.model.v281.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 SHP message segment (Shipment). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>SHP-1: Shipment ID (EI) <b> </b>
53       * <li>SHP-2: Internal Shipment ID (EI) <b>optional repeating</b>
54       * <li>SHP-3: Shipment Status (CWE) <b>optional </b>
55       * <li>SHP-4: Shipment Status Date/Time (DTM) <b> </b>
56       * <li>SHP-5: Shipment Status Reason (TX) <b>optional </b>
57       * <li>SHP-6: Shipment Priority (CWE) <b>optional </b>
58       * <li>SHP-7: Shipment Confidentiality (CWE) <b>optional repeating</b>
59       * <li>SHP-8: Number of Packages in Shipment (NM) <b>optional </b>
60       * <li>SHP-9: Shipment Condition (CWE) <b>optional repeating</b>
61       * <li>SHP-10: Shipment Handling Code (CWE) <b>optional repeating</b>
62       * <li>SHP-11: Shipment Risk Code (CWE) <b>optional repeating</b>
63   * </ul>
64   */
65  @SuppressWarnings("unused")
66  public class SHP extends AbstractSegment {
67  
68      /** 
69       * Creates a new SHP segment
70       */
71      public SHP(Group parent, ModelClassFactory factory) {
72         super(parent, factory);
73         init(factory);
74      }
75  
76      private void init(ModelClassFactory factory) {
77         try {
78                                    this.add(EI.class, true, 1, 0, new Object[]{ getMessage() }, "Shipment ID");
79                                    this.add(EI.class, false, 0, 0, new Object[]{ getMessage() }, "Internal Shipment ID");
80                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Shipment Status");
81                                    this.add(DTM.class, true, 1, 0, new Object[]{ getMessage() }, "Shipment Status Date/Time");
82                                    this.add(TX.class, false, 1, 0, new Object[]{ getMessage() }, "Shipment Status Reason");
83                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Shipment Priority");
84                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Shipment Confidentiality");
85                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Number of Packages in Shipment");
86                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Shipment Condition");
87                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Shipment Handling Code");
88                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Shipment Risk Code");
89         } catch(HL7Exception e) {
90            log.error("Unexpected error creating SHP - this is probably a bug in the source code generator.", e);
91         }
92      }
93  
94  
95  
96      /**
97       * Returns
98       * SHP-1: "Shipment ID" - creates it if necessary
99       */
100     public EI getShipmentID() { 
101 		EI retVal = this.getTypedField(1, 0);
102 		return retVal;
103     }
104     
105     /**
106      * Returns
107      * SHP-1: "Shipment ID" - creates it if necessary
108      */
109     public EI getShp1_ShipmentID() { 
110 		EI retVal = this.getTypedField(1, 0);
111 		return retVal;
112     }
113 
114 
115     /**
116      * Returns all repetitions of Internal Shipment ID (SHP-2).
117      */
118     public EI[] getInternalShipmentID() {
119     	EI[] retVal = this.getTypedField(2, new EI[0]);
120     	return retVal;
121     }
122 
123 
124     /**
125      * Returns all repetitions of Internal Shipment ID (SHP-2).
126      */
127     public EI[] getShp2_InternalShipmentID() {
128     	EI[] retVal = this.getTypedField(2, new EI[0]);
129     	return retVal;
130     }
131 
132 
133     /**
134      * Returns a count of the current number of repetitions of Internal Shipment ID (SHP-2).
135      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
136      * it will return zero.
137      */
138     public int getInternalShipmentIDReps() {
139     	return this.getReps(2);
140     }
141 
142 
143     /**
144      * Returns a specific repetition of
145      * SHP-2: "Internal Shipment ID" - creates it if necessary
146      *
147      * @param rep The repetition index (0-indexed)
148      */
149     public EI getInternalShipmentID(int rep) { 
150 		EI retVal = this.getTypedField(2, rep);
151 		return retVal;
152     }
153 
154     /**
155      * Returns a specific repetition of
156      * SHP-2: "Internal Shipment ID" - creates it if necessary
157      *
158      * @param rep The repetition index (0-indexed)
159      */
160     public EI getShp2_InternalShipmentID(int rep) { 
161 		EI retVal = this.getTypedField(2, rep);
162 		return retVal;
163     }
164 
165     /**
166      * Returns a count of the current number of repetitions of Internal Shipment ID (SHP-2).
167      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
168      * it will return zero.
169      */
170     public int getShp2_InternalShipmentIDReps() {
171     	return this.getReps(2);
172     }
173 
174 
175     /**
176      * Inserts a repetition of
177      * SHP-2: "Internal Shipment ID" at a specific index
178      *
179      * @param rep The repetition index (0-indexed)
180      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
181      */
182     public EI insertInternalShipmentID(int rep) throws HL7Exception { 
183         return (EI) super.insertRepetition(2, rep);
184     }
185 
186 
187     /**
188      * Inserts a repetition of
189      * SHP-2: "Internal Shipment ID" at a specific index
190      *
191      * @param rep The repetition index (0-indexed)
192      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
193      */
194     public EI insertShp2_InternalShipmentID(int rep) throws HL7Exception { 
195         return (EI) super.insertRepetition(2, rep);
196     }
197 
198 
199     /**
200      * Removes a repetition of
201      * SHP-2: "Internal Shipment ID" at a specific index
202      *
203      * @param rep The repetition index (0-indexed)
204      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
205      */
206     public EI removeInternalShipmentID(int rep) throws HL7Exception { 
207         return (EI) super.removeRepetition(2, rep);
208     }
209 
210 
211     /**
212      * Removes a repetition of
213      * SHP-2: "Internal Shipment ID" at a specific index
214      *
215      * @param rep The repetition index (0-indexed)
216      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
217      */
218     public EI removeShp2_InternalShipmentID(int rep) throws HL7Exception { 
219         return (EI) super.removeRepetition(2, rep);
220     }
221 
222 
223 
224 
225     /**
226      * Returns
227      * SHP-3: "Shipment Status" - creates it if necessary
228      */
229     public CWE getShipmentStatus() { 
230 		CWE retVal = this.getTypedField(3, 0);
231 		return retVal;
232     }
233     
234     /**
235      * Returns
236      * SHP-3: "Shipment Status" - creates it if necessary
237      */
238     public CWE getShp3_ShipmentStatus() { 
239 		CWE retVal = this.getTypedField(3, 0);
240 		return retVal;
241     }
242 
243 
244 
245     /**
246      * Returns
247      * SHP-4: "Shipment Status Date/Time" - creates it if necessary
248      */
249     public DTM getShipmentStatusDateTime() { 
250 		DTM retVal = this.getTypedField(4, 0);
251 		return retVal;
252     }
253     
254     /**
255      * Returns
256      * SHP-4: "Shipment Status Date/Time" - creates it if necessary
257      */
258     public DTM getShp4_ShipmentStatusDateTime() { 
259 		DTM retVal = this.getTypedField(4, 0);
260 		return retVal;
261     }
262 
263 
264 
265     /**
266      * Returns
267      * SHP-5: "Shipment Status Reason" - creates it if necessary
268      */
269     public TX getShipmentStatusReason() { 
270 		TX retVal = this.getTypedField(5, 0);
271 		return retVal;
272     }
273     
274     /**
275      * Returns
276      * SHP-5: "Shipment Status Reason" - creates it if necessary
277      */
278     public TX getShp5_ShipmentStatusReason() { 
279 		TX retVal = this.getTypedField(5, 0);
280 		return retVal;
281     }
282 
283 
284 
285     /**
286      * Returns
287      * SHP-6: "Shipment Priority" - creates it if necessary
288      */
289     public CWE getShipmentPriority() { 
290 		CWE retVal = this.getTypedField(6, 0);
291 		return retVal;
292     }
293     
294     /**
295      * Returns
296      * SHP-6: "Shipment Priority" - creates it if necessary
297      */
298     public CWE getShp6_ShipmentPriority() { 
299 		CWE retVal = this.getTypedField(6, 0);
300 		return retVal;
301     }
302 
303 
304     /**
305      * Returns all repetitions of Shipment Confidentiality (SHP-7).
306      */
307     public CWE[] getShipmentConfidentiality() {
308     	CWE[] retVal = this.getTypedField(7, new CWE[0]);
309     	return retVal;
310     }
311 
312 
313     /**
314      * Returns all repetitions of Shipment Confidentiality (SHP-7).
315      */
316     public CWE[] getShp7_ShipmentConfidentiality() {
317     	CWE[] retVal = this.getTypedField(7, new CWE[0]);
318     	return retVal;
319     }
320 
321 
322     /**
323      * Returns a count of the current number of repetitions of Shipment Confidentiality (SHP-7).
324      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
325      * it will return zero.
326      */
327     public int getShipmentConfidentialityReps() {
328     	return this.getReps(7);
329     }
330 
331 
332     /**
333      * Returns a specific repetition of
334      * SHP-7: "Shipment Confidentiality" - creates it if necessary
335      *
336      * @param rep The repetition index (0-indexed)
337      */
338     public CWE getShipmentConfidentiality(int rep) { 
339 		CWE retVal = this.getTypedField(7, rep);
340 		return retVal;
341     }
342 
343     /**
344      * Returns a specific repetition of
345      * SHP-7: "Shipment Confidentiality" - creates it if necessary
346      *
347      * @param rep The repetition index (0-indexed)
348      */
349     public CWE getShp7_ShipmentConfidentiality(int rep) { 
350 		CWE retVal = this.getTypedField(7, rep);
351 		return retVal;
352     }
353 
354     /**
355      * Returns a count of the current number of repetitions of Shipment Confidentiality (SHP-7).
356      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
357      * it will return zero.
358      */
359     public int getShp7_ShipmentConfidentialityReps() {
360     	return this.getReps(7);
361     }
362 
363 
364     /**
365      * Inserts a repetition of
366      * SHP-7: "Shipment Confidentiality" at a specific index
367      *
368      * @param rep The repetition index (0-indexed)
369      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
370      */
371     public CWE insertShipmentConfidentiality(int rep) throws HL7Exception { 
372         return (CWE) super.insertRepetition(7, rep);
373     }
374 
375 
376     /**
377      * Inserts a repetition of
378      * SHP-7: "Shipment Confidentiality" at a specific index
379      *
380      * @param rep The repetition index (0-indexed)
381      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
382      */
383     public CWE insertShp7_ShipmentConfidentiality(int rep) throws HL7Exception { 
384         return (CWE) super.insertRepetition(7, rep);
385     }
386 
387 
388     /**
389      * Removes a repetition of
390      * SHP-7: "Shipment Confidentiality" at a specific index
391      *
392      * @param rep The repetition index (0-indexed)
393      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
394      */
395     public CWE removeShipmentConfidentiality(int rep) throws HL7Exception { 
396         return (CWE) super.removeRepetition(7, rep);
397     }
398 
399 
400     /**
401      * Removes a repetition of
402      * SHP-7: "Shipment Confidentiality" at a specific index
403      *
404      * @param rep The repetition index (0-indexed)
405      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
406      */
407     public CWE removeShp7_ShipmentConfidentiality(int rep) throws HL7Exception { 
408         return (CWE) super.removeRepetition(7, rep);
409     }
410 
411 
412 
413 
414     /**
415      * Returns
416      * SHP-8: "Number of Packages in Shipment" - creates it if necessary
417      */
418     public NM getNumberOfPackagesInShipment() { 
419 		NM retVal = this.getTypedField(8, 0);
420 		return retVal;
421     }
422     
423     /**
424      * Returns
425      * SHP-8: "Number of Packages in Shipment" - creates it if necessary
426      */
427     public NM getShp8_NumberOfPackagesInShipment() { 
428 		NM retVal = this.getTypedField(8, 0);
429 		return retVal;
430     }
431 
432 
433     /**
434      * Returns all repetitions of Shipment Condition (SHP-9).
435      */
436     public CWE[] getShipmentCondition() {
437     	CWE[] retVal = this.getTypedField(9, new CWE[0]);
438     	return retVal;
439     }
440 
441 
442     /**
443      * Returns all repetitions of Shipment Condition (SHP-9).
444      */
445     public CWE[] getShp9_ShipmentCondition() {
446     	CWE[] retVal = this.getTypedField(9, new CWE[0]);
447     	return retVal;
448     }
449 
450 
451     /**
452      * Returns a count of the current number of repetitions of Shipment Condition (SHP-9).
453      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
454      * it will return zero.
455      */
456     public int getShipmentConditionReps() {
457     	return this.getReps(9);
458     }
459 
460 
461     /**
462      * Returns a specific repetition of
463      * SHP-9: "Shipment Condition" - creates it if necessary
464      *
465      * @param rep The repetition index (0-indexed)
466      */
467     public CWE getShipmentCondition(int rep) { 
468 		CWE retVal = this.getTypedField(9, rep);
469 		return retVal;
470     }
471 
472     /**
473      * Returns a specific repetition of
474      * SHP-9: "Shipment Condition" - creates it if necessary
475      *
476      * @param rep The repetition index (0-indexed)
477      */
478     public CWE getShp9_ShipmentCondition(int rep) { 
479 		CWE retVal = this.getTypedField(9, rep);
480 		return retVal;
481     }
482 
483     /**
484      * Returns a count of the current number of repetitions of Shipment Condition (SHP-9).
485      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
486      * it will return zero.
487      */
488     public int getShp9_ShipmentConditionReps() {
489     	return this.getReps(9);
490     }
491 
492 
493     /**
494      * Inserts a repetition of
495      * SHP-9: "Shipment Condition" 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 CWE insertShipmentCondition(int rep) throws HL7Exception { 
501         return (CWE) super.insertRepetition(9, rep);
502     }
503 
504 
505     /**
506      * Inserts a repetition of
507      * SHP-9: "Shipment Condition" at a specific index
508      *
509      * @param rep The repetition index (0-indexed)
510      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
511      */
512     public CWE insertShp9_ShipmentCondition(int rep) throws HL7Exception { 
513         return (CWE) super.insertRepetition(9, rep);
514     }
515 
516 
517     /**
518      * Removes a repetition of
519      * SHP-9: "Shipment Condition" at a specific index
520      *
521      * @param rep The repetition index (0-indexed)
522      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
523      */
524     public CWE removeShipmentCondition(int rep) throws HL7Exception { 
525         return (CWE) super.removeRepetition(9, rep);
526     }
527 
528 
529     /**
530      * Removes a repetition of
531      * SHP-9: "Shipment Condition" at a specific index
532      *
533      * @param rep The repetition index (0-indexed)
534      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
535      */
536     public CWE removeShp9_ShipmentCondition(int rep) throws HL7Exception { 
537         return (CWE) super.removeRepetition(9, rep);
538     }
539 
540 
541 
542     /**
543      * Returns all repetitions of Shipment Handling Code (SHP-10).
544      */
545     public CWE[] getShipmentHandlingCode() {
546     	CWE[] retVal = this.getTypedField(10, new CWE[0]);
547     	return retVal;
548     }
549 
550 
551     /**
552      * Returns all repetitions of Shipment Handling Code (SHP-10).
553      */
554     public CWE[] getShp10_ShipmentHandlingCode() {
555     	CWE[] retVal = this.getTypedField(10, new CWE[0]);
556     	return retVal;
557     }
558 
559 
560     /**
561      * Returns a count of the current number of repetitions of Shipment Handling Code (SHP-10).
562      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
563      * it will return zero.
564      */
565     public int getShipmentHandlingCodeReps() {
566     	return this.getReps(10);
567     }
568 
569 
570     /**
571      * Returns a specific repetition of
572      * SHP-10: "Shipment Handling Code" - creates it if necessary
573      *
574      * @param rep The repetition index (0-indexed)
575      */
576     public CWE getShipmentHandlingCode(int rep) { 
577 		CWE retVal = this.getTypedField(10, rep);
578 		return retVal;
579     }
580 
581     /**
582      * Returns a specific repetition of
583      * SHP-10: "Shipment Handling Code" - creates it if necessary
584      *
585      * @param rep The repetition index (0-indexed)
586      */
587     public CWE getShp10_ShipmentHandlingCode(int rep) { 
588 		CWE retVal = this.getTypedField(10, rep);
589 		return retVal;
590     }
591 
592     /**
593      * Returns a count of the current number of repetitions of Shipment Handling Code (SHP-10).
594      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
595      * it will return zero.
596      */
597     public int getShp10_ShipmentHandlingCodeReps() {
598     	return this.getReps(10);
599     }
600 
601 
602     /**
603      * Inserts a repetition of
604      * SHP-10: "Shipment Handling Code" at a specific index
605      *
606      * @param rep The repetition index (0-indexed)
607      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
608      */
609     public CWE insertShipmentHandlingCode(int rep) throws HL7Exception { 
610         return (CWE) super.insertRepetition(10, rep);
611     }
612 
613 
614     /**
615      * Inserts a repetition of
616      * SHP-10: "Shipment Handling Code" at a specific index
617      *
618      * @param rep The repetition index (0-indexed)
619      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
620      */
621     public CWE insertShp10_ShipmentHandlingCode(int rep) throws HL7Exception { 
622         return (CWE) super.insertRepetition(10, rep);
623     }
624 
625 
626     /**
627      * Removes a repetition of
628      * SHP-10: "Shipment Handling Code" at a specific index
629      *
630      * @param rep The repetition index (0-indexed)
631      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
632      */
633     public CWE removeShipmentHandlingCode(int rep) throws HL7Exception { 
634         return (CWE) super.removeRepetition(10, rep);
635     }
636 
637 
638     /**
639      * Removes a repetition of
640      * SHP-10: "Shipment Handling Code" at a specific index
641      *
642      * @param rep The repetition index (0-indexed)
643      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
644      */
645     public CWE removeShp10_ShipmentHandlingCode(int rep) throws HL7Exception { 
646         return (CWE) super.removeRepetition(10, rep);
647     }
648 
649 
650 
651     /**
652      * Returns all repetitions of Shipment Risk Code (SHP-11).
653      */
654     public CWE[] getShipmentRiskCode() {
655     	CWE[] retVal = this.getTypedField(11, new CWE[0]);
656     	return retVal;
657     }
658 
659 
660     /**
661      * Returns all repetitions of Shipment Risk Code (SHP-11).
662      */
663     public CWE[] getShp11_ShipmentRiskCode() {
664     	CWE[] retVal = this.getTypedField(11, new CWE[0]);
665     	return retVal;
666     }
667 
668 
669     /**
670      * Returns a count of the current number of repetitions of Shipment Risk Code (SHP-11).
671      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
672      * it will return zero.
673      */
674     public int getShipmentRiskCodeReps() {
675     	return this.getReps(11);
676     }
677 
678 
679     /**
680      * Returns a specific repetition of
681      * SHP-11: "Shipment Risk Code" - creates it if necessary
682      *
683      * @param rep The repetition index (0-indexed)
684      */
685     public CWE getShipmentRiskCode(int rep) { 
686 		CWE retVal = this.getTypedField(11, rep);
687 		return retVal;
688     }
689 
690     /**
691      * Returns a specific repetition of
692      * SHP-11: "Shipment Risk Code" - creates it if necessary
693      *
694      * @param rep The repetition index (0-indexed)
695      */
696     public CWE getShp11_ShipmentRiskCode(int rep) { 
697 		CWE retVal = this.getTypedField(11, rep);
698 		return retVal;
699     }
700 
701     /**
702      * Returns a count of the current number of repetitions of Shipment Risk Code (SHP-11).
703      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
704      * it will return zero.
705      */
706     public int getShp11_ShipmentRiskCodeReps() {
707     	return this.getReps(11);
708     }
709 
710 
711     /**
712      * Inserts a repetition of
713      * SHP-11: "Shipment Risk Code" at a specific index
714      *
715      * @param rep The repetition index (0-indexed)
716      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
717      */
718     public CWE insertShipmentRiskCode(int rep) throws HL7Exception { 
719         return (CWE) super.insertRepetition(11, rep);
720     }
721 
722 
723     /**
724      * Inserts a repetition of
725      * SHP-11: "Shipment Risk Code" at a specific index
726      *
727      * @param rep The repetition index (0-indexed)
728      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
729      */
730     public CWE insertShp11_ShipmentRiskCode(int rep) throws HL7Exception { 
731         return (CWE) super.insertRepetition(11, rep);
732     }
733 
734 
735     /**
736      * Removes a repetition of
737      * SHP-11: "Shipment Risk Code" at a specific index
738      *
739      * @param rep The repetition index (0-indexed)
740      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
741      */
742     public CWE removeShipmentRiskCode(int rep) throws HL7Exception { 
743         return (CWE) super.removeRepetition(11, rep);
744     }
745 
746 
747     /**
748      * Removes a repetition of
749      * SHP-11: "Shipment Risk Code" at a specific index
750      *
751      * @param rep The repetition index (0-indexed)
752      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
753      */
754     public CWE removeShp11_ShipmentRiskCode(int rep) throws HL7Exception { 
755         return (CWE) super.removeRepetition(11, rep);
756     }
757 
758 
759 
760 
761 
762 
763     /** {@inheritDoc} */   
764     protected Type createNewTypeWithoutReflection(int field) {
765        switch (field) {
766           case 0: return new EI(getMessage());
767           case 1: return new EI(getMessage());
768           case 2: return new CWE(getMessage());
769           case 3: return new DTM(getMessage());
770           case 4: return new TX(getMessage());
771           case 5: return new CWE(getMessage());
772           case 6: return new CWE(getMessage());
773           case 7: return new NM(getMessage());
774           case 8: return new CWE(getMessage());
775           case 9: return new CWE(getMessage());
776           case 10: return new CWE(getMessage());
777           default: return null;
778        }
779    }
780 
781 
782 }
783