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.v231.segment;
35  
36  // import ca.uhn.hl7v2.model.v231.group.*;
37  import ca.uhn.hl7v2.model.v231.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 (PV2 - patient visit - additional information segment). 
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/Time (TS) <b>optional </b>
60       * <li>PV2-9: Expected Discharge Date/Time (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 repeating</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 (CE) <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-Availability 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, 80, 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, 26, new Object[]{ getMessage() }, "Expected Admit Date/Time");
112                                   this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Discharge Date/Time");
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, 0, 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(CE.class, false, 1, 80, new Object[]{ getMessage() }, "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, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Partnership Code");
138                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Non-Availability 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/Time" - creates it if necessary
380      */
381     public TS getExpectedAdmitDateTime() { 
382 		TS retVal = this.getTypedField(8, 0);
383 		return retVal;
384     }
385     
386     /**
387      * Returns
388      * PV2-8: "Expected Admit Date/Time" - creates it if necessary
389      */
390     public TS getPv28_ExpectedAdmitDateTime() { 
391 		TS retVal = this.getTypedField(8, 0);
392 		return retVal;
393     }
394 
395 
396 
397     /**
398      * Returns
399      * PV2-9: "Expected Discharge Date/Time" - creates it if necessary
400      */
401     public TS getExpectedDischargeDateTime() { 
402 		TS retVal = this.getTypedField(9, 0);
403 		return retVal;
404     }
405     
406     /**
407      * Returns
408      * PV2-9: "Expected Discharge Date/Time" - creates it if necessary
409      */
410     public TS getPv29_ExpectedDischargeDateTime() { 
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      * Returns all repetitions of Referral Source Code (PV2-13).
478      */
479     public XCN[] getReferralSourceCode() {
480     	XCN[] retVal = this.getTypedField(13, new XCN[0]);
481     	return retVal;
482     }
483 
484 
485     /**
486      * Returns all repetitions of Referral Source Code (PV2-13).
487      */
488     public XCN[] getPv213_ReferralSourceCode() {
489     	XCN[] retVal = this.getTypedField(13, new XCN[0]);
490     	return retVal;
491     }
492 
493 
494     /**
495      * Returns a count of the current number of repetitions of Referral Source Code (PV2-13).
496      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
497      * it will return zero.
498      */
499     public int getReferralSourceCodeReps() {
500     	return this.getReps(13);
501     }
502 
503 
504     /**
505      * Returns a specific repetition of
506      * PV2-13: "Referral Source Code" - creates it if necessary
507      *
508      * @param rep The repetition index (0-indexed)
509      */
510     public XCN getReferralSourceCode(int rep) { 
511 		XCN retVal = this.getTypedField(13, rep);
512 		return retVal;
513     }
514 
515     /**
516      * Returns a specific repetition of
517      * PV2-13: "Referral Source Code" - creates it if necessary
518      *
519      * @param rep The repetition index (0-indexed)
520      */
521     public XCN getPv213_ReferralSourceCode(int rep) { 
522 		XCN retVal = this.getTypedField(13, rep);
523 		return retVal;
524     }
525 
526     /**
527      * Returns a count of the current number of repetitions of Referral Source Code (PV2-13).
528      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
529      * it will return zero.
530      */
531     public int getPv213_ReferralSourceCodeReps() {
532     	return this.getReps(13);
533     }
534 
535 
536     /**
537      * Inserts a repetition of
538      * PV2-13: "Referral Source Code" at a specific index
539      *
540      * @param rep The repetition index (0-indexed)
541      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
542      */
543     public XCN insertReferralSourceCode(int rep) throws HL7Exception { 
544         return (XCN) super.insertRepetition(13, rep);
545     }
546 
547 
548     /**
549      * Inserts a repetition of
550      * PV2-13: "Referral Source Code" at a specific index
551      *
552      * @param rep The repetition index (0-indexed)
553      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
554      */
555     public XCN insertPv213_ReferralSourceCode(int rep) throws HL7Exception { 
556         return (XCN) super.insertRepetition(13, rep);
557     }
558 
559 
560     /**
561      * Removes a repetition of
562      * PV2-13: "Referral Source Code" at a specific index
563      *
564      * @param rep The repetition index (0-indexed)
565      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
566      */
567     public XCN removeReferralSourceCode(int rep) throws HL7Exception { 
568         return (XCN) super.removeRepetition(13, rep);
569     }
570 
571 
572     /**
573      * Removes a repetition of
574      * PV2-13: "Referral Source Code" at a specific index
575      *
576      * @param rep The repetition index (0-indexed)
577      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
578      */
579     public XCN removePv213_ReferralSourceCode(int rep) throws HL7Exception { 
580         return (XCN) super.removeRepetition(13, rep);
581     }
582 
583 
584 
585 
586     /**
587      * Returns
588      * PV2-14: "Previous Service Date" - creates it if necessary
589      */
590     public DT getPreviousServiceDate() { 
591 		DT retVal = this.getTypedField(14, 0);
592 		return retVal;
593     }
594     
595     /**
596      * Returns
597      * PV2-14: "Previous Service Date" - creates it if necessary
598      */
599     public DT getPv214_PreviousServiceDate() { 
600 		DT retVal = this.getTypedField(14, 0);
601 		return retVal;
602     }
603 
604 
605 
606     /**
607      * Returns
608      * PV2-15: "Employment Illness Related Indicator" - creates it if necessary
609      */
610     public ID getEmploymentIllnessRelatedIndicator() { 
611 		ID retVal = this.getTypedField(15, 0);
612 		return retVal;
613     }
614     
615     /**
616      * Returns
617      * PV2-15: "Employment Illness Related Indicator" - creates it if necessary
618      */
619     public ID getPv215_EmploymentIllnessRelatedIndicator() { 
620 		ID retVal = this.getTypedField(15, 0);
621 		return retVal;
622     }
623 
624 
625 
626     /**
627      * Returns
628      * PV2-16: "Purge Status Code" - creates it if necessary
629      */
630     public IS getPurgeStatusCode() { 
631 		IS retVal = this.getTypedField(16, 0);
632 		return retVal;
633     }
634     
635     /**
636      * Returns
637      * PV2-16: "Purge Status Code" - creates it if necessary
638      */
639     public IS getPv216_PurgeStatusCode() { 
640 		IS retVal = this.getTypedField(16, 0);
641 		return retVal;
642     }
643 
644 
645 
646     /**
647      * Returns
648      * PV2-17: "Purge Status Date" - creates it if necessary
649      */
650     public DT getPurgeStatusDate() { 
651 		DT retVal = this.getTypedField(17, 0);
652 		return retVal;
653     }
654     
655     /**
656      * Returns
657      * PV2-17: "Purge Status Date" - creates it if necessary
658      */
659     public DT getPv217_PurgeStatusDate() { 
660 		DT retVal = this.getTypedField(17, 0);
661 		return retVal;
662     }
663 
664 
665 
666     /**
667      * Returns
668      * PV2-18: "Special Program Code" - creates it if necessary
669      */
670     public IS getSpecialProgramCode() { 
671 		IS retVal = this.getTypedField(18, 0);
672 		return retVal;
673     }
674     
675     /**
676      * Returns
677      * PV2-18: "Special Program Code" - creates it if necessary
678      */
679     public IS getPv218_SpecialProgramCode() { 
680 		IS retVal = this.getTypedField(18, 0);
681 		return retVal;
682     }
683 
684 
685 
686     /**
687      * Returns
688      * PV2-19: "Retention Indicator" - creates it if necessary
689      */
690     public ID getRetentionIndicator() { 
691 		ID retVal = this.getTypedField(19, 0);
692 		return retVal;
693     }
694     
695     /**
696      * Returns
697      * PV2-19: "Retention Indicator" - creates it if necessary
698      */
699     public ID getPv219_RetentionIndicator() { 
700 		ID retVal = this.getTypedField(19, 0);
701 		return retVal;
702     }
703 
704 
705 
706     /**
707      * Returns
708      * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary
709      */
710     public NM getExpectedNumberOfInsurancePlans() { 
711 		NM retVal = this.getTypedField(20, 0);
712 		return retVal;
713     }
714     
715     /**
716      * Returns
717      * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary
718      */
719     public NM getPv220_ExpectedNumberOfInsurancePlans() { 
720 		NM retVal = this.getTypedField(20, 0);
721 		return retVal;
722     }
723 
724 
725 
726     /**
727      * Returns
728      * PV2-21: "Visit Publicity Code" - creates it if necessary
729      */
730     public IS getVisitPublicityCode() { 
731 		IS retVal = this.getTypedField(21, 0);
732 		return retVal;
733     }
734     
735     /**
736      * Returns
737      * PV2-21: "Visit Publicity Code" - creates it if necessary
738      */
739     public IS getPv221_VisitPublicityCode() { 
740 		IS retVal = this.getTypedField(21, 0);
741 		return retVal;
742     }
743 
744 
745 
746     /**
747      * Returns
748      * PV2-22: "Visit Protection Indicator" - creates it if necessary
749      */
750     public ID getVisitProtectionIndicator() { 
751 		ID retVal = this.getTypedField(22, 0);
752 		return retVal;
753     }
754     
755     /**
756      * Returns
757      * PV2-22: "Visit Protection Indicator" - creates it if necessary
758      */
759     public ID getPv222_VisitProtectionIndicator() { 
760 		ID retVal = this.getTypedField(22, 0);
761 		return retVal;
762     }
763 
764 
765     /**
766      * Returns all repetitions of Clinic Organization Name (PV2-23).
767      */
768     public XON[] getClinicOrganizationName() {
769     	XON[] retVal = this.getTypedField(23, new XON[0]);
770     	return retVal;
771     }
772 
773 
774     /**
775      * Returns all repetitions of Clinic Organization Name (PV2-23).
776      */
777     public XON[] getPv223_ClinicOrganizationName() {
778     	XON[] retVal = this.getTypedField(23, new XON[0]);
779     	return retVal;
780     }
781 
782 
783     /**
784      * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23).
785      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
786      * it will return zero.
787      */
788     public int getClinicOrganizationNameReps() {
789     	return this.getReps(23);
790     }
791 
792 
793     /**
794      * Returns a specific repetition of
795      * PV2-23: "Clinic Organization Name" - creates it if necessary
796      *
797      * @param rep The repetition index (0-indexed)
798      */
799     public XON getClinicOrganizationName(int rep) { 
800 		XON retVal = this.getTypedField(23, rep);
801 		return retVal;
802     }
803 
804     /**
805      * Returns a specific repetition of
806      * PV2-23: "Clinic Organization Name" - creates it if necessary
807      *
808      * @param rep The repetition index (0-indexed)
809      */
810     public XON getPv223_ClinicOrganizationName(int rep) { 
811 		XON retVal = this.getTypedField(23, rep);
812 		return retVal;
813     }
814 
815     /**
816      * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23).
817      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
818      * it will return zero.
819      */
820     public int getPv223_ClinicOrganizationNameReps() {
821     	return this.getReps(23);
822     }
823 
824 
825     /**
826      * Inserts a repetition of
827      * PV2-23: "Clinic Organization Name" at a specific index
828      *
829      * @param rep The repetition index (0-indexed)
830      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
831      */
832     public XON insertClinicOrganizationName(int rep) throws HL7Exception { 
833         return (XON) super.insertRepetition(23, rep);
834     }
835 
836 
837     /**
838      * Inserts a repetition of
839      * PV2-23: "Clinic Organization Name" at a specific index
840      *
841      * @param rep The repetition index (0-indexed)
842      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
843      */
844     public XON insertPv223_ClinicOrganizationName(int rep) throws HL7Exception { 
845         return (XON) super.insertRepetition(23, rep);
846     }
847 
848 
849     /**
850      * Removes a repetition of
851      * PV2-23: "Clinic Organization Name" at a specific index
852      *
853      * @param rep The repetition index (0-indexed)
854      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
855      */
856     public XON removeClinicOrganizationName(int rep) throws HL7Exception { 
857         return (XON) super.removeRepetition(23, rep);
858     }
859 
860 
861     /**
862      * Removes a repetition of
863      * PV2-23: "Clinic Organization Name" at a specific index
864      *
865      * @param rep The repetition index (0-indexed)
866      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
867      */
868     public XON removePv223_ClinicOrganizationName(int rep) throws HL7Exception { 
869         return (XON) super.removeRepetition(23, rep);
870     }
871 
872 
873 
874 
875     /**
876      * Returns
877      * PV2-24: "Patient Status Code" - creates it if necessary
878      */
879     public IS getPatientStatusCode() { 
880 		IS retVal = this.getTypedField(24, 0);
881 		return retVal;
882     }
883     
884     /**
885      * Returns
886      * PV2-24: "Patient Status Code" - creates it if necessary
887      */
888     public IS getPv224_PatientStatusCode() { 
889 		IS retVal = this.getTypedField(24, 0);
890 		return retVal;
891     }
892 
893 
894 
895     /**
896      * Returns
897      * PV2-25: "Visit Priority Code" - creates it if necessary
898      */
899     public IS getVisitPriorityCode() { 
900 		IS retVal = this.getTypedField(25, 0);
901 		return retVal;
902     }
903     
904     /**
905      * Returns
906      * PV2-25: "Visit Priority Code" - creates it if necessary
907      */
908     public IS getPv225_VisitPriorityCode() { 
909 		IS retVal = this.getTypedField(25, 0);
910 		return retVal;
911     }
912 
913 
914 
915     /**
916      * Returns
917      * PV2-26: "Previous Treatment Date" - creates it if necessary
918      */
919     public DT getPreviousTreatmentDate() { 
920 		DT retVal = this.getTypedField(26, 0);
921 		return retVal;
922     }
923     
924     /**
925      * Returns
926      * PV2-26: "Previous Treatment Date" - creates it if necessary
927      */
928     public DT getPv226_PreviousTreatmentDate() { 
929 		DT retVal = this.getTypedField(26, 0);
930 		return retVal;
931     }
932 
933 
934 
935     /**
936      * Returns
937      * PV2-27: "Expected Discharge Disposition" - creates it if necessary
938      */
939     public IS getExpectedDischargeDisposition() { 
940 		IS retVal = this.getTypedField(27, 0);
941 		return retVal;
942     }
943     
944     /**
945      * Returns
946      * PV2-27: "Expected Discharge Disposition" - creates it if necessary
947      */
948     public IS getPv227_ExpectedDischargeDisposition() { 
949 		IS retVal = this.getTypedField(27, 0);
950 		return retVal;
951     }
952 
953 
954 
955     /**
956      * Returns
957      * PV2-28: "Signature on File Date" - creates it if necessary
958      */
959     public DT getSignatureOnFileDate() { 
960 		DT retVal = this.getTypedField(28, 0);
961 		return retVal;
962     }
963     
964     /**
965      * Returns
966      * PV2-28: "Signature on File Date" - creates it if necessary
967      */
968     public DT getPv228_SignatureOnFileDate() { 
969 		DT retVal = this.getTypedField(28, 0);
970 		return retVal;
971     }
972 
973 
974 
975     /**
976      * Returns
977      * PV2-29: "First Similar Illness Date" - creates it if necessary
978      */
979     public DT getFirstSimilarIllnessDate() { 
980 		DT retVal = this.getTypedField(29, 0);
981 		return retVal;
982     }
983     
984     /**
985      * Returns
986      * PV2-29: "First Similar Illness Date" - creates it if necessary
987      */
988     public DT getPv229_FirstSimilarIllnessDate() { 
989 		DT retVal = this.getTypedField(29, 0);
990 		return retVal;
991     }
992 
993 
994 
995     /**
996      * Returns
997      * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary
998      */
999     public CE getPatientChargeAdjustmentCode() { 
1000 		CE retVal = this.getTypedField(30, 0);
1001 		return retVal;
1002     }
1003     
1004     /**
1005      * Returns
1006      * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary
1007      */
1008     public CE getPv230_PatientChargeAdjustmentCode() { 
1009 		CE retVal = this.getTypedField(30, 0);
1010 		return retVal;
1011     }
1012 
1013 
1014 
1015     /**
1016      * Returns
1017      * PV2-31: "Recurring Service Code" - creates it if necessary
1018      */
1019     public IS getRecurringServiceCode() { 
1020 		IS retVal = this.getTypedField(31, 0);
1021 		return retVal;
1022     }
1023     
1024     /**
1025      * Returns
1026      * PV2-31: "Recurring Service Code" - creates it if necessary
1027      */
1028     public IS getPv231_RecurringServiceCode() { 
1029 		IS retVal = this.getTypedField(31, 0);
1030 		return retVal;
1031     }
1032 
1033 
1034 
1035     /**
1036      * Returns
1037      * PV2-32: "Billing Media Code" - creates it if necessary
1038      */
1039     public ID getBillingMediaCode() { 
1040 		ID retVal = this.getTypedField(32, 0);
1041 		return retVal;
1042     }
1043     
1044     /**
1045      * Returns
1046      * PV2-32: "Billing Media Code" - creates it if necessary
1047      */
1048     public ID getPv232_BillingMediaCode() { 
1049 		ID retVal = this.getTypedField(32, 0);
1050 		return retVal;
1051     }
1052 
1053 
1054 
1055     /**
1056      * Returns
1057      * PV2-33: "Expected Surgery Date & Time" - creates it if necessary
1058      */
1059     public TS getExpectedSurgeryDateTime() { 
1060 		TS retVal = this.getTypedField(33, 0);
1061 		return retVal;
1062     }
1063     
1064     /**
1065      * Returns
1066      * PV2-33: "Expected Surgery Date & Time" - creates it if necessary
1067      */
1068     public TS getPv233_ExpectedSurgeryDateTime() { 
1069 		TS retVal = this.getTypedField(33, 0);
1070 		return retVal;
1071     }
1072 
1073 
1074 
1075     /**
1076      * Returns
1077      * PV2-34: "Military Partnership Code" - creates it if necessary
1078      */
1079     public ID getMilitaryPartnershipCode() { 
1080 		ID retVal = this.getTypedField(34, 0);
1081 		return retVal;
1082     }
1083     
1084     /**
1085      * Returns
1086      * PV2-34: "Military Partnership Code" - creates it if necessary
1087      */
1088     public ID getPv234_MilitaryPartnershipCode() { 
1089 		ID retVal = this.getTypedField(34, 0);
1090 		return retVal;
1091     }
1092 
1093 
1094 
1095     /**
1096      * Returns
1097      * PV2-35: "Military Non-Availability Code" - creates it if necessary
1098      */
1099     public ID getMilitaryNonAvailabilityCode() { 
1100 		ID retVal = this.getTypedField(35, 0);
1101 		return retVal;
1102     }
1103     
1104     /**
1105      * Returns
1106      * PV2-35: "Military Non-Availability Code" - creates it if necessary
1107      */
1108     public ID getPv235_MilitaryNonAvailabilityCode() { 
1109 		ID retVal = this.getTypedField(35, 0);
1110 		return retVal;
1111     }
1112 
1113 
1114 
1115     /**
1116      * Returns
1117      * PV2-36: "Newborn Baby Indicator" - creates it if necessary
1118      */
1119     public ID getNewbornBabyIndicator() { 
1120 		ID retVal = this.getTypedField(36, 0);
1121 		return retVal;
1122     }
1123     
1124     /**
1125      * Returns
1126      * PV2-36: "Newborn Baby Indicator" - creates it if necessary
1127      */
1128     public ID getPv236_NewbornBabyIndicator() { 
1129 		ID retVal = this.getTypedField(36, 0);
1130 		return retVal;
1131     }
1132 
1133 
1134 
1135     /**
1136      * Returns
1137      * PV2-37: "Baby Detained Indicator" - creates it if necessary
1138      */
1139     public ID getBabyDetainedIndicator() { 
1140 		ID retVal = this.getTypedField(37, 0);
1141 		return retVal;
1142     }
1143     
1144     /**
1145      * Returns
1146      * PV2-37: "Baby Detained Indicator" - creates it if necessary
1147      */
1148     public ID getPv237_BabyDetainedIndicator() { 
1149 		ID retVal = this.getTypedField(37, 0);
1150 		return retVal;
1151     }
1152 
1153 
1154 
1155 
1156 
1157     /** {@inheritDoc} */   
1158     protected Type createNewTypeWithoutReflection(int field) {
1159        switch (field) {
1160           case 0: return new PL(getMessage());
1161           case 1: return new CE(getMessage());
1162           case 2: return new CE(getMessage());
1163           case 3: return new CE(getMessage());
1164           case 4: return new ST(getMessage());
1165           case 5: return new ST(getMessage());
1166           case 6: return new IS(getMessage(), new Integer( 130 ));
1167           case 7: return new TS(getMessage());
1168           case 8: return new TS(getMessage());
1169           case 9: return new NM(getMessage());
1170           case 10: return new NM(getMessage());
1171           case 11: return new ST(getMessage());
1172           case 12: return new XCN(getMessage());
1173           case 13: return new DT(getMessage());
1174           case 14: return new ID(getMessage(), new Integer( 136 ));
1175           case 15: return new IS(getMessage(), new Integer( 213 ));
1176           case 16: return new DT(getMessage());
1177           case 17: return new IS(getMessage(), new Integer( 214 ));
1178           case 18: return new ID(getMessage(), new Integer( 136 ));
1179           case 19: return new NM(getMessage());
1180           case 20: return new IS(getMessage(), new Integer( 215 ));
1181           case 21: return new ID(getMessage(), new Integer( 136 ));
1182           case 22: return new XON(getMessage());
1183           case 23: return new IS(getMessage(), new Integer( 216 ));
1184           case 24: return new IS(getMessage(), new Integer( 217 ));
1185           case 25: return new DT(getMessage());
1186           case 26: return new IS(getMessage(), new Integer( 112 ));
1187           case 27: return new DT(getMessage());
1188           case 28: return new DT(getMessage());
1189           case 29: return new CE(getMessage());
1190           case 30: return new IS(getMessage(), new Integer( 219 ));
1191           case 31: return new ID(getMessage(), new Integer( 136 ));
1192           case 32: return new TS(getMessage());
1193           case 33: return new ID(getMessage(), new Integer( 136 ));
1194           case 34: return new ID(getMessage(), new Integer( 136 ));
1195           case 35: return new ID(getMessage(), new Integer( 136 ));
1196           case 36: return new ID(getMessage(), new Integer( 136 ));
1197           default: return null;
1198        }
1199    }
1200 
1201 
1202 }
1203