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.v21.segment;
035
036// import ca.uhn.hl7v2.model.v21.group.*;
037import ca.uhn.hl7v2.model.v21.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 - PATIENT ID (SI) <b>optional </b>
052     * <li>PID-2: PATIENT ID EXTERNAL (EXTERNAL ID) (CK) <b>optional </b>
053     * <li>PID-3: PATIENT ID INTERNAL (INTERNAL ID) (CK) <b> </b>
054     * <li>PID-4: ALTERNATE PATIENT ID (ST) <b>optional </b>
055     * <li>PID-5: PATIENT NAME (PN) <b> </b>
056     * <li>PID-6: MOTHER'S MAIDEN NAME (ST) <b>optional </b>
057     * <li>PID-7: DATE OF BIRTH (DT) <b>optional </b>
058     * <li>PID-8: SEX (ID) <b>optional </b>
059     * <li>PID-9: PATIENT ALIAS (PN) <b>optional repeating</b>
060     * <li>PID-10: ETHNIC GROUP (ID) <b>optional </b>
061     * <li>PID-11: PATIENT ADDRESS (AD) <b>optional </b>
062     * <li>PID-12: COUNTY CODE (ID) <b>optional </b>
063     * <li>PID-13: PHONE NUMBER - HOME (TN) <b>optional repeating</b>
064     * <li>PID-14: PHONE NUMBER - BUSINESS (TN) <b>optional repeating</b>
065     * <li>PID-15: LANGUAGE - PATIENT (ST) <b>optional </b>
066     * <li>PID-16: MARITAL STATUS (ID) <b>optional </b>
067     * <li>PID-17: RELIGION (ID) <b>optional </b>
068     * <li>PID-18: PATIENT ACCOUNT NUMBER (CK) <b>optional </b>
069     * <li>PID-19: SSN NUMBER - PATIENT (ST) <b>optional </b>
070     * <li>PID-20: DRIVER'S LIC NUM - PATIENT (CM) <b>optional </b>
071 * </ul>
072 */
073@SuppressWarnings("unused")
074public class PID extends AbstractSegment {
075
076    /** 
077     * Creates a new PID segment
078     */
079    public PID(Group parent, ModelClassFactory factory) {
080       super(parent, factory);
081       init(factory);
082    }
083
084    private void init(ModelClassFactory factory) {
085       try {
086                                  this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "SET ID - PATIENT ID");
087                                  this.add(CK.class, false, 1, 16, new Object[]{ getMessage() }, "PATIENT ID EXTERNAL (EXTERNAL ID)");
088                                  this.add(CK.class, true, 1, 16, new Object[]{ getMessage() }, "PATIENT ID INTERNAL (INTERNAL ID)");
089                                  this.add(ST.class, false, 1, 12, new Object[]{ getMessage() }, "ALTERNATE PATIENT ID");
090                                  this.add(PN.class, true, 1, 48, new Object[]{ getMessage() }, "PATIENT NAME");
091                                  this.add(ST.class, false, 1, 30, new Object[]{ getMessage() }, "MOTHER'S MAIDEN NAME");
092                                  this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "DATE OF BIRTH");
093                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(1) }, "SEX");
094                                  this.add(PN.class, false, 0, 48, new Object[]{ getMessage() }, "PATIENT ALIAS");
095                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(5) }, "ETHNIC GROUP");
096                                  this.add(AD.class, false, 1, 106, new Object[]{ getMessage() }, "PATIENT ADDRESS");
097                                              this.add(ID.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "COUNTY CODE");
098                                  this.add(TN.class, false, 3, 40, new Object[]{ getMessage() }, "PHONE NUMBER - HOME");
099                                  this.add(TN.class, false, 3, 40, new Object[]{ getMessage() }, "PHONE NUMBER - BUSINESS");
100                                  this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "LANGUAGE - PATIENT");
101                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(2) }, "MARITAL STATUS");
102                                              this.add(ID.class, false, 1, 3, new Object[]{ getMessage(), new Integer(6) }, "RELIGION");
103                                  this.add(CK.class, false, 1, 20, new Object[]{ getMessage() }, "PATIENT ACCOUNT NUMBER");
104                                  this.add(ST.class, false, 1, 16, new Object[]{ getMessage() }, "SSN NUMBER - PATIENT");
105                                  this.add(CM.class, false, 1, 25, new Object[]{ getMessage() }, "DRIVER'S LIC NUM - PATIENT");
106       } catch(HL7Exception e) {
107          log.error("Unexpected error creating PID - this is probably a bug in the source code generator.", e);
108       }
109    }
110
111
112
113    /**
114     * Returns
115     * PID-1: "SET ID - PATIENT ID" - creates it if necessary
116     */
117    public SI getSETIDPATIENTID() { 
118                SI retVal = this.getTypedField(1, 0);
119                return retVal;
120    }
121    
122    /**
123     * Returns
124     * PID-1: "SET ID - PATIENT ID" - creates it if necessary
125     */
126    public SI getPid1_SETIDPATIENTID() { 
127                SI retVal = this.getTypedField(1, 0);
128                return retVal;
129    }
130
131
132
133    /**
134     * Returns
135     * PID-2: "PATIENT ID EXTERNAL (EXTERNAL ID)" - creates it if necessary
136     */
137    public CK getPATIENTIDEXTERNALEXTERNALID() { 
138                CK retVal = this.getTypedField(2, 0);
139                return retVal;
140    }
141    
142    /**
143     * Returns
144     * PID-2: "PATIENT ID EXTERNAL (EXTERNAL ID)" - creates it if necessary
145     */
146    public CK getPid2_PATIENTIDEXTERNALEXTERNALID() { 
147                CK retVal = this.getTypedField(2, 0);
148                return retVal;
149    }
150
151
152
153    /**
154     * Returns
155     * PID-3: "PATIENT ID INTERNAL (INTERNAL ID)" - creates it if necessary
156     */
157    public CK getPATIENTIDINTERNALINTERNALID() { 
158                CK retVal = this.getTypedField(3, 0);
159                return retVal;
160    }
161    
162    /**
163     * Returns
164     * PID-3: "PATIENT ID INTERNAL (INTERNAL ID)" - creates it if necessary
165     */
166    public CK getPid3_PATIENTIDINTERNALINTERNALID() { 
167                CK retVal = this.getTypedField(3, 0);
168                return retVal;
169    }
170
171
172
173    /**
174     * Returns
175     * PID-4: "ALTERNATE PATIENT ID" - creates it if necessary
176     */
177    public ST getALTERNATEPATIENTID() { 
178                ST retVal = this.getTypedField(4, 0);
179                return retVal;
180    }
181    
182    /**
183     * Returns
184     * PID-4: "ALTERNATE PATIENT ID" - creates it if necessary
185     */
186    public ST getPid4_ALTERNATEPATIENTID() { 
187                ST retVal = this.getTypedField(4, 0);
188                return retVal;
189    }
190
191
192
193    /**
194     * Returns
195     * PID-5: "PATIENT NAME" - creates it if necessary
196     */
197    public PN getPATIENTNAME() { 
198                PN retVal = this.getTypedField(5, 0);
199                return retVal;
200    }
201    
202    /**
203     * Returns
204     * PID-5: "PATIENT NAME" - creates it if necessary
205     */
206    public PN getPid5_PATIENTNAME() { 
207                PN retVal = this.getTypedField(5, 0);
208                return retVal;
209    }
210
211
212
213    /**
214     * Returns
215     * PID-6: "MOTHER'S MAIDEN NAME" - creates it if necessary
216     */
217    public ST getMOTHERSMAIDENNAME() { 
218                ST retVal = this.getTypedField(6, 0);
219                return retVal;
220    }
221    
222    /**
223     * Returns
224     * PID-6: "MOTHER'S MAIDEN NAME" - creates it if necessary
225     */
226    public ST getPid6_MOTHERSMAIDENNAME() { 
227                ST retVal = this.getTypedField(6, 0);
228                return retVal;
229    }
230
231
232
233    /**
234     * Returns
235     * PID-7: "DATE OF BIRTH" - creates it if necessary
236     */
237    public DT getDATEOFBIRTH() { 
238                DT retVal = this.getTypedField(7, 0);
239                return retVal;
240    }
241    
242    /**
243     * Returns
244     * PID-7: "DATE OF BIRTH" - creates it if necessary
245     */
246    public DT getPid7_DATEOFBIRTH() { 
247                DT retVal = this.getTypedField(7, 0);
248                return retVal;
249    }
250
251
252
253    /**
254     * Returns
255     * PID-8: "SEX" - creates it if necessary
256     */
257    public ID getSEX() { 
258                ID retVal = this.getTypedField(8, 0);
259                return retVal;
260    }
261    
262    /**
263     * Returns
264     * PID-8: "SEX" - creates it if necessary
265     */
266    public ID getPid8_SEX() { 
267                ID retVal = this.getTypedField(8, 0);
268                return retVal;
269    }
270
271
272    /**
273     * Returns all repetitions of PATIENT ALIAS (PID-9).
274     */
275    public PN[] getPATIENTALIAS() {
276        PN[] retVal = this.getTypedField(9, new PN[0]);
277        return retVal;
278    }
279
280
281    /**
282     * Returns all repetitions of PATIENT ALIAS (PID-9).
283     */
284    public PN[] getPid9_PATIENTALIAS() {
285        PN[] retVal = this.getTypedField(9, new PN[0]);
286        return retVal;
287    }
288
289
290    /**
291     * Returns a count of the current number of repetitions of PATIENT ALIAS (PID-9).
292     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
293     * it will return zero.
294     */
295    public int getPATIENTALIASReps() {
296        return this.getReps(9);
297    }
298
299
300    /**
301     * Returns a specific repetition of
302     * PID-9: "PATIENT ALIAS" - creates it if necessary
303     *
304     * @param rep The repetition index (0-indexed)
305     */
306    public PN getPATIENTALIAS(int rep) { 
307                PN retVal = this.getTypedField(9, rep);
308                return retVal;
309    }
310
311    /**
312     * Returns a specific repetition of
313     * PID-9: "PATIENT ALIAS" - creates it if necessary
314     *
315     * @param rep The repetition index (0-indexed)
316     */
317    public PN getPid9_PATIENTALIAS(int rep) { 
318                PN retVal = this.getTypedField(9, rep);
319                return retVal;
320    }
321
322    /**
323     * Returns a count of the current number of repetitions of PATIENT ALIAS (PID-9).
324     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
325     * it will return zero.
326     */
327    public int getPid9_PATIENTALIASReps() {
328        return this.getReps(9);
329    }
330
331
332    /**
333     * Inserts a repetition of
334     * PID-9: "PATIENT ALIAS" at a specific index
335     *
336     * @param rep The repetition index (0-indexed)
337     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
338     */
339    public PN insertPATIENTALIAS(int rep) throws HL7Exception { 
340        return (PN) super.insertRepetition(9, rep);
341    }
342
343
344    /**
345     * Inserts a repetition of
346     * PID-9: "PATIENT ALIAS" at a specific index
347     *
348     * @param rep The repetition index (0-indexed)
349     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
350     */
351    public PN insertPid9_PATIENTALIAS(int rep) throws HL7Exception { 
352        return (PN) super.insertRepetition(9, rep);
353    }
354
355
356    /**
357     * Removes a repetition of
358     * PID-9: "PATIENT ALIAS" at a specific index
359     *
360     * @param rep The repetition index (0-indexed)
361     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
362     */
363    public PN removePATIENTALIAS(int rep) throws HL7Exception { 
364        return (PN) super.removeRepetition(9, rep);
365    }
366
367
368    /**
369     * Removes a repetition of
370     * PID-9: "PATIENT ALIAS" at a specific index
371     *
372     * @param rep The repetition index (0-indexed)
373     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
374     */
375    public PN removePid9_PATIENTALIAS(int rep) throws HL7Exception { 
376        return (PN) super.removeRepetition(9, rep);
377    }
378
379
380
381
382    /**
383     * Returns
384     * PID-10: "ETHNIC GROUP" - creates it if necessary
385     */
386    public ID getETHNICGROUP() { 
387                ID retVal = this.getTypedField(10, 0);
388                return retVal;
389    }
390    
391    /**
392     * Returns
393     * PID-10: "ETHNIC GROUP" - creates it if necessary
394     */
395    public ID getPid10_ETHNICGROUP() { 
396                ID retVal = this.getTypedField(10, 0);
397                return retVal;
398    }
399
400
401
402    /**
403     * Returns
404     * PID-11: "PATIENT ADDRESS" - creates it if necessary
405     */
406    public AD getPATIENTADDRESS() { 
407                AD retVal = this.getTypedField(11, 0);
408                return retVal;
409    }
410    
411    /**
412     * Returns
413     * PID-11: "PATIENT ADDRESS" - creates it if necessary
414     */
415    public AD getPid11_PATIENTADDRESS() { 
416                AD retVal = this.getTypedField(11, 0);
417                return retVal;
418    }
419
420
421
422    /**
423     * Returns
424     * PID-12: "COUNTY CODE" - creates it if necessary
425     */
426    public ID getCOUNTYCODE() { 
427                ID retVal = this.getTypedField(12, 0);
428                return retVal;
429    }
430    
431    /**
432     * Returns
433     * PID-12: "COUNTY CODE" - creates it if necessary
434     */
435    public ID getPid12_COUNTYCODE() { 
436                ID retVal = this.getTypedField(12, 0);
437                return retVal;
438    }
439
440
441    /**
442     * Returns all repetitions of PHONE NUMBER - HOME (PID-13).
443     */
444    public TN[] getPHONENUMBERHOME() {
445        TN[] retVal = this.getTypedField(13, new TN[0]);
446        return retVal;
447    }
448
449
450    /**
451     * Returns all repetitions of PHONE NUMBER - HOME (PID-13).
452     */
453    public TN[] getPid13_PHONENUMBERHOME() {
454        TN[] retVal = this.getTypedField(13, new TN[0]);
455        return retVal;
456    }
457
458
459    /**
460     * Returns a count of the current number of repetitions of PHONE NUMBER - HOME (PID-13).
461     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
462     * it will return zero.
463     */
464    public int getPHONENUMBERHOMEReps() {
465        return this.getReps(13);
466    }
467
468
469    /**
470     * Returns a specific repetition of
471     * PID-13: "PHONE NUMBER - HOME" - creates it if necessary
472     *
473     * @param rep The repetition index (0-indexed)
474     */
475    public TN getPHONENUMBERHOME(int rep) { 
476                TN retVal = this.getTypedField(13, rep);
477                return retVal;
478    }
479
480    /**
481     * Returns a specific repetition of
482     * PID-13: "PHONE NUMBER - HOME" - creates it if necessary
483     *
484     * @param rep The repetition index (0-indexed)
485     */
486    public TN getPid13_PHONENUMBERHOME(int rep) { 
487                TN retVal = this.getTypedField(13, rep);
488                return retVal;
489    }
490
491    /**
492     * Returns a count of the current number of repetitions of PHONE NUMBER - HOME (PID-13).
493     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
494     * it will return zero.
495     */
496    public int getPid13_PHONENUMBERHOMEReps() {
497        return this.getReps(13);
498    }
499
500
501    /**
502     * Inserts a repetition of
503     * PID-13: "PHONE NUMBER - HOME" at a specific index
504     *
505     * @param rep The repetition index (0-indexed)
506     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
507     */
508    public TN insertPHONENUMBERHOME(int rep) throws HL7Exception { 
509        return (TN) super.insertRepetition(13, rep);
510    }
511
512
513    /**
514     * Inserts a repetition of
515     * PID-13: "PHONE NUMBER - HOME" at a specific index
516     *
517     * @param rep The repetition index (0-indexed)
518     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
519     */
520    public TN insertPid13_PHONENUMBERHOME(int rep) throws HL7Exception { 
521        return (TN) super.insertRepetition(13, rep);
522    }
523
524
525    /**
526     * Removes a repetition of
527     * PID-13: "PHONE NUMBER - HOME" at a specific index
528     *
529     * @param rep The repetition index (0-indexed)
530     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
531     */
532    public TN removePHONENUMBERHOME(int rep) throws HL7Exception { 
533        return (TN) super.removeRepetition(13, rep);
534    }
535
536
537    /**
538     * Removes a repetition of
539     * PID-13: "PHONE NUMBER - HOME" at a specific index
540     *
541     * @param rep The repetition index (0-indexed)
542     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
543     */
544    public TN removePid13_PHONENUMBERHOME(int rep) throws HL7Exception { 
545        return (TN) super.removeRepetition(13, rep);
546    }
547
548
549
550    /**
551     * Returns all repetitions of PHONE NUMBER - BUSINESS (PID-14).
552     */
553    public TN[] getPHONENUMBERBUSINESS() {
554        TN[] retVal = this.getTypedField(14, new TN[0]);
555        return retVal;
556    }
557
558
559    /**
560     * Returns all repetitions of PHONE NUMBER - BUSINESS (PID-14).
561     */
562    public TN[] getPid14_PHONENUMBERBUSINESS() {
563        TN[] retVal = this.getTypedField(14, new TN[0]);
564        return retVal;
565    }
566
567
568    /**
569     * Returns a count of the current number of repetitions of PHONE NUMBER - BUSINESS (PID-14).
570     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
571     * it will return zero.
572     */
573    public int getPHONENUMBERBUSINESSReps() {
574        return this.getReps(14);
575    }
576
577
578    /**
579     * Returns a specific repetition of
580     * PID-14: "PHONE NUMBER - BUSINESS" - creates it if necessary
581     *
582     * @param rep The repetition index (0-indexed)
583     */
584    public TN getPHONENUMBERBUSINESS(int rep) { 
585                TN retVal = this.getTypedField(14, rep);
586                return retVal;
587    }
588
589    /**
590     * Returns a specific repetition of
591     * PID-14: "PHONE NUMBER - BUSINESS" - creates it if necessary
592     *
593     * @param rep The repetition index (0-indexed)
594     */
595    public TN getPid14_PHONENUMBERBUSINESS(int rep) { 
596                TN retVal = this.getTypedField(14, rep);
597                return retVal;
598    }
599
600    /**
601     * Returns a count of the current number of repetitions of PHONE NUMBER - BUSINESS (PID-14).
602     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
603     * it will return zero.
604     */
605    public int getPid14_PHONENUMBERBUSINESSReps() {
606        return this.getReps(14);
607    }
608
609
610    /**
611     * Inserts a repetition of
612     * PID-14: "PHONE NUMBER - BUSINESS" at a specific index
613     *
614     * @param rep The repetition index (0-indexed)
615     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
616     */
617    public TN insertPHONENUMBERBUSINESS(int rep) throws HL7Exception { 
618        return (TN) super.insertRepetition(14, rep);
619    }
620
621
622    /**
623     * Inserts a repetition of
624     * PID-14: "PHONE NUMBER - BUSINESS" at a specific index
625     *
626     * @param rep The repetition index (0-indexed)
627     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
628     */
629    public TN insertPid14_PHONENUMBERBUSINESS(int rep) throws HL7Exception { 
630        return (TN) super.insertRepetition(14, rep);
631    }
632
633
634    /**
635     * Removes a repetition of
636     * PID-14: "PHONE NUMBER - BUSINESS" at a specific index
637     *
638     * @param rep The repetition index (0-indexed)
639     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
640     */
641    public TN removePHONENUMBERBUSINESS(int rep) throws HL7Exception { 
642        return (TN) super.removeRepetition(14, rep);
643    }
644
645
646    /**
647     * Removes a repetition of
648     * PID-14: "PHONE NUMBER - BUSINESS" at a specific index
649     *
650     * @param rep The repetition index (0-indexed)
651     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
652     */
653    public TN removePid14_PHONENUMBERBUSINESS(int rep) throws HL7Exception { 
654        return (TN) super.removeRepetition(14, rep);
655    }
656
657
658
659
660    /**
661     * Returns
662     * PID-15: "LANGUAGE - PATIENT" - creates it if necessary
663     */
664    public ST getLANGUAGEPATIENT() { 
665                ST retVal = this.getTypedField(15, 0);
666                return retVal;
667    }
668    
669    /**
670     * Returns
671     * PID-15: "LANGUAGE - PATIENT" - creates it if necessary
672     */
673    public ST getPid15_LANGUAGEPATIENT() { 
674                ST retVal = this.getTypedField(15, 0);
675                return retVal;
676    }
677
678
679
680    /**
681     * Returns
682     * PID-16: "MARITAL STATUS" - creates it if necessary
683     */
684    public ID getMARITALSTATUS() { 
685                ID retVal = this.getTypedField(16, 0);
686                return retVal;
687    }
688    
689    /**
690     * Returns
691     * PID-16: "MARITAL STATUS" - creates it if necessary
692     */
693    public ID getPid16_MARITALSTATUS() { 
694                ID retVal = this.getTypedField(16, 0);
695                return retVal;
696    }
697
698
699
700    /**
701     * Returns
702     * PID-17: "RELIGION" - creates it if necessary
703     */
704    public ID getRELIGION() { 
705                ID retVal = this.getTypedField(17, 0);
706                return retVal;
707    }
708    
709    /**
710     * Returns
711     * PID-17: "RELIGION" - creates it if necessary
712     */
713    public ID getPid17_RELIGION() { 
714                ID retVal = this.getTypedField(17, 0);
715                return retVal;
716    }
717
718
719
720    /**
721     * Returns
722     * PID-18: "PATIENT ACCOUNT NUMBER" - creates it if necessary
723     */
724    public CK getPATIENTACCOUNTNUMBER() { 
725                CK retVal = this.getTypedField(18, 0);
726                return retVal;
727    }
728    
729    /**
730     * Returns
731     * PID-18: "PATIENT ACCOUNT NUMBER" - creates it if necessary
732     */
733    public CK getPid18_PATIENTACCOUNTNUMBER() { 
734                CK retVal = this.getTypedField(18, 0);
735                return retVal;
736    }
737
738
739
740    /**
741     * Returns
742     * PID-19: "SSN NUMBER - PATIENT" - creates it if necessary
743     */
744    public ST getSSNNUMBERPATIENT() { 
745                ST retVal = this.getTypedField(19, 0);
746                return retVal;
747    }
748    
749    /**
750     * Returns
751     * PID-19: "SSN NUMBER - PATIENT" - creates it if necessary
752     */
753    public ST getPid19_SSNNUMBERPATIENT() { 
754                ST retVal = this.getTypedField(19, 0);
755                return retVal;
756    }
757
758
759
760    /**
761     * Returns
762     * PID-20: "DRIVER'S LIC NUM - PATIENT" - creates it if necessary
763     */
764    public CM getDRIVERSLICNUMPATIENT() { 
765                CM retVal = this.getTypedField(20, 0);
766                return retVal;
767    }
768    
769    /**
770     * Returns
771     * PID-20: "DRIVER'S LIC NUM - PATIENT" - creates it if necessary
772     */
773    public CM getPid20_DRIVERSLICNUMPATIENT() { 
774                CM retVal = this.getTypedField(20, 0);
775                return retVal;
776    }
777
778
779
780
781
782    /** {@inheritDoc} */   
783    protected Type createNewTypeWithoutReflection(int field) {
784       switch (field) {
785          case 0: return new SI(getMessage());
786          case 1: return new CK(getMessage());
787          case 2: return new CK(getMessage());
788          case 3: return new ST(getMessage());
789          case 4: return new PN(getMessage());
790          case 5: return new ST(getMessage());
791          case 6: return new DT(getMessage());
792          case 7: return new ID(getMessage(), new Integer( 1 ));
793          case 8: return new PN(getMessage());
794          case 9: return new ID(getMessage(), new Integer( 5 ));
795          case 10: return new AD(getMessage());
796          case 11: return new ID(getMessage(), new Integer( 0 ));
797          case 12: return new TN(getMessage());
798          case 13: return new TN(getMessage());
799          case 14: return new ST(getMessage());
800          case 15: return new ID(getMessage(), new Integer( 2 ));
801          case 16: return new ID(getMessage(), new Integer( 6 ));
802          case 17: return new CK(getMessage());
803          case 18: return new ST(getMessage());
804          case 19: return new CM(getMessage());
805          default: return null;
806       }
807   }
808
809
810}
811