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.v24.segment;
035
036// import ca.uhn.hl7v2.model.v24.group.*;
037import ca.uhn.hl7v2.model.v24.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/**
049 *<p>Represents an HL7 PID message segment (Patient identification). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>PID-1: Set ID - PID (SI) <b>optional </b>
053     * <li>PID-2: Patient ID (CX) <b>optional </b>
054     * <li>PID-3: Patient Identifier List (CX) <b> repeating</b>
055     * <li>PID-4: Alternate Patient ID - PID (CX) <b>optional repeating</b>
056     * <li>PID-5: Patient Name (XPN) <b> repeating</b>
057     * <li>PID-6: Mother's Maiden Name (XPN) <b>optional repeating</b>
058     * <li>PID-7: Date/Time Of Birth (TS) <b>optional </b>
059     * <li>PID-8: Administrative Sex (IS) <b>optional </b>
060     * <li>PID-9: Patient Alias (XPN) <b>optional repeating</b>
061     * <li>PID-10: Race (CE) <b>optional repeating</b>
062     * <li>PID-11: Patient Address (XAD) <b>optional repeating</b>
063     * <li>PID-12: County Code (IS) <b>optional </b>
064     * <li>PID-13: Phone Number - Home (XTN) <b>optional repeating</b>
065     * <li>PID-14: Phone Number - Business (XTN) <b>optional repeating</b>
066     * <li>PID-15: Primary Language (CE) <b>optional </b>
067     * <li>PID-16: Marital Status (CE) <b>optional </b>
068     * <li>PID-17: Religion (CE) <b>optional </b>
069     * <li>PID-18: Patient Account Number (CX) <b>optional </b>
070     * <li>PID-19: SSN Number - Patient (ST) <b>optional </b>
071     * <li>PID-20: Driver's License Number - Patient (DLN) <b>optional </b>
072     * <li>PID-21: Mother's Identifier (CX) <b>optional repeating</b>
073     * <li>PID-22: Ethnic Group (CE) <b>optional repeating</b>
074     * <li>PID-23: Birth Place (ST) <b>optional </b>
075     * <li>PID-24: Multiple Birth Indicator (ID) <b>optional </b>
076     * <li>PID-25: Birth Order (NM) <b>optional </b>
077     * <li>PID-26: Citizenship (CE) <b>optional repeating</b>
078     * <li>PID-27: Veterans Military Status (CE) <b>optional </b>
079     * <li>PID-28: Nationality (CE) <b>optional </b>
080     * <li>PID-29: Patient Death Date and Time (TS) <b>optional </b>
081     * <li>PID-30: Patient Death Indicator (ID) <b>optional </b>
082     * <li>PID-31: Identity Unknown Indicator (ID) <b>optional </b>
083     * <li>PID-32: Identity Reliability Code (IS) <b>optional repeating</b>
084     * <li>PID-33: Last Update Date/Time (TS) <b>optional </b>
085     * <li>PID-34: Last Update Facility (HD) <b>optional </b>
086     * <li>PID-35: Species Code (CE) <b>optional </b>
087     * <li>PID-36: Breed Code (CE) <b>optional </b>
088     * <li>PID-37: Strain (ST) <b>optional </b>
089     * <li>PID-38: Production Class Code (CE) <b>optional </b>
090 * </ul>
091 */
092@SuppressWarnings("unused")
093public class PID extends AbstractSegment {
094
095    /** 
096     * Creates a new PID segment
097     */
098    public PID(Group parent, ModelClassFactory factory) {
099       super(parent, factory);
100       init(factory);
101    }
102
103    private void init(ModelClassFactory factory) {
104       try {
105                                  this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - PID");
106                                  this.add(CX.class, false, 1, 20, new Object[]{ getMessage() }, "Patient ID");
107                                  this.add(CX.class, true, 0, 250, new Object[]{ getMessage() }, "Patient Identifier List");
108                                  this.add(CX.class, false, 0, 20, new Object[]{ getMessage() }, "Alternate Patient ID - PID");
109                                  this.add(XPN.class, true, 0, 250, new Object[]{ getMessage() }, "Patient Name");
110                                  this.add(XPN.class, false, 0, 250, new Object[]{ getMessage() }, "Mother's Maiden Name");
111                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time Of Birth");
112                                              this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(1) }, "Administrative Sex");
113                                  this.add(XPN.class, false, 0, 250, new Object[]{ getMessage() }, "Patient Alias");
114                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Race");
115                                  this.add(XAD.class, false, 0, 250, new Object[]{ getMessage() }, "Patient Address");
116                                              this.add(IS.class, false, 1, 4, new Object[]{ getMessage(), new Integer(289) }, "County Code");
117                                  this.add(XTN.class, false, 0, 250, new Object[]{ getMessage() }, "Phone Number - Home");
118                                  this.add(XTN.class, false, 0, 250, new Object[]{ getMessage() }, "Phone Number - Business");
119                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Primary Language");
120                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Marital Status");
121                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Religion");
122                                  this.add(CX.class, false, 1, 250, new Object[]{ getMessage() }, "Patient Account Number");
123                                  this.add(ST.class, false, 1, 16, new Object[]{ getMessage() }, "SSN Number - Patient");
124                                  this.add(DLN.class, false, 1, 25, new Object[]{ getMessage() }, "Driver's License Number - Patient");
125                                  this.add(CX.class, false, 0, 250, new Object[]{ getMessage() }, "Mother's Identifier");
126                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Ethnic Group");
127                                  this.add(ST.class, false, 1, 250, new Object[]{ getMessage() }, "Birth Place");
128                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Multiple Birth Indicator");
129                                  this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Birth Order");
130                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Citizenship");
131                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Veterans Military Status");
132                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Nationality");
133                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Patient Death Date and Time");
134                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Patient Death Indicator");
135                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Identity Unknown Indicator");
136                                              this.add(IS.class, false, 0, 20, new Object[]{ getMessage(), new Integer(445) }, "Identity Reliability Code");
137                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Last Update Date/Time");
138                                  this.add(HD.class, false, 1, 40, new Object[]{ getMessage() }, "Last Update Facility");
139                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Species Code");
140                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Breed Code");
141                                  this.add(ST.class, false, 1, 80, new Object[]{ getMessage() }, "Strain");
142                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Production Class Code");
143       } catch(HL7Exception e) {
144          log.error("Unexpected error creating PID - this is probably a bug in the source code generator.", e);
145       }
146    }
147
148
149
150    /**
151     * Returns
152     * PID-1: "Set ID - PID" - creates it if necessary
153     */
154    public SI getSetIDPID() { 
155                SI retVal = this.getTypedField(1, 0);
156                return retVal;
157    }
158    
159    /**
160     * Returns
161     * PID-1: "Set ID - PID" - creates it if necessary
162     */
163    public SI getPid1_SetIDPID() { 
164                SI retVal = this.getTypedField(1, 0);
165                return retVal;
166    }
167
168
169
170    /**
171     * Returns
172     * PID-2: "Patient ID" - creates it if necessary
173     */
174    public CX getPatientID() { 
175                CX retVal = this.getTypedField(2, 0);
176                return retVal;
177    }
178    
179    /**
180     * Returns
181     * PID-2: "Patient ID" - creates it if necessary
182     */
183    public CX getPid2_PatientID() { 
184                CX retVal = this.getTypedField(2, 0);
185                return retVal;
186    }
187
188
189    /**
190     * Returns all repetitions of Patient Identifier List (PID-3).
191     */
192    public CX[] getPatientIdentifierList() {
193        CX[] retVal = this.getTypedField(3, new CX[0]);
194        return retVal;
195    }
196
197
198    /**
199     * Returns all repetitions of Patient Identifier List (PID-3).
200     */
201    public CX[] getPid3_PatientIdentifierList() {
202        CX[] retVal = this.getTypedField(3, new CX[0]);
203        return retVal;
204    }
205
206
207    /**
208     * Returns a count of the current number of repetitions of Patient Identifier List (PID-3).
209     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
210     * it will return zero.
211     */
212    public int getPatientIdentifierListReps() {
213        return this.getReps(3);
214    }
215
216
217    /**
218     * Returns a specific repetition of
219     * PID-3: "Patient Identifier List" - creates it if necessary
220     *
221     * @param rep The repetition index (0-indexed)
222     */
223    public CX getPatientIdentifierList(int rep) { 
224                CX retVal = this.getTypedField(3, rep);
225                return retVal;
226    }
227
228    /**
229     * Returns a specific repetition of
230     * PID-3: "Patient Identifier List" - creates it if necessary
231     *
232     * @param rep The repetition index (0-indexed)
233     */
234    public CX getPid3_PatientIdentifierList(int rep) { 
235                CX retVal = this.getTypedField(3, rep);
236                return retVal;
237    }
238
239    /**
240     * Returns a count of the current number of repetitions of Patient Identifier List (PID-3).
241     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
242     * it will return zero.
243     */
244    public int getPid3_PatientIdentifierListReps() {
245        return this.getReps(3);
246    }
247
248
249    /**
250     * Inserts a repetition of
251     * PID-3: "Patient Identifier List" at a specific index
252     *
253     * @param rep The repetition index (0-indexed)
254     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
255     */
256    public CX insertPatientIdentifierList(int rep) throws HL7Exception { 
257        return (CX) super.insertRepetition(3, rep);
258    }
259
260
261    /**
262     * Inserts a repetition of
263     * PID-3: "Patient Identifier List" at a specific index
264     *
265     * @param rep The repetition index (0-indexed)
266     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
267     */
268    public CX insertPid3_PatientIdentifierList(int rep) throws HL7Exception { 
269        return (CX) super.insertRepetition(3, rep);
270    }
271
272
273    /**
274     * Removes a repetition of
275     * PID-3: "Patient Identifier List" at a specific index
276     *
277     * @param rep The repetition index (0-indexed)
278     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
279     */
280    public CX removePatientIdentifierList(int rep) throws HL7Exception { 
281        return (CX) super.removeRepetition(3, rep);
282    }
283
284
285    /**
286     * Removes a repetition of
287     * PID-3: "Patient Identifier List" at a specific index
288     *
289     * @param rep The repetition index (0-indexed)
290     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
291     */
292    public CX removePid3_PatientIdentifierList(int rep) throws HL7Exception { 
293        return (CX) super.removeRepetition(3, rep);
294    }
295
296
297
298    /**
299     * Returns all repetitions of Alternate Patient ID - PID (PID-4).
300     */
301    public CX[] getAlternatePatientIDPID() {
302        CX[] retVal = this.getTypedField(4, new CX[0]);
303        return retVal;
304    }
305
306
307    /**
308     * Returns all repetitions of Alternate Patient ID - PID (PID-4).
309     */
310    public CX[] getPid4_AlternatePatientIDPID() {
311        CX[] retVal = this.getTypedField(4, new CX[0]);
312        return retVal;
313    }
314
315
316    /**
317     * Returns a count of the current number of repetitions of Alternate Patient ID - PID (PID-4).
318     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
319     * it will return zero.
320     */
321    public int getAlternatePatientIDPIDReps() {
322        return this.getReps(4);
323    }
324
325
326    /**
327     * Returns a specific repetition of
328     * PID-4: "Alternate Patient ID - PID" - creates it if necessary
329     *
330     * @param rep The repetition index (0-indexed)
331     */
332    public CX getAlternatePatientIDPID(int rep) { 
333                CX retVal = this.getTypedField(4, rep);
334                return retVal;
335    }
336
337    /**
338     * Returns a specific repetition of
339     * PID-4: "Alternate Patient ID - PID" - creates it if necessary
340     *
341     * @param rep The repetition index (0-indexed)
342     */
343    public CX getPid4_AlternatePatientIDPID(int rep) { 
344                CX retVal = this.getTypedField(4, rep);
345                return retVal;
346    }
347
348    /**
349     * Returns a count of the current number of repetitions of Alternate Patient ID - PID (PID-4).
350     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
351     * it will return zero.
352     */
353    public int getPid4_AlternatePatientIDPIDReps() {
354        return this.getReps(4);
355    }
356
357
358    /**
359     * Inserts a repetition of
360     * PID-4: "Alternate Patient ID - PID" at a specific index
361     *
362     * @param rep The repetition index (0-indexed)
363     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
364     */
365    public CX insertAlternatePatientIDPID(int rep) throws HL7Exception { 
366        return (CX) super.insertRepetition(4, rep);
367    }
368
369
370    /**
371     * Inserts a repetition of
372     * PID-4: "Alternate Patient ID - PID" at a specific index
373     *
374     * @param rep The repetition index (0-indexed)
375     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
376     */
377    public CX insertPid4_AlternatePatientIDPID(int rep) throws HL7Exception { 
378        return (CX) super.insertRepetition(4, rep);
379    }
380
381
382    /**
383     * Removes a repetition of
384     * PID-4: "Alternate Patient ID - PID" at a specific index
385     *
386     * @param rep The repetition index (0-indexed)
387     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
388     */
389    public CX removeAlternatePatientIDPID(int rep) throws HL7Exception { 
390        return (CX) super.removeRepetition(4, rep);
391    }
392
393
394    /**
395     * Removes a repetition of
396     * PID-4: "Alternate Patient ID - PID" at a specific index
397     *
398     * @param rep The repetition index (0-indexed)
399     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
400     */
401    public CX removePid4_AlternatePatientIDPID(int rep) throws HL7Exception { 
402        return (CX) super.removeRepetition(4, rep);
403    }
404
405
406
407    /**
408     * Returns all repetitions of Patient Name (PID-5).
409     */
410    public XPN[] getPatientName() {
411        XPN[] retVal = this.getTypedField(5, new XPN[0]);
412        return retVal;
413    }
414
415
416    /**
417     * Returns all repetitions of Patient Name (PID-5).
418     */
419    public XPN[] getPid5_PatientName() {
420        XPN[] retVal = this.getTypedField(5, new XPN[0]);
421        return retVal;
422    }
423
424
425    /**
426     * Returns a count of the current number of repetitions of Patient Name (PID-5).
427     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
428     * it will return zero.
429     */
430    public int getPatientNameReps() {
431        return this.getReps(5);
432    }
433
434
435    /**
436     * Returns a specific repetition of
437     * PID-5: "Patient Name" - creates it if necessary
438     *
439     * @param rep The repetition index (0-indexed)
440     */
441    public XPN getPatientName(int rep) { 
442                XPN retVal = this.getTypedField(5, rep);
443                return retVal;
444    }
445
446    /**
447     * Returns a specific repetition of
448     * PID-5: "Patient Name" - creates it if necessary
449     *
450     * @param rep The repetition index (0-indexed)
451     */
452    public XPN getPid5_PatientName(int rep) { 
453                XPN retVal = this.getTypedField(5, rep);
454                return retVal;
455    }
456
457    /**
458     * Returns a count of the current number of repetitions of Patient Name (PID-5).
459     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
460     * it will return zero.
461     */
462    public int getPid5_PatientNameReps() {
463        return this.getReps(5);
464    }
465
466
467    /**
468     * Inserts a repetition of
469     * PID-5: "Patient Name" at a specific index
470     *
471     * @param rep The repetition index (0-indexed)
472     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
473     */
474    public XPN insertPatientName(int rep) throws HL7Exception { 
475        return (XPN) super.insertRepetition(5, rep);
476    }
477
478
479    /**
480     * Inserts a repetition of
481     * PID-5: "Patient Name" at a specific index
482     *
483     * @param rep The repetition index (0-indexed)
484     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
485     */
486    public XPN insertPid5_PatientName(int rep) throws HL7Exception { 
487        return (XPN) super.insertRepetition(5, rep);
488    }
489
490
491    /**
492     * Removes a repetition of
493     * PID-5: "Patient Name" at a specific index
494     *
495     * @param rep The repetition index (0-indexed)
496     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
497     */
498    public XPN removePatientName(int rep) throws HL7Exception { 
499        return (XPN) super.removeRepetition(5, rep);
500    }
501
502
503    /**
504     * Removes a repetition of
505     * PID-5: "Patient Name" at a specific index
506     *
507     * @param rep The repetition index (0-indexed)
508     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
509     */
510    public XPN removePid5_PatientName(int rep) throws HL7Exception { 
511        return (XPN) super.removeRepetition(5, rep);
512    }
513
514
515
516    /**
517     * Returns all repetitions of Mother's Maiden Name (PID-6).
518     */
519    public XPN[] getMotherSMaidenName() {
520        XPN[] retVal = this.getTypedField(6, new XPN[0]);
521        return retVal;
522    }
523
524
525    /**
526     * Returns all repetitions of Mother's Maiden Name (PID-6).
527     */
528    public XPN[] getPid6_MotherSMaidenName() {
529        XPN[] retVal = this.getTypedField(6, new XPN[0]);
530        return retVal;
531    }
532
533
534    /**
535     * Returns a count of the current number of repetitions of Mother's Maiden Name (PID-6).
536     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
537     * it will return zero.
538     */
539    public int getMotherSMaidenNameReps() {
540        return this.getReps(6);
541    }
542
543
544    /**
545     * Returns a specific repetition of
546     * PID-6: "Mother's Maiden Name" - creates it if necessary
547     *
548     * @param rep The repetition index (0-indexed)
549     */
550    public XPN getMotherSMaidenName(int rep) { 
551                XPN retVal = this.getTypedField(6, rep);
552                return retVal;
553    }
554
555    /**
556     * Returns a specific repetition of
557     * PID-6: "Mother's Maiden Name" - creates it if necessary
558     *
559     * @param rep The repetition index (0-indexed)
560     */
561    public XPN getPid6_MotherSMaidenName(int rep) { 
562                XPN retVal = this.getTypedField(6, rep);
563                return retVal;
564    }
565
566    /**
567     * Returns a count of the current number of repetitions of Mother's Maiden Name (PID-6).
568     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
569     * it will return zero.
570     */
571    public int getPid6_MotherSMaidenNameReps() {
572        return this.getReps(6);
573    }
574
575
576    /**
577     * Inserts a repetition of
578     * PID-6: "Mother's Maiden Name" at a specific index
579     *
580     * @param rep The repetition index (0-indexed)
581     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
582     */
583    public XPN insertMotherSMaidenName(int rep) throws HL7Exception { 
584        return (XPN) super.insertRepetition(6, rep);
585    }
586
587
588    /**
589     * Inserts a repetition of
590     * PID-6: "Mother's Maiden Name" at a specific index
591     *
592     * @param rep The repetition index (0-indexed)
593     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
594     */
595    public XPN insertPid6_MotherSMaidenName(int rep) throws HL7Exception { 
596        return (XPN) super.insertRepetition(6, rep);
597    }
598
599
600    /**
601     * Removes a repetition of
602     * PID-6: "Mother's Maiden Name" at a specific index
603     *
604     * @param rep The repetition index (0-indexed)
605     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
606     */
607    public XPN removeMotherSMaidenName(int rep) throws HL7Exception { 
608        return (XPN) super.removeRepetition(6, rep);
609    }
610
611
612    /**
613     * Removes a repetition of
614     * PID-6: "Mother's Maiden Name" at a specific index
615     *
616     * @param rep The repetition index (0-indexed)
617     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
618     */
619    public XPN removePid6_MotherSMaidenName(int rep) throws HL7Exception { 
620        return (XPN) super.removeRepetition(6, rep);
621    }
622
623
624
625
626    /**
627     * Returns
628     * PID-7: "Date/Time Of Birth" - creates it if necessary
629     */
630    public TS getDateTimeOfBirth() { 
631                TS retVal = this.getTypedField(7, 0);
632                return retVal;
633    }
634    
635    /**
636     * Returns
637     * PID-7: "Date/Time Of Birth" - creates it if necessary
638     */
639    public TS getPid7_DateTimeOfBirth() { 
640                TS retVal = this.getTypedField(7, 0);
641                return retVal;
642    }
643
644
645
646    /**
647     * Returns
648     * PID-8: "Administrative Sex" - creates it if necessary
649     */
650    public IS getAdministrativeSex() { 
651                IS retVal = this.getTypedField(8, 0);
652                return retVal;
653    }
654    
655    /**
656     * Returns
657     * PID-8: "Administrative Sex" - creates it if necessary
658     */
659    public IS getPid8_AdministrativeSex() { 
660                IS retVal = this.getTypedField(8, 0);
661                return retVal;
662    }
663
664
665    /**
666     * Returns all repetitions of Patient Alias (PID-9).
667     */
668    public XPN[] getPatientAlias() {
669        XPN[] retVal = this.getTypedField(9, new XPN[0]);
670        return retVal;
671    }
672
673
674    /**
675     * Returns all repetitions of Patient Alias (PID-9).
676     */
677    public XPN[] getPid9_PatientAlias() {
678        XPN[] retVal = this.getTypedField(9, new XPN[0]);
679        return retVal;
680    }
681
682
683    /**
684     * Returns a count of the current number of repetitions of Patient Alias (PID-9).
685     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
686     * it will return zero.
687     */
688    public int getPatientAliasReps() {
689        return this.getReps(9);
690    }
691
692
693    /**
694     * Returns a specific repetition of
695     * PID-9: "Patient Alias" - creates it if necessary
696     *
697     * @param rep The repetition index (0-indexed)
698     */
699    public XPN getPatientAlias(int rep) { 
700                XPN retVal = this.getTypedField(9, rep);
701                return retVal;
702    }
703
704    /**
705     * Returns a specific repetition of
706     * PID-9: "Patient Alias" - creates it if necessary
707     *
708     * @param rep The repetition index (0-indexed)
709     */
710    public XPN getPid9_PatientAlias(int rep) { 
711                XPN retVal = this.getTypedField(9, rep);
712                return retVal;
713    }
714
715    /**
716     * Returns a count of the current number of repetitions of Patient Alias (PID-9).
717     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
718     * it will return zero.
719     */
720    public int getPid9_PatientAliasReps() {
721        return this.getReps(9);
722    }
723
724
725    /**
726     * Inserts a repetition of
727     * PID-9: "Patient Alias" at a specific index
728     *
729     * @param rep The repetition index (0-indexed)
730     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
731     */
732    public XPN insertPatientAlias(int rep) throws HL7Exception { 
733        return (XPN) super.insertRepetition(9, rep);
734    }
735
736
737    /**
738     * Inserts a repetition of
739     * PID-9: "Patient Alias" at a specific index
740     *
741     * @param rep The repetition index (0-indexed)
742     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
743     */
744    public XPN insertPid9_PatientAlias(int rep) throws HL7Exception { 
745        return (XPN) super.insertRepetition(9, rep);
746    }
747
748
749    /**
750     * Removes a repetition of
751     * PID-9: "Patient Alias" at a specific index
752     *
753     * @param rep The repetition index (0-indexed)
754     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
755     */
756    public XPN removePatientAlias(int rep) throws HL7Exception { 
757        return (XPN) super.removeRepetition(9, rep);
758    }
759
760
761    /**
762     * Removes a repetition of
763     * PID-9: "Patient Alias" at a specific index
764     *
765     * @param rep The repetition index (0-indexed)
766     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
767     */
768    public XPN removePid9_PatientAlias(int rep) throws HL7Exception { 
769        return (XPN) super.removeRepetition(9, rep);
770    }
771
772
773
774    /**
775     * Returns all repetitions of Race (PID-10).
776     */
777    public CE[] getRace() {
778        CE[] retVal = this.getTypedField(10, new CE[0]);
779        return retVal;
780    }
781
782
783    /**
784     * Returns all repetitions of Race (PID-10).
785     */
786    public CE[] getPid10_Race() {
787        CE[] retVal = this.getTypedField(10, new CE[0]);
788        return retVal;
789    }
790
791
792    /**
793     * Returns a count of the current number of repetitions of Race (PID-10).
794     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
795     * it will return zero.
796     */
797    public int getRaceReps() {
798        return this.getReps(10);
799    }
800
801
802    /**
803     * Returns a specific repetition of
804     * PID-10: "Race" - creates it if necessary
805     *
806     * @param rep The repetition index (0-indexed)
807     */
808    public CE getRace(int rep) { 
809                CE retVal = this.getTypedField(10, rep);
810                return retVal;
811    }
812
813    /**
814     * Returns a specific repetition of
815     * PID-10: "Race" - creates it if necessary
816     *
817     * @param rep The repetition index (0-indexed)
818     */
819    public CE getPid10_Race(int rep) { 
820                CE retVal = this.getTypedField(10, rep);
821                return retVal;
822    }
823
824    /**
825     * Returns a count of the current number of repetitions of Race (PID-10).
826     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
827     * it will return zero.
828     */
829    public int getPid10_RaceReps() {
830        return this.getReps(10);
831    }
832
833
834    /**
835     * Inserts a repetition of
836     * PID-10: "Race" at a specific index
837     *
838     * @param rep The repetition index (0-indexed)
839     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
840     */
841    public CE insertRace(int rep) throws HL7Exception { 
842        return (CE) super.insertRepetition(10, rep);
843    }
844
845
846    /**
847     * Inserts a repetition of
848     * PID-10: "Race" at a specific index
849     *
850     * @param rep The repetition index (0-indexed)
851     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
852     */
853    public CE insertPid10_Race(int rep) throws HL7Exception { 
854        return (CE) super.insertRepetition(10, rep);
855    }
856
857
858    /**
859     * Removes a repetition of
860     * PID-10: "Race" at a specific index
861     *
862     * @param rep The repetition index (0-indexed)
863     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
864     */
865    public CE removeRace(int rep) throws HL7Exception { 
866        return (CE) super.removeRepetition(10, rep);
867    }
868
869
870    /**
871     * Removes a repetition of
872     * PID-10: "Race" at a specific index
873     *
874     * @param rep The repetition index (0-indexed)
875     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
876     */
877    public CE removePid10_Race(int rep) throws HL7Exception { 
878        return (CE) super.removeRepetition(10, rep);
879    }
880
881
882
883    /**
884     * Returns all repetitions of Patient Address (PID-11).
885     */
886    public XAD[] getPatientAddress() {
887        XAD[] retVal = this.getTypedField(11, new XAD[0]);
888        return retVal;
889    }
890
891
892    /**
893     * Returns all repetitions of Patient Address (PID-11).
894     */
895    public XAD[] getPid11_PatientAddress() {
896        XAD[] retVal = this.getTypedField(11, new XAD[0]);
897        return retVal;
898    }
899
900
901    /**
902     * Returns a count of the current number of repetitions of Patient Address (PID-11).
903     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
904     * it will return zero.
905     */
906    public int getPatientAddressReps() {
907        return this.getReps(11);
908    }
909
910
911    /**
912     * Returns a specific repetition of
913     * PID-11: "Patient Address" - creates it if necessary
914     *
915     * @param rep The repetition index (0-indexed)
916     */
917    public XAD getPatientAddress(int rep) { 
918                XAD retVal = this.getTypedField(11, rep);
919                return retVal;
920    }
921
922    /**
923     * Returns a specific repetition of
924     * PID-11: "Patient Address" - creates it if necessary
925     *
926     * @param rep The repetition index (0-indexed)
927     */
928    public XAD getPid11_PatientAddress(int rep) { 
929                XAD retVal = this.getTypedField(11, rep);
930                return retVal;
931    }
932
933    /**
934     * Returns a count of the current number of repetitions of Patient Address (PID-11).
935     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
936     * it will return zero.
937     */
938    public int getPid11_PatientAddressReps() {
939        return this.getReps(11);
940    }
941
942
943    /**
944     * Inserts a repetition of
945     * PID-11: "Patient Address" at a specific index
946     *
947     * @param rep The repetition index (0-indexed)
948     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
949     */
950    public XAD insertPatientAddress(int rep) throws HL7Exception { 
951        return (XAD) super.insertRepetition(11, rep);
952    }
953
954
955    /**
956     * Inserts a repetition of
957     * PID-11: "Patient Address" at a specific index
958     *
959     * @param rep The repetition index (0-indexed)
960     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
961     */
962    public XAD insertPid11_PatientAddress(int rep) throws HL7Exception { 
963        return (XAD) super.insertRepetition(11, rep);
964    }
965
966
967    /**
968     * Removes a repetition of
969     * PID-11: "Patient Address" at a specific index
970     *
971     * @param rep The repetition index (0-indexed)
972     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
973     */
974    public XAD removePatientAddress(int rep) throws HL7Exception { 
975        return (XAD) super.removeRepetition(11, rep);
976    }
977
978
979    /**
980     * Removes a repetition of
981     * PID-11: "Patient Address" at a specific index
982     *
983     * @param rep The repetition index (0-indexed)
984     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
985     */
986    public XAD removePid11_PatientAddress(int rep) throws HL7Exception { 
987        return (XAD) super.removeRepetition(11, rep);
988    }
989
990
991
992
993    /**
994     * Returns
995     * PID-12: "County Code" - creates it if necessary
996     */
997    public IS getCountyCode() { 
998                IS retVal = this.getTypedField(12, 0);
999                return retVal;
1000    }
1001    
1002    /**
1003     * Returns
1004     * PID-12: "County Code" - creates it if necessary
1005     */
1006    public IS getPid12_CountyCode() { 
1007                IS retVal = this.getTypedField(12, 0);
1008                return retVal;
1009    }
1010
1011
1012    /**
1013     * Returns all repetitions of Phone Number - Home (PID-13).
1014     */
1015    public XTN[] getPhoneNumberHome() {
1016        XTN[] retVal = this.getTypedField(13, new XTN[0]);
1017        return retVal;
1018    }
1019
1020
1021    /**
1022     * Returns all repetitions of Phone Number - Home (PID-13).
1023     */
1024    public XTN[] getPid13_PhoneNumberHome() {
1025        XTN[] retVal = this.getTypedField(13, new XTN[0]);
1026        return retVal;
1027    }
1028
1029
1030    /**
1031     * Returns a count of the current number of repetitions of Phone Number - Home (PID-13).
1032     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1033     * it will return zero.
1034     */
1035    public int getPhoneNumberHomeReps() {
1036        return this.getReps(13);
1037    }
1038
1039
1040    /**
1041     * Returns a specific repetition of
1042     * PID-13: "Phone Number - Home" - creates it if necessary
1043     *
1044     * @param rep The repetition index (0-indexed)
1045     */
1046    public XTN getPhoneNumberHome(int rep) { 
1047                XTN retVal = this.getTypedField(13, rep);
1048                return retVal;
1049    }
1050
1051    /**
1052     * Returns a specific repetition of
1053     * PID-13: "Phone Number - Home" - creates it if necessary
1054     *
1055     * @param rep The repetition index (0-indexed)
1056     */
1057    public XTN getPid13_PhoneNumberHome(int rep) { 
1058                XTN retVal = this.getTypedField(13, rep);
1059                return retVal;
1060    }
1061
1062    /**
1063     * Returns a count of the current number of repetitions of Phone Number - Home (PID-13).
1064     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1065     * it will return zero.
1066     */
1067    public int getPid13_PhoneNumberHomeReps() {
1068        return this.getReps(13);
1069    }
1070
1071
1072    /**
1073     * Inserts a repetition of
1074     * PID-13: "Phone Number - Home" at a specific index
1075     *
1076     * @param rep The repetition index (0-indexed)
1077     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1078     */
1079    public XTN insertPhoneNumberHome(int rep) throws HL7Exception { 
1080        return (XTN) super.insertRepetition(13, rep);
1081    }
1082
1083
1084    /**
1085     * Inserts a repetition of
1086     * PID-13: "Phone Number - Home" at a specific index
1087     *
1088     * @param rep The repetition index (0-indexed)
1089     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1090     */
1091    public XTN insertPid13_PhoneNumberHome(int rep) throws HL7Exception { 
1092        return (XTN) super.insertRepetition(13, rep);
1093    }
1094
1095
1096    /**
1097     * Removes a repetition of
1098     * PID-13: "Phone Number - Home" at a specific index
1099     *
1100     * @param rep The repetition index (0-indexed)
1101     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1102     */
1103    public XTN removePhoneNumberHome(int rep) throws HL7Exception { 
1104        return (XTN) super.removeRepetition(13, rep);
1105    }
1106
1107
1108    /**
1109     * Removes a repetition of
1110     * PID-13: "Phone Number - Home" at a specific index
1111     *
1112     * @param rep The repetition index (0-indexed)
1113     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1114     */
1115    public XTN removePid13_PhoneNumberHome(int rep) throws HL7Exception { 
1116        return (XTN) super.removeRepetition(13, rep);
1117    }
1118
1119
1120
1121    /**
1122     * Returns all repetitions of Phone Number - Business (PID-14).
1123     */
1124    public XTN[] getPhoneNumberBusiness() {
1125        XTN[] retVal = this.getTypedField(14, new XTN[0]);
1126        return retVal;
1127    }
1128
1129
1130    /**
1131     * Returns all repetitions of Phone Number - Business (PID-14).
1132     */
1133    public XTN[] getPid14_PhoneNumberBusiness() {
1134        XTN[] retVal = this.getTypedField(14, new XTN[0]);
1135        return retVal;
1136    }
1137
1138
1139    /**
1140     * Returns a count of the current number of repetitions of Phone Number - Business (PID-14).
1141     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1142     * it will return zero.
1143     */
1144    public int getPhoneNumberBusinessReps() {
1145        return this.getReps(14);
1146    }
1147
1148
1149    /**
1150     * Returns a specific repetition of
1151     * PID-14: "Phone Number - Business" - creates it if necessary
1152     *
1153     * @param rep The repetition index (0-indexed)
1154     */
1155    public XTN getPhoneNumberBusiness(int rep) { 
1156                XTN retVal = this.getTypedField(14, rep);
1157                return retVal;
1158    }
1159
1160    /**
1161     * Returns a specific repetition of
1162     * PID-14: "Phone Number - Business" - creates it if necessary
1163     *
1164     * @param rep The repetition index (0-indexed)
1165     */
1166    public XTN getPid14_PhoneNumberBusiness(int rep) { 
1167                XTN retVal = this.getTypedField(14, rep);
1168                return retVal;
1169    }
1170
1171    /**
1172     * Returns a count of the current number of repetitions of Phone Number - Business (PID-14).
1173     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1174     * it will return zero.
1175     */
1176    public int getPid14_PhoneNumberBusinessReps() {
1177        return this.getReps(14);
1178    }
1179
1180
1181    /**
1182     * Inserts a repetition of
1183     * PID-14: "Phone Number - Business" at a specific index
1184     *
1185     * @param rep The repetition index (0-indexed)
1186     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1187     */
1188    public XTN insertPhoneNumberBusiness(int rep) throws HL7Exception { 
1189        return (XTN) super.insertRepetition(14, rep);
1190    }
1191
1192
1193    /**
1194     * Inserts a repetition of
1195     * PID-14: "Phone Number - Business" at a specific index
1196     *
1197     * @param rep The repetition index (0-indexed)
1198     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1199     */
1200    public XTN insertPid14_PhoneNumberBusiness(int rep) throws HL7Exception { 
1201        return (XTN) super.insertRepetition(14, rep);
1202    }
1203
1204
1205    /**
1206     * Removes a repetition of
1207     * PID-14: "Phone Number - Business" at a specific index
1208     *
1209     * @param rep The repetition index (0-indexed)
1210     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1211     */
1212    public XTN removePhoneNumberBusiness(int rep) throws HL7Exception { 
1213        return (XTN) super.removeRepetition(14, rep);
1214    }
1215
1216
1217    /**
1218     * Removes a repetition of
1219     * PID-14: "Phone Number - Business" at a specific index
1220     *
1221     * @param rep The repetition index (0-indexed)
1222     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1223     */
1224    public XTN removePid14_PhoneNumberBusiness(int rep) throws HL7Exception { 
1225        return (XTN) super.removeRepetition(14, rep);
1226    }
1227
1228
1229
1230
1231    /**
1232     * Returns
1233     * PID-15: "Primary Language" - creates it if necessary
1234     */
1235    public CE getPrimaryLanguage() { 
1236                CE retVal = this.getTypedField(15, 0);
1237                return retVal;
1238    }
1239    
1240    /**
1241     * Returns
1242     * PID-15: "Primary Language" - creates it if necessary
1243     */
1244    public CE getPid15_PrimaryLanguage() { 
1245                CE retVal = this.getTypedField(15, 0);
1246                return retVal;
1247    }
1248
1249
1250
1251    /**
1252     * Returns
1253     * PID-16: "Marital Status" - creates it if necessary
1254     */
1255    public CE getMaritalStatus() { 
1256                CE retVal = this.getTypedField(16, 0);
1257                return retVal;
1258    }
1259    
1260    /**
1261     * Returns
1262     * PID-16: "Marital Status" - creates it if necessary
1263     */
1264    public CE getPid16_MaritalStatus() { 
1265                CE retVal = this.getTypedField(16, 0);
1266                return retVal;
1267    }
1268
1269
1270
1271    /**
1272     * Returns
1273     * PID-17: "Religion" - creates it if necessary
1274     */
1275    public CE getReligion() { 
1276                CE retVal = this.getTypedField(17, 0);
1277                return retVal;
1278    }
1279    
1280    /**
1281     * Returns
1282     * PID-17: "Religion" - creates it if necessary
1283     */
1284    public CE getPid17_Religion() { 
1285                CE retVal = this.getTypedField(17, 0);
1286                return retVal;
1287    }
1288
1289
1290
1291    /**
1292     * Returns
1293     * PID-18: "Patient Account Number" - creates it if necessary
1294     */
1295    public CX getPatientAccountNumber() { 
1296                CX retVal = this.getTypedField(18, 0);
1297                return retVal;
1298    }
1299    
1300    /**
1301     * Returns
1302     * PID-18: "Patient Account Number" - creates it if necessary
1303     */
1304    public CX getPid18_PatientAccountNumber() { 
1305                CX retVal = this.getTypedField(18, 0);
1306                return retVal;
1307    }
1308
1309
1310
1311    /**
1312     * Returns
1313     * PID-19: "SSN Number - Patient" - creates it if necessary
1314     */
1315    public ST getSSNNumberPatient() { 
1316                ST retVal = this.getTypedField(19, 0);
1317                return retVal;
1318    }
1319    
1320    /**
1321     * Returns
1322     * PID-19: "SSN Number - Patient" - creates it if necessary
1323     */
1324    public ST getPid19_SSNNumberPatient() { 
1325                ST retVal = this.getTypedField(19, 0);
1326                return retVal;
1327    }
1328
1329
1330
1331    /**
1332     * Returns
1333     * PID-20: "Driver's License Number - Patient" - creates it if necessary
1334     */
1335    public DLN getDriverSLicenseNumberPatient() { 
1336                DLN retVal = this.getTypedField(20, 0);
1337                return retVal;
1338    }
1339    
1340    /**
1341     * Returns
1342     * PID-20: "Driver's License Number - Patient" - creates it if necessary
1343     */
1344    public DLN getPid20_DriverSLicenseNumberPatient() { 
1345                DLN retVal = this.getTypedField(20, 0);
1346                return retVal;
1347    }
1348
1349
1350    /**
1351     * Returns all repetitions of Mother's Identifier (PID-21).
1352     */
1353    public CX[] getMotherSIdentifier() {
1354        CX[] retVal = this.getTypedField(21, new CX[0]);
1355        return retVal;
1356    }
1357
1358
1359    /**
1360     * Returns all repetitions of Mother's Identifier (PID-21).
1361     */
1362    public CX[] getPid21_MotherSIdentifier() {
1363        CX[] retVal = this.getTypedField(21, new CX[0]);
1364        return retVal;
1365    }
1366
1367
1368    /**
1369     * Returns a count of the current number of repetitions of Mother's Identifier (PID-21).
1370     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1371     * it will return zero.
1372     */
1373    public int getMotherSIdentifierReps() {
1374        return this.getReps(21);
1375    }
1376
1377
1378    /**
1379     * Returns a specific repetition of
1380     * PID-21: "Mother's Identifier" - creates it if necessary
1381     *
1382     * @param rep The repetition index (0-indexed)
1383     */
1384    public CX getMotherSIdentifier(int rep) { 
1385                CX retVal = this.getTypedField(21, rep);
1386                return retVal;
1387    }
1388
1389    /**
1390     * Returns a specific repetition of
1391     * PID-21: "Mother's Identifier" - creates it if necessary
1392     *
1393     * @param rep The repetition index (0-indexed)
1394     */
1395    public CX getPid21_MotherSIdentifier(int rep) { 
1396                CX retVal = this.getTypedField(21, rep);
1397                return retVal;
1398    }
1399
1400    /**
1401     * Returns a count of the current number of repetitions of Mother's Identifier (PID-21).
1402     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1403     * it will return zero.
1404     */
1405    public int getPid21_MotherSIdentifierReps() {
1406        return this.getReps(21);
1407    }
1408
1409
1410    /**
1411     * Inserts a repetition of
1412     * PID-21: "Mother's Identifier" at a specific index
1413     *
1414     * @param rep The repetition index (0-indexed)
1415     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1416     */
1417    public CX insertMotherSIdentifier(int rep) throws HL7Exception { 
1418        return (CX) super.insertRepetition(21, rep);
1419    }
1420
1421
1422    /**
1423     * Inserts a repetition of
1424     * PID-21: "Mother's Identifier" at a specific index
1425     *
1426     * @param rep The repetition index (0-indexed)
1427     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1428     */
1429    public CX insertPid21_MotherSIdentifier(int rep) throws HL7Exception { 
1430        return (CX) super.insertRepetition(21, rep);
1431    }
1432
1433
1434    /**
1435     * Removes a repetition of
1436     * PID-21: "Mother's Identifier" at a specific index
1437     *
1438     * @param rep The repetition index (0-indexed)
1439     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1440     */
1441    public CX removeMotherSIdentifier(int rep) throws HL7Exception { 
1442        return (CX) super.removeRepetition(21, rep);
1443    }
1444
1445
1446    /**
1447     * Removes a repetition of
1448     * PID-21: "Mother's Identifier" at a specific index
1449     *
1450     * @param rep The repetition index (0-indexed)
1451     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1452     */
1453    public CX removePid21_MotherSIdentifier(int rep) throws HL7Exception { 
1454        return (CX) super.removeRepetition(21, rep);
1455    }
1456
1457
1458
1459    /**
1460     * Returns all repetitions of Ethnic Group (PID-22).
1461     */
1462    public CE[] getEthnicGroup() {
1463        CE[] retVal = this.getTypedField(22, new CE[0]);
1464        return retVal;
1465    }
1466
1467
1468    /**
1469     * Returns all repetitions of Ethnic Group (PID-22).
1470     */
1471    public CE[] getPid22_EthnicGroup() {
1472        CE[] retVal = this.getTypedField(22, new CE[0]);
1473        return retVal;
1474    }
1475
1476
1477    /**
1478     * Returns a count of the current number of repetitions of Ethnic Group (PID-22).
1479     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1480     * it will return zero.
1481     */
1482    public int getEthnicGroupReps() {
1483        return this.getReps(22);
1484    }
1485
1486
1487    /**
1488     * Returns a specific repetition of
1489     * PID-22: "Ethnic Group" - creates it if necessary
1490     *
1491     * @param rep The repetition index (0-indexed)
1492     */
1493    public CE getEthnicGroup(int rep) { 
1494                CE retVal = this.getTypedField(22, rep);
1495                return retVal;
1496    }
1497
1498    /**
1499     * Returns a specific repetition of
1500     * PID-22: "Ethnic Group" - creates it if necessary
1501     *
1502     * @param rep The repetition index (0-indexed)
1503     */
1504    public CE getPid22_EthnicGroup(int rep) { 
1505                CE retVal = this.getTypedField(22, rep);
1506                return retVal;
1507    }
1508
1509    /**
1510     * Returns a count of the current number of repetitions of Ethnic Group (PID-22).
1511     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1512     * it will return zero.
1513     */
1514    public int getPid22_EthnicGroupReps() {
1515        return this.getReps(22);
1516    }
1517
1518
1519    /**
1520     * Inserts a repetition of
1521     * PID-22: "Ethnic Group" at a specific index
1522     *
1523     * @param rep The repetition index (0-indexed)
1524     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1525     */
1526    public CE insertEthnicGroup(int rep) throws HL7Exception { 
1527        return (CE) super.insertRepetition(22, rep);
1528    }
1529
1530
1531    /**
1532     * Inserts a repetition of
1533     * PID-22: "Ethnic Group" at a specific index
1534     *
1535     * @param rep The repetition index (0-indexed)
1536     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1537     */
1538    public CE insertPid22_EthnicGroup(int rep) throws HL7Exception { 
1539        return (CE) super.insertRepetition(22, rep);
1540    }
1541
1542
1543    /**
1544     * Removes a repetition of
1545     * PID-22: "Ethnic Group" at a specific index
1546     *
1547     * @param rep The repetition index (0-indexed)
1548     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1549     */
1550    public CE removeEthnicGroup(int rep) throws HL7Exception { 
1551        return (CE) super.removeRepetition(22, rep);
1552    }
1553
1554
1555    /**
1556     * Removes a repetition of
1557     * PID-22: "Ethnic Group" at a specific index
1558     *
1559     * @param rep The repetition index (0-indexed)
1560     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1561     */
1562    public CE removePid22_EthnicGroup(int rep) throws HL7Exception { 
1563        return (CE) super.removeRepetition(22, rep);
1564    }
1565
1566
1567
1568
1569    /**
1570     * Returns
1571     * PID-23: "Birth Place" - creates it if necessary
1572     */
1573    public ST getBirthPlace() { 
1574                ST retVal = this.getTypedField(23, 0);
1575                return retVal;
1576    }
1577    
1578    /**
1579     * Returns
1580     * PID-23: "Birth Place" - creates it if necessary
1581     */
1582    public ST getPid23_BirthPlace() { 
1583                ST retVal = this.getTypedField(23, 0);
1584                return retVal;
1585    }
1586
1587
1588
1589    /**
1590     * Returns
1591     * PID-24: "Multiple Birth Indicator" - creates it if necessary
1592     */
1593    public ID getMultipleBirthIndicator() { 
1594                ID retVal = this.getTypedField(24, 0);
1595                return retVal;
1596    }
1597    
1598    /**
1599     * Returns
1600     * PID-24: "Multiple Birth Indicator" - creates it if necessary
1601     */
1602    public ID getPid24_MultipleBirthIndicator() { 
1603                ID retVal = this.getTypedField(24, 0);
1604                return retVal;
1605    }
1606
1607
1608
1609    /**
1610     * Returns
1611     * PID-25: "Birth Order" - creates it if necessary
1612     */
1613    public NM getBirthOrder() { 
1614                NM retVal = this.getTypedField(25, 0);
1615                return retVal;
1616    }
1617    
1618    /**
1619     * Returns
1620     * PID-25: "Birth Order" - creates it if necessary
1621     */
1622    public NM getPid25_BirthOrder() { 
1623                NM retVal = this.getTypedField(25, 0);
1624                return retVal;
1625    }
1626
1627
1628    /**
1629     * Returns all repetitions of Citizenship (PID-26).
1630     */
1631    public CE[] getCitizenship() {
1632        CE[] retVal = this.getTypedField(26, new CE[0]);
1633        return retVal;
1634    }
1635
1636
1637    /**
1638     * Returns all repetitions of Citizenship (PID-26).
1639     */
1640    public CE[] getPid26_Citizenship() {
1641        CE[] retVal = this.getTypedField(26, new CE[0]);
1642        return retVal;
1643    }
1644
1645
1646    /**
1647     * Returns a count of the current number of repetitions of Citizenship (PID-26).
1648     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1649     * it will return zero.
1650     */
1651    public int getCitizenshipReps() {
1652        return this.getReps(26);
1653    }
1654
1655
1656    /**
1657     * Returns a specific repetition of
1658     * PID-26: "Citizenship" - creates it if necessary
1659     *
1660     * @param rep The repetition index (0-indexed)
1661     */
1662    public CE getCitizenship(int rep) { 
1663                CE retVal = this.getTypedField(26, rep);
1664                return retVal;
1665    }
1666
1667    /**
1668     * Returns a specific repetition of
1669     * PID-26: "Citizenship" - creates it if necessary
1670     *
1671     * @param rep The repetition index (0-indexed)
1672     */
1673    public CE getPid26_Citizenship(int rep) { 
1674                CE retVal = this.getTypedField(26, rep);
1675                return retVal;
1676    }
1677
1678    /**
1679     * Returns a count of the current number of repetitions of Citizenship (PID-26).
1680     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1681     * it will return zero.
1682     */
1683    public int getPid26_CitizenshipReps() {
1684        return this.getReps(26);
1685    }
1686
1687
1688    /**
1689     * Inserts a repetition of
1690     * PID-26: "Citizenship" at a specific index
1691     *
1692     * @param rep The repetition index (0-indexed)
1693     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1694     */
1695    public CE insertCitizenship(int rep) throws HL7Exception { 
1696        return (CE) super.insertRepetition(26, rep);
1697    }
1698
1699
1700    /**
1701     * Inserts a repetition of
1702     * PID-26: "Citizenship" at a specific index
1703     *
1704     * @param rep The repetition index (0-indexed)
1705     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1706     */
1707    public CE insertPid26_Citizenship(int rep) throws HL7Exception { 
1708        return (CE) super.insertRepetition(26, rep);
1709    }
1710
1711
1712    /**
1713     * Removes a repetition of
1714     * PID-26: "Citizenship" at a specific index
1715     *
1716     * @param rep The repetition index (0-indexed)
1717     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1718     */
1719    public CE removeCitizenship(int rep) throws HL7Exception { 
1720        return (CE) super.removeRepetition(26, rep);
1721    }
1722
1723
1724    /**
1725     * Removes a repetition of
1726     * PID-26: "Citizenship" at a specific index
1727     *
1728     * @param rep The repetition index (0-indexed)
1729     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1730     */
1731    public CE removePid26_Citizenship(int rep) throws HL7Exception { 
1732        return (CE) super.removeRepetition(26, rep);
1733    }
1734
1735
1736
1737
1738    /**
1739     * Returns
1740     * PID-27: "Veterans Military Status" - creates it if necessary
1741     */
1742    public CE getVeteransMilitaryStatus() { 
1743                CE retVal = this.getTypedField(27, 0);
1744                return retVal;
1745    }
1746    
1747    /**
1748     * Returns
1749     * PID-27: "Veterans Military Status" - creates it if necessary
1750     */
1751    public CE getPid27_VeteransMilitaryStatus() { 
1752                CE retVal = this.getTypedField(27, 0);
1753                return retVal;
1754    }
1755
1756
1757
1758    /**
1759     * Returns
1760     * PID-28: "Nationality" - creates it if necessary
1761     */
1762    public CE getNationality() { 
1763                CE retVal = this.getTypedField(28, 0);
1764                return retVal;
1765    }
1766    
1767    /**
1768     * Returns
1769     * PID-28: "Nationality" - creates it if necessary
1770     */
1771    public CE getPid28_Nationality() { 
1772                CE retVal = this.getTypedField(28, 0);
1773                return retVal;
1774    }
1775
1776
1777
1778    /**
1779     * Returns
1780     * PID-29: "Patient Death Date and Time" - creates it if necessary
1781     */
1782    public TS getPatientDeathDateAndTime() { 
1783                TS retVal = this.getTypedField(29, 0);
1784                return retVal;
1785    }
1786    
1787    /**
1788     * Returns
1789     * PID-29: "Patient Death Date and Time" - creates it if necessary
1790     */
1791    public TS getPid29_PatientDeathDateAndTime() { 
1792                TS retVal = this.getTypedField(29, 0);
1793                return retVal;
1794    }
1795
1796
1797
1798    /**
1799     * Returns
1800     * PID-30: "Patient Death Indicator" - creates it if necessary
1801     */
1802    public ID getPatientDeathIndicator() { 
1803                ID retVal = this.getTypedField(30, 0);
1804                return retVal;
1805    }
1806    
1807    /**
1808     * Returns
1809     * PID-30: "Patient Death Indicator" - creates it if necessary
1810     */
1811    public ID getPid30_PatientDeathIndicator() { 
1812                ID retVal = this.getTypedField(30, 0);
1813                return retVal;
1814    }
1815
1816
1817
1818    /**
1819     * Returns
1820     * PID-31: "Identity Unknown Indicator" - creates it if necessary
1821     */
1822    public ID getIdentityUnknownIndicator() { 
1823                ID retVal = this.getTypedField(31, 0);
1824                return retVal;
1825    }
1826    
1827    /**
1828     * Returns
1829     * PID-31: "Identity Unknown Indicator" - creates it if necessary
1830     */
1831    public ID getPid31_IdentityUnknownIndicator() { 
1832                ID retVal = this.getTypedField(31, 0);
1833                return retVal;
1834    }
1835
1836
1837    /**
1838     * Returns all repetitions of Identity Reliability Code (PID-32).
1839     */
1840    public IS[] getIdentityReliabilityCode() {
1841        IS[] retVal = this.getTypedField(32, new IS[0]);
1842        return retVal;
1843    }
1844
1845
1846    /**
1847     * Returns all repetitions of Identity Reliability Code (PID-32).
1848     */
1849    public IS[] getPid32_IdentityReliabilityCode() {
1850        IS[] retVal = this.getTypedField(32, new IS[0]);
1851        return retVal;
1852    }
1853
1854
1855    /**
1856     * Returns a count of the current number of repetitions of Identity Reliability Code (PID-32).
1857     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1858     * it will return zero.
1859     */
1860    public int getIdentityReliabilityCodeReps() {
1861        return this.getReps(32);
1862    }
1863
1864
1865    /**
1866     * Returns a specific repetition of
1867     * PID-32: "Identity Reliability Code" - creates it if necessary
1868     *
1869     * @param rep The repetition index (0-indexed)
1870     */
1871    public IS getIdentityReliabilityCode(int rep) { 
1872                IS retVal = this.getTypedField(32, rep);
1873                return retVal;
1874    }
1875
1876    /**
1877     * Returns a specific repetition of
1878     * PID-32: "Identity Reliability Code" - creates it if necessary
1879     *
1880     * @param rep The repetition index (0-indexed)
1881     */
1882    public IS getPid32_IdentityReliabilityCode(int rep) { 
1883                IS retVal = this.getTypedField(32, rep);
1884                return retVal;
1885    }
1886
1887    /**
1888     * Returns a count of the current number of repetitions of Identity Reliability Code (PID-32).
1889     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1890     * it will return zero.
1891     */
1892    public int getPid32_IdentityReliabilityCodeReps() {
1893        return this.getReps(32);
1894    }
1895
1896
1897    /**
1898     * Inserts a repetition of
1899     * PID-32: "Identity Reliability Code" at a specific index
1900     *
1901     * @param rep The repetition index (0-indexed)
1902     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1903     */
1904    public IS insertIdentityReliabilityCode(int rep) throws HL7Exception { 
1905        return (IS) super.insertRepetition(32, rep);
1906    }
1907
1908
1909    /**
1910     * Inserts a repetition of
1911     * PID-32: "Identity Reliability Code" at a specific index
1912     *
1913     * @param rep The repetition index (0-indexed)
1914     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1915     */
1916    public IS insertPid32_IdentityReliabilityCode(int rep) throws HL7Exception { 
1917        return (IS) super.insertRepetition(32, rep);
1918    }
1919
1920
1921    /**
1922     * Removes a repetition of
1923     * PID-32: "Identity Reliability Code" at a specific index
1924     *
1925     * @param rep The repetition index (0-indexed)
1926     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1927     */
1928    public IS removeIdentityReliabilityCode(int rep) throws HL7Exception { 
1929        return (IS) super.removeRepetition(32, rep);
1930    }
1931
1932
1933    /**
1934     * Removes a repetition of
1935     * PID-32: "Identity Reliability Code" at a specific index
1936     *
1937     * @param rep The repetition index (0-indexed)
1938     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1939     */
1940    public IS removePid32_IdentityReliabilityCode(int rep) throws HL7Exception { 
1941        return (IS) super.removeRepetition(32, rep);
1942    }
1943
1944
1945
1946
1947    /**
1948     * Returns
1949     * PID-33: "Last Update Date/Time" - creates it if necessary
1950     */
1951    public TS getLastUpdateDateTime() { 
1952                TS retVal = this.getTypedField(33, 0);
1953                return retVal;
1954    }
1955    
1956    /**
1957     * Returns
1958     * PID-33: "Last Update Date/Time" - creates it if necessary
1959     */
1960    public TS getPid33_LastUpdateDateTime() { 
1961                TS retVal = this.getTypedField(33, 0);
1962                return retVal;
1963    }
1964
1965
1966
1967    /**
1968     * Returns
1969     * PID-34: "Last Update Facility" - creates it if necessary
1970     */
1971    public HD getLastUpdateFacility() { 
1972                HD retVal = this.getTypedField(34, 0);
1973                return retVal;
1974    }
1975    
1976    /**
1977     * Returns
1978     * PID-34: "Last Update Facility" - creates it if necessary
1979     */
1980    public HD getPid34_LastUpdateFacility() { 
1981                HD retVal = this.getTypedField(34, 0);
1982                return retVal;
1983    }
1984
1985
1986
1987    /**
1988     * Returns
1989     * PID-35: "Species Code" - creates it if necessary
1990     */
1991    public CE getSpeciesCode() { 
1992                CE retVal = this.getTypedField(35, 0);
1993                return retVal;
1994    }
1995    
1996    /**
1997     * Returns
1998     * PID-35: "Species Code" - creates it if necessary
1999     */
2000    public CE getPid35_SpeciesCode() { 
2001                CE retVal = this.getTypedField(35, 0);
2002                return retVal;
2003    }
2004
2005
2006
2007    /**
2008     * Returns
2009     * PID-36: "Breed Code" - creates it if necessary
2010     */
2011    public CE getBreedCode() { 
2012                CE retVal = this.getTypedField(36, 0);
2013                return retVal;
2014    }
2015    
2016    /**
2017     * Returns
2018     * PID-36: "Breed Code" - creates it if necessary
2019     */
2020    public CE getPid36_BreedCode() { 
2021                CE retVal = this.getTypedField(36, 0);
2022                return retVal;
2023    }
2024
2025
2026
2027    /**
2028     * Returns
2029     * PID-37: "Strain" - creates it if necessary
2030     */
2031    public ST getStrain() { 
2032                ST retVal = this.getTypedField(37, 0);
2033                return retVal;
2034    }
2035    
2036    /**
2037     * Returns
2038     * PID-37: "Strain" - creates it if necessary
2039     */
2040    public ST getPid37_Strain() { 
2041                ST retVal = this.getTypedField(37, 0);
2042                return retVal;
2043    }
2044
2045
2046
2047    /**
2048     * Returns
2049     * PID-38: "Production Class Code" - creates it if necessary
2050     */
2051    public CE getProductionClassCode() { 
2052                CE retVal = this.getTypedField(38, 0);
2053                return retVal;
2054    }
2055    
2056    /**
2057     * Returns
2058     * PID-38: "Production Class Code" - creates it if necessary
2059     */
2060    public CE getPid38_ProductionClassCode() { 
2061                CE retVal = this.getTypedField(38, 0);
2062                return retVal;
2063    }
2064
2065
2066
2067
2068
2069    /** {@inheritDoc} */   
2070    protected Type createNewTypeWithoutReflection(int field) {
2071       switch (field) {
2072          case 0: return new SI(getMessage());
2073          case 1: return new CX(getMessage());
2074          case 2: return new CX(getMessage());
2075          case 3: return new CX(getMessage());
2076          case 4: return new XPN(getMessage());
2077          case 5: return new XPN(getMessage());
2078          case 6: return new TS(getMessage());
2079          case 7: return new IS(getMessage(), new Integer( 1 ));
2080          case 8: return new XPN(getMessage());
2081          case 9: return new CE(getMessage());
2082          case 10: return new XAD(getMessage());
2083          case 11: return new IS(getMessage(), new Integer( 289 ));
2084          case 12: return new XTN(getMessage());
2085          case 13: return new XTN(getMessage());
2086          case 14: return new CE(getMessage());
2087          case 15: return new CE(getMessage());
2088          case 16: return new CE(getMessage());
2089          case 17: return new CX(getMessage());
2090          case 18: return new ST(getMessage());
2091          case 19: return new DLN(getMessage());
2092          case 20: return new CX(getMessage());
2093          case 21: return new CE(getMessage());
2094          case 22: return new ST(getMessage());
2095          case 23: return new ID(getMessage(), new Integer( 136 ));
2096          case 24: return new NM(getMessage());
2097          case 25: return new CE(getMessage());
2098          case 26: return new CE(getMessage());
2099          case 27: return new CE(getMessage());
2100          case 28: return new TS(getMessage());
2101          case 29: return new ID(getMessage(), new Integer( 136 ));
2102          case 30: return new ID(getMessage(), new Integer( 136 ));
2103          case 31: return new IS(getMessage(), new Integer( 445 ));
2104          case 32: return new TS(getMessage());
2105          case 33: return new HD(getMessage());
2106          case 34: return new CE(getMessage());
2107          case 35: return new CE(getMessage());
2108          case 36: return new ST(getMessage());
2109          case 37: return new CE(getMessage());
2110          default: return null;
2111       }
2112   }
2113
2114
2115}
2116