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.v28.segment;
35  
36  // import ca.uhn.hl7v2.model.v28.group.*;
37  import ca.uhn.hl7v2.model.v28.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 RXV message segment (Pharmacy/Treatment Infusion). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>RXV-1: Set ID - RXV (SI) <b>optional </b>
53       * <li>RXV-2: Bolus Type (ID) <b> </b>
54       * <li>RXV-3: Bolus Dose Amount (NM) <b>optional </b>
55       * <li>RXV-4: Bolus Dose Amount Units (CWE) <b>optional </b>
56       * <li>RXV-5: Bolus Dose Volume (NM) <b>optional </b>
57       * <li>RXV-6: Bolus Dose Volume Units (CWE) <b>optional </b>
58       * <li>RXV-7: PCA Type (ID) <b> </b>
59       * <li>RXV-8: PCA Dose Amount (NM) <b>optional </b>
60       * <li>RXV-9: PCA Dose Amount Units (CWE) <b>optional </b>
61       * <li>RXV-10: PCA Dose Amount Volume (NM) <b>optional </b>
62       * <li>RXV-11: PCA Dose Amount Volume Units (CWE) <b>optional </b>
63       * <li>RXV-12: Max Dose Amount (NM) <b>optional </b>
64       * <li>RXV-13: Max Dose Amount Units (CWE) <b>optional </b>
65       * <li>RXV-14: Max Dose Amount Volume (NM) <b>optional </b>
66       * <li>RXV-15: Max Dose Amount Volume Units (CWE) <b>optional </b>
67       * <li>RXV-16: Max Dose per Time (CQ) <b> </b>
68       * <li>RXV-17: Lockout Interval (CQ) <b>optional </b>
69       * <li>RXV-18: Syringe Manufacturer (CWE) <b>optional </b>
70       * <li>RXV-19: Syringe Model Number (CWE) <b>optional </b>
71       * <li>RXV-20: Syringe Size (NM) <b>optional </b>
72       * <li>RXV-21: Syringe Size Units (CWE) <b>optional </b>
73       * <li>RXV-22: Action Code (ID) <b>optional </b>
74   * </ul>
75   */
76  @SuppressWarnings("unused")
77  public class RXV extends AbstractSegment {
78  
79      /** 
80       * Creates a new RXV segment
81       */
82      public RXV(Group parent, ModelClassFactory factory) {
83         super(parent, factory);
84         init(factory);
85      }
86  
87      private void init(ModelClassFactory factory) {
88         try {
89                                    this.add(SI.class, false, 1, 0, new Object[]{ getMessage() }, "Set ID - RXV");
90                                                this.add(ID.class, true, 1, 1, new Object[]{ getMessage(), new Integer(917) }, "Bolus Type");
91                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Bolus Dose Amount");
92                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Bolus Dose Amount Units");
93                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Bolus Dose Volume");
94                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Bolus Dose Volume Units");
95                                                this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(918) }, "PCA Type");
96                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "PCA Dose Amount");
97                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "PCA Dose Amount Units");
98                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "PCA Dose Amount Volume");
99                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "PCA Dose Amount Volume Units");
100                                   this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Max Dose Amount");
101                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Max Dose Amount Units");
102                                   this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Max Dose Amount Volume");
103                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Max Dose Amount Volume Units");
104                                   this.add(CQ.class, true, 1, 0, new Object[]{ getMessage() }, "Max Dose per Time");
105                                   this.add(CQ.class, false, 1, 0, new Object[]{ getMessage() }, "Lockout Interval");
106                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Syringe Manufacturer");
107                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Syringe Model Number");
108                                   this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Syringe Size");
109                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Syringe Size Units");
110                                               this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(206) }, "Action Code");
111        } catch(HL7Exception e) {
112           log.error("Unexpected error creating RXV - this is probably a bug in the source code generator.", e);
113        }
114     }
115 
116 
117 
118     /**
119      * Returns
120      * RXV-1: "Set ID - RXV" - creates it if necessary
121      */
122     public SI getSetIDRXV() { 
123 		SI retVal = this.getTypedField(1, 0);
124 		return retVal;
125     }
126     
127     /**
128      * Returns
129      * RXV-1: "Set ID - RXV" - creates it if necessary
130      */
131     public SI getRxv1_SetIDRXV() { 
132 		SI retVal = this.getTypedField(1, 0);
133 		return retVal;
134     }
135 
136 
137 
138     /**
139      * Returns
140      * RXV-2: "Bolus Type" - creates it if necessary
141      */
142     public ID getBolusType() { 
143 		ID retVal = this.getTypedField(2, 0);
144 		return retVal;
145     }
146     
147     /**
148      * Returns
149      * RXV-2: "Bolus Type" - creates it if necessary
150      */
151     public ID getRxv2_BolusType() { 
152 		ID retVal = this.getTypedField(2, 0);
153 		return retVal;
154     }
155 
156 
157 
158     /**
159      * Returns
160      * RXV-3: "Bolus Dose Amount" - creates it if necessary
161      */
162     public NM getBolusDoseAmount() { 
163 		NM retVal = this.getTypedField(3, 0);
164 		return retVal;
165     }
166     
167     /**
168      * Returns
169      * RXV-3: "Bolus Dose Amount" - creates it if necessary
170      */
171     public NM getRxv3_BolusDoseAmount() { 
172 		NM retVal = this.getTypedField(3, 0);
173 		return retVal;
174     }
175 
176 
177 
178     /**
179      * Returns
180      * RXV-4: "Bolus Dose Amount Units" - creates it if necessary
181      */
182     public CWE getBolusDoseAmountUnits() { 
183 		CWE retVal = this.getTypedField(4, 0);
184 		return retVal;
185     }
186     
187     /**
188      * Returns
189      * RXV-4: "Bolus Dose Amount Units" - creates it if necessary
190      */
191     public CWE getRxv4_BolusDoseAmountUnits() { 
192 		CWE retVal = this.getTypedField(4, 0);
193 		return retVal;
194     }
195 
196 
197 
198     /**
199      * Returns
200      * RXV-5: "Bolus Dose Volume" - creates it if necessary
201      */
202     public NM getBolusDoseVolume() { 
203 		NM retVal = this.getTypedField(5, 0);
204 		return retVal;
205     }
206     
207     /**
208      * Returns
209      * RXV-5: "Bolus Dose Volume" - creates it if necessary
210      */
211     public NM getRxv5_BolusDoseVolume() { 
212 		NM retVal = this.getTypedField(5, 0);
213 		return retVal;
214     }
215 
216 
217 
218     /**
219      * Returns
220      * RXV-6: "Bolus Dose Volume Units" - creates it if necessary
221      */
222     public CWE getBolusDoseVolumeUnits() { 
223 		CWE retVal = this.getTypedField(6, 0);
224 		return retVal;
225     }
226     
227     /**
228      * Returns
229      * RXV-6: "Bolus Dose Volume Units" - creates it if necessary
230      */
231     public CWE getRxv6_BolusDoseVolumeUnits() { 
232 		CWE retVal = this.getTypedField(6, 0);
233 		return retVal;
234     }
235 
236 
237 
238     /**
239      * Returns
240      * RXV-7: "PCA Type" - creates it if necessary
241      */
242     public ID getPCAType() { 
243 		ID retVal = this.getTypedField(7, 0);
244 		return retVal;
245     }
246     
247     /**
248      * Returns
249      * RXV-7: "PCA Type" - creates it if necessary
250      */
251     public ID getRxv7_PCAType() { 
252 		ID retVal = this.getTypedField(7, 0);
253 		return retVal;
254     }
255 
256 
257 
258     /**
259      * Returns
260      * RXV-8: "PCA Dose Amount" - creates it if necessary
261      */
262     public NM getPCADoseAmount() { 
263 		NM retVal = this.getTypedField(8, 0);
264 		return retVal;
265     }
266     
267     /**
268      * Returns
269      * RXV-8: "PCA Dose Amount" - creates it if necessary
270      */
271     public NM getRxv8_PCADoseAmount() { 
272 		NM retVal = this.getTypedField(8, 0);
273 		return retVal;
274     }
275 
276 
277 
278     /**
279      * Returns
280      * RXV-9: "PCA Dose Amount Units" - creates it if necessary
281      */
282     public CWE getPCADoseAmountUnits() { 
283 		CWE retVal = this.getTypedField(9, 0);
284 		return retVal;
285     }
286     
287     /**
288      * Returns
289      * RXV-9: "PCA Dose Amount Units" - creates it if necessary
290      */
291     public CWE getRxv9_PCADoseAmountUnits() { 
292 		CWE retVal = this.getTypedField(9, 0);
293 		return retVal;
294     }
295 
296 
297 
298     /**
299      * Returns
300      * RXV-10: "PCA Dose Amount Volume" - creates it if necessary
301      */
302     public NM getPCADoseAmountVolume() { 
303 		NM retVal = this.getTypedField(10, 0);
304 		return retVal;
305     }
306     
307     /**
308      * Returns
309      * RXV-10: "PCA Dose Amount Volume" - creates it if necessary
310      */
311     public NM getRxv10_PCADoseAmountVolume() { 
312 		NM retVal = this.getTypedField(10, 0);
313 		return retVal;
314     }
315 
316 
317 
318     /**
319      * Returns
320      * RXV-11: "PCA Dose Amount Volume Units" - creates it if necessary
321      */
322     public CWE getPCADoseAmountVolumeUnits() { 
323 		CWE retVal = this.getTypedField(11, 0);
324 		return retVal;
325     }
326     
327     /**
328      * Returns
329      * RXV-11: "PCA Dose Amount Volume Units" - creates it if necessary
330      */
331     public CWE getRxv11_PCADoseAmountVolumeUnits() { 
332 		CWE retVal = this.getTypedField(11, 0);
333 		return retVal;
334     }
335 
336 
337 
338     /**
339      * Returns
340      * RXV-12: "Max Dose Amount" - creates it if necessary
341      */
342     public NM getMaxDoseAmount() { 
343 		NM retVal = this.getTypedField(12, 0);
344 		return retVal;
345     }
346     
347     /**
348      * Returns
349      * RXV-12: "Max Dose Amount" - creates it if necessary
350      */
351     public NM getRxv12_MaxDoseAmount() { 
352 		NM retVal = this.getTypedField(12, 0);
353 		return retVal;
354     }
355 
356 
357 
358     /**
359      * Returns
360      * RXV-13: "Max Dose Amount Units" - creates it if necessary
361      */
362     public CWE getMaxDoseAmountUnits() { 
363 		CWE retVal = this.getTypedField(13, 0);
364 		return retVal;
365     }
366     
367     /**
368      * Returns
369      * RXV-13: "Max Dose Amount Units" - creates it if necessary
370      */
371     public CWE getRxv13_MaxDoseAmountUnits() { 
372 		CWE retVal = this.getTypedField(13, 0);
373 		return retVal;
374     }
375 
376 
377 
378     /**
379      * Returns
380      * RXV-14: "Max Dose Amount Volume" - creates it if necessary
381      */
382     public NM getMaxDoseAmountVolume() { 
383 		NM retVal = this.getTypedField(14, 0);
384 		return retVal;
385     }
386     
387     /**
388      * Returns
389      * RXV-14: "Max Dose Amount Volume" - creates it if necessary
390      */
391     public NM getRxv14_MaxDoseAmountVolume() { 
392 		NM retVal = this.getTypedField(14, 0);
393 		return retVal;
394     }
395 
396 
397 
398     /**
399      * Returns
400      * RXV-15: "Max Dose Amount Volume Units" - creates it if necessary
401      */
402     public CWE getMaxDoseAmountVolumeUnits() { 
403 		CWE retVal = this.getTypedField(15, 0);
404 		return retVal;
405     }
406     
407     /**
408      * Returns
409      * RXV-15: "Max Dose Amount Volume Units" - creates it if necessary
410      */
411     public CWE getRxv15_MaxDoseAmountVolumeUnits() { 
412 		CWE retVal = this.getTypedField(15, 0);
413 		return retVal;
414     }
415 
416 
417 
418     /**
419      * Returns
420      * RXV-16: "Max Dose per Time" - creates it if necessary
421      */
422     public CQ getMaxDosePerTime() { 
423 		CQ retVal = this.getTypedField(16, 0);
424 		return retVal;
425     }
426     
427     /**
428      * Returns
429      * RXV-16: "Max Dose per Time" - creates it if necessary
430      */
431     public CQ getRxv16_MaxDosePerTime() { 
432 		CQ retVal = this.getTypedField(16, 0);
433 		return retVal;
434     }
435 
436 
437 
438     /**
439      * Returns
440      * RXV-17: "Lockout Interval" - creates it if necessary
441      */
442     public CQ getLockoutInterval() { 
443 		CQ retVal = this.getTypedField(17, 0);
444 		return retVal;
445     }
446     
447     /**
448      * Returns
449      * RXV-17: "Lockout Interval" - creates it if necessary
450      */
451     public CQ getRxv17_LockoutInterval() { 
452 		CQ retVal = this.getTypedField(17, 0);
453 		return retVal;
454     }
455 
456 
457 
458     /**
459      * Returns
460      * RXV-18: "Syringe Manufacturer" - creates it if necessary
461      */
462     public CWE getSyringeManufacturer() { 
463 		CWE retVal = this.getTypedField(18, 0);
464 		return retVal;
465     }
466     
467     /**
468      * Returns
469      * RXV-18: "Syringe Manufacturer" - creates it if necessary
470      */
471     public CWE getRxv18_SyringeManufacturer() { 
472 		CWE retVal = this.getTypedField(18, 0);
473 		return retVal;
474     }
475 
476 
477 
478     /**
479      * Returns
480      * RXV-19: "Syringe Model Number" - creates it if necessary
481      */
482     public CWE getSyringeModelNumber() { 
483 		CWE retVal = this.getTypedField(19, 0);
484 		return retVal;
485     }
486     
487     /**
488      * Returns
489      * RXV-19: "Syringe Model Number" - creates it if necessary
490      */
491     public CWE getRxv19_SyringeModelNumber() { 
492 		CWE retVal = this.getTypedField(19, 0);
493 		return retVal;
494     }
495 
496 
497 
498     /**
499      * Returns
500      * RXV-20: "Syringe Size" - creates it if necessary
501      */
502     public NM getSyringeSize() { 
503 		NM retVal = this.getTypedField(20, 0);
504 		return retVal;
505     }
506     
507     /**
508      * Returns
509      * RXV-20: "Syringe Size" - creates it if necessary
510      */
511     public NM getRxv20_SyringeSize() { 
512 		NM retVal = this.getTypedField(20, 0);
513 		return retVal;
514     }
515 
516 
517 
518     /**
519      * Returns
520      * RXV-21: "Syringe Size Units" - creates it if necessary
521      */
522     public CWE getSyringeSizeUnits() { 
523 		CWE retVal = this.getTypedField(21, 0);
524 		return retVal;
525     }
526     
527     /**
528      * Returns
529      * RXV-21: "Syringe Size Units" - creates it if necessary
530      */
531     public CWE getRxv21_SyringeSizeUnits() { 
532 		CWE retVal = this.getTypedField(21, 0);
533 		return retVal;
534     }
535 
536 
537 
538     /**
539      * Returns
540      * RXV-22: "Action Code" - creates it if necessary
541      */
542     public ID getActionCode() { 
543 		ID retVal = this.getTypedField(22, 0);
544 		return retVal;
545     }
546     
547     /**
548      * Returns
549      * RXV-22: "Action Code" - creates it if necessary
550      */
551     public ID getRxv22_ActionCode() { 
552 		ID retVal = this.getTypedField(22, 0);
553 		return retVal;
554     }
555 
556 
557 
558 
559 
560     /** {@inheritDoc} */   
561     protected Type createNewTypeWithoutReflection(int field) {
562        switch (field) {
563           case 0: return new SI(getMessage());
564           case 1: return new ID(getMessage(), new Integer( 917 ));
565           case 2: return new NM(getMessage());
566           case 3: return new CWE(getMessage());
567           case 4: return new NM(getMessage());
568           case 5: return new CWE(getMessage());
569           case 6: return new ID(getMessage(), new Integer( 918 ));
570           case 7: return new NM(getMessage());
571           case 8: return new CWE(getMessage());
572           case 9: return new NM(getMessage());
573           case 10: return new CWE(getMessage());
574           case 11: return new NM(getMessage());
575           case 12: return new CWE(getMessage());
576           case 13: return new NM(getMessage());
577           case 14: return new CWE(getMessage());
578           case 15: return new CQ(getMessage());
579           case 16: return new CQ(getMessage());
580           case 17: return new CWE(getMessage());
581           case 18: return new CWE(getMessage());
582           case 19: return new NM(getMessage());
583           case 20: return new CWE(getMessage());
584           case 21: return new ID(getMessage(), new Integer( 206 ));
585           default: return null;
586        }
587    }
588 
589 
590 }
591