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