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.v23.segment;
35  
36  // import ca.uhn.hl7v2.model.v23.group.*;
37  import ca.uhn.hl7v2.model.v23.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 PV2 message segment (Patient visit - additional information). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>PV2-1: Prior Pending Location (PL) <b>optional </b>
53       * <li>PV2-2: Accommodation Code (CE) <b>optional </b>
54       * <li>PV2-3: Admit Reason (CE) <b>optional </b>
55       * <li>PV2-4: Transfer Reason (CE) <b>optional </b>
56       * <li>PV2-5: Patient Valuables (ST) <b>optional repeating</b>
57       * <li>PV2-6: Patient Valuables Location (ST) <b>optional </b>
58       * <li>PV2-7: Visit User Code (IS) <b>optional </b>
59       * <li>PV2-8: Expected Admit Date (TS) <b>optional </b>
60       * <li>PV2-9: Expected Discharge Date (TS) <b>optional </b>
61       * <li>PV2-10: Estimated Length of Inpatient Stay (NM) <b>optional </b>
62       * <li>PV2-11: Actual Length of Inpatient Stay (NM) <b>optional </b>
63       * <li>PV2-12: Visit Description (ST) <b>optional </b>
64       * <li>PV2-13: Referral Source Code (XCN) <b>optional </b>
65       * <li>PV2-14: Previous Service Date (DT) <b>optional </b>
66       * <li>PV2-15: Employment Illness Related Indicator (ID) <b>optional </b>
67       * <li>PV2-16: Purge Status Code (IS) <b>optional </b>
68       * <li>PV2-17: Purge Status Date (DT) <b>optional </b>
69       * <li>PV2-18: Special Program Code (IS) <b>optional </b>
70       * <li>PV2-19: Retention Indicator (ID) <b>optional </b>
71       * <li>PV2-20: Expected Number of Insurance Plans (NM) <b>optional </b>
72       * <li>PV2-21: Visit Publicity Code (IS) <b>optional </b>
73       * <li>PV2-22: Visit Protection Indicator (ID) <b>optional </b>
74       * <li>PV2-23: Clinic Organization Name (XON) <b>optional repeating</b>
75       * <li>PV2-24: Patient Status Code (IS) <b>optional </b>
76       * <li>PV2-25: Visit Priority Code (IS) <b>optional </b>
77       * <li>PV2-26: Previous Treatment Date (DT) <b>optional </b>
78       * <li>PV2-27: Expected Discharge Disposition (IS) <b>optional </b>
79       * <li>PV2-28: Signature on File Date (DT) <b>optional </b>
80       * <li>PV2-29: First Similar Illness Date (DT) <b>optional </b>
81       * <li>PV2-30: Patient Charge Adjustment Code (IS) <b>optional </b>
82       * <li>PV2-31: Recurring Service Code (IS) <b>optional </b>
83       * <li>PV2-32: Billing Media Code (ID) <b>optional </b>
84       * <li>PV2-33: Expected Surgery Date & Time (TS) <b>optional </b>
85       * <li>PV2-34: Military Partnership Code (ID) <b>optional </b>
86       * <li>PV2-35: Military Non-Availabiltiy Code (ID) <b>optional </b>
87       * <li>PV2-36: Newborn Baby Indicator (ID) <b>optional </b>
88       * <li>PV2-37: Baby Detained Indicator (ID) <b>optional </b>
89   * </ul>
90   */
91  @SuppressWarnings("unused")
92  public class PV2 extends AbstractSegment {
93  
94      /** 
95       * Creates a new PV2 segment
96       */
97      public PV2(Group parent, ModelClassFactory factory) {
98         super(parent, factory);
99         init(factory);
100     }
101 
102     private void init(ModelClassFactory factory) {
103        try {
104                                   this.add(PL.class, false, 1, 12, new Object[]{ getMessage() }, "Prior Pending Location");
105                                   this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Accommodation Code");
106                                   this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Admit Reason");
107                                   this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Transfer Reason");
108                                   this.add(ST.class, false, 0, 25, new Object[]{ getMessage() }, "Patient Valuables");
109                                   this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Patient Valuables Location");
110                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(130) }, "Visit User Code");
111                                   this.add(TS.class, false, 1, 8, new Object[]{ getMessage() }, "Expected Admit Date");
112                                   this.add(TS.class, false, 1, 8, new Object[]{ getMessage() }, "Expected Discharge Date");
113                                   this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Estimated Length of Inpatient Stay");
114                                   this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Actual Length of Inpatient Stay");
115                                   this.add(ST.class, false, 1, 50, new Object[]{ getMessage() }, "Visit Description");
116                                   this.add(XCN.class, false, 1, 90, new Object[]{ getMessage() }, "Referral Source Code");
117                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Service Date");
118                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Employment Illness Related Indicator");
119                                               this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(213) }, "Purge Status Code");
120                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Purge Status Date");
121                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(214) }, "Special Program Code");
122                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Retention Indicator");
123                                   this.add(NM.class, false, 1, 1, new Object[]{ getMessage() }, "Expected Number of Insurance Plans");
124                                               this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(215) }, "Visit Publicity Code");
125                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Visit Protection Indicator");
126                                   this.add(XON.class, false, 0, 90, new Object[]{ getMessage() }, "Clinic Organization Name");
127                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(216) }, "Patient Status Code");
128                                               this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(217) }, "Visit Priority Code");
129                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Treatment Date");
130                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(112) }, "Expected Discharge Disposition");
131                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Signature on File Date");
132                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "First Similar Illness Date");
133                                               this.add(IS.class, false, 1, 3, new Object[]{ getMessage(), new Integer(218) }, "Patient Charge Adjustment Code");
134                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(219) }, "Recurring Service Code");
135                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Billing Media Code");
136                                   this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Surgery Date & Time");
137                                               this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(136) }, "Military Partnership Code");
138                                               this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(136) }, "Military Non-Availabiltiy Code");
139                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Newborn Baby Indicator");
140                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Baby Detained Indicator");
141        } catch(HL7Exception e) {
142           log.error("Unexpected error creating PV2 - this is probably a bug in the source code generator.", e);
143        }
144     }
145 
146 
147 
148     /**
149      * Returns
150      * PV2-1: "Prior Pending Location" - creates it if necessary
151      */
152     public PL getPriorPendingLocation() { 
153 		PL retVal = this.getTypedField(1, 0);
154 		return retVal;
155     }
156     
157     /**
158      * Returns
159      * PV2-1: "Prior Pending Location" - creates it if necessary
160      */
161     public PL getPv21_PriorPendingLocation() { 
162 		PL retVal = this.getTypedField(1, 0);
163 		return retVal;
164     }
165 
166 
167 
168     /**
169      * Returns
170      * PV2-2: "Accommodation Code" - creates it if necessary
171      */
172     public CE getAccommodationCode() { 
173 		CE retVal = this.getTypedField(2, 0);
174 		return retVal;
175     }
176     
177     /**
178      * Returns
179      * PV2-2: "Accommodation Code" - creates it if necessary
180      */
181     public CE getPv22_AccommodationCode() { 
182 		CE retVal = this.getTypedField(2, 0);
183 		return retVal;
184     }
185 
186 
187 
188     /**
189      * Returns
190      * PV2-3: "Admit Reason" - creates it if necessary
191      */
192     public CE getAdmitReason() { 
193 		CE retVal = this.getTypedField(3, 0);
194 		return retVal;
195     }
196     
197     /**
198      * Returns
199      * PV2-3: "Admit Reason" - creates it if necessary
200      */
201     public CE getPv23_AdmitReason() { 
202 		CE retVal = this.getTypedField(3, 0);
203 		return retVal;
204     }
205 
206 
207 
208     /**
209      * Returns
210      * PV2-4: "Transfer Reason" - creates it if necessary
211      */
212     public CE getTransferReason() { 
213 		CE retVal = this.getTypedField(4, 0);
214 		return retVal;
215     }
216     
217     /**
218      * Returns
219      * PV2-4: "Transfer Reason" - creates it if necessary
220      */
221     public CE getPv24_TransferReason() { 
222 		CE retVal = this.getTypedField(4, 0);
223 		return retVal;
224     }
225 
226 
227     /**
228      * Returns all repetitions of Patient Valuables (PV2-5).
229      */
230     public ST[] getPatientValuables() {
231     	ST[] retVal = this.getTypedField(5, new ST[0]);
232     	return retVal;
233     }
234 
235 
236     /**
237      * Returns all repetitions of Patient Valuables (PV2-5).
238      */
239     public ST[] getPv25_PatientValuables() {
240     	ST[] retVal = this.getTypedField(5, new ST[0]);
241     	return retVal;
242     }
243 
244 
245     /**
246      * Returns a count of the current number of repetitions of Patient Valuables (PV2-5).
247      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
248      * it will return zero.
249      */
250     public int getPatientValuablesReps() {
251     	return this.getReps(5);
252     }
253 
254 
255     /**
256      * Returns a specific repetition of
257      * PV2-5: "Patient Valuables" - creates it if necessary
258      *
259      * @param rep The repetition index (0-indexed)
260      */
261     public ST getPatientValuables(int rep) { 
262 		ST retVal = this.getTypedField(5, rep);
263 		return retVal;
264     }
265 
266     /**
267      * Returns a specific repetition of
268      * PV2-5: "Patient Valuables" - creates it if necessary
269      *
270      * @param rep The repetition index (0-indexed)
271      */
272     public ST getPv25_PatientValuables(int rep) { 
273 		ST retVal = this.getTypedField(5, rep);
274 		return retVal;
275     }
276 
277     /**
278      * Returns a count of the current number of repetitions of Patient Valuables (PV2-5).
279      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
280      * it will return zero.
281      */
282     public int getPv25_PatientValuablesReps() {
283     	return this.getReps(5);
284     }
285 
286 
287     /**
288      * Inserts a repetition of
289      * PV2-5: "Patient Valuables" at a specific index
290      *
291      * @param rep The repetition index (0-indexed)
292      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
293      */
294     public ST insertPatientValuables(int rep) throws HL7Exception { 
295         return (ST) super.insertRepetition(5, rep);
296     }
297 
298 
299     /**
300      * Inserts a repetition of
301      * PV2-5: "Patient Valuables" at a specific index
302      *
303      * @param rep The repetition index (0-indexed)
304      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
305      */
306     public ST insertPv25_PatientValuables(int rep) throws HL7Exception { 
307         return (ST) super.insertRepetition(5, rep);
308     }
309 
310 
311     /**
312      * Removes a repetition of
313      * PV2-5: "Patient Valuables" at a specific index
314      *
315      * @param rep The repetition index (0-indexed)
316      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
317      */
318     public ST removePatientValuables(int rep) throws HL7Exception { 
319         return (ST) super.removeRepetition(5, rep);
320     }
321 
322 
323     /**
324      * Removes a repetition of
325      * PV2-5: "Patient Valuables" at a specific index
326      *
327      * @param rep The repetition index (0-indexed)
328      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
329      */
330     public ST removePv25_PatientValuables(int rep) throws HL7Exception { 
331         return (ST) super.removeRepetition(5, rep);
332     }
333 
334 
335 
336 
337     /**
338      * Returns
339      * PV2-6: "Patient Valuables Location" - creates it if necessary
340      */
341     public ST getPatientValuablesLocation() { 
342 		ST retVal = this.getTypedField(6, 0);
343 		return retVal;
344     }
345     
346     /**
347      * Returns
348      * PV2-6: "Patient Valuables Location" - creates it if necessary
349      */
350     public ST getPv26_PatientValuablesLocation() { 
351 		ST retVal = this.getTypedField(6, 0);
352 		return retVal;
353     }
354 
355 
356 
357     /**
358      * Returns
359      * PV2-7: "Visit User Code" - creates it if necessary
360      */
361     public IS getVisitUserCode() { 
362 		IS retVal = this.getTypedField(7, 0);
363 		return retVal;
364     }
365     
366     /**
367      * Returns
368      * PV2-7: "Visit User Code" - creates it if necessary
369      */
370     public IS getPv27_VisitUserCode() { 
371 		IS retVal = this.getTypedField(7, 0);
372 		return retVal;
373     }
374 
375 
376 
377     /**
378      * Returns
379      * PV2-8: "Expected Admit Date" - creates it if necessary
380      */
381     public TS getExpectedAdmitDate() { 
382 		TS retVal = this.getTypedField(8, 0);
383 		return retVal;
384     }
385     
386     /**
387      * Returns
388      * PV2-8: "Expected Admit Date" - creates it if necessary
389      */
390     public TS getPv28_ExpectedAdmitDate() { 
391 		TS retVal = this.getTypedField(8, 0);
392 		return retVal;
393     }
394 
395 
396 
397     /**
398      * Returns
399      * PV2-9: "Expected Discharge Date" - creates it if necessary
400      */
401     public TS getExpectedDischargeDate() { 
402 		TS retVal = this.getTypedField(9, 0);
403 		return retVal;
404     }
405     
406     /**
407      * Returns
408      * PV2-9: "Expected Discharge Date" - creates it if necessary
409      */
410     public TS getPv29_ExpectedDischargeDate() { 
411 		TS retVal = this.getTypedField(9, 0);
412 		return retVal;
413     }
414 
415 
416 
417     /**
418      * Returns
419      * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary
420      */
421     public NM getEstimatedLengthOfInpatientStay() { 
422 		NM retVal = this.getTypedField(10, 0);
423 		return retVal;
424     }
425     
426     /**
427      * Returns
428      * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary
429      */
430     public NM getPv210_EstimatedLengthOfInpatientStay() { 
431 		NM retVal = this.getTypedField(10, 0);
432 		return retVal;
433     }
434 
435 
436 
437     /**
438      * Returns
439      * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary
440      */
441     public NM getActualLengthOfInpatientStay() { 
442 		NM retVal = this.getTypedField(11, 0);
443 		return retVal;
444     }
445     
446     /**
447      * Returns
448      * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary
449      */
450     public NM getPv211_ActualLengthOfInpatientStay() { 
451 		NM retVal = this.getTypedField(11, 0);
452 		return retVal;
453     }
454 
455 
456 
457     /**
458      * Returns
459      * PV2-12: "Visit Description" - creates it if necessary
460      */
461     public ST getVisitDescription() { 
462 		ST retVal = this.getTypedField(12, 0);
463 		return retVal;
464     }
465     
466     /**
467      * Returns
468      * PV2-12: "Visit Description" - creates it if necessary
469      */
470     public ST getPv212_VisitDescription() { 
471 		ST retVal = this.getTypedField(12, 0);
472 		return retVal;
473     }
474 
475 
476 
477     /**
478      * Returns
479      * PV2-13: "Referral Source Code" - creates it if necessary
480      */
481     public XCN getReferralSourceCode() { 
482 		XCN retVal = this.getTypedField(13, 0);
483 		return retVal;
484     }
485     
486     /**
487      * Returns
488      * PV2-13: "Referral Source Code" - creates it if necessary
489      */
490     public XCN getPv213_ReferralSourceCode() { 
491 		XCN retVal = this.getTypedField(13, 0);
492 		return retVal;
493     }
494 
495 
496 
497     /**
498      * Returns
499      * PV2-14: "Previous Service Date" - creates it if necessary
500      */
501     public DT getPreviousServiceDate() { 
502 		DT retVal = this.getTypedField(14, 0);
503 		return retVal;
504     }
505     
506     /**
507      * Returns
508      * PV2-14: "Previous Service Date" - creates it if necessary
509      */
510     public DT getPv214_PreviousServiceDate() { 
511 		DT retVal = this.getTypedField(14, 0);
512 		return retVal;
513     }
514 
515 
516 
517     /**
518      * Returns
519      * PV2-15: "Employment Illness Related Indicator" - creates it if necessary
520      */
521     public ID getEmploymentIllnessRelatedIndicator() { 
522 		ID retVal = this.getTypedField(15, 0);
523 		return retVal;
524     }
525     
526     /**
527      * Returns
528      * PV2-15: "Employment Illness Related Indicator" - creates it if necessary
529      */
530     public ID getPv215_EmploymentIllnessRelatedIndicator() { 
531 		ID retVal = this.getTypedField(15, 0);
532 		return retVal;
533     }
534 
535 
536 
537     /**
538      * Returns
539      * PV2-16: "Purge Status Code" - creates it if necessary
540      */
541     public IS getPurgeStatusCode() { 
542 		IS retVal = this.getTypedField(16, 0);
543 		return retVal;
544     }
545     
546     /**
547      * Returns
548      * PV2-16: "Purge Status Code" - creates it if necessary
549      */
550     public IS getPv216_PurgeStatusCode() { 
551 		IS retVal = this.getTypedField(16, 0);
552 		return retVal;
553     }
554 
555 
556 
557     /**
558      * Returns
559      * PV2-17: "Purge Status Date" - creates it if necessary
560      */
561     public DT getPurgeStatusDate() { 
562 		DT retVal = this.getTypedField(17, 0);
563 		return retVal;
564     }
565     
566     /**
567      * Returns
568      * PV2-17: "Purge Status Date" - creates it if necessary
569      */
570     public DT getPv217_PurgeStatusDate() { 
571 		DT retVal = this.getTypedField(17, 0);
572 		return retVal;
573     }
574 
575 
576 
577     /**
578      * Returns
579      * PV2-18: "Special Program Code" - creates it if necessary
580      */
581     public IS getSpecialProgramCode() { 
582 		IS retVal = this.getTypedField(18, 0);
583 		return retVal;
584     }
585     
586     /**
587      * Returns
588      * PV2-18: "Special Program Code" - creates it if necessary
589      */
590     public IS getPv218_SpecialProgramCode() { 
591 		IS retVal = this.getTypedField(18, 0);
592 		return retVal;
593     }
594 
595 
596 
597     /**
598      * Returns
599      * PV2-19: "Retention Indicator" - creates it if necessary
600      */
601     public ID getRetentionIndicator() { 
602 		ID retVal = this.getTypedField(19, 0);
603 		return retVal;
604     }
605     
606     /**
607      * Returns
608      * PV2-19: "Retention Indicator" - creates it if necessary
609      */
610     public ID getPv219_RetentionIndicator() { 
611 		ID retVal = this.getTypedField(19, 0);
612 		return retVal;
613     }
614 
615 
616 
617     /**
618      * Returns
619      * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary
620      */
621     public NM getExpectedNumberOfInsurancePlans() { 
622 		NM retVal = this.getTypedField(20, 0);
623 		return retVal;
624     }
625     
626     /**
627      * Returns
628      * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary
629      */
630     public NM getPv220_ExpectedNumberOfInsurancePlans() { 
631 		NM retVal = this.getTypedField(20, 0);
632 		return retVal;
633     }
634 
635 
636 
637     /**
638      * Returns
639      * PV2-21: "Visit Publicity Code" - creates it if necessary
640      */
641     public IS getVisitPublicityCode() { 
642 		IS retVal = this.getTypedField(21, 0);
643 		return retVal;
644     }
645     
646     /**
647      * Returns
648      * PV2-21: "Visit Publicity Code" - creates it if necessary
649      */
650     public IS getPv221_VisitPublicityCode() { 
651 		IS retVal = this.getTypedField(21, 0);
652 		return retVal;
653     }
654 
655 
656 
657     /**
658      * Returns
659      * PV2-22: "Visit Protection Indicator" - creates it if necessary
660      */
661     public ID getVisitProtectionIndicator() { 
662 		ID retVal = this.getTypedField(22, 0);
663 		return retVal;
664     }
665     
666     /**
667      * Returns
668      * PV2-22: "Visit Protection Indicator" - creates it if necessary
669      */
670     public ID getPv222_VisitProtectionIndicator() { 
671 		ID retVal = this.getTypedField(22, 0);
672 		return retVal;
673     }
674 
675 
676     /**
677      * Returns all repetitions of Clinic Organization Name (PV2-23).
678      */
679     public XON[] getClinicOrganizationName() {
680     	XON[] retVal = this.getTypedField(23, new XON[0]);
681     	return retVal;
682     }
683 
684 
685     /**
686      * Returns all repetitions of Clinic Organization Name (PV2-23).
687      */
688     public XON[] getPv223_ClinicOrganizationName() {
689     	XON[] retVal = this.getTypedField(23, new XON[0]);
690     	return retVal;
691     }
692 
693 
694     /**
695      * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23).
696      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
697      * it will return zero.
698      */
699     public int getClinicOrganizationNameReps() {
700     	return this.getReps(23);
701     }
702 
703 
704     /**
705      * Returns a specific repetition of
706      * PV2-23: "Clinic Organization Name" - creates it if necessary
707      *
708      * @param rep The repetition index (0-indexed)
709      */
710     public XON getClinicOrganizationName(int rep) { 
711 		XON retVal = this.getTypedField(23, rep);
712 		return retVal;
713     }
714 
715     /**
716      * Returns a specific repetition of
717      * PV2-23: "Clinic Organization Name" - creates it if necessary
718      *
719      * @param rep The repetition index (0-indexed)
720      */
721     public XON getPv223_ClinicOrganizationName(int rep) { 
722 		XON retVal = this.getTypedField(23, rep);
723 		return retVal;
724     }
725 
726     /**
727      * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23).
728      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
729      * it will return zero.
730      */
731     public int getPv223_ClinicOrganizationNameReps() {
732     	return this.getReps(23);
733     }
734 
735 
736     /**
737      * Inserts a repetition of
738      * PV2-23: "Clinic Organization Name" at a specific index
739      *
740      * @param rep The repetition index (0-indexed)
741      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
742      */
743     public XON insertClinicOrganizationName(int rep) throws HL7Exception { 
744         return (XON) super.insertRepetition(23, rep);
745     }
746 
747 
748     /**
749      * Inserts a repetition of
750      * PV2-23: "Clinic Organization Name" at a specific index
751      *
752      * @param rep The repetition index (0-indexed)
753      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
754      */
755     public XON insertPv223_ClinicOrganizationName(int rep) throws HL7Exception { 
756         return (XON) super.insertRepetition(23, rep);
757     }
758 
759 
760     /**
761      * Removes a repetition of
762      * PV2-23: "Clinic Organization Name" at a specific index
763      *
764      * @param rep The repetition index (0-indexed)
765      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
766      */
767     public XON removeClinicOrganizationName(int rep) throws HL7Exception { 
768         return (XON) super.removeRepetition(23, rep);
769     }
770 
771 
772     /**
773      * Removes a repetition of
774      * PV2-23: "Clinic Organization Name" at a specific index
775      *
776      * @param rep The repetition index (0-indexed)
777      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
778      */
779     public XON removePv223_ClinicOrganizationName(int rep) throws HL7Exception { 
780         return (XON) super.removeRepetition(23, rep);
781     }
782 
783 
784 
785 
786     /**
787      * Returns
788      * PV2-24: "Patient Status Code" - creates it if necessary
789      */
790     public IS getPatientStatusCode() { 
791 		IS retVal = this.getTypedField(24, 0);
792 		return retVal;
793     }
794     
795     /**
796      * Returns
797      * PV2-24: "Patient Status Code" - creates it if necessary
798      */
799     public IS getPv224_PatientStatusCode() { 
800 		IS retVal = this.getTypedField(24, 0);
801 		return retVal;
802     }
803 
804 
805 
806     /**
807      * Returns
808      * PV2-25: "Visit Priority Code" - creates it if necessary
809      */
810     public IS getVisitPriorityCode() { 
811 		IS retVal = this.getTypedField(25, 0);
812 		return retVal;
813     }
814     
815     /**
816      * Returns
817      * PV2-25: "Visit Priority Code" - creates it if necessary
818      */
819     public IS getPv225_VisitPriorityCode() { 
820 		IS retVal = this.getTypedField(25, 0);
821 		return retVal;
822     }
823 
824 
825 
826     /**
827      * Returns
828      * PV2-26: "Previous Treatment Date" - creates it if necessary
829      */
830     public DT getPreviousTreatmentDate() { 
831 		DT retVal = this.getTypedField(26, 0);
832 		return retVal;
833     }
834     
835     /**
836      * Returns
837      * PV2-26: "Previous Treatment Date" - creates it if necessary
838      */
839     public DT getPv226_PreviousTreatmentDate() { 
840 		DT retVal = this.getTypedField(26, 0);
841 		return retVal;
842     }
843 
844 
845 
846     /**
847      * Returns
848      * PV2-27: "Expected Discharge Disposition" - creates it if necessary
849      */
850     public IS getExpectedDischargeDisposition() { 
851 		IS retVal = this.getTypedField(27, 0);
852 		return retVal;
853     }
854     
855     /**
856      * Returns
857      * PV2-27: "Expected Discharge Disposition" - creates it if necessary
858      */
859     public IS getPv227_ExpectedDischargeDisposition() { 
860 		IS retVal = this.getTypedField(27, 0);
861 		return retVal;
862     }
863 
864 
865 
866     /**
867      * Returns
868      * PV2-28: "Signature on File Date" - creates it if necessary
869      */
870     public DT getSignatureOnFileDate() { 
871 		DT retVal = this.getTypedField(28, 0);
872 		return retVal;
873     }
874     
875     /**
876      * Returns
877      * PV2-28: "Signature on File Date" - creates it if necessary
878      */
879     public DT getPv228_SignatureOnFileDate() { 
880 		DT retVal = this.getTypedField(28, 0);
881 		return retVal;
882     }
883 
884 
885 
886     /**
887      * Returns
888      * PV2-29: "First Similar Illness Date" - creates it if necessary
889      */
890     public DT getFirstSimilarIllnessDate() { 
891 		DT retVal = this.getTypedField(29, 0);
892 		return retVal;
893     }
894     
895     /**
896      * Returns
897      * PV2-29: "First Similar Illness Date" - creates it if necessary
898      */
899     public DT getPv229_FirstSimilarIllnessDate() { 
900 		DT retVal = this.getTypedField(29, 0);
901 		return retVal;
902     }
903 
904 
905 
906     /**
907      * Returns
908      * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary
909      */
910     public IS getPatientChargeAdjustmentCode() { 
911 		IS retVal = this.getTypedField(30, 0);
912 		return retVal;
913     }
914     
915     /**
916      * Returns
917      * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary
918      */
919     public IS getPv230_PatientChargeAdjustmentCode() { 
920 		IS retVal = this.getTypedField(30, 0);
921 		return retVal;
922     }
923 
924 
925 
926     /**
927      * Returns
928      * PV2-31: "Recurring Service Code" - creates it if necessary
929      */
930     public IS getRecurringServiceCode() { 
931 		IS retVal = this.getTypedField(31, 0);
932 		return retVal;
933     }
934     
935     /**
936      * Returns
937      * PV2-31: "Recurring Service Code" - creates it if necessary
938      */
939     public IS getPv231_RecurringServiceCode() { 
940 		IS retVal = this.getTypedField(31, 0);
941 		return retVal;
942     }
943 
944 
945 
946     /**
947      * Returns
948      * PV2-32: "Billing Media Code" - creates it if necessary
949      */
950     public ID getBillingMediaCode() { 
951 		ID retVal = this.getTypedField(32, 0);
952 		return retVal;
953     }
954     
955     /**
956      * Returns
957      * PV2-32: "Billing Media Code" - creates it if necessary
958      */
959     public ID getPv232_BillingMediaCode() { 
960 		ID retVal = this.getTypedField(32, 0);
961 		return retVal;
962     }
963 
964 
965 
966     /**
967      * Returns
968      * PV2-33: "Expected Surgery Date & Time" - creates it if necessary
969      */
970     public TS getExpectedSurgeryDateTime() { 
971 		TS retVal = this.getTypedField(33, 0);
972 		return retVal;
973     }
974     
975     /**
976      * Returns
977      * PV2-33: "Expected Surgery Date & Time" - creates it if necessary
978      */
979     public TS getPv233_ExpectedSurgeryDateTime() { 
980 		TS retVal = this.getTypedField(33, 0);
981 		return retVal;
982     }
983 
984 
985 
986     /**
987      * Returns
988      * PV2-34: "Military Partnership Code" - creates it if necessary
989      */
990     public ID getMilitaryPartnershipCode() { 
991 		ID retVal = this.getTypedField(34, 0);
992 		return retVal;
993     }
994     
995     /**
996      * Returns
997      * PV2-34: "Military Partnership Code" - creates it if necessary
998      */
999     public ID getPv234_MilitaryPartnershipCode() { 
1000 		ID retVal = this.getTypedField(34, 0);
1001 		return retVal;
1002     }
1003 
1004 
1005 
1006     /**
1007      * Returns
1008      * PV2-35: "Military Non-Availabiltiy Code" - creates it if necessary
1009      */
1010     public ID getMilitaryNonAvailabiltiyCode() { 
1011 		ID retVal = this.getTypedField(35, 0);
1012 		return retVal;
1013     }
1014     
1015     /**
1016      * Returns
1017      * PV2-35: "Military Non-Availabiltiy Code" - creates it if necessary
1018      */
1019     public ID getPv235_MilitaryNonAvailabiltiyCode() { 
1020 		ID retVal = this.getTypedField(35, 0);
1021 		return retVal;
1022     }
1023 
1024 
1025 
1026     /**
1027      * Returns
1028      * PV2-36: "Newborn Baby Indicator" - creates it if necessary
1029      */
1030     public ID getNewbornBabyIndicator() { 
1031 		ID retVal = this.getTypedField(36, 0);
1032 		return retVal;
1033     }
1034     
1035     /**
1036      * Returns
1037      * PV2-36: "Newborn Baby Indicator" - creates it if necessary
1038      */
1039     public ID getPv236_NewbornBabyIndicator() { 
1040 		ID retVal = this.getTypedField(36, 0);
1041 		return retVal;
1042     }
1043 
1044 
1045 
1046     /**
1047      * Returns
1048      * PV2-37: "Baby Detained Indicator" - creates it if necessary
1049      */
1050     public ID getBabyDetainedIndicator() { 
1051 		ID retVal = this.getTypedField(37, 0);
1052 		return retVal;
1053     }
1054     
1055     /**
1056      * Returns
1057      * PV2-37: "Baby Detained Indicator" - creates it if necessary
1058      */
1059     public ID getPv237_BabyDetainedIndicator() { 
1060 		ID retVal = this.getTypedField(37, 0);
1061 		return retVal;
1062     }
1063 
1064 
1065 
1066 
1067 
1068     /** {@inheritDoc} */   
1069     protected Type createNewTypeWithoutReflection(int field) {
1070        switch (field) {
1071           case 0: return new PL(getMessage());
1072           case 1: return new CE(getMessage());
1073           case 2: return new CE(getMessage());
1074           case 3: return new CE(getMessage());
1075           case 4: return new ST(getMessage());
1076           case 5: return new ST(getMessage());
1077           case 6: return new IS(getMessage(), new Integer( 130 ));
1078           case 7: return new TS(getMessage());
1079           case 8: return new TS(getMessage());
1080           case 9: return new NM(getMessage());
1081           case 10: return new NM(getMessage());
1082           case 11: return new ST(getMessage());
1083           case 12: return new XCN(getMessage());
1084           case 13: return new DT(getMessage());
1085           case 14: return new ID(getMessage(), new Integer( 136 ));
1086           case 15: return new IS(getMessage(), new Integer( 213 ));
1087           case 16: return new DT(getMessage());
1088           case 17: return new IS(getMessage(), new Integer( 214 ));
1089           case 18: return new ID(getMessage(), new Integer( 136 ));
1090           case 19: return new NM(getMessage());
1091           case 20: return new IS(getMessage(), new Integer( 215 ));
1092           case 21: return new ID(getMessage(), new Integer( 136 ));
1093           case 22: return new XON(getMessage());
1094           case 23: return new IS(getMessage(), new Integer( 216 ));
1095           case 24: return new IS(getMessage(), new Integer( 217 ));
1096           case 25: return new DT(getMessage());
1097           case 26: return new IS(getMessage(), new Integer( 112 ));
1098           case 27: return new DT(getMessage());
1099           case 28: return new DT(getMessage());
1100           case 29: return new IS(getMessage(), new Integer( 218 ));
1101           case 30: return new IS(getMessage(), new Integer( 219 ));
1102           case 31: return new ID(getMessage(), new Integer( 136 ));
1103           case 32: return new TS(getMessage());
1104           case 33: return new ID(getMessage(), new Integer( 136 ));
1105           case 34: return new ID(getMessage(), new Integer( 136 ));
1106           case 35: return new ID(getMessage(), new Integer( 136 ));
1107           case 36: return new ID(getMessage(), new Integer( 136 ));
1108           default: return null;
1109        }
1110    }
1111 
1112 
1113 }
1114