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.v22.segment;
35  
36  // import ca.uhn.hl7v2.model.v22.group.*;
37  import ca.uhn.hl7v2.model.v22.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 PID message segment (PATIENT IDENTIFICATION). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>PID-1: Set ID - Patient ID (SI) <b>optional </b>
53       * <li>PID-2: Patient ID (External ID) (CK) <b>optional </b>
54       * <li>PID-3: Patient ID (Internal ID) (CM_PAT_ID) <b> repeating</b>
55       * <li>PID-4: Alternate Patient ID (ST) <b>optional </b>
56       * <li>PID-5: Patient Name (PN) <b> </b>
57       * <li>PID-6: Mother's Maiden Name (ST) <b>optional </b>
58       * <li>PID-7: Date of Birth (TS) <b>optional </b>
59       * <li>PID-8: Sex (ID) <b>optional </b>
60       * <li>PID-9: Patient Alias (PN) <b>optional repeating</b>
61       * <li>PID-10: Race (ID) <b>optional </b>
62       * <li>PID-11: Patient Address (AD) <b>optional repeating</b>
63       * <li>PID-12: County code (ID) <b>optional </b>
64       * <li>PID-13: Phone Number - Home (TN) <b>optional repeating</b>
65       * <li>PID-14: Phone Number - Business (TN) <b>optional repeating</b>
66       * <li>PID-15: Language - Patient (ST) <b>optional </b>
67       * <li>PID-16: Marital Status (ID) <b>optional </b>
68       * <li>PID-17: Religion (ID) <b>optional </b>
69       * <li>PID-18: Patient Account Number (CK) <b>optional </b>
70       * <li>PID-19: Social security number - patient (ST) <b>optional </b>
71       * <li>PID-20: Driver's license number - patient (CM_LICENSE_NO) <b>optional </b>
72       * <li>PID-21: Mother's Identifier (CK) <b>optional </b>
73       * <li>PID-22: Ethnic Group (ID) <b>optional </b>
74       * <li>PID-23: Birth Place (ST) <b>optional </b>
75       * <li>PID-24: Multiple Birth Indicator (ID) <b>optional </b>
76       * <li>PID-25: Birth Order (NM) <b>optional </b>
77       * <li>PID-26: Citizenship (ID) <b>optional repeating</b>
78       * <li>PID-27: Veterans Military Status (ST) <b>optional </b>
79   * </ul>
80   */
81  @SuppressWarnings("unused")
82  public class PID extends AbstractSegment {
83  
84      /** 
85       * Creates a new PID segment
86       */
87      public PID(Group parent, ModelClassFactory factory) {
88         super(parent, factory);
89         init(factory);
90      }
91  
92      private void init(ModelClassFactory factory) {
93         try {
94                                    this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - Patient ID");
95                                    this.add(CK.class, false, 1, 16, new Object[]{ getMessage() }, "Patient ID (External ID)");
96                                    this.add(CM_PAT_ID.class, true, 0, 20, new Object[]{ getMessage() }, "Patient ID (Internal ID)");
97                                    this.add(ST.class, false, 1, 12, new Object[]{ getMessage() }, "Alternate Patient ID");
98                                    this.add(PN.class, true, 1, 48, new Object[]{ getMessage() }, "Patient Name");
99                                    this.add(ST.class, false, 1, 30, new Object[]{ getMessage() }, "Mother's Maiden Name");
100                                   this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date of Birth");
101                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(1) }, "Sex");
102                                   this.add(PN.class, false, 0, 48, new Object[]{ getMessage() }, "Patient Alias");
103                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(5) }, "Race");
104                                   this.add(AD.class, false, 3, 106, new Object[]{ getMessage() }, "Patient Address");
105                                               this.add(ID.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "County code");
106                                   this.add(TN.class, false, 3, 40, new Object[]{ getMessage() }, "Phone Number - Home");
107                                   this.add(TN.class, false, 3, 40, new Object[]{ getMessage() }, "Phone Number - Business");
108                                   this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Language - Patient");
109                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(2) }, "Marital Status");
110                                               this.add(ID.class, false, 1, 3, new Object[]{ getMessage(), new Integer(6) }, "Religion");
111                                   this.add(CK.class, false, 1, 20, new Object[]{ getMessage() }, "Patient Account Number");
112                                   this.add(ST.class, false, 1, 16, new Object[]{ getMessage() }, "Social security number - patient");
113                                   this.add(CM_LICENSE_NO.class, false, 1, 25, new Object[]{ getMessage() }, "Driver's license number - patient");
114                                   this.add(CK.class, false, 1, 20, new Object[]{ getMessage() }, "Mother's Identifier");
115                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(189) }, "Ethnic Group");
116                                   this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Birth Place");
117                                               this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Multiple Birth Indicator");
118                                   this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Birth Order");
119                                               this.add(ID.class, false, 0, 3, new Object[]{ getMessage(), new Integer(171) }, "Citizenship");
120                                   this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "Veterans Military Status");
121        } catch(HL7Exception e) {
122           log.error("Unexpected error creating PID - this is probably a bug in the source code generator.", e);
123        }
124     }
125 
126 
127 
128     /**
129      * Returns
130      * PID-1: "Set ID - Patient ID" - creates it if necessary
131      */
132     public SI getSetIDPatientID() { 
133 		SI retVal = this.getTypedField(1, 0);
134 		return retVal;
135     }
136     
137     /**
138      * Returns
139      * PID-1: "Set ID - Patient ID" - creates it if necessary
140      */
141     public SI getPid1_SetIDPatientID() { 
142 		SI retVal = this.getTypedField(1, 0);
143 		return retVal;
144     }
145 
146 
147 
148     /**
149      * Returns
150      * PID-2: "Patient ID (External ID)" - creates it if necessary
151      */
152     public CK getPatientIDExternalID() { 
153 		CK retVal = this.getTypedField(2, 0);
154 		return retVal;
155     }
156     
157     /**
158      * Returns
159      * PID-2: "Patient ID (External ID)" - creates it if necessary
160      */
161     public CK getPid2_PatientIDExternalID() { 
162 		CK retVal = this.getTypedField(2, 0);
163 		return retVal;
164     }
165 
166 
167     /**
168      * Returns all repetitions of Patient ID (Internal ID) (PID-3).
169      */
170     public CM_PAT_ID[] getPatientIDInternalID() {
171     	CM_PAT_ID[] retVal = this.getTypedField(3, new CM_PAT_ID[0]);
172     	return retVal;
173     }
174 
175 
176     /**
177      * Returns all repetitions of Patient ID (Internal ID) (PID-3).
178      */
179     public CM_PAT_ID[] getPid3_PatientIDInternalID() {
180     	CM_PAT_ID[] retVal = this.getTypedField(3, new CM_PAT_ID[0]);
181     	return retVal;
182     }
183 
184 
185     /**
186      * Returns a count of the current number of repetitions of Patient ID (Internal ID) (PID-3).
187      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
188      * it will return zero.
189      */
190     public int getPatientIDInternalIDReps() {
191     	return this.getReps(3);
192     }
193 
194 
195     /**
196      * Returns a specific repetition of
197      * PID-3: "Patient ID (Internal ID)" - creates it if necessary
198      *
199      * @param rep The repetition index (0-indexed)
200      */
201     public CM_PAT_ID getPatientIDInternalID(int rep) { 
202 		CM_PAT_ID retVal = this.getTypedField(3, rep);
203 		return retVal;
204     }
205 
206     /**
207      * Returns a specific repetition of
208      * PID-3: "Patient ID (Internal ID)" - creates it if necessary
209      *
210      * @param rep The repetition index (0-indexed)
211      */
212     public CM_PAT_ID getPid3_PatientIDInternalID(int rep) { 
213 		CM_PAT_ID retVal = this.getTypedField(3, rep);
214 		return retVal;
215     }
216 
217     /**
218      * Returns a count of the current number of repetitions of Patient ID (Internal ID) (PID-3).
219      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
220      * it will return zero.
221      */
222     public int getPid3_PatientIDInternalIDReps() {
223     	return this.getReps(3);
224     }
225 
226 
227     /**
228      * Inserts a repetition of
229      * PID-3: "Patient ID (Internal ID)" at a specific index
230      *
231      * @param rep The repetition index (0-indexed)
232      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
233      */
234     public CM_PAT_ID insertPatientIDInternalID(int rep) throws HL7Exception { 
235         return (CM_PAT_ID) super.insertRepetition(3, rep);
236     }
237 
238 
239     /**
240      * Inserts a repetition of
241      * PID-3: "Patient ID (Internal ID)" at a specific index
242      *
243      * @param rep The repetition index (0-indexed)
244      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
245      */
246     public CM_PAT_ID insertPid3_PatientIDInternalID(int rep) throws HL7Exception { 
247         return (CM_PAT_ID) super.insertRepetition(3, rep);
248     }
249 
250 
251     /**
252      * Removes a repetition of
253      * PID-3: "Patient ID (Internal ID)" at a specific index
254      *
255      * @param rep The repetition index (0-indexed)
256      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
257      */
258     public CM_PAT_ID removePatientIDInternalID(int rep) throws HL7Exception { 
259         return (CM_PAT_ID) super.removeRepetition(3, rep);
260     }
261 
262 
263     /**
264      * Removes a repetition of
265      * PID-3: "Patient ID (Internal ID)" at a specific index
266      *
267      * @param rep The repetition index (0-indexed)
268      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
269      */
270     public CM_PAT_ID removePid3_PatientIDInternalID(int rep) throws HL7Exception { 
271         return (CM_PAT_ID) super.removeRepetition(3, rep);
272     }
273 
274 
275 
276 
277     /**
278      * Returns
279      * PID-4: "Alternate Patient ID" - creates it if necessary
280      */
281     public ST getAlternatePatientID() { 
282 		ST retVal = this.getTypedField(4, 0);
283 		return retVal;
284     }
285     
286     /**
287      * Returns
288      * PID-4: "Alternate Patient ID" - creates it if necessary
289      */
290     public ST getPid4_AlternatePatientID() { 
291 		ST retVal = this.getTypedField(4, 0);
292 		return retVal;
293     }
294 
295 
296 
297     /**
298      * Returns
299      * PID-5: "Patient Name" - creates it if necessary
300      */
301     public PN getPatientName() { 
302 		PN retVal = this.getTypedField(5, 0);
303 		return retVal;
304     }
305     
306     /**
307      * Returns
308      * PID-5: "Patient Name" - creates it if necessary
309      */
310     public PN getPid5_PatientName() { 
311 		PN retVal = this.getTypedField(5, 0);
312 		return retVal;
313     }
314 
315 
316 
317     /**
318      * Returns
319      * PID-6: "Mother's Maiden Name" - creates it if necessary
320      */
321     public ST getMotherSMaidenName() { 
322 		ST retVal = this.getTypedField(6, 0);
323 		return retVal;
324     }
325     
326     /**
327      * Returns
328      * PID-6: "Mother's Maiden Name" - creates it if necessary
329      */
330     public ST getPid6_MotherSMaidenName() { 
331 		ST retVal = this.getTypedField(6, 0);
332 		return retVal;
333     }
334 
335 
336 
337     /**
338      * Returns
339      * PID-7: "Date of Birth" - creates it if necessary
340      */
341     public TS getDateOfBirth() { 
342 		TS retVal = this.getTypedField(7, 0);
343 		return retVal;
344     }
345     
346     /**
347      * Returns
348      * PID-7: "Date of Birth" - creates it if necessary
349      */
350     public TS getPid7_DateOfBirth() { 
351 		TS retVal = this.getTypedField(7, 0);
352 		return retVal;
353     }
354 
355 
356 
357     /**
358      * Returns
359      * PID-8: "Sex" - creates it if necessary
360      */
361     public ID getSex() { 
362 		ID retVal = this.getTypedField(8, 0);
363 		return retVal;
364     }
365     
366     /**
367      * Returns
368      * PID-8: "Sex" - creates it if necessary
369      */
370     public ID getPid8_Sex() { 
371 		ID retVal = this.getTypedField(8, 0);
372 		return retVal;
373     }
374 
375 
376     /**
377      * Returns all repetitions of Patient Alias (PID-9).
378      */
379     public PN[] getPatientAlias() {
380     	PN[] retVal = this.getTypedField(9, new PN[0]);
381     	return retVal;
382     }
383 
384 
385     /**
386      * Returns all repetitions of Patient Alias (PID-9).
387      */
388     public PN[] getPid9_PatientAlias() {
389     	PN[] retVal = this.getTypedField(9, new PN[0]);
390     	return retVal;
391     }
392 
393 
394     /**
395      * Returns a count of the current number of repetitions of Patient Alias (PID-9).
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 getPatientAliasReps() {
400     	return this.getReps(9);
401     }
402 
403 
404     /**
405      * Returns a specific repetition of
406      * PID-9: "Patient Alias" - creates it if necessary
407      *
408      * @param rep The repetition index (0-indexed)
409      */
410     public PN getPatientAlias(int rep) { 
411 		PN retVal = this.getTypedField(9, rep);
412 		return retVal;
413     }
414 
415     /**
416      * Returns a specific repetition of
417      * PID-9: "Patient Alias" - creates it if necessary
418      *
419      * @param rep The repetition index (0-indexed)
420      */
421     public PN getPid9_PatientAlias(int rep) { 
422 		PN retVal = this.getTypedField(9, rep);
423 		return retVal;
424     }
425 
426     /**
427      * Returns a count of the current number of repetitions of Patient Alias (PID-9).
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 getPid9_PatientAliasReps() {
432     	return this.getReps(9);
433     }
434 
435 
436     /**
437      * Inserts a repetition of
438      * PID-9: "Patient Alias" 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 PN insertPatientAlias(int rep) throws HL7Exception { 
444         return (PN) super.insertRepetition(9, rep);
445     }
446 
447 
448     /**
449      * Inserts a repetition of
450      * PID-9: "Patient Alias" 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 PN insertPid9_PatientAlias(int rep) throws HL7Exception { 
456         return (PN) super.insertRepetition(9, rep);
457     }
458 
459 
460     /**
461      * Removes a repetition of
462      * PID-9: "Patient Alias" 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 PN removePatientAlias(int rep) throws HL7Exception { 
468         return (PN) super.removeRepetition(9, rep);
469     }
470 
471 
472     /**
473      * Removes a repetition of
474      * PID-9: "Patient Alias" 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 PN removePid9_PatientAlias(int rep) throws HL7Exception { 
480         return (PN) super.removeRepetition(9, rep);
481     }
482 
483 
484 
485 
486     /**
487      * Returns
488      * PID-10: "Race" - creates it if necessary
489      */
490     public ID getRace() { 
491 		ID retVal = this.getTypedField(10, 0);
492 		return retVal;
493     }
494     
495     /**
496      * Returns
497      * PID-10: "Race" - creates it if necessary
498      */
499     public ID getPid10_Race() { 
500 		ID retVal = this.getTypedField(10, 0);
501 		return retVal;
502     }
503 
504 
505     /**
506      * Returns all repetitions of Patient Address (PID-11).
507      */
508     public AD[] getPatientAddress() {
509     	AD[] retVal = this.getTypedField(11, new AD[0]);
510     	return retVal;
511     }
512 
513 
514     /**
515      * Returns all repetitions of Patient Address (PID-11).
516      */
517     public AD[] getPid11_PatientAddress() {
518     	AD[] retVal = this.getTypedField(11, new AD[0]);
519     	return retVal;
520     }
521 
522 
523     /**
524      * Returns a count of the current number of repetitions of Patient Address (PID-11).
525      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
526      * it will return zero.
527      */
528     public int getPatientAddressReps() {
529     	return this.getReps(11);
530     }
531 
532 
533     /**
534      * Returns a specific repetition of
535      * PID-11: "Patient Address" - creates it if necessary
536      *
537      * @param rep The repetition index (0-indexed)
538      */
539     public AD getPatientAddress(int rep) { 
540 		AD retVal = this.getTypedField(11, rep);
541 		return retVal;
542     }
543 
544     /**
545      * Returns a specific repetition of
546      * PID-11: "Patient Address" - creates it if necessary
547      *
548      * @param rep The repetition index (0-indexed)
549      */
550     public AD getPid11_PatientAddress(int rep) { 
551 		AD retVal = this.getTypedField(11, rep);
552 		return retVal;
553     }
554 
555     /**
556      * Returns a count of the current number of repetitions of Patient Address (PID-11).
557      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
558      * it will return zero.
559      */
560     public int getPid11_PatientAddressReps() {
561     	return this.getReps(11);
562     }
563 
564 
565     /**
566      * Inserts a repetition of
567      * PID-11: "Patient Address" at a specific index
568      *
569      * @param rep The repetition index (0-indexed)
570      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
571      */
572     public AD insertPatientAddress(int rep) throws HL7Exception { 
573         return (AD) super.insertRepetition(11, rep);
574     }
575 
576 
577     /**
578      * Inserts a repetition of
579      * PID-11: "Patient Address" at a specific index
580      *
581      * @param rep The repetition index (0-indexed)
582      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
583      */
584     public AD insertPid11_PatientAddress(int rep) throws HL7Exception { 
585         return (AD) super.insertRepetition(11, rep);
586     }
587 
588 
589     /**
590      * Removes a repetition of
591      * PID-11: "Patient Address" at a specific index
592      *
593      * @param rep The repetition index (0-indexed)
594      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
595      */
596     public AD removePatientAddress(int rep) throws HL7Exception { 
597         return (AD) super.removeRepetition(11, rep);
598     }
599 
600 
601     /**
602      * Removes a repetition of
603      * PID-11: "Patient Address" at a specific index
604      *
605      * @param rep The repetition index (0-indexed)
606      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
607      */
608     public AD removePid11_PatientAddress(int rep) throws HL7Exception { 
609         return (AD) super.removeRepetition(11, rep);
610     }
611 
612 
613 
614 
615     /**
616      * Returns
617      * PID-12: "County code" - creates it if necessary
618      */
619     public ID getCountyCode() { 
620 		ID retVal = this.getTypedField(12, 0);
621 		return retVal;
622     }
623     
624     /**
625      * Returns
626      * PID-12: "County code" - creates it if necessary
627      */
628     public ID getPid12_CountyCode() { 
629 		ID retVal = this.getTypedField(12, 0);
630 		return retVal;
631     }
632 
633 
634     /**
635      * Returns all repetitions of Phone Number - Home (PID-13).
636      */
637     public TN[] getPhoneNumberHome() {
638     	TN[] retVal = this.getTypedField(13, new TN[0]);
639     	return retVal;
640     }
641 
642 
643     /**
644      * Returns all repetitions of Phone Number - Home (PID-13).
645      */
646     public TN[] getPid13_PhoneNumberHome() {
647     	TN[] retVal = this.getTypedField(13, new TN[0]);
648     	return retVal;
649     }
650 
651 
652     /**
653      * Returns a count of the current number of repetitions of Phone Number - Home (PID-13).
654      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
655      * it will return zero.
656      */
657     public int getPhoneNumberHomeReps() {
658     	return this.getReps(13);
659     }
660 
661 
662     /**
663      * Returns a specific repetition of
664      * PID-13: "Phone Number - Home" - creates it if necessary
665      *
666      * @param rep The repetition index (0-indexed)
667      */
668     public TN getPhoneNumberHome(int rep) { 
669 		TN retVal = this.getTypedField(13, rep);
670 		return retVal;
671     }
672 
673     /**
674      * Returns a specific repetition of
675      * PID-13: "Phone Number - Home" - creates it if necessary
676      *
677      * @param rep The repetition index (0-indexed)
678      */
679     public TN getPid13_PhoneNumberHome(int rep) { 
680 		TN retVal = this.getTypedField(13, rep);
681 		return retVal;
682     }
683 
684     /**
685      * Returns a count of the current number of repetitions of Phone Number - Home (PID-13).
686      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
687      * it will return zero.
688      */
689     public int getPid13_PhoneNumberHomeReps() {
690     	return this.getReps(13);
691     }
692 
693 
694     /**
695      * Inserts a repetition of
696      * PID-13: "Phone Number - Home" at a specific index
697      *
698      * @param rep The repetition index (0-indexed)
699      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
700      */
701     public TN insertPhoneNumberHome(int rep) throws HL7Exception { 
702         return (TN) super.insertRepetition(13, rep);
703     }
704 
705 
706     /**
707      * Inserts a repetition of
708      * PID-13: "Phone Number - Home" at a specific index
709      *
710      * @param rep The repetition index (0-indexed)
711      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
712      */
713     public TN insertPid13_PhoneNumberHome(int rep) throws HL7Exception { 
714         return (TN) super.insertRepetition(13, rep);
715     }
716 
717 
718     /**
719      * Removes a repetition of
720      * PID-13: "Phone Number - Home" at a specific index
721      *
722      * @param rep The repetition index (0-indexed)
723      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
724      */
725     public TN removePhoneNumberHome(int rep) throws HL7Exception { 
726         return (TN) super.removeRepetition(13, rep);
727     }
728 
729 
730     /**
731      * Removes a repetition of
732      * PID-13: "Phone Number - Home" at a specific index
733      *
734      * @param rep The repetition index (0-indexed)
735      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
736      */
737     public TN removePid13_PhoneNumberHome(int rep) throws HL7Exception { 
738         return (TN) super.removeRepetition(13, rep);
739     }
740 
741 
742 
743     /**
744      * Returns all repetitions of Phone Number - Business (PID-14).
745      */
746     public TN[] getPhoneNumberBusiness() {
747     	TN[] retVal = this.getTypedField(14, new TN[0]);
748     	return retVal;
749     }
750 
751 
752     /**
753      * Returns all repetitions of Phone Number - Business (PID-14).
754      */
755     public TN[] getPid14_PhoneNumberBusiness() {
756     	TN[] retVal = this.getTypedField(14, new TN[0]);
757     	return retVal;
758     }
759 
760 
761     /**
762      * Returns a count of the current number of repetitions of Phone Number - Business (PID-14).
763      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
764      * it will return zero.
765      */
766     public int getPhoneNumberBusinessReps() {
767     	return this.getReps(14);
768     }
769 
770 
771     /**
772      * Returns a specific repetition of
773      * PID-14: "Phone Number - Business" - creates it if necessary
774      *
775      * @param rep The repetition index (0-indexed)
776      */
777     public TN getPhoneNumberBusiness(int rep) { 
778 		TN retVal = this.getTypedField(14, rep);
779 		return retVal;
780     }
781 
782     /**
783      * Returns a specific repetition of
784      * PID-14: "Phone Number - Business" - creates it if necessary
785      *
786      * @param rep The repetition index (0-indexed)
787      */
788     public TN getPid14_PhoneNumberBusiness(int rep) { 
789 		TN retVal = this.getTypedField(14, rep);
790 		return retVal;
791     }
792 
793     /**
794      * Returns a count of the current number of repetitions of Phone Number - Business (PID-14).
795      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
796      * it will return zero.
797      */
798     public int getPid14_PhoneNumberBusinessReps() {
799     	return this.getReps(14);
800     }
801 
802 
803     /**
804      * Inserts a repetition of
805      * PID-14: "Phone Number - Business" at a specific index
806      *
807      * @param rep The repetition index (0-indexed)
808      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
809      */
810     public TN insertPhoneNumberBusiness(int rep) throws HL7Exception { 
811         return (TN) super.insertRepetition(14, rep);
812     }
813 
814 
815     /**
816      * Inserts a repetition of
817      * PID-14: "Phone Number - Business" at a specific index
818      *
819      * @param rep The repetition index (0-indexed)
820      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
821      */
822     public TN insertPid14_PhoneNumberBusiness(int rep) throws HL7Exception { 
823         return (TN) super.insertRepetition(14, rep);
824     }
825 
826 
827     /**
828      * Removes a repetition of
829      * PID-14: "Phone Number - Business" at a specific index
830      *
831      * @param rep The repetition index (0-indexed)
832      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
833      */
834     public TN removePhoneNumberBusiness(int rep) throws HL7Exception { 
835         return (TN) super.removeRepetition(14, rep);
836     }
837 
838 
839     /**
840      * Removes a repetition of
841      * PID-14: "Phone Number - Business" at a specific index
842      *
843      * @param rep The repetition index (0-indexed)
844      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
845      */
846     public TN removePid14_PhoneNumberBusiness(int rep) throws HL7Exception { 
847         return (TN) super.removeRepetition(14, rep);
848     }
849 
850 
851 
852 
853     /**
854      * Returns
855      * PID-15: "Language - Patient" - creates it if necessary
856      */
857     public ST getLanguagePatient() { 
858 		ST retVal = this.getTypedField(15, 0);
859 		return retVal;
860     }
861     
862     /**
863      * Returns
864      * PID-15: "Language - Patient" - creates it if necessary
865      */
866     public ST getPid15_LanguagePatient() { 
867 		ST retVal = this.getTypedField(15, 0);
868 		return retVal;
869     }
870 
871 
872 
873     /**
874      * Returns
875      * PID-16: "Marital Status" - creates it if necessary
876      */
877     public ID getMaritalStatus() { 
878 		ID retVal = this.getTypedField(16, 0);
879 		return retVal;
880     }
881     
882     /**
883      * Returns
884      * PID-16: "Marital Status" - creates it if necessary
885      */
886     public ID getPid16_MaritalStatus() { 
887 		ID retVal = this.getTypedField(16, 0);
888 		return retVal;
889     }
890 
891 
892 
893     /**
894      * Returns
895      * PID-17: "Religion" - creates it if necessary
896      */
897     public ID getReligion() { 
898 		ID retVal = this.getTypedField(17, 0);
899 		return retVal;
900     }
901     
902     /**
903      * Returns
904      * PID-17: "Religion" - creates it if necessary
905      */
906     public ID getPid17_Religion() { 
907 		ID retVal = this.getTypedField(17, 0);
908 		return retVal;
909     }
910 
911 
912 
913     /**
914      * Returns
915      * PID-18: "Patient Account Number" - creates it if necessary
916      */
917     public CK getPatientAccountNumber() { 
918 		CK retVal = this.getTypedField(18, 0);
919 		return retVal;
920     }
921     
922     /**
923      * Returns
924      * PID-18: "Patient Account Number" - creates it if necessary
925      */
926     public CK getPid18_PatientAccountNumber() { 
927 		CK retVal = this.getTypedField(18, 0);
928 		return retVal;
929     }
930 
931 
932 
933     /**
934      * Returns
935      * PID-19: "Social security number - patient" - creates it if necessary
936      */
937     public ST getSocialSecurityNumberPatient() { 
938 		ST retVal = this.getTypedField(19, 0);
939 		return retVal;
940     }
941     
942     /**
943      * Returns
944      * PID-19: "Social security number - patient" - creates it if necessary
945      */
946     public ST getPid19_SocialSecurityNumberPatient() { 
947 		ST retVal = this.getTypedField(19, 0);
948 		return retVal;
949     }
950 
951 
952 
953     /**
954      * Returns
955      * PID-20: "Driver's license number - patient" - creates it if necessary
956      */
957     public CM_LICENSE_NO getDriverSLicenseNumberPatient() { 
958 		CM_LICENSE_NO retVal = this.getTypedField(20, 0);
959 		return retVal;
960     }
961     
962     /**
963      * Returns
964      * PID-20: "Driver's license number - patient" - creates it if necessary
965      */
966     public CM_LICENSE_NO getPid20_DriverSLicenseNumberPatient() { 
967 		CM_LICENSE_NO retVal = this.getTypedField(20, 0);
968 		return retVal;
969     }
970 
971 
972 
973     /**
974      * Returns
975      * PID-21: "Mother's Identifier" - creates it if necessary
976      */
977     public CK getMotherSIdentifier() { 
978 		CK retVal = this.getTypedField(21, 0);
979 		return retVal;
980     }
981     
982     /**
983      * Returns
984      * PID-21: "Mother's Identifier" - creates it if necessary
985      */
986     public CK getPid21_MotherSIdentifier() { 
987 		CK retVal = this.getTypedField(21, 0);
988 		return retVal;
989     }
990 
991 
992 
993     /**
994      * Returns
995      * PID-22: "Ethnic Group" - creates it if necessary
996      */
997     public ID getEthnicGroup() { 
998 		ID retVal = this.getTypedField(22, 0);
999 		return retVal;
1000     }
1001     
1002     /**
1003      * Returns
1004      * PID-22: "Ethnic Group" - creates it if necessary
1005      */
1006     public ID getPid22_EthnicGroup() { 
1007 		ID retVal = this.getTypedField(22, 0);
1008 		return retVal;
1009     }
1010 
1011 
1012 
1013     /**
1014      * Returns
1015      * PID-23: "Birth Place" - creates it if necessary
1016      */
1017     public ST getBirthPlace() { 
1018 		ST retVal = this.getTypedField(23, 0);
1019 		return retVal;
1020     }
1021     
1022     /**
1023      * Returns
1024      * PID-23: "Birth Place" - creates it if necessary
1025      */
1026     public ST getPid23_BirthPlace() { 
1027 		ST retVal = this.getTypedField(23, 0);
1028 		return retVal;
1029     }
1030 
1031 
1032 
1033     /**
1034      * Returns
1035      * PID-24: "Multiple Birth Indicator" - creates it if necessary
1036      */
1037     public ID getMultipleBirthIndicator() { 
1038 		ID retVal = this.getTypedField(24, 0);
1039 		return retVal;
1040     }
1041     
1042     /**
1043      * Returns
1044      * PID-24: "Multiple Birth Indicator" - creates it if necessary
1045      */
1046     public ID getPid24_MultipleBirthIndicator() { 
1047 		ID retVal = this.getTypedField(24, 0);
1048 		return retVal;
1049     }
1050 
1051 
1052 
1053     /**
1054      * Returns
1055      * PID-25: "Birth Order" - creates it if necessary
1056      */
1057     public NM getBirthOrder() { 
1058 		NM retVal = this.getTypedField(25, 0);
1059 		return retVal;
1060     }
1061     
1062     /**
1063      * Returns
1064      * PID-25: "Birth Order" - creates it if necessary
1065      */
1066     public NM getPid25_BirthOrder() { 
1067 		NM retVal = this.getTypedField(25, 0);
1068 		return retVal;
1069     }
1070 
1071 
1072     /**
1073      * Returns all repetitions of Citizenship (PID-26).
1074      */
1075     public ID[] getCitizenship() {
1076     	ID[] retVal = this.getTypedField(26, new ID[0]);
1077     	return retVal;
1078     }
1079 
1080 
1081     /**
1082      * Returns all repetitions of Citizenship (PID-26).
1083      */
1084     public ID[] getPid26_Citizenship() {
1085     	ID[] retVal = this.getTypedField(26, new ID[0]);
1086     	return retVal;
1087     }
1088 
1089 
1090     /**
1091      * Returns a count of the current number of repetitions of Citizenship (PID-26).
1092      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1093      * it will return zero.
1094      */
1095     public int getCitizenshipReps() {
1096     	return this.getReps(26);
1097     }
1098 
1099 
1100     /**
1101      * Returns a specific repetition of
1102      * PID-26: "Citizenship" - creates it if necessary
1103      *
1104      * @param rep The repetition index (0-indexed)
1105      */
1106     public ID getCitizenship(int rep) { 
1107 		ID retVal = this.getTypedField(26, rep);
1108 		return retVal;
1109     }
1110 
1111     /**
1112      * Returns a specific repetition of
1113      * PID-26: "Citizenship" - creates it if necessary
1114      *
1115      * @param rep The repetition index (0-indexed)
1116      */
1117     public ID getPid26_Citizenship(int rep) { 
1118 		ID retVal = this.getTypedField(26, rep);
1119 		return retVal;
1120     }
1121 
1122     /**
1123      * Returns a count of the current number of repetitions of Citizenship (PID-26).
1124      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1125      * it will return zero.
1126      */
1127     public int getPid26_CitizenshipReps() {
1128     	return this.getReps(26);
1129     }
1130 
1131 
1132     /**
1133      * Inserts a repetition of
1134      * PID-26: "Citizenship" at a specific index
1135      *
1136      * @param rep The repetition index (0-indexed)
1137      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1138      */
1139     public ID insertCitizenship(int rep) throws HL7Exception { 
1140         return (ID) super.insertRepetition(26, rep);
1141     }
1142 
1143 
1144     /**
1145      * Inserts a repetition of
1146      * PID-26: "Citizenship" at a specific index
1147      *
1148      * @param rep The repetition index (0-indexed)
1149      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1150      */
1151     public ID insertPid26_Citizenship(int rep) throws HL7Exception { 
1152         return (ID) super.insertRepetition(26, rep);
1153     }
1154 
1155 
1156     /**
1157      * Removes a repetition of
1158      * PID-26: "Citizenship" at a specific index
1159      *
1160      * @param rep The repetition index (0-indexed)
1161      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1162      */
1163     public ID removeCitizenship(int rep) throws HL7Exception { 
1164         return (ID) super.removeRepetition(26, rep);
1165     }
1166 
1167 
1168     /**
1169      * Removes a repetition of
1170      * PID-26: "Citizenship" at a specific index
1171      *
1172      * @param rep The repetition index (0-indexed)
1173      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1174      */
1175     public ID removePid26_Citizenship(int rep) throws HL7Exception { 
1176         return (ID) super.removeRepetition(26, rep);
1177     }
1178 
1179 
1180 
1181 
1182     /**
1183      * Returns
1184      * PID-27: "Veterans Military Status" - creates it if necessary
1185      */
1186     public ST getVeteransMilitaryStatus() { 
1187 		ST retVal = this.getTypedField(27, 0);
1188 		return retVal;
1189     }
1190     
1191     /**
1192      * Returns
1193      * PID-27: "Veterans Military Status" - creates it if necessary
1194      */
1195     public ST getPid27_VeteransMilitaryStatus() { 
1196 		ST retVal = this.getTypedField(27, 0);
1197 		return retVal;
1198     }
1199 
1200 
1201 
1202 
1203 
1204     /** {@inheritDoc} */   
1205     protected Type createNewTypeWithoutReflection(int field) {
1206        switch (field) {
1207           case 0: return new SI(getMessage());
1208           case 1: return new CK(getMessage());
1209           case 2: return new CM_PAT_ID(getMessage());
1210           case 3: return new ST(getMessage());
1211           case 4: return new PN(getMessage());
1212           case 5: return new ST(getMessage());
1213           case 6: return new TS(getMessage());
1214           case 7: return new ID(getMessage(), new Integer( 1 ));
1215           case 8: return new PN(getMessage());
1216           case 9: return new ID(getMessage(), new Integer( 5 ));
1217           case 10: return new AD(getMessage());
1218           case 11: return new ID(getMessage(), new Integer( 0 ));
1219           case 12: return new TN(getMessage());
1220           case 13: return new TN(getMessage());
1221           case 14: return new ST(getMessage());
1222           case 15: return new ID(getMessage(), new Integer( 2 ));
1223           case 16: return new ID(getMessage(), new Integer( 6 ));
1224           case 17: return new CK(getMessage());
1225           case 18: return new ST(getMessage());
1226           case 19: return new CM_LICENSE_NO(getMessage());
1227           case 20: return new CK(getMessage());
1228           case 21: return new ID(getMessage(), new Integer( 189 ));
1229           case 22: return new ST(getMessage());
1230           case 23: return new ID(getMessage(), new Integer( 0 ));
1231           case 24: return new NM(getMessage());
1232           case 25: return new ID(getMessage(), new Integer( 171 ));
1233           case 26: return new ST(getMessage());
1234           default: return null;
1235        }
1236    }
1237 
1238 
1239 }
1240