Coverage Report - ca.uhn.hl7v2.test.singledt.conf.segment.PD1
 
Classes in this File Line Coverage Branch Coverage Complexity
PD1
0%
0/195
0%
0/22
1.462
 
 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 "[file_name]".  Description: 
 15  
  * "[one_line_description]" 
 16  
  * 
 17  
  * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
 18  
  * 2012.  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  
 
 34  
 package ca.uhn.hl7v2.test.singledt.conf.segment;
 35  
 
 36  
 // import ca.uhn.hl7v2.test.singledt.conf.group.*;
 37  
 import ca.uhn.hl7v2.model.v25.datatype.*;
 38  
 import ca.uhn.hl7v2.HL7Exception;
 39  
 import ca.uhn.hl7v2.parser.ModelClassFactory;
 40  
 import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
 41  
 import ca.uhn.hl7v2.model.AbstractMessage;
 42  
 import ca.uhn.hl7v2.model.Group;
 43  
 import ca.uhn.hl7v2.model.Type;
 44  
 import ca.uhn.hl7v2.model.AbstractSegment;
 45  
 import ca.uhn.hl7v2.model.Varies;
 46  
 
 47  
 
 48  
 /**
 49  
  *<p>Represents an HL7 PD1 message segment (Patient Additional Demographic). 
 50  
  * This segment has the following fields:</p>
 51  
  * <ul>
 52  
      * <li>PD1-1: Living Dependency (IS) <b>optional repeating</b>
 53  
      * <li>PD1-2: Living Arrangement (IS) <b>optional </b>
 54  
      * <li>PD1-3: Patient Primary Facility (XON) <b>optional repeating</b>
 55  
      * <li>PD1-4: Patient Primary Care Provider Name & ID No. (XCN) <b>optional repeating</b>
 56  
      * <li>PD1-5: Student Indicator (IS) <b>optional </b>
 57  
      * <li>PD1-6: Handicap (IS) <b>optional </b>
 58  
      * <li>PD1-7: Living Will Code (IS) <b>optional </b>
 59  
      * <li>PD1-8: Organ Donor Code (IS) <b>optional </b>
 60  
      * <li>PD1-9: Separate Bill (ID) <b>optional </b>
 61  
      * <li>PD1-10: Duplicate Patient (CX) <b>optional repeating</b>
 62  
      * <li>PD1-11: Publicity Code (CE) <b>optional </b>
 63  
      * <li>PD1-12: Protection Indicator (ID) <b>optional </b>
 64  
      * <li>PD1-13: Protection Indicator Effective Date (DT) <b>optional </b>
 65  
      * <li>PD1-14: Place of Worship (XON) <b>optional repeating</b>
 66  
      * <li>PD1-15: Advance Directive Code (CE) <b>optional repeating</b>
 67  
      * <li>PD1-16: Immunization Registry Status (IS) <b>optional </b>
 68  
      * <li>PD1-17: Immunization Registry Status Effective Date (DT) <b>optional </b>
 69  
      * <li>PD1-18: Publicity Code Effective Date (DT) <b>optional </b>
 70  
      * <li>PD1-19: Military Branch (IS) <b>optional </b>
 71  
      * <li>PD1-20: Military Rank/Grade (IS) <b>optional </b>
 72  
      * <li>PD1-21: Military Status (IS) <b>optional </b>
 73  
  * </ul>
 74  
  */
 75  
 @SuppressWarnings("unused")
 76  
 public class PD1 extends AbstractSegment {
 77  
 
 78  
     /** 
 79  
      * Creates a new PD1 segment
 80  
      */
 81  
     public PD1(Group parent, ModelClassFactory factory) {
 82  0
        super(parent, factory);
 83  0
        init(factory);
 84  0
     }
 85  
 
 86  
     private void init(ModelClassFactory factory) {
 87  
        try {
 88  0
                                               this.add(IS.class, false, -1, 2, new Object[]{ getMessage(), new Integer(223) }, "Living Dependency");
 89  0
                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(220) }, "Living Arrangement");
 90  0
                                   this.add(XON.class, false, -1, 250, new Object[]{ getMessage() }, "Patient Primary Facility");
 91  0
                                   this.add(XCN.class, false, -1, 309, new Object[]{ getMessage() }, "Patient Primary Care Provider Name & ID No.");
 92  0
                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(231) }, "Student Indicator");
 93  0
                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(295) }, "Handicap");
 94  0
                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(315) }, "Living Will Code");
 95  0
                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(316) }, "Organ Donor Code");
 96  0
                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Separate Bill");
 97  0
                                   this.add(CX.class, false, -1, 250, new Object[]{ getMessage() }, "Duplicate Patient");
 98  0
                                   this.add(CE.class, false, 1, 478, new Object[]{ getMessage() }, "Publicity Code");
 99  0
                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Protection Indicator");
 100  0
                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Protection Indicator Effective Date");
 101  0
                                   this.add(XON.class, false, -1, 250, new Object[]{ getMessage() }, "Place of Worship");
 102  0
                                   this.add(CE.class, false, -1, 478, new Object[]{ getMessage() }, "Advance Directive Code");
 103  0
                                               this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(441) }, "Immunization Registry Status");
 104  0
                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Immunization Registry Status Effective Date");
 105  0
                                   this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Publicity Code Effective Date");
 106  0
                                               this.add(IS.class, false, 1, 5, new Object[]{ getMessage(), new Integer(140) }, "Military Branch");
 107  0
                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(141) }, "Military Rank/Grade");
 108  0
                                               this.add(IS.class, false, 1, 3, new Object[]{ getMessage(), new Integer(142) }, "Military Status");
 109  0
        } catch(HL7Exception e) {
 110  0
           log.error("Unexpected error creating PD1 - this is probably a bug in the source code generator.", e);
 111  0
        }
 112  0
     }
 113  
 
 114  
 
 115  
     /**
 116  
      * Returns all repetitions of Living Dependency (PD1-1).
 117  
      */
 118  
     public IS[] getLivingDependency() {
 119  0
             IS[] retVal = this.getTypedField(1, new IS[0]);
 120  0
             return retVal;
 121  
     }
 122  
 
 123  
 
 124  
     /**
 125  
      * Returns all repetitions of Living Dependency (PD1-1).
 126  
      */
 127  
     public IS[] getPd11_LivingDependency() {
 128  0
             IS[] retVal = this.getTypedField(1, new IS[0]);
 129  0
             return retVal;
 130  
     }
 131  
 
 132  
 
 133  
     /**
 134  
      * Returns a count of the current number of repetitions of Living Dependency (PD1-1).
 135  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 136  
      * it will return zero.
 137  
      */
 138  
     public int getLivingDependencyReps() {
 139  0
             return this.getReps(1);
 140  
     }
 141  
 
 142  
 
 143  
     /**
 144  
      * Returns a specific repetition of
 145  
      * PD1-1: "Living Dependency" - creates it if necessary
 146  
      *
 147  
      * @param rep The repetition index (0-indexed)
 148  
      */
 149  
     public IS getLivingDependency(int rep) { 
 150  0
                 IS retVal = this.getTypedField(1, rep);
 151  0
                 return retVal;
 152  
     }
 153  
 
 154  
     /**
 155  
      * Returns a specific repetition of
 156  
      * PD1-1: "Living Dependency" - creates it if necessary
 157  
      *
 158  
      * @param rep The repetition index (0-indexed)
 159  
      */
 160  
     public IS getPd11_LivingDependency(int rep) { 
 161  0
                 IS retVal = this.getTypedField(1, rep);
 162  0
                 return retVal;
 163  
     }
 164  
 
 165  
     /**
 166  
      * Returns a count of the current number of repetitions of Living Dependency (PD1-1).
 167  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 168  
      * it will return zero.
 169  
      */
 170  
     public int getPd11_LivingDependencyReps() {
 171  0
             return this.getReps(1);
 172  
     }
 173  
 
 174  
 
 175  
     /**
 176  
      * Inserts a repetition of
 177  
      * PD1-1: "Living Dependency" at a specific index
 178  
      *
 179  
      * @param rep The repetition index (0-indexed)
 180  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 181  
      */
 182  
     public IS insertLivingDependency(int rep) throws HL7Exception { 
 183  0
         return (IS) super.insertRepetition(1, rep);
 184  
     }
 185  
 
 186  
 
 187  
     /**
 188  
      * Inserts a repetition of
 189  
      * PD1-1: "Living Dependency" at a specific index
 190  
      *
 191  
      * @param rep The repetition index (0-indexed)
 192  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 193  
      */
 194  
     public IS insertPd11_LivingDependency(int rep) throws HL7Exception { 
 195  0
         return (IS) super.insertRepetition(1, rep);
 196  
     }
 197  
 
 198  
 
 199  
     /**
 200  
      * Removes a repetition of
 201  
      * PD1-1: "Living Dependency" at a specific index
 202  
      *
 203  
      * @param rep The repetition index (0-indexed)
 204  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 205  
      */
 206  
     public IS removeLivingDependency(int rep) throws HL7Exception { 
 207  0
         return (IS) super.removeRepetition(1, rep);
 208  
     }
 209  
 
 210  
 
 211  
     /**
 212  
      * Removes a repetition of
 213  
      * PD1-1: "Living Dependency" at a specific index
 214  
      *
 215  
      * @param rep The repetition index (0-indexed)
 216  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 217  
      */
 218  
     public IS removePd11_LivingDependency(int rep) throws HL7Exception { 
 219  0
         return (IS) super.removeRepetition(1, rep);
 220  
     }
 221  
 
 222  
 
 223  
 
 224  
 
 225  
     /**
 226  
      * Returns
 227  
      * PD1-2: "Living Arrangement" - creates it if necessary
 228  
      */
 229  
     public IS getLivingArrangement() { 
 230  0
                 IS retVal = this.getTypedField(2, 0);
 231  0
                 return retVal;
 232  
     }
 233  
     
 234  
     /**
 235  
      * Returns
 236  
      * PD1-2: "Living Arrangement" - creates it if necessary
 237  
      */
 238  
     public IS getPd12_LivingArrangement() { 
 239  0
                 IS retVal = this.getTypedField(2, 0);
 240  0
                 return retVal;
 241  
     }
 242  
 
 243  
 
 244  
     /**
 245  
      * Returns all repetitions of Patient Primary Facility (PD1-3).
 246  
      */
 247  
     public XON[] getPatientPrimaryFacility() {
 248  0
             XON[] retVal = this.getTypedField(3, new XON[0]);
 249  0
             return retVal;
 250  
     }
 251  
 
 252  
 
 253  
     /**
 254  
      * Returns all repetitions of Patient Primary Facility (PD1-3).
 255  
      */
 256  
     public XON[] getPd13_PatientPrimaryFacility() {
 257  0
             XON[] retVal = this.getTypedField(3, new XON[0]);
 258  0
             return retVal;
 259  
     }
 260  
 
 261  
 
 262  
     /**
 263  
      * Returns a count of the current number of repetitions of Patient Primary Facility (PD1-3).
 264  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 265  
      * it will return zero.
 266  
      */
 267  
     public int getPatientPrimaryFacilityReps() {
 268  0
             return this.getReps(3);
 269  
     }
 270  
 
 271  
 
 272  
     /**
 273  
      * Returns a specific repetition of
 274  
      * PD1-3: "Patient Primary Facility" - creates it if necessary
 275  
      *
 276  
      * @param rep The repetition index (0-indexed)
 277  
      */
 278  
     public XON getPatientPrimaryFacility(int rep) { 
 279  0
                 XON retVal = this.getTypedField(3, rep);
 280  0
                 return retVal;
 281  
     }
 282  
 
 283  
     /**
 284  
      * Returns a specific repetition of
 285  
      * PD1-3: "Patient Primary Facility" - creates it if necessary
 286  
      *
 287  
      * @param rep The repetition index (0-indexed)
 288  
      */
 289  
     public XON getPd13_PatientPrimaryFacility(int rep) { 
 290  0
                 XON retVal = this.getTypedField(3, rep);
 291  0
                 return retVal;
 292  
     }
 293  
 
 294  
     /**
 295  
      * Returns a count of the current number of repetitions of Patient Primary Facility (PD1-3).
 296  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 297  
      * it will return zero.
 298  
      */
 299  
     public int getPd13_PatientPrimaryFacilityReps() {
 300  0
             return this.getReps(3);
 301  
     }
 302  
 
 303  
 
 304  
     /**
 305  
      * Inserts a repetition of
 306  
      * PD1-3: "Patient Primary Facility" at a specific index
 307  
      *
 308  
      * @param rep The repetition index (0-indexed)
 309  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 310  
      */
 311  
     public XON insertPatientPrimaryFacility(int rep) throws HL7Exception { 
 312  0
         return (XON) super.insertRepetition(3, rep);
 313  
     }
 314  
 
 315  
 
 316  
     /**
 317  
      * Inserts a repetition of
 318  
      * PD1-3: "Patient Primary Facility" at a specific index
 319  
      *
 320  
      * @param rep The repetition index (0-indexed)
 321  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 322  
      */
 323  
     public XON insertPd13_PatientPrimaryFacility(int rep) throws HL7Exception { 
 324  0
         return (XON) super.insertRepetition(3, rep);
 325  
     }
 326  
 
 327  
 
 328  
     /**
 329  
      * Removes a repetition of
 330  
      * PD1-3: "Patient Primary Facility" at a specific index
 331  
      *
 332  
      * @param rep The repetition index (0-indexed)
 333  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 334  
      */
 335  
     public XON removePatientPrimaryFacility(int rep) throws HL7Exception { 
 336  0
         return (XON) super.removeRepetition(3, rep);
 337  
     }
 338  
 
 339  
 
 340  
     /**
 341  
      * Removes a repetition of
 342  
      * PD1-3: "Patient Primary Facility" at a specific index
 343  
      *
 344  
      * @param rep The repetition index (0-indexed)
 345  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 346  
      */
 347  
     public XON removePd13_PatientPrimaryFacility(int rep) throws HL7Exception { 
 348  0
         return (XON) super.removeRepetition(3, rep);
 349  
     }
 350  
 
 351  
 
 352  
 
 353  
     /**
 354  
      * Returns all repetitions of Patient Primary Care Provider Name & ID No. (PD1-4).
 355  
      */
 356  
     public XCN[] getPatientPrimaryCareProviderNameIDNo() {
 357  0
             XCN[] retVal = this.getTypedField(4, new XCN[0]);
 358  0
             return retVal;
 359  
     }
 360  
 
 361  
 
 362  
     /**
 363  
      * Returns all repetitions of Patient Primary Care Provider Name & ID No. (PD1-4).
 364  
      */
 365  
     public XCN[] getPd14_PatientPrimaryCareProviderNameIDNo() {
 366  0
             XCN[] retVal = this.getTypedField(4, new XCN[0]);
 367  0
             return retVal;
 368  
     }
 369  
 
 370  
 
 371  
     /**
 372  
      * Returns a count of the current number of repetitions of Patient Primary Care Provider Name & ID No. (PD1-4).
 373  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 374  
      * it will return zero.
 375  
      */
 376  
     public int getPatientPrimaryCareProviderNameIDNoReps() {
 377  0
             return this.getReps(4);
 378  
     }
 379  
 
 380  
 
 381  
     /**
 382  
      * Returns a specific repetition of
 383  
      * PD1-4: "Patient Primary Care Provider Name & ID No." - creates it if necessary
 384  
      *
 385  
      * @param rep The repetition index (0-indexed)
 386  
      */
 387  
     public XCN getPatientPrimaryCareProviderNameIDNo(int rep) { 
 388  0
                 XCN retVal = this.getTypedField(4, rep);
 389  0
                 return retVal;
 390  
     }
 391  
 
 392  
     /**
 393  
      * Returns a specific repetition of
 394  
      * PD1-4: "Patient Primary Care Provider Name & ID No." - creates it if necessary
 395  
      *
 396  
      * @param rep The repetition index (0-indexed)
 397  
      */
 398  
     public XCN getPd14_PatientPrimaryCareProviderNameIDNo(int rep) { 
 399  0
                 XCN retVal = this.getTypedField(4, rep);
 400  0
                 return retVal;
 401  
     }
 402  
 
 403  
     /**
 404  
      * Returns a count of the current number of repetitions of Patient Primary Care Provider Name & ID No. (PD1-4).
 405  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 406  
      * it will return zero.
 407  
      */
 408  
     public int getPd14_PatientPrimaryCareProviderNameIDNoReps() {
 409  0
             return this.getReps(4);
 410  
     }
 411  
 
 412  
 
 413  
     /**
 414  
      * Inserts a repetition of
 415  
      * PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index
 416  
      *
 417  
      * @param rep The repetition index (0-indexed)
 418  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 419  
      */
 420  
     public XCN insertPatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception { 
 421  0
         return (XCN) super.insertRepetition(4, rep);
 422  
     }
 423  
 
 424  
 
 425  
     /**
 426  
      * Inserts a repetition of
 427  
      * PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index
 428  
      *
 429  
      * @param rep The repetition index (0-indexed)
 430  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 431  
      */
 432  
     public XCN insertPd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception { 
 433  0
         return (XCN) super.insertRepetition(4, rep);
 434  
     }
 435  
 
 436  
 
 437  
     /**
 438  
      * Removes a repetition of
 439  
      * PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index
 440  
      *
 441  
      * @param rep The repetition index (0-indexed)
 442  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 443  
      */
 444  
     public XCN removePatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception { 
 445  0
         return (XCN) super.removeRepetition(4, rep);
 446  
     }
 447  
 
 448  
 
 449  
     /**
 450  
      * Removes a repetition of
 451  
      * PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index
 452  
      *
 453  
      * @param rep The repetition index (0-indexed)
 454  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 455  
      */
 456  
     public XCN removePd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception { 
 457  0
         return (XCN) super.removeRepetition(4, rep);
 458  
     }
 459  
 
 460  
 
 461  
 
 462  
 
 463  
     /**
 464  
      * Returns
 465  
      * PD1-5: "Student Indicator" - creates it if necessary
 466  
      */
 467  
     public IS getStudentIndicator() { 
 468  0
                 IS retVal = this.getTypedField(5, 0);
 469  0
                 return retVal;
 470  
     }
 471  
     
 472  
     /**
 473  
      * Returns
 474  
      * PD1-5: "Student Indicator" - creates it if necessary
 475  
      */
 476  
     public IS getPd15_StudentIndicator() { 
 477  0
                 IS retVal = this.getTypedField(5, 0);
 478  0
                 return retVal;
 479  
     }
 480  
 
 481  
 
 482  
 
 483  
     /**
 484  
      * Returns
 485  
      * PD1-6: "Handicap" - creates it if necessary
 486  
      */
 487  
     public IS getHandicap() { 
 488  0
                 IS retVal = this.getTypedField(6, 0);
 489  0
                 return retVal;
 490  
     }
 491  
     
 492  
     /**
 493  
      * Returns
 494  
      * PD1-6: "Handicap" - creates it if necessary
 495  
      */
 496  
     public IS getPd16_Handicap() { 
 497  0
                 IS retVal = this.getTypedField(6, 0);
 498  0
                 return retVal;
 499  
     }
 500  
 
 501  
 
 502  
 
 503  
     /**
 504  
      * Returns
 505  
      * PD1-7: "Living Will Code" - creates it if necessary
 506  
      */
 507  
     public IS getLivingWillCode() { 
 508  0
                 IS retVal = this.getTypedField(7, 0);
 509  0
                 return retVal;
 510  
     }
 511  
     
 512  
     /**
 513  
      * Returns
 514  
      * PD1-7: "Living Will Code" - creates it if necessary
 515  
      */
 516  
     public IS getPd17_LivingWillCode() { 
 517  0
                 IS retVal = this.getTypedField(7, 0);
 518  0
                 return retVal;
 519  
     }
 520  
 
 521  
 
 522  
 
 523  
     /**
 524  
      * Returns
 525  
      * PD1-8: "Organ Donor Code" - creates it if necessary
 526  
      */
 527  
     public IS getOrganDonorCode() { 
 528  0
                 IS retVal = this.getTypedField(8, 0);
 529  0
                 return retVal;
 530  
     }
 531  
     
 532  
     /**
 533  
      * Returns
 534  
      * PD1-8: "Organ Donor Code" - creates it if necessary
 535  
      */
 536  
     public IS getPd18_OrganDonorCode() { 
 537  0
                 IS retVal = this.getTypedField(8, 0);
 538  0
                 return retVal;
 539  
     }
 540  
 
 541  
 
 542  
 
 543  
     /**
 544  
      * Returns
 545  
      * PD1-9: "Separate Bill" - creates it if necessary
 546  
      */
 547  
     public ID getSeparateBill() { 
 548  0
                 ID retVal = this.getTypedField(9, 0);
 549  0
                 return retVal;
 550  
     }
 551  
     
 552  
     /**
 553  
      * Returns
 554  
      * PD1-9: "Separate Bill" - creates it if necessary
 555  
      */
 556  
     public ID getPd19_SeparateBill() { 
 557  0
                 ID retVal = this.getTypedField(9, 0);
 558  0
                 return retVal;
 559  
     }
 560  
 
 561  
 
 562  
     /**
 563  
      * Returns all repetitions of Duplicate Patient (PD1-10).
 564  
      */
 565  
     public CX[] getDuplicatePatient() {
 566  0
             CX[] retVal = this.getTypedField(10, new CX[0]);
 567  0
             return retVal;
 568  
     }
 569  
 
 570  
 
 571  
     /**
 572  
      * Returns all repetitions of Duplicate Patient (PD1-10).
 573  
      */
 574  
     public CX[] getPd110_DuplicatePatient() {
 575  0
             CX[] retVal = this.getTypedField(10, new CX[0]);
 576  0
             return retVal;
 577  
     }
 578  
 
 579  
 
 580  
     /**
 581  
      * Returns a count of the current number of repetitions of Duplicate Patient (PD1-10).
 582  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 583  
      * it will return zero.
 584  
      */
 585  
     public int getDuplicatePatientReps() {
 586  0
             return this.getReps(10);
 587  
     }
 588  
 
 589  
 
 590  
     /**
 591  
      * Returns a specific repetition of
 592  
      * PD1-10: "Duplicate Patient" - creates it if necessary
 593  
      *
 594  
      * @param rep The repetition index (0-indexed)
 595  
      */
 596  
     public CX getDuplicatePatient(int rep) { 
 597  0
                 CX retVal = this.getTypedField(10, rep);
 598  0
                 return retVal;
 599  
     }
 600  
 
 601  
     /**
 602  
      * Returns a specific repetition of
 603  
      * PD1-10: "Duplicate Patient" - creates it if necessary
 604  
      *
 605  
      * @param rep The repetition index (0-indexed)
 606  
      */
 607  
     public CX getPd110_DuplicatePatient(int rep) { 
 608  0
                 CX retVal = this.getTypedField(10, rep);
 609  0
                 return retVal;
 610  
     }
 611  
 
 612  
     /**
 613  
      * Returns a count of the current number of repetitions of Duplicate Patient (PD1-10).
 614  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 615  
      * it will return zero.
 616  
      */
 617  
     public int getPd110_DuplicatePatientReps() {
 618  0
             return this.getReps(10);
 619  
     }
 620  
 
 621  
 
 622  
     /**
 623  
      * Inserts a repetition of
 624  
      * PD1-10: "Duplicate Patient" 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 CX insertDuplicatePatient(int rep) throws HL7Exception { 
 630  0
         return (CX) super.insertRepetition(10, rep);
 631  
     }
 632  
 
 633  
 
 634  
     /**
 635  
      * Inserts a repetition of
 636  
      * PD1-10: "Duplicate Patient" 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 CX insertPd110_DuplicatePatient(int rep) throws HL7Exception { 
 642  0
         return (CX) super.insertRepetition(10, rep);
 643  
     }
 644  
 
 645  
 
 646  
     /**
 647  
      * Removes a repetition of
 648  
      * PD1-10: "Duplicate Patient" 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 CX removeDuplicatePatient(int rep) throws HL7Exception { 
 654  0
         return (CX) super.removeRepetition(10, rep);
 655  
     }
 656  
 
 657  
 
 658  
     /**
 659  
      * Removes a repetition of
 660  
      * PD1-10: "Duplicate Patient" at a specific index
 661  
      *
 662  
      * @param rep The repetition index (0-indexed)
 663  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 664  
      */
 665  
     public CX removePd110_DuplicatePatient(int rep) throws HL7Exception { 
 666  0
         return (CX) super.removeRepetition(10, rep);
 667  
     }
 668  
 
 669  
 
 670  
 
 671  
 
 672  
     /**
 673  
      * Returns
 674  
      * PD1-11: "Publicity Code" - creates it if necessary
 675  
      */
 676  
     public CE getPublicityCode() { 
 677  0
                 CE retVal = this.getTypedField(11, 0);
 678  0
                 return retVal;
 679  
     }
 680  
     
 681  
     /**
 682  
      * Returns
 683  
      * PD1-11: "Publicity Code" - creates it if necessary
 684  
      */
 685  
     public CE getPd111_PublicityCode() { 
 686  0
                 CE retVal = this.getTypedField(11, 0);
 687  0
                 return retVal;
 688  
     }
 689  
 
 690  
 
 691  
 
 692  
     /**
 693  
      * Returns
 694  
      * PD1-12: "Protection Indicator" - creates it if necessary
 695  
      */
 696  
     public ID getProtectionIndicator() { 
 697  0
                 ID retVal = this.getTypedField(12, 0);
 698  0
                 return retVal;
 699  
     }
 700  
     
 701  
     /**
 702  
      * Returns
 703  
      * PD1-12: "Protection Indicator" - creates it if necessary
 704  
      */
 705  
     public ID getPd112_ProtectionIndicator() { 
 706  0
                 ID retVal = this.getTypedField(12, 0);
 707  0
                 return retVal;
 708  
     }
 709  
 
 710  
 
 711  
 
 712  
     /**
 713  
      * Returns
 714  
      * PD1-13: "Protection Indicator Effective Date" - creates it if necessary
 715  
      */
 716  
     public DT getProtectionIndicatorEffectiveDate() { 
 717  0
                 DT retVal = this.getTypedField(13, 0);
 718  0
                 return retVal;
 719  
     }
 720  
     
 721  
     /**
 722  
      * Returns
 723  
      * PD1-13: "Protection Indicator Effective Date" - creates it if necessary
 724  
      */
 725  
     public DT getPd113_ProtectionIndicatorEffectiveDate() { 
 726  0
                 DT retVal = this.getTypedField(13, 0);
 727  0
                 return retVal;
 728  
     }
 729  
 
 730  
 
 731  
     /**
 732  
      * Returns all repetitions of Place of Worship (PD1-14).
 733  
      */
 734  
     public XON[] getPlaceOfWorship() {
 735  0
             XON[] retVal = this.getTypedField(14, new XON[0]);
 736  0
             return retVal;
 737  
     }
 738  
 
 739  
 
 740  
     /**
 741  
      * Returns all repetitions of Place of Worship (PD1-14).
 742  
      */
 743  
     public XON[] getPd114_PlaceOfWorship() {
 744  0
             XON[] retVal = this.getTypedField(14, new XON[0]);
 745  0
             return retVal;
 746  
     }
 747  
 
 748  
 
 749  
     /**
 750  
      * Returns a count of the current number of repetitions of Place of Worship (PD1-14).
 751  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 752  
      * it will return zero.
 753  
      */
 754  
     public int getPlaceOfWorshipReps() {
 755  0
             return this.getReps(14);
 756  
     }
 757  
 
 758  
 
 759  
     /**
 760  
      * Returns a specific repetition of
 761  
      * PD1-14: "Place of Worship" - creates it if necessary
 762  
      *
 763  
      * @param rep The repetition index (0-indexed)
 764  
      */
 765  
     public XON getPlaceOfWorship(int rep) { 
 766  0
                 XON retVal = this.getTypedField(14, rep);
 767  0
                 return retVal;
 768  
     }
 769  
 
 770  
     /**
 771  
      * Returns a specific repetition of
 772  
      * PD1-14: "Place of Worship" - creates it if necessary
 773  
      *
 774  
      * @param rep The repetition index (0-indexed)
 775  
      */
 776  
     public XON getPd114_PlaceOfWorship(int rep) { 
 777  0
                 XON retVal = this.getTypedField(14, rep);
 778  0
                 return retVal;
 779  
     }
 780  
 
 781  
     /**
 782  
      * Returns a count of the current number of repetitions of Place of Worship (PD1-14).
 783  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 784  
      * it will return zero.
 785  
      */
 786  
     public int getPd114_PlaceOfWorshipReps() {
 787  0
             return this.getReps(14);
 788  
     }
 789  
 
 790  
 
 791  
     /**
 792  
      * Inserts a repetition of
 793  
      * PD1-14: "Place of Worship" at a specific index
 794  
      *
 795  
      * @param rep The repetition index (0-indexed)
 796  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 797  
      */
 798  
     public XON insertPlaceOfWorship(int rep) throws HL7Exception { 
 799  0
         return (XON) super.insertRepetition(14, rep);
 800  
     }
 801  
 
 802  
 
 803  
     /**
 804  
      * Inserts a repetition of
 805  
      * PD1-14: "Place of Worship" at a specific index
 806  
      *
 807  
      * @param rep The repetition index (0-indexed)
 808  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 809  
      */
 810  
     public XON insertPd114_PlaceOfWorship(int rep) throws HL7Exception { 
 811  0
         return (XON) super.insertRepetition(14, rep);
 812  
     }
 813  
 
 814  
 
 815  
     /**
 816  
      * Removes a repetition of
 817  
      * PD1-14: "Place of Worship" at a specific index
 818  
      *
 819  
      * @param rep The repetition index (0-indexed)
 820  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 821  
      */
 822  
     public XON removePlaceOfWorship(int rep) throws HL7Exception { 
 823  0
         return (XON) super.removeRepetition(14, rep);
 824  
     }
 825  
 
 826  
 
 827  
     /**
 828  
      * Removes a repetition of
 829  
      * PD1-14: "Place of Worship" at a specific index
 830  
      *
 831  
      * @param rep The repetition index (0-indexed)
 832  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 833  
      */
 834  
     public XON removePd114_PlaceOfWorship(int rep) throws HL7Exception { 
 835  0
         return (XON) super.removeRepetition(14, rep);
 836  
     }
 837  
 
 838  
 
 839  
 
 840  
     /**
 841  
      * Returns all repetitions of Advance Directive Code (PD1-15).
 842  
      */
 843  
     public CE[] getAdvanceDirectiveCode() {
 844  0
             CE[] retVal = this.getTypedField(15, new CE[0]);
 845  0
             return retVal;
 846  
     }
 847  
 
 848  
 
 849  
     /**
 850  
      * Returns all repetitions of Advance Directive Code (PD1-15).
 851  
      */
 852  
     public CE[] getPd115_AdvanceDirectiveCode() {
 853  0
             CE[] retVal = this.getTypedField(15, new CE[0]);
 854  0
             return retVal;
 855  
     }
 856  
 
 857  
 
 858  
     /**
 859  
      * Returns a count of the current number of repetitions of Advance Directive Code (PD1-15).
 860  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 861  
      * it will return zero.
 862  
      */
 863  
     public int getAdvanceDirectiveCodeReps() {
 864  0
             return this.getReps(15);
 865  
     }
 866  
 
 867  
 
 868  
     /**
 869  
      * Returns a specific repetition of
 870  
      * PD1-15: "Advance Directive Code" - creates it if necessary
 871  
      *
 872  
      * @param rep The repetition index (0-indexed)
 873  
      */
 874  
     public CE getAdvanceDirectiveCode(int rep) { 
 875  0
                 CE retVal = this.getTypedField(15, rep);
 876  0
                 return retVal;
 877  
     }
 878  
 
 879  
     /**
 880  
      * Returns a specific repetition of
 881  
      * PD1-15: "Advance Directive Code" - creates it if necessary
 882  
      *
 883  
      * @param rep The repetition index (0-indexed)
 884  
      */
 885  
     public CE getPd115_AdvanceDirectiveCode(int rep) { 
 886  0
                 CE retVal = this.getTypedField(15, rep);
 887  0
                 return retVal;
 888  
     }
 889  
 
 890  
     /**
 891  
      * Returns a count of the current number of repetitions of Advance Directive Code (PD1-15).
 892  
      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
 893  
      * it will return zero.
 894  
      */
 895  
     public int getPd115_AdvanceDirectiveCodeReps() {
 896  0
             return this.getReps(15);
 897  
     }
 898  
 
 899  
 
 900  
     /**
 901  
      * Inserts a repetition of
 902  
      * PD1-15: "Advance Directive Code" at a specific index
 903  
      *
 904  
      * @param rep The repetition index (0-indexed)
 905  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 906  
      */
 907  
     public CE insertAdvanceDirectiveCode(int rep) throws HL7Exception { 
 908  0
         return (CE) super.insertRepetition(15, rep);
 909  
     }
 910  
 
 911  
 
 912  
     /**
 913  
      * Inserts a repetition of
 914  
      * PD1-15: "Advance Directive Code" at a specific index
 915  
      *
 916  
      * @param rep The repetition index (0-indexed)
 917  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 918  
      */
 919  
     public CE insertPd115_AdvanceDirectiveCode(int rep) throws HL7Exception { 
 920  0
         return (CE) super.insertRepetition(15, rep);
 921  
     }
 922  
 
 923  
 
 924  
     /**
 925  
      * Removes a repetition of
 926  
      * PD1-15: "Advance Directive Code" at a specific index
 927  
      *
 928  
      * @param rep The repetition index (0-indexed)
 929  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 930  
      */
 931  
     public CE removeAdvanceDirectiveCode(int rep) throws HL7Exception { 
 932  0
         return (CE) super.removeRepetition(15, rep);
 933  
     }
 934  
 
 935  
 
 936  
     /**
 937  
      * Removes a repetition of
 938  
      * PD1-15: "Advance Directive Code" at a specific index
 939  
      *
 940  
      * @param rep The repetition index (0-indexed)
 941  
      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
 942  
      */
 943  
     public CE removePd115_AdvanceDirectiveCode(int rep) throws HL7Exception { 
 944  0
         return (CE) super.removeRepetition(15, rep);
 945  
     }
 946  
 
 947  
 
 948  
 
 949  
 
 950  
     /**
 951  
      * Returns
 952  
      * PD1-16: "Immunization Registry Status" - creates it if necessary
 953  
      */
 954  
     public IS getImmunizationRegistryStatus() { 
 955  0
                 IS retVal = this.getTypedField(16, 0);
 956  0
                 return retVal;
 957  
     }
 958  
     
 959  
     /**
 960  
      * Returns
 961  
      * PD1-16: "Immunization Registry Status" - creates it if necessary
 962  
      */
 963  
     public IS getPd116_ImmunizationRegistryStatus() { 
 964  0
                 IS retVal = this.getTypedField(16, 0);
 965  0
                 return retVal;
 966  
     }
 967  
 
 968  
 
 969  
 
 970  
     /**
 971  
      * Returns
 972  
      * PD1-17: "Immunization Registry Status Effective Date" - creates it if necessary
 973  
      */
 974  
     public DT getImmunizationRegistryStatusEffectiveDate() { 
 975  0
                 DT retVal = this.getTypedField(17, 0);
 976  0
                 return retVal;
 977  
     }
 978  
     
 979  
     /**
 980  
      * Returns
 981  
      * PD1-17: "Immunization Registry Status Effective Date" - creates it if necessary
 982  
      */
 983  
     public DT getPd117_ImmunizationRegistryStatusEffectiveDate() { 
 984  0
                 DT retVal = this.getTypedField(17, 0);
 985  0
                 return retVal;
 986  
     }
 987  
 
 988  
 
 989  
 
 990  
     /**
 991  
      * Returns
 992  
      * PD1-18: "Publicity Code Effective Date" - creates it if necessary
 993  
      */
 994  
     public DT getPublicityCodeEffectiveDate() { 
 995  0
                 DT retVal = this.getTypedField(18, 0);
 996  0
                 return retVal;
 997  
     }
 998  
     
 999  
     /**
 1000  
      * Returns
 1001  
      * PD1-18: "Publicity Code Effective Date" - creates it if necessary
 1002  
      */
 1003  
     public DT getPd118_PublicityCodeEffectiveDate() { 
 1004  0
                 DT retVal = this.getTypedField(18, 0);
 1005  0
                 return retVal;
 1006  
     }
 1007  
 
 1008  
 
 1009  
 
 1010  
     /**
 1011  
      * Returns
 1012  
      * PD1-19: "Military Branch" - creates it if necessary
 1013  
      */
 1014  
     public IS getMilitaryBranch() { 
 1015  0
                 IS retVal = this.getTypedField(19, 0);
 1016  0
                 return retVal;
 1017  
     }
 1018  
     
 1019  
     /**
 1020  
      * Returns
 1021  
      * PD1-19: "Military Branch" - creates it if necessary
 1022  
      */
 1023  
     public IS getPd119_MilitaryBranch() { 
 1024  0
                 IS retVal = this.getTypedField(19, 0);
 1025  0
                 return retVal;
 1026  
     }
 1027  
 
 1028  
 
 1029  
 
 1030  
     /**
 1031  
      * Returns
 1032  
      * PD1-20: "Military Rank/Grade" - creates it if necessary
 1033  
      */
 1034  
     public IS getMilitaryRankGrade() { 
 1035  0
                 IS retVal = this.getTypedField(20, 0);
 1036  0
                 return retVal;
 1037  
     }
 1038  
     
 1039  
     /**
 1040  
      * Returns
 1041  
      * PD1-20: "Military Rank/Grade" - creates it if necessary
 1042  
      */
 1043  
     public IS getPd120_MilitaryRankGrade() { 
 1044  0
                 IS retVal = this.getTypedField(20, 0);
 1045  0
                 return retVal;
 1046  
     }
 1047  
 
 1048  
 
 1049  
 
 1050  
     /**
 1051  
      * Returns
 1052  
      * PD1-21: "Military Status" - creates it if necessary
 1053  
      */
 1054  
     public IS getMilitaryStatus() { 
 1055  0
                 IS retVal = this.getTypedField(21, 0);
 1056  0
                 return retVal;
 1057  
     }
 1058  
     
 1059  
     /**
 1060  
      * Returns
 1061  
      * PD1-21: "Military Status" - creates it if necessary
 1062  
      */
 1063  
     public IS getPd121_MilitaryStatus() { 
 1064  0
                 IS retVal = this.getTypedField(21, 0);
 1065  0
                 return retVal;
 1066  
     }
 1067  
 
 1068  
 
 1069  
 
 1070  
 
 1071  
 
 1072  
     /** {@inheritDoc} */   
 1073  
     protected Type createNewTypeWithoutReflection(int field) {
 1074  0
        switch (field) {
 1075  0
           case 0: return new IS(getMessage(), new Integer( 223 ));
 1076  0
           case 1: return new IS(getMessage(), new Integer( 220 ));
 1077  0
           case 2: return new XON(getMessage());
 1078  0
           case 3: return new XCN(getMessage());
 1079  0
           case 4: return new IS(getMessage(), new Integer( 231 ));
 1080  0
           case 5: return new IS(getMessage(), new Integer( 295 ));
 1081  0
           case 6: return new IS(getMessage(), new Integer( 315 ));
 1082  0
           case 7: return new IS(getMessage(), new Integer( 316 ));
 1083  0
           case 8: return new ID(getMessage(), new Integer( 136 ));
 1084  0
           case 9: return new CX(getMessage());
 1085  0
           case 10: return new CE(getMessage());
 1086  0
           case 11: return new ID(getMessage(), new Integer( 136 ));
 1087  0
           case 12: return new DT(getMessage());
 1088  0
           case 13: return new XON(getMessage());
 1089  0
           case 14: return new CE(getMessage());
 1090  0
           case 15: return new IS(getMessage(), new Integer( 441 ));
 1091  0
           case 16: return new DT(getMessage());
 1092  0
           case 17: return new DT(getMessage());
 1093  0
           case 18: return new IS(getMessage(), new Integer( 140 ));
 1094  0
           case 19: return new IS(getMessage(), new Integer( 141 ));
 1095  0
           case 20: return new IS(getMessage(), new Integer( 142 ));
 1096  0
           default: return null;
 1097  
        }
 1098  
    }
 1099  
 
 1100  
 
 1101  
 }
 1102