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.v24.segment;
35  
36  // import ca.uhn.hl7v2.model.v24.group.*;
37  import ca.uhn.hl7v2.model.v24.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 repeating</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 and 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       * <li>PV2-38: Mode of Arrival Code (CE) <b>optional </b>
90       * <li>PV2-39: Recreational Drug Use Code (CE) <b>optional repeating</b>
91       * <li>PV2-40: Admission Level of Care Code (CE) <b>optional </b>
92       * <li>PV2-41: Precaution Code (CE) <b>optional repeating</b>
93       * <li>PV2-42: Patient Condition Code (CE) <b>optional </b>
94       * <li>PV2-43: Living Will Code (IS) <b>optional </b>
95       * <li>PV2-44: Organ Donor Code (IS) <b>optional </b>
96       * <li>PV2-45: Advance Directive Code (CE) <b>optional repeating</b>
97       * <li>PV2-46: Patient Status Effective Date (DT) <b>optional </b>
98       * <li>PV2-47: Expected LOA Return Date/Time (TS) <b>optional </b>
99   * </ul>
100  */
101 @SuppressWarnings("unused")
102 public class PV2 extends AbstractSegment {
103 
104     /** 
105      * Creates a new PV2 segment
106      */
107     public PV2(Group parent, ModelClassFactory factory) {
108        super(parent, factory);
109        init(factory);
110     }
111 
112     private void init(ModelClassFactory factory) {
113        try {
114                                   this.add(PL.class, false, 1, 80, new Object[]{ getMessage() }, "Prior Pending Location");
115                                   this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Accommodation Code");
116                                   this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Admit Reason");
117                                   this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Transfer Reason");
118                                   this.add(ST.class, false, 0, 25, new Object[]{ getMessage() }, "Patient Valuables");
119                                   this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Patient Valuables Location");
120                                               this.add(IS.class, false, 0, 2, new Object[]{ getMessage(), new Integer(130) }, "Visit User Code");
121                                   this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Admit Date/Time");
122                                   this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Discharge Date/Time");
123                                   this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Estimated Length of Inpatient Stay");
124                                   this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Actual Length of Inpatient Stay");
125                                   this.add(ST.class, false, 1, 50, new Object[]{ getMessage() }, "Visit Description");
126                                   this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Referral Source Code");
127                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Service Date");
128                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Employment Illness Related Indicator");
129                                               this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(213) }, "Purge Status Code");
130                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Purge Status Date");
131                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(214) }, "Special Program Code");
132                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Retention Indicator");
133                                   this.add(NM.class, false, 1, 1, new Object[]{ getMessage() }, "Expected Number of Insurance Plans");
134                                               this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(215) }, "Visit Publicity Code");
135                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Visit Protection Indicator");
136                                   this.add(XON.class, false, 0, 250, new Object[]{ getMessage() }, "Clinic Organization Name");
137                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(216) }, "Patient Status Code");
138                                               this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(217) }, "Visit Priority Code");
139                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Treatment Date");
140                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(112) }, "Expected Discharge Disposition");
141                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Signature on File Date");
142                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "First Similar Illness Date");
143                                   this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Patient Charge Adjustment Code");
144                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(219) }, "Recurring Service Code");
145                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Billing Media Code");
146                                   this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Surgery Date and Time");
147                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Partnership Code");
148                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Non-Availability Code");
149                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Newborn Baby Indicator");
150                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Baby Detained Indicator");
151                                   this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Mode of Arrival Code");
152                                   this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Recreational Drug Use Code");
153                                   this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Admission Level of Care Code");
154                                   this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Precaution Code");
155                                   this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Patient Condition Code");
156                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(315) }, "Living Will Code");
157                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(316) }, "Organ Donor Code");
158                                   this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Advance Directive Code");
159                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Patient Status Effective Date");
160                                   this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected LOA Return Date/Time");
161        } catch(HL7Exception e) {
162           log.error("Unexpected error creating PV2 - this is probably a bug in the source code generator.", e);
163        }
164     }
165 
166 
167 
168     /**
169      * Returns
170      * PV2-1: "Prior Pending Location" - creates it if necessary
171      */
172     public PL getPriorPendingLocation() { 
173 		PL retVal = this.getTypedField(1, 0);
174 		return retVal;
175     }
176     
177     /**
178      * Returns
179      * PV2-1: "Prior Pending Location" - creates it if necessary
180      */
181     public PL getPv21_PriorPendingLocation() { 
182 		PL retVal = this.getTypedField(1, 0);
183 		return retVal;
184     }
185 
186 
187 
188     /**
189      * Returns
190      * PV2-2: "Accommodation Code" - creates it if necessary
191      */
192     public CE getAccommodationCode() { 
193 		CE retVal = this.getTypedField(2, 0);
194 		return retVal;
195     }
196     
197     /**
198      * Returns
199      * PV2-2: "Accommodation Code" - creates it if necessary
200      */
201     public CE getPv22_AccommodationCode() { 
202 		CE retVal = this.getTypedField(2, 0);
203 		return retVal;
204     }
205 
206 
207 
208     /**
209      * Returns
210      * PV2-3: "Admit Reason" - creates it if necessary
211      */
212     public CE getAdmitReason() { 
213 		CE retVal = this.getTypedField(3, 0);
214 		return retVal;
215     }
216     
217     /**
218      * Returns
219      * PV2-3: "Admit Reason" - creates it if necessary
220      */
221     public CE getPv23_AdmitReason() { 
222 		CE retVal = this.getTypedField(3, 0);
223 		return retVal;
224     }
225 
226 
227 
228     /**
229      * Returns
230      * PV2-4: "Transfer Reason" - creates it if necessary
231      */
232     public CE getTransferReason() { 
233 		CE retVal = this.getTypedField(4, 0);
234 		return retVal;
235     }
236     
237     /**
238      * Returns
239      * PV2-4: "Transfer Reason" - creates it if necessary
240      */
241     public CE getPv24_TransferReason() { 
242 		CE retVal = this.getTypedField(4, 0);
243 		return retVal;
244     }
245 
246 
247     /**
248      * Returns all repetitions of Patient Valuables (PV2-5).
249      */
250     public ST[] getPatientValuables() {
251     	ST[] retVal = this.getTypedField(5, new ST[0]);
252     	return retVal;
253     }
254 
255 
256     /**
257      * Returns all repetitions of Patient Valuables (PV2-5).
258      */
259     public ST[] getPv25_PatientValuables() {
260     	ST[] retVal = this.getTypedField(5, new ST[0]);
261     	return retVal;
262     }
263 
264 
265     /**
266      * Returns a count of the current number of repetitions of Patient Valuables (PV2-5).
267      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
268      * it will return zero.
269      */
270     public int getPatientValuablesReps() {
271     	return this.getReps(5);
272     }
273 
274 
275     /**
276      * Returns a specific repetition of
277      * PV2-5: "Patient Valuables" - creates it if necessary
278      *
279      * @param rep The repetition index (0-indexed)
280      */
281     public ST getPatientValuables(int rep) { 
282 		ST retVal = this.getTypedField(5, rep);
283 		return retVal;
284     }
285 
286     /**
287      * Returns a specific repetition of
288      * PV2-5: "Patient Valuables" - creates it if necessary
289      *
290      * @param rep The repetition index (0-indexed)
291      */
292     public ST getPv25_PatientValuables(int rep) { 
293 		ST retVal = this.getTypedField(5, rep);
294 		return retVal;
295     }
296 
297     /**
298      * Returns a count of the current number of repetitions of Patient Valuables (PV2-5).
299      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
300      * it will return zero.
301      */
302     public int getPv25_PatientValuablesReps() {
303     	return this.getReps(5);
304     }
305 
306 
307     /**
308      * Inserts a repetition of
309      * PV2-5: "Patient Valuables" at a specific index
310      *
311      * @param rep The repetition index (0-indexed)
312      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
313      */
314     public ST insertPatientValuables(int rep) throws HL7Exception { 
315         return (ST) super.insertRepetition(5, rep);
316     }
317 
318 
319     /**
320      * Inserts a repetition of
321      * PV2-5: "Patient Valuables" at a specific index
322      *
323      * @param rep The repetition index (0-indexed)
324      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
325      */
326     public ST insertPv25_PatientValuables(int rep) throws HL7Exception { 
327         return (ST) super.insertRepetition(5, rep);
328     }
329 
330 
331     /**
332      * Removes a repetition of
333      * PV2-5: "Patient Valuables" at a specific index
334      *
335      * @param rep The repetition index (0-indexed)
336      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
337      */
338     public ST removePatientValuables(int rep) throws HL7Exception { 
339         return (ST) super.removeRepetition(5, rep);
340     }
341 
342 
343     /**
344      * Removes a repetition of
345      * PV2-5: "Patient Valuables" at a specific index
346      *
347      * @param rep The repetition index (0-indexed)
348      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
349      */
350     public ST removePv25_PatientValuables(int rep) throws HL7Exception { 
351         return (ST) super.removeRepetition(5, rep);
352     }
353 
354 
355 
356 
357     /**
358      * Returns
359      * PV2-6: "Patient Valuables Location" - creates it if necessary
360      */
361     public ST getPatientValuablesLocation() { 
362 		ST retVal = this.getTypedField(6, 0);
363 		return retVal;
364     }
365     
366     /**
367      * Returns
368      * PV2-6: "Patient Valuables Location" - creates it if necessary
369      */
370     public ST getPv26_PatientValuablesLocation() { 
371 		ST retVal = this.getTypedField(6, 0);
372 		return retVal;
373     }
374 
375 
376     /**
377      * Returns all repetitions of Visit User Code (PV2-7).
378      */
379     public IS[] getVisitUserCode() {
380     	IS[] retVal = this.getTypedField(7, new IS[0]);
381     	return retVal;
382     }
383 
384 
385     /**
386      * Returns all repetitions of Visit User Code (PV2-7).
387      */
388     public IS[] getPv27_VisitUserCode() {
389     	IS[] retVal = this.getTypedField(7, new IS[0]);
390     	return retVal;
391     }
392 
393 
394     /**
395      * Returns a count of the current number of repetitions of Visit User Code (PV2-7).
396      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
397      * it will return zero.
398      */
399     public int getVisitUserCodeReps() {
400     	return this.getReps(7);
401     }
402 
403 
404     /**
405      * Returns a specific repetition of
406      * PV2-7: "Visit User Code" - creates it if necessary
407      *
408      * @param rep The repetition index (0-indexed)
409      */
410     public IS getVisitUserCode(int rep) { 
411 		IS retVal = this.getTypedField(7, rep);
412 		return retVal;
413     }
414 
415     /**
416      * Returns a specific repetition of
417      * PV2-7: "Visit User Code" - creates it if necessary
418      *
419      * @param rep The repetition index (0-indexed)
420      */
421     public IS getPv27_VisitUserCode(int rep) { 
422 		IS retVal = this.getTypedField(7, rep);
423 		return retVal;
424     }
425 
426     /**
427      * Returns a count of the current number of repetitions of Visit User Code (PV2-7).
428      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
429      * it will return zero.
430      */
431     public int getPv27_VisitUserCodeReps() {
432     	return this.getReps(7);
433     }
434 
435 
436     /**
437      * Inserts a repetition of
438      * PV2-7: "Visit User Code" at a specific index
439      *
440      * @param rep The repetition index (0-indexed)
441      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
442      */
443     public IS insertVisitUserCode(int rep) throws HL7Exception { 
444         return (IS) super.insertRepetition(7, rep);
445     }
446 
447 
448     /**
449      * Inserts a repetition of
450      * PV2-7: "Visit User Code" at a specific index
451      *
452      * @param rep The repetition index (0-indexed)
453      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
454      */
455     public IS insertPv27_VisitUserCode(int rep) throws HL7Exception { 
456         return (IS) super.insertRepetition(7, rep);
457     }
458 
459 
460     /**
461      * Removes a repetition of
462      * PV2-7: "Visit User Code" at a specific index
463      *
464      * @param rep The repetition index (0-indexed)
465      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
466      */
467     public IS removeVisitUserCode(int rep) throws HL7Exception { 
468         return (IS) super.removeRepetition(7, rep);
469     }
470 
471 
472     /**
473      * Removes a repetition of
474      * PV2-7: "Visit User Code" at a specific index
475      *
476      * @param rep The repetition index (0-indexed)
477      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
478      */
479     public IS removePv27_VisitUserCode(int rep) throws HL7Exception { 
480         return (IS) super.removeRepetition(7, rep);
481     }
482 
483 
484 
485 
486     /**
487      * Returns
488      * PV2-8: "Expected Admit Date/Time" - creates it if necessary
489      */
490     public TS getExpectedAdmitDateTime() { 
491 		TS retVal = this.getTypedField(8, 0);
492 		return retVal;
493     }
494     
495     /**
496      * Returns
497      * PV2-8: "Expected Admit Date/Time" - creates it if necessary
498      */
499     public TS getPv28_ExpectedAdmitDateTime() { 
500 		TS retVal = this.getTypedField(8, 0);
501 		return retVal;
502     }
503 
504 
505 
506     /**
507      * Returns
508      * PV2-9: "Expected Discharge Date/Time" - creates it if necessary
509      */
510     public TS getExpectedDischargeDateTime() { 
511 		TS retVal = this.getTypedField(9, 0);
512 		return retVal;
513     }
514     
515     /**
516      * Returns
517      * PV2-9: "Expected Discharge Date/Time" - creates it if necessary
518      */
519     public TS getPv29_ExpectedDischargeDateTime() { 
520 		TS retVal = this.getTypedField(9, 0);
521 		return retVal;
522     }
523 
524 
525 
526     /**
527      * Returns
528      * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary
529      */
530     public NM getEstimatedLengthOfInpatientStay() { 
531 		NM retVal = this.getTypedField(10, 0);
532 		return retVal;
533     }
534     
535     /**
536      * Returns
537      * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary
538      */
539     public NM getPv210_EstimatedLengthOfInpatientStay() { 
540 		NM retVal = this.getTypedField(10, 0);
541 		return retVal;
542     }
543 
544 
545 
546     /**
547      * Returns
548      * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary
549      */
550     public NM getActualLengthOfInpatientStay() { 
551 		NM retVal = this.getTypedField(11, 0);
552 		return retVal;
553     }
554     
555     /**
556      * Returns
557      * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary
558      */
559     public NM getPv211_ActualLengthOfInpatientStay() { 
560 		NM retVal = this.getTypedField(11, 0);
561 		return retVal;
562     }
563 
564 
565 
566     /**
567      * Returns
568      * PV2-12: "Visit Description" - creates it if necessary
569      */
570     public ST getVisitDescription() { 
571 		ST retVal = this.getTypedField(12, 0);
572 		return retVal;
573     }
574     
575     /**
576      * Returns
577      * PV2-12: "Visit Description" - creates it if necessary
578      */
579     public ST getPv212_VisitDescription() { 
580 		ST retVal = this.getTypedField(12, 0);
581 		return retVal;
582     }
583 
584 
585     /**
586      * Returns all repetitions of Referral Source Code (PV2-13).
587      */
588     public XCN[] getReferralSourceCode() {
589     	XCN[] retVal = this.getTypedField(13, new XCN[0]);
590     	return retVal;
591     }
592 
593 
594     /**
595      * Returns all repetitions of Referral Source Code (PV2-13).
596      */
597     public XCN[] getPv213_ReferralSourceCode() {
598     	XCN[] retVal = this.getTypedField(13, new XCN[0]);
599     	return retVal;
600     }
601 
602 
603     /**
604      * Returns a count of the current number of repetitions of Referral Source Code (PV2-13).
605      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
606      * it will return zero.
607      */
608     public int getReferralSourceCodeReps() {
609     	return this.getReps(13);
610     }
611 
612 
613     /**
614      * Returns a specific repetition of
615      * PV2-13: "Referral Source Code" - creates it if necessary
616      *
617      * @param rep The repetition index (0-indexed)
618      */
619     public XCN getReferralSourceCode(int rep) { 
620 		XCN retVal = this.getTypedField(13, rep);
621 		return retVal;
622     }
623 
624     /**
625      * Returns a specific repetition of
626      * PV2-13: "Referral Source Code" - creates it if necessary
627      *
628      * @param rep The repetition index (0-indexed)
629      */
630     public XCN getPv213_ReferralSourceCode(int rep) { 
631 		XCN retVal = this.getTypedField(13, rep);
632 		return retVal;
633     }
634 
635     /**
636      * Returns a count of the current number of repetitions of Referral Source Code (PV2-13).
637      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
638      * it will return zero.
639      */
640     public int getPv213_ReferralSourceCodeReps() {
641     	return this.getReps(13);
642     }
643 
644 
645     /**
646      * Inserts a repetition of
647      * PV2-13: "Referral Source Code" at a specific index
648      *
649      * @param rep The repetition index (0-indexed)
650      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
651      */
652     public XCN insertReferralSourceCode(int rep) throws HL7Exception { 
653         return (XCN) super.insertRepetition(13, rep);
654     }
655 
656 
657     /**
658      * Inserts a repetition of
659      * PV2-13: "Referral Source Code" at a specific index
660      *
661      * @param rep The repetition index (0-indexed)
662      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
663      */
664     public XCN insertPv213_ReferralSourceCode(int rep) throws HL7Exception { 
665         return (XCN) super.insertRepetition(13, rep);
666     }
667 
668 
669     /**
670      * Removes a repetition of
671      * PV2-13: "Referral Source Code" at a specific index
672      *
673      * @param rep The repetition index (0-indexed)
674      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
675      */
676     public XCN removeReferralSourceCode(int rep) throws HL7Exception { 
677         return (XCN) super.removeRepetition(13, rep);
678     }
679 
680 
681     /**
682      * Removes a repetition of
683      * PV2-13: "Referral Source Code" at a specific index
684      *
685      * @param rep The repetition index (0-indexed)
686      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
687      */
688     public XCN removePv213_ReferralSourceCode(int rep) throws HL7Exception { 
689         return (XCN) super.removeRepetition(13, rep);
690     }
691 
692 
693 
694 
695     /**
696      * Returns
697      * PV2-14: "Previous Service Date" - creates it if necessary
698      */
699     public DT getPreviousServiceDate() { 
700 		DT retVal = this.getTypedField(14, 0);
701 		return retVal;
702     }
703     
704     /**
705      * Returns
706      * PV2-14: "Previous Service Date" - creates it if necessary
707      */
708     public DT getPv214_PreviousServiceDate() { 
709 		DT retVal = this.getTypedField(14, 0);
710 		return retVal;
711     }
712 
713 
714 
715     /**
716      * Returns
717      * PV2-15: "Employment Illness Related Indicator" - creates it if necessary
718      */
719     public ID getEmploymentIllnessRelatedIndicator() { 
720 		ID retVal = this.getTypedField(15, 0);
721 		return retVal;
722     }
723     
724     /**
725      * Returns
726      * PV2-15: "Employment Illness Related Indicator" - creates it if necessary
727      */
728     public ID getPv215_EmploymentIllnessRelatedIndicator() { 
729 		ID retVal = this.getTypedField(15, 0);
730 		return retVal;
731     }
732 
733 
734 
735     /**
736      * Returns
737      * PV2-16: "Purge Status Code" - creates it if necessary
738      */
739     public IS getPurgeStatusCode() { 
740 		IS retVal = this.getTypedField(16, 0);
741 		return retVal;
742     }
743     
744     /**
745      * Returns
746      * PV2-16: "Purge Status Code" - creates it if necessary
747      */
748     public IS getPv216_PurgeStatusCode() { 
749 		IS retVal = this.getTypedField(16, 0);
750 		return retVal;
751     }
752 
753 
754 
755     /**
756      * Returns
757      * PV2-17: "Purge Status Date" - creates it if necessary
758      */
759     public DT getPurgeStatusDate() { 
760 		DT retVal = this.getTypedField(17, 0);
761 		return retVal;
762     }
763     
764     /**
765      * Returns
766      * PV2-17: "Purge Status Date" - creates it if necessary
767      */
768     public DT getPv217_PurgeStatusDate() { 
769 		DT retVal = this.getTypedField(17, 0);
770 		return retVal;
771     }
772 
773 
774 
775     /**
776      * Returns
777      * PV2-18: "Special Program Code" - creates it if necessary
778      */
779     public IS getSpecialProgramCode() { 
780 		IS retVal = this.getTypedField(18, 0);
781 		return retVal;
782     }
783     
784     /**
785      * Returns
786      * PV2-18: "Special Program Code" - creates it if necessary
787      */
788     public IS getPv218_SpecialProgramCode() { 
789 		IS retVal = this.getTypedField(18, 0);
790 		return retVal;
791     }
792 
793 
794 
795     /**
796      * Returns
797      * PV2-19: "Retention Indicator" - creates it if necessary
798      */
799     public ID getRetentionIndicator() { 
800 		ID retVal = this.getTypedField(19, 0);
801 		return retVal;
802     }
803     
804     /**
805      * Returns
806      * PV2-19: "Retention Indicator" - creates it if necessary
807      */
808     public ID getPv219_RetentionIndicator() { 
809 		ID retVal = this.getTypedField(19, 0);
810 		return retVal;
811     }
812 
813 
814 
815     /**
816      * Returns
817      * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary
818      */
819     public NM getExpectedNumberOfInsurancePlans() { 
820 		NM retVal = this.getTypedField(20, 0);
821 		return retVal;
822     }
823     
824     /**
825      * Returns
826      * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary
827      */
828     public NM getPv220_ExpectedNumberOfInsurancePlans() { 
829 		NM retVal = this.getTypedField(20, 0);
830 		return retVal;
831     }
832 
833 
834 
835     /**
836      * Returns
837      * PV2-21: "Visit Publicity Code" - creates it if necessary
838      */
839     public IS getVisitPublicityCode() { 
840 		IS retVal = this.getTypedField(21, 0);
841 		return retVal;
842     }
843     
844     /**
845      * Returns
846      * PV2-21: "Visit Publicity Code" - creates it if necessary
847      */
848     public IS getPv221_VisitPublicityCode() { 
849 		IS retVal = this.getTypedField(21, 0);
850 		return retVal;
851     }
852 
853 
854 
855     /**
856      * Returns
857      * PV2-22: "Visit Protection Indicator" - creates it if necessary
858      */
859     public ID getVisitProtectionIndicator() { 
860 		ID retVal = this.getTypedField(22, 0);
861 		return retVal;
862     }
863     
864     /**
865      * Returns
866      * PV2-22: "Visit Protection Indicator" - creates it if necessary
867      */
868     public ID getPv222_VisitProtectionIndicator() { 
869 		ID retVal = this.getTypedField(22, 0);
870 		return retVal;
871     }
872 
873 
874     /**
875      * Returns all repetitions of Clinic Organization Name (PV2-23).
876      */
877     public XON[] getClinicOrganizationName() {
878     	XON[] retVal = this.getTypedField(23, new XON[0]);
879     	return retVal;
880     }
881 
882 
883     /**
884      * Returns all repetitions of Clinic Organization Name (PV2-23).
885      */
886     public XON[] getPv223_ClinicOrganizationName() {
887     	XON[] retVal = this.getTypedField(23, new XON[0]);
888     	return retVal;
889     }
890 
891 
892     /**
893      * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23).
894      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
895      * it will return zero.
896      */
897     public int getClinicOrganizationNameReps() {
898     	return this.getReps(23);
899     }
900 
901 
902     /**
903      * Returns a specific repetition of
904      * PV2-23: "Clinic Organization Name" - creates it if necessary
905      *
906      * @param rep The repetition index (0-indexed)
907      */
908     public XON getClinicOrganizationName(int rep) { 
909 		XON retVal = this.getTypedField(23, rep);
910 		return retVal;
911     }
912 
913     /**
914      * Returns a specific repetition of
915      * PV2-23: "Clinic Organization Name" - creates it if necessary
916      *
917      * @param rep The repetition index (0-indexed)
918      */
919     public XON getPv223_ClinicOrganizationName(int rep) { 
920 		XON retVal = this.getTypedField(23, rep);
921 		return retVal;
922     }
923 
924     /**
925      * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23).
926      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
927      * it will return zero.
928      */
929     public int getPv223_ClinicOrganizationNameReps() {
930     	return this.getReps(23);
931     }
932 
933 
934     /**
935      * Inserts a repetition of
936      * PV2-23: "Clinic Organization Name" at a specific index
937      *
938      * @param rep The repetition index (0-indexed)
939      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
940      */
941     public XON insertClinicOrganizationName(int rep) throws HL7Exception { 
942         return (XON) super.insertRepetition(23, rep);
943     }
944 
945 
946     /**
947      * Inserts a repetition of
948      * PV2-23: "Clinic Organization Name" at a specific index
949      *
950      * @param rep The repetition index (0-indexed)
951      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
952      */
953     public XON insertPv223_ClinicOrganizationName(int rep) throws HL7Exception { 
954         return (XON) super.insertRepetition(23, rep);
955     }
956 
957 
958     /**
959      * Removes a repetition of
960      * PV2-23: "Clinic Organization Name" at a specific index
961      *
962      * @param rep The repetition index (0-indexed)
963      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
964      */
965     public XON removeClinicOrganizationName(int rep) throws HL7Exception { 
966         return (XON) super.removeRepetition(23, rep);
967     }
968 
969 
970     /**
971      * Removes a repetition of
972      * PV2-23: "Clinic Organization Name" at a specific index
973      *
974      * @param rep The repetition index (0-indexed)
975      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
976      */
977     public XON removePv223_ClinicOrganizationName(int rep) throws HL7Exception { 
978         return (XON) super.removeRepetition(23, rep);
979     }
980 
981 
982 
983 
984     /**
985      * Returns
986      * PV2-24: "Patient Status Code" - creates it if necessary
987      */
988     public IS getPatientStatusCode() { 
989 		IS retVal = this.getTypedField(24, 0);
990 		return retVal;
991     }
992     
993     /**
994      * Returns
995      * PV2-24: "Patient Status Code" - creates it if necessary
996      */
997     public IS getPv224_PatientStatusCode() { 
998 		IS retVal = this.getTypedField(24, 0);
999 		return retVal;
1000     }
1001 
1002 
1003 
1004     /**
1005      * Returns
1006      * PV2-25: "Visit Priority Code" - creates it if necessary
1007      */
1008     public IS getVisitPriorityCode() { 
1009 		IS retVal = this.getTypedField(25, 0);
1010 		return retVal;
1011     }
1012     
1013     /**
1014      * Returns
1015      * PV2-25: "Visit Priority Code" - creates it if necessary
1016      */
1017     public IS getPv225_VisitPriorityCode() { 
1018 		IS retVal = this.getTypedField(25, 0);
1019 		return retVal;
1020     }
1021 
1022 
1023 
1024     /**
1025      * Returns
1026      * PV2-26: "Previous Treatment Date" - creates it if necessary
1027      */
1028     public DT getPreviousTreatmentDate() { 
1029 		DT retVal = this.getTypedField(26, 0);
1030 		return retVal;
1031     }
1032     
1033     /**
1034      * Returns
1035      * PV2-26: "Previous Treatment Date" - creates it if necessary
1036      */
1037     public DT getPv226_PreviousTreatmentDate() { 
1038 		DT retVal = this.getTypedField(26, 0);
1039 		return retVal;
1040     }
1041 
1042 
1043 
1044     /**
1045      * Returns
1046      * PV2-27: "Expected Discharge Disposition" - creates it if necessary
1047      */
1048     public IS getExpectedDischargeDisposition() { 
1049 		IS retVal = this.getTypedField(27, 0);
1050 		return retVal;
1051     }
1052     
1053     /**
1054      * Returns
1055      * PV2-27: "Expected Discharge Disposition" - creates it if necessary
1056      */
1057     public IS getPv227_ExpectedDischargeDisposition() { 
1058 		IS retVal = this.getTypedField(27, 0);
1059 		return retVal;
1060     }
1061 
1062 
1063 
1064     /**
1065      * Returns
1066      * PV2-28: "Signature on File Date" - creates it if necessary
1067      */
1068     public DT getSignatureOnFileDate() { 
1069 		DT retVal = this.getTypedField(28, 0);
1070 		return retVal;
1071     }
1072     
1073     /**
1074      * Returns
1075      * PV2-28: "Signature on File Date" - creates it if necessary
1076      */
1077     public DT getPv228_SignatureOnFileDate() { 
1078 		DT retVal = this.getTypedField(28, 0);
1079 		return retVal;
1080     }
1081 
1082 
1083 
1084     /**
1085      * Returns
1086      * PV2-29: "First Similar Illness Date" - creates it if necessary
1087      */
1088     public DT getFirstSimilarIllnessDate() { 
1089 		DT retVal = this.getTypedField(29, 0);
1090 		return retVal;
1091     }
1092     
1093     /**
1094      * Returns
1095      * PV2-29: "First Similar Illness Date" - creates it if necessary
1096      */
1097     public DT getPv229_FirstSimilarIllnessDate() { 
1098 		DT retVal = this.getTypedField(29, 0);
1099 		return retVal;
1100     }
1101 
1102 
1103 
1104     /**
1105      * Returns
1106      * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary
1107      */
1108     public CE getPatientChargeAdjustmentCode() { 
1109 		CE retVal = this.getTypedField(30, 0);
1110 		return retVal;
1111     }
1112     
1113     /**
1114      * Returns
1115      * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary
1116      */
1117     public CE getPv230_PatientChargeAdjustmentCode() { 
1118 		CE retVal = this.getTypedField(30, 0);
1119 		return retVal;
1120     }
1121 
1122 
1123 
1124     /**
1125      * Returns
1126      * PV2-31: "Recurring Service Code" - creates it if necessary
1127      */
1128     public IS getRecurringServiceCode() { 
1129 		IS retVal = this.getTypedField(31, 0);
1130 		return retVal;
1131     }
1132     
1133     /**
1134      * Returns
1135      * PV2-31: "Recurring Service Code" - creates it if necessary
1136      */
1137     public IS getPv231_RecurringServiceCode() { 
1138 		IS retVal = this.getTypedField(31, 0);
1139 		return retVal;
1140     }
1141 
1142 
1143 
1144     /**
1145      * Returns
1146      * PV2-32: "Billing Media Code" - creates it if necessary
1147      */
1148     public ID getBillingMediaCode() { 
1149 		ID retVal = this.getTypedField(32, 0);
1150 		return retVal;
1151     }
1152     
1153     /**
1154      * Returns
1155      * PV2-32: "Billing Media Code" - creates it if necessary
1156      */
1157     public ID getPv232_BillingMediaCode() { 
1158 		ID retVal = this.getTypedField(32, 0);
1159 		return retVal;
1160     }
1161 
1162 
1163 
1164     /**
1165      * Returns
1166      * PV2-33: "Expected Surgery Date and Time" - creates it if necessary
1167      */
1168     public TS getExpectedSurgeryDateAndTime() { 
1169 		TS retVal = this.getTypedField(33, 0);
1170 		return retVal;
1171     }
1172     
1173     /**
1174      * Returns
1175      * PV2-33: "Expected Surgery Date and Time" - creates it if necessary
1176      */
1177     public TS getPv233_ExpectedSurgeryDateAndTime() { 
1178 		TS retVal = this.getTypedField(33, 0);
1179 		return retVal;
1180     }
1181 
1182 
1183 
1184     /**
1185      * Returns
1186      * PV2-34: "Military Partnership Code" - creates it if necessary
1187      */
1188     public ID getMilitaryPartnershipCode() { 
1189 		ID retVal = this.getTypedField(34, 0);
1190 		return retVal;
1191     }
1192     
1193     /**
1194      * Returns
1195      * PV2-34: "Military Partnership Code" - creates it if necessary
1196      */
1197     public ID getPv234_MilitaryPartnershipCode() { 
1198 		ID retVal = this.getTypedField(34, 0);
1199 		return retVal;
1200     }
1201 
1202 
1203 
1204     /**
1205      * Returns
1206      * PV2-35: "Military Non-Availability Code" - creates it if necessary
1207      */
1208     public ID getMilitaryNonAvailabilityCode() { 
1209 		ID retVal = this.getTypedField(35, 0);
1210 		return retVal;
1211     }
1212     
1213     /**
1214      * Returns
1215      * PV2-35: "Military Non-Availability Code" - creates it if necessary
1216      */
1217     public ID getPv235_MilitaryNonAvailabilityCode() { 
1218 		ID retVal = this.getTypedField(35, 0);
1219 		return retVal;
1220     }
1221 
1222 
1223 
1224     /**
1225      * Returns
1226      * PV2-36: "Newborn Baby Indicator" - creates it if necessary
1227      */
1228     public ID getNewbornBabyIndicator() { 
1229 		ID retVal = this.getTypedField(36, 0);
1230 		return retVal;
1231     }
1232     
1233     /**
1234      * Returns
1235      * PV2-36: "Newborn Baby Indicator" - creates it if necessary
1236      */
1237     public ID getPv236_NewbornBabyIndicator() { 
1238 		ID retVal = this.getTypedField(36, 0);
1239 		return retVal;
1240     }
1241 
1242 
1243 
1244     /**
1245      * Returns
1246      * PV2-37: "Baby Detained Indicator" - creates it if necessary
1247      */
1248     public ID getBabyDetainedIndicator() { 
1249 		ID retVal = this.getTypedField(37, 0);
1250 		return retVal;
1251     }
1252     
1253     /**
1254      * Returns
1255      * PV2-37: "Baby Detained Indicator" - creates it if necessary
1256      */
1257     public ID getPv237_BabyDetainedIndicator() { 
1258 		ID retVal = this.getTypedField(37, 0);
1259 		return retVal;
1260     }
1261 
1262 
1263 
1264     /**
1265      * Returns
1266      * PV2-38: "Mode of Arrival Code" - creates it if necessary
1267      */
1268     public CE getModeOfArrivalCode() { 
1269 		CE retVal = this.getTypedField(38, 0);
1270 		return retVal;
1271     }
1272     
1273     /**
1274      * Returns
1275      * PV2-38: "Mode of Arrival Code" - creates it if necessary
1276      */
1277     public CE getPv238_ModeOfArrivalCode() { 
1278 		CE retVal = this.getTypedField(38, 0);
1279 		return retVal;
1280     }
1281 
1282 
1283     /**
1284      * Returns all repetitions of Recreational Drug Use Code (PV2-39).
1285      */
1286     public CE[] getRecreationalDrugUseCode() {
1287     	CE[] retVal = this.getTypedField(39, new CE[0]);
1288     	return retVal;
1289     }
1290 
1291 
1292     /**
1293      * Returns all repetitions of Recreational Drug Use Code (PV2-39).
1294      */
1295     public CE[] getPv239_RecreationalDrugUseCode() {
1296     	CE[] retVal = this.getTypedField(39, new CE[0]);
1297     	return retVal;
1298     }
1299 
1300 
1301     /**
1302      * Returns a count of the current number of repetitions of Recreational Drug Use Code (PV2-39).
1303      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1304      * it will return zero.
1305      */
1306     public int getRecreationalDrugUseCodeReps() {
1307     	return this.getReps(39);
1308     }
1309 
1310 
1311     /**
1312      * Returns a specific repetition of
1313      * PV2-39: "Recreational Drug Use Code" - creates it if necessary
1314      *
1315      * @param rep The repetition index (0-indexed)
1316      */
1317     public CE getRecreationalDrugUseCode(int rep) { 
1318 		CE retVal = this.getTypedField(39, rep);
1319 		return retVal;
1320     }
1321 
1322     /**
1323      * Returns a specific repetition of
1324      * PV2-39: "Recreational Drug Use Code" - creates it if necessary
1325      *
1326      * @param rep The repetition index (0-indexed)
1327      */
1328     public CE getPv239_RecreationalDrugUseCode(int rep) { 
1329 		CE retVal = this.getTypedField(39, rep);
1330 		return retVal;
1331     }
1332 
1333     /**
1334      * Returns a count of the current number of repetitions of Recreational Drug Use Code (PV2-39).
1335      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1336      * it will return zero.
1337      */
1338     public int getPv239_RecreationalDrugUseCodeReps() {
1339     	return this.getReps(39);
1340     }
1341 
1342 
1343     /**
1344      * Inserts a repetition of
1345      * PV2-39: "Recreational Drug Use Code" at a specific index
1346      *
1347      * @param rep The repetition index (0-indexed)
1348      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1349      */
1350     public CE insertRecreationalDrugUseCode(int rep) throws HL7Exception { 
1351         return (CE) super.insertRepetition(39, rep);
1352     }
1353 
1354 
1355     /**
1356      * Inserts a repetition of
1357      * PV2-39: "Recreational Drug Use Code" at a specific index
1358      *
1359      * @param rep The repetition index (0-indexed)
1360      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1361      */
1362     public CE insertPv239_RecreationalDrugUseCode(int rep) throws HL7Exception { 
1363         return (CE) super.insertRepetition(39, rep);
1364     }
1365 
1366 
1367     /**
1368      * Removes a repetition of
1369      * PV2-39: "Recreational Drug Use Code" at a specific index
1370      *
1371      * @param rep The repetition index (0-indexed)
1372      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1373      */
1374     public CE removeRecreationalDrugUseCode(int rep) throws HL7Exception { 
1375         return (CE) super.removeRepetition(39, rep);
1376     }
1377 
1378 
1379     /**
1380      * Removes a repetition of
1381      * PV2-39: "Recreational Drug Use Code" at a specific index
1382      *
1383      * @param rep The repetition index (0-indexed)
1384      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1385      */
1386     public CE removePv239_RecreationalDrugUseCode(int rep) throws HL7Exception { 
1387         return (CE) super.removeRepetition(39, rep);
1388     }
1389 
1390 
1391 
1392 
1393     /**
1394      * Returns
1395      * PV2-40: "Admission Level of Care Code" - creates it if necessary
1396      */
1397     public CE getAdmissionLevelOfCareCode() { 
1398 		CE retVal = this.getTypedField(40, 0);
1399 		return retVal;
1400     }
1401     
1402     /**
1403      * Returns
1404      * PV2-40: "Admission Level of Care Code" - creates it if necessary
1405      */
1406     public CE getPv240_AdmissionLevelOfCareCode() { 
1407 		CE retVal = this.getTypedField(40, 0);
1408 		return retVal;
1409     }
1410 
1411 
1412     /**
1413      * Returns all repetitions of Precaution Code (PV2-41).
1414      */
1415     public CE[] getPrecautionCode() {
1416     	CE[] retVal = this.getTypedField(41, new CE[0]);
1417     	return retVal;
1418     }
1419 
1420 
1421     /**
1422      * Returns all repetitions of Precaution Code (PV2-41).
1423      */
1424     public CE[] getPv241_PrecautionCode() {
1425     	CE[] retVal = this.getTypedField(41, new CE[0]);
1426     	return retVal;
1427     }
1428 
1429 
1430     /**
1431      * Returns a count of the current number of repetitions of Precaution Code (PV2-41).
1432      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1433      * it will return zero.
1434      */
1435     public int getPrecautionCodeReps() {
1436     	return this.getReps(41);
1437     }
1438 
1439 
1440     /**
1441      * Returns a specific repetition of
1442      * PV2-41: "Precaution Code" - creates it if necessary
1443      *
1444      * @param rep The repetition index (0-indexed)
1445      */
1446     public CE getPrecautionCode(int rep) { 
1447 		CE retVal = this.getTypedField(41, rep);
1448 		return retVal;
1449     }
1450 
1451     /**
1452      * Returns a specific repetition of
1453      * PV2-41: "Precaution Code" - creates it if necessary
1454      *
1455      * @param rep The repetition index (0-indexed)
1456      */
1457     public CE getPv241_PrecautionCode(int rep) { 
1458 		CE retVal = this.getTypedField(41, rep);
1459 		return retVal;
1460     }
1461 
1462     /**
1463      * Returns a count of the current number of repetitions of Precaution Code (PV2-41).
1464      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1465      * it will return zero.
1466      */
1467     public int getPv241_PrecautionCodeReps() {
1468     	return this.getReps(41);
1469     }
1470 
1471 
1472     /**
1473      * Inserts a repetition of
1474      * PV2-41: "Precaution Code" at a specific index
1475      *
1476      * @param rep The repetition index (0-indexed)
1477      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1478      */
1479     public CE insertPrecautionCode(int rep) throws HL7Exception { 
1480         return (CE) super.insertRepetition(41, rep);
1481     }
1482 
1483 
1484     /**
1485      * Inserts a repetition of
1486      * PV2-41: "Precaution Code" at a specific index
1487      *
1488      * @param rep The repetition index (0-indexed)
1489      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1490      */
1491     public CE insertPv241_PrecautionCode(int rep) throws HL7Exception { 
1492         return (CE) super.insertRepetition(41, rep);
1493     }
1494 
1495 
1496     /**
1497      * Removes a repetition of
1498      * PV2-41: "Precaution Code" at a specific index
1499      *
1500      * @param rep The repetition index (0-indexed)
1501      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1502      */
1503     public CE removePrecautionCode(int rep) throws HL7Exception { 
1504         return (CE) super.removeRepetition(41, rep);
1505     }
1506 
1507 
1508     /**
1509      * Removes a repetition of
1510      * PV2-41: "Precaution Code" at a specific index
1511      *
1512      * @param rep The repetition index (0-indexed)
1513      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1514      */
1515     public CE removePv241_PrecautionCode(int rep) throws HL7Exception { 
1516         return (CE) super.removeRepetition(41, rep);
1517     }
1518 
1519 
1520 
1521 
1522     /**
1523      * Returns
1524      * PV2-42: "Patient Condition Code" - creates it if necessary
1525      */
1526     public CE getPatientConditionCode() { 
1527 		CE retVal = this.getTypedField(42, 0);
1528 		return retVal;
1529     }
1530     
1531     /**
1532      * Returns
1533      * PV2-42: "Patient Condition Code" - creates it if necessary
1534      */
1535     public CE getPv242_PatientConditionCode() { 
1536 		CE retVal = this.getTypedField(42, 0);
1537 		return retVal;
1538     }
1539 
1540 
1541 
1542     /**
1543      * Returns
1544      * PV2-43: "Living Will Code" - creates it if necessary
1545      */
1546     public IS getLivingWillCode() { 
1547 		IS retVal = this.getTypedField(43, 0);
1548 		return retVal;
1549     }
1550     
1551     /**
1552      * Returns
1553      * PV2-43: "Living Will Code" - creates it if necessary
1554      */
1555     public IS getPv243_LivingWillCode() { 
1556 		IS retVal = this.getTypedField(43, 0);
1557 		return retVal;
1558     }
1559 
1560 
1561 
1562     /**
1563      * Returns
1564      * PV2-44: "Organ Donor Code" - creates it if necessary
1565      */
1566     public IS getOrganDonorCode() { 
1567 		IS retVal = this.getTypedField(44, 0);
1568 		return retVal;
1569     }
1570     
1571     /**
1572      * Returns
1573      * PV2-44: "Organ Donor Code" - creates it if necessary
1574      */
1575     public IS getPv244_OrganDonorCode() { 
1576 		IS retVal = this.getTypedField(44, 0);
1577 		return retVal;
1578     }
1579 
1580 
1581     /**
1582      * Returns all repetitions of Advance Directive Code (PV2-45).
1583      */
1584     public CE[] getAdvanceDirectiveCode() {
1585     	CE[] retVal = this.getTypedField(45, new CE[0]);
1586     	return retVal;
1587     }
1588 
1589 
1590     /**
1591      * Returns all repetitions of Advance Directive Code (PV2-45).
1592      */
1593     public CE[] getPv245_AdvanceDirectiveCode() {
1594     	CE[] retVal = this.getTypedField(45, new CE[0]);
1595     	return retVal;
1596     }
1597 
1598 
1599     /**
1600      * Returns a count of the current number of repetitions of Advance Directive Code (PV2-45).
1601      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1602      * it will return zero.
1603      */
1604     public int getAdvanceDirectiveCodeReps() {
1605     	return this.getReps(45);
1606     }
1607 
1608 
1609     /**
1610      * Returns a specific repetition of
1611      * PV2-45: "Advance Directive Code" - creates it if necessary
1612      *
1613      * @param rep The repetition index (0-indexed)
1614      */
1615     public CE getAdvanceDirectiveCode(int rep) { 
1616 		CE retVal = this.getTypedField(45, rep);
1617 		return retVal;
1618     }
1619 
1620     /**
1621      * Returns a specific repetition of
1622      * PV2-45: "Advance Directive Code" - creates it if necessary
1623      *
1624      * @param rep The repetition index (0-indexed)
1625      */
1626     public CE getPv245_AdvanceDirectiveCode(int rep) { 
1627 		CE retVal = this.getTypedField(45, rep);
1628 		return retVal;
1629     }
1630 
1631     /**
1632      * Returns a count of the current number of repetitions of Advance Directive Code (PV2-45).
1633      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1634      * it will return zero.
1635      */
1636     public int getPv245_AdvanceDirectiveCodeReps() {
1637     	return this.getReps(45);
1638     }
1639 
1640 
1641     /**
1642      * Inserts a repetition of
1643      * PV2-45: "Advance Directive Code" at a specific index
1644      *
1645      * @param rep The repetition index (0-indexed)
1646      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1647      */
1648     public CE insertAdvanceDirectiveCode(int rep) throws HL7Exception { 
1649         return (CE) super.insertRepetition(45, rep);
1650     }
1651 
1652 
1653     /**
1654      * Inserts a repetition of
1655      * PV2-45: "Advance Directive Code" at a specific index
1656      *
1657      * @param rep The repetition index (0-indexed)
1658      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1659      */
1660     public CE insertPv245_AdvanceDirectiveCode(int rep) throws HL7Exception { 
1661         return (CE) super.insertRepetition(45, rep);
1662     }
1663 
1664 
1665     /**
1666      * Removes a repetition of
1667      * PV2-45: "Advance Directive Code" at a specific index
1668      *
1669      * @param rep The repetition index (0-indexed)
1670      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1671      */
1672     public CE removeAdvanceDirectiveCode(int rep) throws HL7Exception { 
1673         return (CE) super.removeRepetition(45, rep);
1674     }
1675 
1676 
1677     /**
1678      * Removes a repetition of
1679      * PV2-45: "Advance Directive Code" at a specific index
1680      *
1681      * @param rep The repetition index (0-indexed)
1682      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1683      */
1684     public CE removePv245_AdvanceDirectiveCode(int rep) throws HL7Exception { 
1685         return (CE) super.removeRepetition(45, rep);
1686     }
1687 
1688 
1689 
1690 
1691     /**
1692      * Returns
1693      * PV2-46: "Patient Status Effective Date" - creates it if necessary
1694      */
1695     public DT getPatientStatusEffectiveDate() { 
1696 		DT retVal = this.getTypedField(46, 0);
1697 		return retVal;
1698     }
1699     
1700     /**
1701      * Returns
1702      * PV2-46: "Patient Status Effective Date" - creates it if necessary
1703      */
1704     public DT getPv246_PatientStatusEffectiveDate() { 
1705 		DT retVal = this.getTypedField(46, 0);
1706 		return retVal;
1707     }
1708 
1709 
1710 
1711     /**
1712      * Returns
1713      * PV2-47: "Expected LOA Return Date/Time" - creates it if necessary
1714      */
1715     public TS getExpectedLOAReturnDateTime() { 
1716 		TS retVal = this.getTypedField(47, 0);
1717 		return retVal;
1718     }
1719     
1720     /**
1721      * Returns
1722      * PV2-47: "Expected LOA Return Date/Time" - creates it if necessary
1723      */
1724     public TS getPv247_ExpectedLOAReturnDateTime() { 
1725 		TS retVal = this.getTypedField(47, 0);
1726 		return retVal;
1727     }
1728 
1729 
1730 
1731 
1732 
1733     /** {@inheritDoc} */   
1734     protected Type createNewTypeWithoutReflection(int field) {
1735        switch (field) {
1736           case 0: return new PL(getMessage());
1737           case 1: return new CE(getMessage());
1738           case 2: return new CE(getMessage());
1739           case 3: return new CE(getMessage());
1740           case 4: return new ST(getMessage());
1741           case 5: return new ST(getMessage());
1742           case 6: return new IS(getMessage(), new Integer( 130 ));
1743           case 7: return new TS(getMessage());
1744           case 8: return new TS(getMessage());
1745           case 9: return new NM(getMessage());
1746           case 10: return new NM(getMessage());
1747           case 11: return new ST(getMessage());
1748           case 12: return new XCN(getMessage());
1749           case 13: return new DT(getMessage());
1750           case 14: return new ID(getMessage(), new Integer( 136 ));
1751           case 15: return new IS(getMessage(), new Integer( 213 ));
1752           case 16: return new DT(getMessage());
1753           case 17: return new IS(getMessage(), new Integer( 214 ));
1754           case 18: return new ID(getMessage(), new Integer( 136 ));
1755           case 19: return new NM(getMessage());
1756           case 20: return new IS(getMessage(), new Integer( 215 ));
1757           case 21: return new ID(getMessage(), new Integer( 136 ));
1758           case 22: return new XON(getMessage());
1759           case 23: return new IS(getMessage(), new Integer( 216 ));
1760           case 24: return new IS(getMessage(), new Integer( 217 ));
1761           case 25: return new DT(getMessage());
1762           case 26: return new IS(getMessage(), new Integer( 112 ));
1763           case 27: return new DT(getMessage());
1764           case 28: return new DT(getMessage());
1765           case 29: return new CE(getMessage());
1766           case 30: return new IS(getMessage(), new Integer( 219 ));
1767           case 31: return new ID(getMessage(), new Integer( 136 ));
1768           case 32: return new TS(getMessage());
1769           case 33: return new ID(getMessage(), new Integer( 136 ));
1770           case 34: return new ID(getMessage(), new Integer( 136 ));
1771           case 35: return new ID(getMessage(), new Integer( 136 ));
1772           case 36: return new ID(getMessage(), new Integer( 136 ));
1773           case 37: return new CE(getMessage());
1774           case 38: return new CE(getMessage());
1775           case 39: return new CE(getMessage());
1776           case 40: return new CE(getMessage());
1777           case 41: return new CE(getMessage());
1778           case 42: return new IS(getMessage(), new Integer( 315 ));
1779           case 43: return new IS(getMessage(), new Integer( 316 ));
1780           case 44: return new CE(getMessage());
1781           case 45: return new DT(getMessage());
1782           case 46: return new TS(getMessage());
1783           default: return null;
1784        }
1785    }
1786 
1787 
1788 }
1789