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 "PPN.java".  Description:
015 * "Composite class PPN"
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2013.  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
033package ca.uhn.hl7v2.model.v27.datatype;
034
035import ca.uhn.hl7v2.model.DataTypeException;
036import ca.uhn.hl7v2.model.Message;
037import ca.uhn.hl7v2.model.Type;
038import ca.uhn.hl7v2.model.AbstractComposite;
039
040
041/**
042 * <p>Represents an HL7 PPN (Performing Person Time Stamp) data type. 
043 * This type consists of the following components:</p>
044 * <ul>
045 * <li>Person Identifier (ST)
046 * <li>Family Name (FN)
047 * <li>Given Name (ST)
048 * <li>Second and Further Given Names or Initials Thereof (ST)
049 * <li>Suffix (e.g., JR or III) (ST)
050 * <li>Prefix (e.g., DR) (ST)
051 * <li>Degree (e.g., MD) (NULLDT)
052 * <li>Source Table (CWE)
053 * <li>Assigning Authority (HD)
054 * <li>Name Type Code (ID)
055 * <li>Identifier Check Digit (ST)
056 * <li>Check Digit Scheme (ID)
057 * <li>Identifier Type Code (ID)
058 * <li>Assigning Facility (HD)
059 * <li>Date/Time Action Performed (DTM)
060 * <li>Name Representation Code (ID)
061 * <li>Name Context (CWE)
062 * <li>Name Validity Range (NULLDT)
063 * <li>Name Assembly Order (ID)
064 * <li>Effective Date (DTM)
065 * <li>Expiration Date (DTM)
066 * <li>Professional Suffix (ST)
067 * <li>Assigning Jurisdiction (CWE)
068 * <li>Assigning Agency or Department (CWE)
069 * <li>Security Check (ST)
070 * <li>Security Check Scheme (ID)
071 * </ul>
072 */
073@SuppressWarnings("unused")
074public class PPN extends AbstractComposite {
075
076    private Type[] data;
077
078    /** 
079     * Creates a new PPN type
080     */
081    public PPN(Message message) {
082        super(message);
083        init();
084    }
085
086    private void init() {
087        data = new Type[26];    
088        data[0] = new ST(getMessage());
089        data[1] = new FN(getMessage());
090        data[2] = new ST(getMessage());
091        data[3] = new ST(getMessage());
092        data[4] = new ST(getMessage());
093        data[5] = new ST(getMessage());
094        data[6] = new NULLDT(getMessage());
095        data[7] = new CWE(getMessage());
096        data[8] = new HD(getMessage());
097        data[9] = new ID(getMessage(), 200);
098        data[10] = new ST(getMessage());
099        data[11] = new ID(getMessage(), 61);
100        data[12] = new ID(getMessage(), 203);
101        data[13] = new HD(getMessage());
102        data[14] = new DTM(getMessage());
103        data[15] = new ID(getMessage(), 465);
104        data[16] = new CWE(getMessage());
105        data[17] = new NULLDT(getMessage());
106        data[18] = new ID(getMessage(), 444);
107        data[19] = new DTM(getMessage());
108        data[20] = new DTM(getMessage());
109        data[21] = new ST(getMessage());
110        data[22] = new CWE(getMessage());
111        data[23] = new CWE(getMessage());
112        data[24] = new ST(getMessage());
113        data[25] = new ID(getMessage(), 904);
114    }
115
116
117    /**
118     * Returns an array containing the data elements.
119     */
120    public Type[] getComponents() { 
121        return this.data; 
122    }
123
124    /**
125     * Returns an individual data component.
126     *
127     * @param number The component number (0-indexed)
128     * @throws DataTypeException if the given element number is out of range.
129     */
130    public Type getComponent(int number) throws DataTypeException { 
131
132        try { 
133            return this.data[number]; 
134        } catch (ArrayIndexOutOfBoundsException e) { 
135            throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)"); 
136        } 
137    } 
138
139
140    /**
141     * Returns Person Identifier (component 1).  This is a convenience method that saves you from 
142     * casting and handling an exception.
143     */
144    public ST getPersonIdentifier() {
145       return getTyped(0, ST.class);
146    }
147
148    
149    /**
150     * Returns Person Identifier (component 1).  This is a convenience method that saves you from 
151     * casting and handling an exception.
152     */
153    public ST getPpn1_PersonIdentifier() {
154       return getTyped(0, ST.class);
155    }
156
157
158    /**
159     * Returns Family Name (component 2).  This is a convenience method that saves you from 
160     * casting and handling an exception.
161     */
162    public FN getFamilyName() {
163       return getTyped(1, FN.class);
164    }
165
166    
167    /**
168     * Returns Family Name (component 2).  This is a convenience method that saves you from 
169     * casting and handling an exception.
170     */
171    public FN getPpn2_FamilyName() {
172       return getTyped(1, FN.class);
173    }
174
175
176    /**
177     * Returns Given Name (component 3).  This is a convenience method that saves you from 
178     * casting and handling an exception.
179     */
180    public ST getGivenName() {
181       return getTyped(2, ST.class);
182    }
183
184    
185    /**
186     * Returns Given Name (component 3).  This is a convenience method that saves you from 
187     * casting and handling an exception.
188     */
189    public ST getPpn3_GivenName() {
190       return getTyped(2, ST.class);
191    }
192
193
194    /**
195     * Returns Second and Further Given Names or Initials Thereof (component 4).  This is a convenience method that saves you from 
196     * casting and handling an exception.
197     */
198    public ST getSecondAndFurtherGivenNamesOrInitialsThereof() {
199       return getTyped(3, ST.class);
200    }
201
202    
203    /**
204     * Returns Second and Further Given Names or Initials Thereof (component 4).  This is a convenience method that saves you from 
205     * casting and handling an exception.
206     */
207    public ST getPpn4_SecondAndFurtherGivenNamesOrInitialsThereof() {
208       return getTyped(3, ST.class);
209    }
210
211
212    /**
213     * Returns Suffix (e.g., JR or III) (component 5).  This is a convenience method that saves you from 
214     * casting and handling an exception.
215     */
216    public ST getSuffixEgJRorIII() {
217       return getTyped(4, ST.class);
218    }
219
220    
221    /**
222     * Returns Suffix (e.g., JR or III) (component 5).  This is a convenience method that saves you from 
223     * casting and handling an exception.
224     */
225    public ST getPpn5_SuffixEgJRorIII() {
226       return getTyped(4, ST.class);
227    }
228
229
230    /**
231     * Returns Prefix (e.g., DR) (component 6).  This is a convenience method that saves you from 
232     * casting and handling an exception.
233     */
234    public ST getPrefixEgDR() {
235       return getTyped(5, ST.class);
236    }
237
238    
239    /**
240     * Returns Prefix (e.g., DR) (component 6).  This is a convenience method that saves you from 
241     * casting and handling an exception.
242     */
243    public ST getPpn6_PrefixEgDR() {
244       return getTyped(5, ST.class);
245    }
246
247
248    /**
249     * Returns Degree (e.g., MD) (component 7).  This is a convenience method that saves you from 
250     * casting and handling an exception.
251     */
252    public NULLDT getDegreeEgMD() {
253       return getTyped(6, NULLDT.class);
254    }
255
256    
257    /**
258     * Returns Degree (e.g., MD) (component 7).  This is a convenience method that saves you from 
259     * casting and handling an exception.
260     */
261    public NULLDT getPpn7_DegreeEgMD() {
262       return getTyped(6, NULLDT.class);
263    }
264
265
266    /**
267     * Returns Source Table (component 8).  This is a convenience method that saves you from 
268     * casting and handling an exception.
269     */
270    public CWE getSourceTable() {
271       return getTyped(7, CWE.class);
272    }
273
274    
275    /**
276     * Returns Source Table (component 8).  This is a convenience method that saves you from 
277     * casting and handling an exception.
278     */
279    public CWE getPpn8_SourceTable() {
280       return getTyped(7, CWE.class);
281    }
282
283
284    /**
285     * Returns Assigning Authority (component 9).  This is a convenience method that saves you from 
286     * casting and handling an exception.
287     */
288    public HD getAssigningAuthority() {
289       return getTyped(8, HD.class);
290    }
291
292    
293    /**
294     * Returns Assigning Authority (component 9).  This is a convenience method that saves you from 
295     * casting and handling an exception.
296     */
297    public HD getPpn9_AssigningAuthority() {
298       return getTyped(8, HD.class);
299    }
300
301
302    /**
303     * Returns Name Type Code (component 10).  This is a convenience method that saves you from 
304     * casting and handling an exception.
305     */
306    public ID getNameTypeCode() {
307       return getTyped(9, ID.class);
308    }
309
310    
311    /**
312     * Returns Name Type Code (component 10).  This is a convenience method that saves you from 
313     * casting and handling an exception.
314     */
315    public ID getPpn10_NameTypeCode() {
316       return getTyped(9, ID.class);
317    }
318
319
320    /**
321     * Returns Identifier Check Digit (component 11).  This is a convenience method that saves you from 
322     * casting and handling an exception.
323     */
324    public ST getIdentifierCheckDigit() {
325       return getTyped(10, ST.class);
326    }
327
328    
329    /**
330     * Returns Identifier Check Digit (component 11).  This is a convenience method that saves you from 
331     * casting and handling an exception.
332     */
333    public ST getPpn11_IdentifierCheckDigit() {
334       return getTyped(10, ST.class);
335    }
336
337
338    /**
339     * Returns Check Digit Scheme (component 12).  This is a convenience method that saves you from 
340     * casting and handling an exception.
341     */
342    public ID getCheckDigitScheme() {
343       return getTyped(11, ID.class);
344    }
345
346    
347    /**
348     * Returns Check Digit Scheme (component 12).  This is a convenience method that saves you from 
349     * casting and handling an exception.
350     */
351    public ID getPpn12_CheckDigitScheme() {
352       return getTyped(11, ID.class);
353    }
354
355
356    /**
357     * Returns Identifier Type Code (component 13).  This is a convenience method that saves you from 
358     * casting and handling an exception.
359     */
360    public ID getIdentifierTypeCode() {
361       return getTyped(12, ID.class);
362    }
363
364    
365    /**
366     * Returns Identifier Type Code (component 13).  This is a convenience method that saves you from 
367     * casting and handling an exception.
368     */
369    public ID getPpn13_IdentifierTypeCode() {
370       return getTyped(12, ID.class);
371    }
372
373
374    /**
375     * Returns Assigning Facility (component 14).  This is a convenience method that saves you from 
376     * casting and handling an exception.
377     */
378    public HD getAssigningFacility() {
379       return getTyped(13, HD.class);
380    }
381
382    
383    /**
384     * Returns Assigning Facility (component 14).  This is a convenience method that saves you from 
385     * casting and handling an exception.
386     */
387    public HD getPpn14_AssigningFacility() {
388       return getTyped(13, HD.class);
389    }
390
391
392    /**
393     * Returns Date/Time Action Performed (component 15).  This is a convenience method that saves you from 
394     * casting and handling an exception.
395     */
396    public DTM getDateTimeActionPerformed() {
397       return getTyped(14, DTM.class);
398    }
399
400    
401    /**
402     * Returns Date/Time Action Performed (component 15).  This is a convenience method that saves you from 
403     * casting and handling an exception.
404     */
405    public DTM getPpn15_DateTimeActionPerformed() {
406       return getTyped(14, DTM.class);
407    }
408
409
410    /**
411     * Returns Name Representation Code (component 16).  This is a convenience method that saves you from 
412     * casting and handling an exception.
413     */
414    public ID getNameRepresentationCode() {
415       return getTyped(15, ID.class);
416    }
417
418    
419    /**
420     * Returns Name Representation Code (component 16).  This is a convenience method that saves you from 
421     * casting and handling an exception.
422     */
423    public ID getPpn16_NameRepresentationCode() {
424       return getTyped(15, ID.class);
425    }
426
427
428    /**
429     * Returns Name Context (component 17).  This is a convenience method that saves you from 
430     * casting and handling an exception.
431     */
432    public CWE getNameContext() {
433       return getTyped(16, CWE.class);
434    }
435
436    
437    /**
438     * Returns Name Context (component 17).  This is a convenience method that saves you from 
439     * casting and handling an exception.
440     */
441    public CWE getPpn17_NameContext() {
442       return getTyped(16, CWE.class);
443    }
444
445
446    /**
447     * Returns Name Validity Range (component 18).  This is a convenience method that saves you from 
448     * casting and handling an exception.
449     */
450    public NULLDT getNameValidityRange() {
451       return getTyped(17, NULLDT.class);
452    }
453
454    
455    /**
456     * Returns Name Validity Range (component 18).  This is a convenience method that saves you from 
457     * casting and handling an exception.
458     */
459    public NULLDT getPpn18_NameValidityRange() {
460       return getTyped(17, NULLDT.class);
461    }
462
463
464    /**
465     * Returns Name Assembly Order (component 19).  This is a convenience method that saves you from 
466     * casting and handling an exception.
467     */
468    public ID getNameAssemblyOrder() {
469       return getTyped(18, ID.class);
470    }
471
472    
473    /**
474     * Returns Name Assembly Order (component 19).  This is a convenience method that saves you from 
475     * casting and handling an exception.
476     */
477    public ID getPpn19_NameAssemblyOrder() {
478       return getTyped(18, ID.class);
479    }
480
481
482    /**
483     * Returns Effective Date (component 20).  This is a convenience method that saves you from 
484     * casting and handling an exception.
485     */
486    public DTM getEffectiveDate() {
487       return getTyped(19, DTM.class);
488    }
489
490    
491    /**
492     * Returns Effective Date (component 20).  This is a convenience method that saves you from 
493     * casting and handling an exception.
494     */
495    public DTM getPpn20_EffectiveDate() {
496       return getTyped(19, DTM.class);
497    }
498
499
500    /**
501     * Returns Expiration Date (component 21).  This is a convenience method that saves you from 
502     * casting and handling an exception.
503     */
504    public DTM getExpirationDate() {
505       return getTyped(20, DTM.class);
506    }
507
508    
509    /**
510     * Returns Expiration Date (component 21).  This is a convenience method that saves you from 
511     * casting and handling an exception.
512     */
513    public DTM getPpn21_ExpirationDate() {
514       return getTyped(20, DTM.class);
515    }
516
517
518    /**
519     * Returns Professional Suffix (component 22).  This is a convenience method that saves you from 
520     * casting and handling an exception.
521     */
522    public ST getProfessionalSuffix() {
523       return getTyped(21, ST.class);
524    }
525
526    
527    /**
528     * Returns Professional Suffix (component 22).  This is a convenience method that saves you from 
529     * casting and handling an exception.
530     */
531    public ST getPpn22_ProfessionalSuffix() {
532       return getTyped(21, ST.class);
533    }
534
535
536    /**
537     * Returns Assigning Jurisdiction (component 23).  This is a convenience method that saves you from 
538     * casting and handling an exception.
539     */
540    public CWE getAssigningJurisdiction() {
541       return getTyped(22, CWE.class);
542    }
543
544    
545    /**
546     * Returns Assigning Jurisdiction (component 23).  This is a convenience method that saves you from 
547     * casting and handling an exception.
548     */
549    public CWE getPpn23_AssigningJurisdiction() {
550       return getTyped(22, CWE.class);
551    }
552
553
554    /**
555     * Returns Assigning Agency or Department (component 24).  This is a convenience method that saves you from 
556     * casting and handling an exception.
557     */
558    public CWE getAssigningAgencyOrDepartment() {
559       return getTyped(23, CWE.class);
560    }
561
562    
563    /**
564     * Returns Assigning Agency or Department (component 24).  This is a convenience method that saves you from 
565     * casting and handling an exception.
566     */
567    public CWE getPpn24_AssigningAgencyOrDepartment() {
568       return getTyped(23, CWE.class);
569    }
570
571
572    /**
573     * Returns Security Check (component 25).  This is a convenience method that saves you from 
574     * casting and handling an exception.
575     */
576    public ST getSecurityCheck() {
577       return getTyped(24, ST.class);
578    }
579
580    
581    /**
582     * Returns Security Check (component 25).  This is a convenience method that saves you from 
583     * casting and handling an exception.
584     */
585    public ST getPpn25_SecurityCheck() {
586       return getTyped(24, ST.class);
587    }
588
589
590    /**
591     * Returns Security Check Scheme (component 26).  This is a convenience method that saves you from 
592     * casting and handling an exception.
593     */
594    public ID getSecurityCheckScheme() {
595       return getTyped(25, ID.class);
596    }
597
598    
599    /**
600     * Returns Security Check Scheme (component 26).  This is a convenience method that saves you from 
601     * casting and handling an exception.
602     */
603    public ID getPpn26_SecurityCheckScheme() {
604       return getTyped(25, ID.class);
605    }
606
607
608
609}
610