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