1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  package ca.uhn.hl7v2.model.v281.segment;
35  
36  
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  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  @SuppressWarnings("unused")
69  public class TQ1 extends AbstractSegment {
70  
71      
72  
73  
74      public TQ1(Group parent, ModelClassFactory factory) {
75         super(parent, factory);
76         init(factory);
77      }
78  
79      private void init(ModelClassFactory factory) {
80         try {
81                                    this.add(SI.class, false, 1, 0, new Object[]{ getMessage() }, "Set ID - TQ1");
82                                    this.add(CQ.class, false, 1, 0, new Object[]{ getMessage() }, "Quantity");
83                                    this.add(RPT.class, false, 0, 0, new Object[]{ getMessage() }, "Repeat Pattern");
84                                    this.add(TM.class, false, 0, 0, new Object[]{ getMessage() }, "Explicit Time");
85                                    this.add(CQ.class, false, 0, 0, new Object[]{ getMessage() }, "Relative Time and Units");
86                                    this.add(CQ.class, false, 1, 0, new Object[]{ getMessage() }, "Service Duration");
87                                    this.add(DTM.class, false, 1, 0, new Object[]{ getMessage() }, "Start date/time");
88                                    this.add(DTM.class, false, 1, 0, new Object[]{ getMessage() }, "End date/time");
89                                    this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Priority");
90                                    this.add(TX.class, false, 1, 0, new Object[]{ getMessage() }, "Condition text");
91                                    this.add(TX.class, false, 1, 0, new Object[]{ getMessage() }, "Text instruction");
92                                                this.add(ID.class, false, 1, 0, new Object[]{ getMessage(), new Integer(472) }, "Conjunction");
93                                    this.add(CQ.class, false, 1, 0, new Object[]{ getMessage() }, "Occurrence duration");
94                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Total occurrences");
95         } catch(HL7Exception e) {
96            log.error("Unexpected error creating TQ1 - this is probably a bug in the source code generator.", e);
97         }
98      }
99  
100 
101 
102     
103 
104 
105 
106     public SI getSetIDTQ1() { 
107 		SI retVal = this.getTypedField(1, 0);
108 		return retVal;
109     }
110     
111     
112 
113 
114 
115     public SI getTq11_SetIDTQ1() { 
116 		SI retVal = this.getTypedField(1, 0);
117 		return retVal;
118     }
119 
120 
121 
122     
123 
124 
125 
126     public CQ getQuantity() { 
127 		CQ retVal = this.getTypedField(2, 0);
128 		return retVal;
129     }
130     
131     
132 
133 
134 
135     public CQ getTq12_Quantity() { 
136 		CQ retVal = this.getTypedField(2, 0);
137 		return retVal;
138     }
139 
140 
141     
142 
143 
144     public RPT[] getRepeatPattern() {
145     	RPT[] retVal = this.getTypedField(3, new RPT[0]);
146     	return retVal;
147     }
148 
149 
150     
151 
152 
153     public RPT[] getTq13_RepeatPattern() {
154     	RPT[] retVal = this.getTypedField(3, new RPT[0]);
155     	return retVal;
156     }
157 
158 
159     
160 
161 
162 
163 
164     public int getRepeatPatternReps() {
165     	return this.getReps(3);
166     }
167 
168 
169     
170 
171 
172 
173 
174 
175     public RPT getRepeatPattern(int rep) { 
176 		RPT retVal = this.getTypedField(3, rep);
177 		return retVal;
178     }
179 
180     
181 
182 
183 
184 
185 
186     public RPT getTq13_RepeatPattern(int rep) { 
187 		RPT retVal = this.getTypedField(3, rep);
188 		return retVal;
189     }
190 
191     
192 
193 
194 
195 
196     public int getTq13_RepeatPatternReps() {
197     	return this.getReps(3);
198     }
199 
200 
201     
202 
203 
204 
205 
206 
207 
208     public RPT insertRepeatPattern(int rep) throws HL7Exception { 
209         return (RPT) super.insertRepetition(3, rep);
210     }
211 
212 
213     
214 
215 
216 
217 
218 
219 
220     public RPT insertTq13_RepeatPattern(int rep) throws HL7Exception { 
221         return (RPT) super.insertRepetition(3, rep);
222     }
223 
224 
225     
226 
227 
228 
229 
230 
231 
232     public RPT removeRepeatPattern(int rep) throws HL7Exception { 
233         return (RPT) super.removeRepetition(3, rep);
234     }
235 
236 
237     
238 
239 
240 
241 
242 
243 
244     public RPT removeTq13_RepeatPattern(int rep) throws HL7Exception { 
245         return (RPT) super.removeRepetition(3, rep);
246     }
247 
248 
249 
250     
251 
252 
253     public TM[] getExplicitTime() {
254     	TM[] retVal = this.getTypedField(4, new TM[0]);
255     	return retVal;
256     }
257 
258 
259     
260 
261 
262     public TM[] getTq14_ExplicitTime() {
263     	TM[] retVal = this.getTypedField(4, new TM[0]);
264     	return retVal;
265     }
266 
267 
268     
269 
270 
271 
272 
273     public int getExplicitTimeReps() {
274     	return this.getReps(4);
275     }
276 
277 
278     
279 
280 
281 
282 
283 
284     public TM getExplicitTime(int rep) { 
285 		TM retVal = this.getTypedField(4, rep);
286 		return retVal;
287     }
288 
289     
290 
291 
292 
293 
294 
295     public TM getTq14_ExplicitTime(int rep) { 
296 		TM retVal = this.getTypedField(4, rep);
297 		return retVal;
298     }
299 
300     
301 
302 
303 
304 
305     public int getTq14_ExplicitTimeReps() {
306     	return this.getReps(4);
307     }
308 
309 
310     
311 
312 
313 
314 
315 
316 
317     public TM insertExplicitTime(int rep) throws HL7Exception { 
318         return (TM) super.insertRepetition(4, rep);
319     }
320 
321 
322     
323 
324 
325 
326 
327 
328 
329     public TM insertTq14_ExplicitTime(int rep) throws HL7Exception { 
330         return (TM) super.insertRepetition(4, rep);
331     }
332 
333 
334     
335 
336 
337 
338 
339 
340 
341     public TM removeExplicitTime(int rep) throws HL7Exception { 
342         return (TM) super.removeRepetition(4, rep);
343     }
344 
345 
346     
347 
348 
349 
350 
351 
352 
353     public TM removeTq14_ExplicitTime(int rep) throws HL7Exception { 
354         return (TM) super.removeRepetition(4, rep);
355     }
356 
357 
358 
359     
360 
361 
362     public CQ[] getRelativeTimeAndUnits() {
363     	CQ[] retVal = this.getTypedField(5, new CQ[0]);
364     	return retVal;
365     }
366 
367 
368     
369 
370 
371     public CQ[] getTq15_RelativeTimeAndUnits() {
372     	CQ[] retVal = this.getTypedField(5, new CQ[0]);
373     	return retVal;
374     }
375 
376 
377     
378 
379 
380 
381 
382     public int getRelativeTimeAndUnitsReps() {
383     	return this.getReps(5);
384     }
385 
386 
387     
388 
389 
390 
391 
392 
393     public CQ getRelativeTimeAndUnits(int rep) { 
394 		CQ retVal = this.getTypedField(5, rep);
395 		return retVal;
396     }
397 
398     
399 
400 
401 
402 
403 
404     public CQ getTq15_RelativeTimeAndUnits(int rep) { 
405 		CQ retVal = this.getTypedField(5, rep);
406 		return retVal;
407     }
408 
409     
410 
411 
412 
413 
414     public int getTq15_RelativeTimeAndUnitsReps() {
415     	return this.getReps(5);
416     }
417 
418 
419     
420 
421 
422 
423 
424 
425 
426     public CQ insertRelativeTimeAndUnits(int rep) throws HL7Exception { 
427         return (CQ) super.insertRepetition(5, rep);
428     }
429 
430 
431     
432 
433 
434 
435 
436 
437 
438     public CQ insertTq15_RelativeTimeAndUnits(int rep) throws HL7Exception { 
439         return (CQ) super.insertRepetition(5, rep);
440     }
441 
442 
443     
444 
445 
446 
447 
448 
449 
450     public CQ removeRelativeTimeAndUnits(int rep) throws HL7Exception { 
451         return (CQ) super.removeRepetition(5, rep);
452     }
453 
454 
455     
456 
457 
458 
459 
460 
461 
462     public CQ removeTq15_RelativeTimeAndUnits(int rep) throws HL7Exception { 
463         return (CQ) super.removeRepetition(5, rep);
464     }
465 
466 
467 
468 
469     
470 
471 
472 
473     public CQ getServiceDuration() { 
474 		CQ retVal = this.getTypedField(6, 0);
475 		return retVal;
476     }
477     
478     
479 
480 
481 
482     public CQ getTq16_ServiceDuration() { 
483 		CQ retVal = this.getTypedField(6, 0);
484 		return retVal;
485     }
486 
487 
488 
489     
490 
491 
492 
493     public DTM getStartDateTime() { 
494 		DTM retVal = this.getTypedField(7, 0);
495 		return retVal;
496     }
497     
498     
499 
500 
501 
502     public DTM getTq17_StartDateTime() { 
503 		DTM retVal = this.getTypedField(7, 0);
504 		return retVal;
505     }
506 
507 
508 
509     
510 
511 
512 
513     public DTM getEndDateTime() { 
514 		DTM retVal = this.getTypedField(8, 0);
515 		return retVal;
516     }
517     
518     
519 
520 
521 
522     public DTM getTq18_EndDateTime() { 
523 		DTM retVal = this.getTypedField(8, 0);
524 		return retVal;
525     }
526 
527 
528     
529 
530 
531     public CWE[] getPriority() {
532     	CWE[] retVal = this.getTypedField(9, new CWE[0]);
533     	return retVal;
534     }
535 
536 
537     
538 
539 
540     public CWE[] getTq19_Priority() {
541     	CWE[] retVal = this.getTypedField(9, new CWE[0]);
542     	return retVal;
543     }
544 
545 
546     
547 
548 
549 
550 
551     public int getPriorityReps() {
552     	return this.getReps(9);
553     }
554 
555 
556     
557 
558 
559 
560 
561 
562     public CWE getPriority(int rep) { 
563 		CWE retVal = this.getTypedField(9, rep);
564 		return retVal;
565     }
566 
567     
568 
569 
570 
571 
572 
573     public CWE getTq19_Priority(int rep) { 
574 		CWE retVal = this.getTypedField(9, rep);
575 		return retVal;
576     }
577 
578     
579 
580 
581 
582 
583     public int getTq19_PriorityReps() {
584     	return this.getReps(9);
585     }
586 
587 
588     
589 
590 
591 
592 
593 
594 
595     public CWE insertPriority(int rep) throws HL7Exception { 
596         return (CWE) super.insertRepetition(9, rep);
597     }
598 
599 
600     
601 
602 
603 
604 
605 
606 
607     public CWE insertTq19_Priority(int rep) throws HL7Exception { 
608         return (CWE) super.insertRepetition(9, rep);
609     }
610 
611 
612     
613 
614 
615 
616 
617 
618 
619     public CWE removePriority(int rep) throws HL7Exception { 
620         return (CWE) super.removeRepetition(9, rep);
621     }
622 
623 
624     
625 
626 
627 
628 
629 
630 
631     public CWE removeTq19_Priority(int rep) throws HL7Exception { 
632         return (CWE) super.removeRepetition(9, rep);
633     }
634 
635 
636 
637 
638     
639 
640 
641 
642     public TX getConditionText() { 
643 		TX retVal = this.getTypedField(10, 0);
644 		return retVal;
645     }
646     
647     
648 
649 
650 
651     public TX getTq110_ConditionText() { 
652 		TX retVal = this.getTypedField(10, 0);
653 		return retVal;
654     }
655 
656 
657 
658     
659 
660 
661 
662     public TX getTextInstruction() { 
663 		TX retVal = this.getTypedField(11, 0);
664 		return retVal;
665     }
666     
667     
668 
669 
670 
671     public TX getTq111_TextInstruction() { 
672 		TX retVal = this.getTypedField(11, 0);
673 		return retVal;
674     }
675 
676 
677 
678     
679 
680 
681 
682     public ID getConjunction() { 
683 		ID retVal = this.getTypedField(12, 0);
684 		return retVal;
685     }
686     
687     
688 
689 
690 
691     public ID getTq112_Conjunction() { 
692 		ID retVal = this.getTypedField(12, 0);
693 		return retVal;
694     }
695 
696 
697 
698     
699 
700 
701 
702     public CQ getOccurrenceDuration() { 
703 		CQ retVal = this.getTypedField(13, 0);
704 		return retVal;
705     }
706     
707     
708 
709 
710 
711     public CQ getTq113_OccurrenceDuration() { 
712 		CQ retVal = this.getTypedField(13, 0);
713 		return retVal;
714     }
715 
716 
717 
718     
719 
720 
721 
722     public NM getTotalOccurrences() { 
723 		NM retVal = this.getTypedField(14, 0);
724 		return retVal;
725     }
726     
727     
728 
729 
730 
731     public NM getTq114_TotalOccurrences() { 
732 		NM retVal = this.getTypedField(14, 0);
733 		return retVal;
734     }
735 
736 
737 
738 
739 
740        
741     protected Type createNewTypeWithoutReflection(int field) {
742        switch (field) {
743           case 0: return new SI(getMessage());
744           case 1: return new CQ(getMessage());
745           case 2: return new RPT(getMessage());
746           case 3: return new TM(getMessage());
747           case 4: return new CQ(getMessage());
748           case 5: return new CQ(getMessage());
749           case 6: return new DTM(getMessage());
750           case 7: return new DTM(getMessage());
751           case 8: return new CWE(getMessage());
752           case 9: return new TX(getMessage());
753           case 10: return new TX(getMessage());
754           case 11: return new ID(getMessage(), new Integer( 472 ));
755           case 12: return new CQ(getMessage());
756           case 13: return new NM(getMessage());
757           default: return null;
758        }
759    }
760 
761 
762 }
763