View Javadoc
1   /*
2    * This class is an auto-generated source file for a HAPI
3    * HL7 v2.x standard structure class.
4    *
5    * For more information, visit: http://hl7api.sourceforge.net/
6    * 
7    * The contents of this file are subject to the Mozilla Public License Version 1.1 
8    * (the "License"); you may not use this file except in compliance with the License. 
9    * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
10   * Software distributed under the License is distributed on an "AS IS" basis, 
11   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
12   * specific language governing rights and limitations under the License. 
13   * 
14   * The Original Code is "PPN.java".  Description:
15   * "Composite class PPN"
16   * 
17   * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
18   * 2013.  All Rights Reserved.
19   * 
20   * Contributor(s): ______________________________________. 
21   * 
22   * Alternatively, the contents of this file may be used under the terms of the 
23   * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
24   * applicable instead of those above.  If you wish to allow use of your version of this 
25   * file only under the terms of the GPL and not to allow others to use your version 
26   * of this file under the MPL, indicate your decision by deleting  the provisions above 
27   * and replace  them with the notice and other provisions required by the GPL License.  
28   * If you do not delete the provisions above, a recipient may use your version of 
29   * this file under either the MPL or the GPL. 
30   * 
31   */
32  
33  package ca.uhn.hl7v2.model.v26.datatype;
34  
35  import ca.uhn.hl7v2.model.DataTypeException;
36  import ca.uhn.hl7v2.model.Message;
37  import ca.uhn.hl7v2.model.Type;
38  import ca.uhn.hl7v2.model.AbstractComposite;
39  
40  
41  /**
42   * <p>Represents an HL7 PPN (Performing Person Time Stamp) data type. 
43   * This type consists of the following components:</p>
44   * <ul>
45   * <li>ID Number (ST)
46   * <li>Family Name (FN)
47   * <li>Given Name (ST)
48   * <li>Second and Further Given Names or Initials Thereof (ST)
49   * <li>Suffix (e.g., JR or III) (ST)
50   * <li>Prefix (e.g., DR) (ST)
51   * <li>Degree (e.g., MD) (IS)
52   * <li>Source Table (IS)
53   * <li>Assigning Authority (HD)
54   * <li>Name Type Code (ID)
55   * <li>Identifier Check Digit (ST)
56   * <li>Check Digit Scheme (ID)
57   * <li>Identifier Type Code (ID)
58   * <li>Assigning Facility (HD)
59   * <li>Date/Time Action Performed (DTM)
60   * <li>Name Representation Code (ID)
61   * <li>Name Context (CWE)
62   * <li>Name Validity Range (DR)
63   * <li>Name Assembly Order (ID)
64   * <li>Effective Date (DTM)
65   * <li>Expiration Date (DTM)
66   * <li>Professional Suffix (ST)
67   * <li>Assigning Jurisdiction (CWE)
68   * <li>Assigning Agency or Department (CWE)
69   * </ul>
70   */
71  @SuppressWarnings("unused")
72  public class PPN extends AbstractComposite {
73  
74      private Type[] data;
75  
76      /** 
77       * Creates a new PPN type
78       */
79      public PPN(Message message) {
80          super(message);
81          init();
82      }
83  
84      private void init() {
85          data = new Type[24];    
86          data[0] = new ST(getMessage());
87          data[1] = new FN(getMessage());
88          data[2] = new ST(getMessage());
89          data[3] = new ST(getMessage());
90          data[4] = new ST(getMessage());
91          data[5] = new ST(getMessage());
92          data[6] = new IS(getMessage(), 360);
93          data[7] = new IS(getMessage(), 297);
94          data[8] = new HD(getMessage());
95          data[9] = new ID(getMessage(), 200);
96          data[10] = new ST(getMessage());
97          data[11] = new ID(getMessage(), 61);
98          data[12] = new ID(getMessage(), 203);
99          data[13] = new HD(getMessage());
100         data[14] = new DTM(getMessage());
101         data[15] = new ID(getMessage(), 465);
102         data[16] = new CWE(getMessage());
103         data[17] = new DR(getMessage());
104         data[18] = new ID(getMessage(), 444);
105         data[19] = new DTM(getMessage());
106         data[20] = new DTM(getMessage());
107         data[21] = new ST(getMessage());
108         data[22] = new CWE(getMessage());
109         data[23] = new CWE(getMessage());
110     }
111 
112 
113     /**
114      * Returns an array containing the data elements.
115      */
116     public Type[] getComponents() { 
117         return this.data; 
118     }
119 
120     /**
121      * Returns an individual data component.
122      *
123      * @param number The component number (0-indexed)
124      * @throws DataTypeException if the given element number is out of range.
125      */
126     public Type getComponent(int number) throws DataTypeException { 
127 
128         try { 
129             return this.data[number]; 
130         } catch (ArrayIndexOutOfBoundsException e) { 
131             throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)"); 
132         } 
133     } 
134 
135 
136     /**
137      * Returns ID Number (component 1).  This is a convenience method that saves you from 
138      * casting and handling an exception.
139      */
140     public ST getIDNumber() {
141        return getTyped(0, ST.class);
142     }
143 
144     
145     /**
146      * Returns ID Number (component 1).  This is a convenience method that saves you from 
147      * casting and handling an exception.
148      */
149     public ST getPpn1_IDNumber() {
150        return getTyped(0, ST.class);
151     }
152 
153 
154     /**
155      * Returns Family Name (component 2).  This is a convenience method that saves you from 
156      * casting and handling an exception.
157      */
158     public FN getFamilyName() {
159        return getTyped(1, FN.class);
160     }
161 
162     
163     /**
164      * Returns Family Name (component 2).  This is a convenience method that saves you from 
165      * casting and handling an exception.
166      */
167     public FN getPpn2_FamilyName() {
168        return getTyped(1, FN.class);
169     }
170 
171 
172     /**
173      * Returns Given Name (component 3).  This is a convenience method that saves you from 
174      * casting and handling an exception.
175      */
176     public ST getGivenName() {
177        return getTyped(2, ST.class);
178     }
179 
180     
181     /**
182      * Returns Given Name (component 3).  This is a convenience method that saves you from 
183      * casting and handling an exception.
184      */
185     public ST getPpn3_GivenName() {
186        return getTyped(2, ST.class);
187     }
188 
189 
190     /**
191      * Returns Second and Further Given Names or Initials Thereof (component 4).  This is a convenience method that saves you from 
192      * casting and handling an exception.
193      */
194     public ST getSecondAndFurtherGivenNamesOrInitialsThereof() {
195        return getTyped(3, ST.class);
196     }
197 
198     
199     /**
200      * Returns Second and Further Given Names or Initials Thereof (component 4).  This is a convenience method that saves you from 
201      * casting and handling an exception.
202      */
203     public ST getPpn4_SecondAndFurtherGivenNamesOrInitialsThereof() {
204        return getTyped(3, ST.class);
205     }
206 
207 
208     /**
209      * Returns Suffix (e.g., JR or III) (component 5).  This is a convenience method that saves you from 
210      * casting and handling an exception.
211      */
212     public ST getSuffixEgJRorIII() {
213        return getTyped(4, ST.class);
214     }
215 
216     
217     /**
218      * Returns Suffix (e.g., JR or III) (component 5).  This is a convenience method that saves you from 
219      * casting and handling an exception.
220      */
221     public ST getPpn5_SuffixEgJRorIII() {
222        return getTyped(4, ST.class);
223     }
224 
225 
226     /**
227      * Returns Prefix (e.g., DR) (component 6).  This is a convenience method that saves you from 
228      * casting and handling an exception.
229      */
230     public ST getPrefixEgDR() {
231        return getTyped(5, ST.class);
232     }
233 
234     
235     /**
236      * Returns Prefix (e.g., DR) (component 6).  This is a convenience method that saves you from 
237      * casting and handling an exception.
238      */
239     public ST getPpn6_PrefixEgDR() {
240        return getTyped(5, ST.class);
241     }
242 
243 
244     /**
245      * Returns Degree (e.g., MD) (component 7).  This is a convenience method that saves you from 
246      * casting and handling an exception.
247      */
248     public IS getDegreeEgMD() {
249        return getTyped(6, IS.class);
250     }
251 
252     
253     /**
254      * Returns Degree (e.g., MD) (component 7).  This is a convenience method that saves you from 
255      * casting and handling an exception.
256      */
257     public IS getPpn7_DegreeEgMD() {
258        return getTyped(6, IS.class);
259     }
260 
261 
262     /**
263      * Returns Source Table (component 8).  This is a convenience method that saves you from 
264      * casting and handling an exception.
265      */
266     public IS getSourceTable() {
267        return getTyped(7, IS.class);
268     }
269 
270     
271     /**
272      * Returns Source Table (component 8).  This is a convenience method that saves you from 
273      * casting and handling an exception.
274      */
275     public IS getPpn8_SourceTable() {
276        return getTyped(7, IS.class);
277     }
278 
279 
280     /**
281      * Returns Assigning Authority (component 9).  This is a convenience method that saves you from 
282      * casting and handling an exception.
283      */
284     public HD getAssigningAuthority() {
285        return getTyped(8, HD.class);
286     }
287 
288     
289     /**
290      * Returns Assigning Authority (component 9).  This is a convenience method that saves you from 
291      * casting and handling an exception.
292      */
293     public HD getPpn9_AssigningAuthority() {
294        return getTyped(8, HD.class);
295     }
296 
297 
298     /**
299      * Returns Name Type Code (component 10).  This is a convenience method that saves you from 
300      * casting and handling an exception.
301      */
302     public ID getNameTypeCode() {
303        return getTyped(9, ID.class);
304     }
305 
306     
307     /**
308      * Returns Name Type Code (component 10).  This is a convenience method that saves you from 
309      * casting and handling an exception.
310      */
311     public ID getPpn10_NameTypeCode() {
312        return getTyped(9, ID.class);
313     }
314 
315 
316     /**
317      * Returns Identifier Check Digit (component 11).  This is a convenience method that saves you from 
318      * casting and handling an exception.
319      */
320     public ST getIdentifierCheckDigit() {
321        return getTyped(10, ST.class);
322     }
323 
324     
325     /**
326      * Returns Identifier Check Digit (component 11).  This is a convenience method that saves you from 
327      * casting and handling an exception.
328      */
329     public ST getPpn11_IdentifierCheckDigit() {
330        return getTyped(10, ST.class);
331     }
332 
333 
334     /**
335      * Returns Check Digit Scheme (component 12).  This is a convenience method that saves you from 
336      * casting and handling an exception.
337      */
338     public ID getCheckDigitScheme() {
339        return getTyped(11, ID.class);
340     }
341 
342     
343     /**
344      * Returns Check Digit Scheme (component 12).  This is a convenience method that saves you from 
345      * casting and handling an exception.
346      */
347     public ID getPpn12_CheckDigitScheme() {
348        return getTyped(11, ID.class);
349     }
350 
351 
352     /**
353      * Returns Identifier Type Code (component 13).  This is a convenience method that saves you from 
354      * casting and handling an exception.
355      */
356     public ID getIdentifierTypeCode() {
357        return getTyped(12, ID.class);
358     }
359 
360     
361     /**
362      * Returns Identifier Type Code (component 13).  This is a convenience method that saves you from 
363      * casting and handling an exception.
364      */
365     public ID getPpn13_IdentifierTypeCode() {
366        return getTyped(12, ID.class);
367     }
368 
369 
370     /**
371      * Returns Assigning Facility (component 14).  This is a convenience method that saves you from 
372      * casting and handling an exception.
373      */
374     public HD getAssigningFacility() {
375        return getTyped(13, HD.class);
376     }
377 
378     
379     /**
380      * Returns Assigning Facility (component 14).  This is a convenience method that saves you from 
381      * casting and handling an exception.
382      */
383     public HD getPpn14_AssigningFacility() {
384        return getTyped(13, HD.class);
385     }
386 
387 
388     /**
389      * Returns Date/Time Action Performed (component 15).  This is a convenience method that saves you from 
390      * casting and handling an exception.
391      */
392     public DTM getDateTimeActionPerformed() {
393        return getTyped(14, DTM.class);
394     }
395 
396     
397     /**
398      * Returns Date/Time Action Performed (component 15).  This is a convenience method that saves you from 
399      * casting and handling an exception.
400      */
401     public DTM getPpn15_DateTimeActionPerformed() {
402        return getTyped(14, DTM.class);
403     }
404 
405 
406     /**
407      * Returns Name Representation Code (component 16).  This is a convenience method that saves you from 
408      * casting and handling an exception.
409      */
410     public ID getNameRepresentationCode() {
411        return getTyped(15, ID.class);
412     }
413 
414     
415     /**
416      * Returns Name Representation Code (component 16).  This is a convenience method that saves you from 
417      * casting and handling an exception.
418      */
419     public ID getPpn16_NameRepresentationCode() {
420        return getTyped(15, ID.class);
421     }
422 
423 
424     /**
425      * Returns Name Context (component 17).  This is a convenience method that saves you from 
426      * casting and handling an exception.
427      */
428     public CWE getNameContext() {
429        return getTyped(16, CWE.class);
430     }
431 
432     
433     /**
434      * Returns Name Context (component 17).  This is a convenience method that saves you from 
435      * casting and handling an exception.
436      */
437     public CWE getPpn17_NameContext() {
438        return getTyped(16, CWE.class);
439     }
440 
441 
442     /**
443      * Returns Name Validity Range (component 18).  This is a convenience method that saves you from 
444      * casting and handling an exception.
445      */
446     public DR getNameValidityRange() {
447        return getTyped(17, DR.class);
448     }
449 
450     
451     /**
452      * Returns Name Validity Range (component 18).  This is a convenience method that saves you from 
453      * casting and handling an exception.
454      */
455     public DR getPpn18_NameValidityRange() {
456        return getTyped(17, DR.class);
457     }
458 
459 
460     /**
461      * Returns Name Assembly Order (component 19).  This is a convenience method that saves you from 
462      * casting and handling an exception.
463      */
464     public ID getNameAssemblyOrder() {
465        return getTyped(18, ID.class);
466     }
467 
468     
469     /**
470      * Returns Name Assembly Order (component 19).  This is a convenience method that saves you from 
471      * casting and handling an exception.
472      */
473     public ID getPpn19_NameAssemblyOrder() {
474        return getTyped(18, ID.class);
475     }
476 
477 
478     /**
479      * Returns Effective Date (component 20).  This is a convenience method that saves you from 
480      * casting and handling an exception.
481      */
482     public DTM getEffectiveDate() {
483        return getTyped(19, DTM.class);
484     }
485 
486     
487     /**
488      * Returns Effective Date (component 20).  This is a convenience method that saves you from 
489      * casting and handling an exception.
490      */
491     public DTM getPpn20_EffectiveDate() {
492        return getTyped(19, DTM.class);
493     }
494 
495 
496     /**
497      * Returns Expiration Date (component 21).  This is a convenience method that saves you from 
498      * casting and handling an exception.
499      */
500     public DTM getExpirationDate() {
501        return getTyped(20, DTM.class);
502     }
503 
504     
505     /**
506      * Returns Expiration Date (component 21).  This is a convenience method that saves you from 
507      * casting and handling an exception.
508      */
509     public DTM getPpn21_ExpirationDate() {
510        return getTyped(20, DTM.class);
511     }
512 
513 
514     /**
515      * Returns Professional Suffix (component 22).  This is a convenience method that saves you from 
516      * casting and handling an exception.
517      */
518     public ST getProfessionalSuffix() {
519        return getTyped(21, ST.class);
520     }
521 
522     
523     /**
524      * Returns Professional Suffix (component 22).  This is a convenience method that saves you from 
525      * casting and handling an exception.
526      */
527     public ST getPpn22_ProfessionalSuffix() {
528        return getTyped(21, ST.class);
529     }
530 
531 
532     /**
533      * Returns Assigning Jurisdiction (component 23).  This is a convenience method that saves you from 
534      * casting and handling an exception.
535      */
536     public CWE getAssigningJurisdiction() {
537        return getTyped(22, CWE.class);
538     }
539 
540     
541     /**
542      * Returns Assigning Jurisdiction (component 23).  This is a convenience method that saves you from 
543      * casting and handling an exception.
544      */
545     public CWE getPpn23_AssigningJurisdiction() {
546        return getTyped(22, CWE.class);
547     }
548 
549 
550     /**
551      * Returns Assigning Agency or Department (component 24).  This is a convenience method that saves you from 
552      * casting and handling an exception.
553      */
554     public CWE getAssigningAgencyOrDepartment() {
555        return getTyped(23, CWE.class);
556     }
557 
558     
559     /**
560      * Returns Assigning Agency or Department (component 24).  This is a convenience method that saves you from 
561      * casting and handling an exception.
562      */
563     public CWE getPpn24_AssigningAgencyOrDepartment() {
564        return getTyped(23, CWE.class);
565     }
566 
567 
568 
569 }
570