All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.hl7v2.model.v24.segment.PD1 Maven / Gradle / Ivy

There is a newer version: 2.3
Show newest version
/*
 * This class is an auto-generated source file for a HAPI
 * HL7 v2.x standard structure class.
 *
 * For more information, visit: http://hl7api.sourceforge.net/
 */

package ca.uhn.hl7v2.model.v24.segment;

// import ca.uhn.hl7v2.model.v24.group.*;
import ca.uhn.hl7v2.model.v24.datatype.*;
import ca.uhn.log.HapiLogFactory;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
import ca.uhn.hl7v2.model.AbstractMessage;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Varies;

/**
 *

Represents an HL7 PD1 message segment (patient additional demographic). * This segment has the following fields:

*
    *
  • PD1-1: Living Dependency (IS) optional repeating *
  • PD1-2: Living Arrangement (IS) optional *
  • PD1-3: Patient Primary Facility (XON) optional repeating *
  • PD1-4: Patient Primary Care Provider Name & ID No. (XCN) optional repeating *
  • PD1-5: Student Indicator (IS) optional *
  • PD1-6: Handicap (IS) optional *
  • PD1-7: Living Will Code (IS) optional *
  • PD1-8: Organ Donor Code (IS) optional *
  • PD1-9: Separate Bill (ID) optional *
  • PD1-10: Duplicate Patient (CX) optional repeating *
  • PD1-11: Publicity Code (CE) optional *
  • PD1-12: Protection Indicator (ID) optional *
  • PD1-13: Protection Indicator Effective Date (DT) optional *
  • PD1-14: Place of Worship (XON) optional repeating *
  • PD1-15: Advance Directive Code (CE) optional repeating *
  • PD1-16: Immunization Registry Status (IS) optional *
  • PD1-17: Immunization Registry Status Effective Date (DT) optional *
  • PD1-18: Publicity Code Effective Date (DT) optional *
  • PD1-19: Military Branch (IS) optional *
  • PD1-20: Military Rank/Grade (IS) optional *
  • PD1-21: Military Status (IS) optional *
*/ public class PD1 extends AbstractSegment { /** * Creates a new PD1 segment */ public PD1(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(IS.class, false, 0, 2, new Object[]{ getMessage() }, "Living Dependency"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Living Arrangement"); this.add(XON.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Patient Primary Facility"); this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Patient Primary Care Provider Name & ID No."); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Student Indicator"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Handicap"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Living Will Code"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Organ Donor Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Separate Bill"); this.add(CX.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Duplicate Patient"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(215) }, "Publicity Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Protection Indicator"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Protection Indicator Effective Date"); this.add(XON.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Place of Worship"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(435) }, "Advance Directive Code"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Immunization Registry Status"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Immunization Registry Status Effective Date"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Publicity Code Effective Date"); this.add(IS.class, false, 1, 5, new Object[]{ getMessage() }, "Military Branch"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Military Rank/Grade"); this.add(IS.class, false, 1, 3, new Object[]{ getMessage() }, "Military Status"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating PD1 - this is probably a bug in the source code generator.", e); } } /** * Returns all repetitions of Living Dependency (PD1-1). */ public IS[] getLivingDependency() { IS[] ret = null; try { Type[] t = this.getField(1); ret = new IS[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (IS)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Living Dependency (PD1-1). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getLivingDependencyReps() { IS[] ret = null; try { Type[] t = this.getField(1); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * PD1-1: "Living Dependency" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public IS getLivingDependency(int rep) { IS ret = null; try { Type t = this.getField(1, rep); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * PD1-1: "Living Dependency" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public IS getPd11_LivingDependency(int rep) { IS ret = null; try { Type t = this.getField(1, rep); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Living Dependency (PD1-1). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPd11_LivingDependencyReps() { IS[] ret = null; try { Type[] t = this.getField(1); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * PD1-1: "Living Dependency" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public IS insertLivingDependency(int rep) throws HL7Exception { return (IS) super.insertRepetition(1, rep); } /** * Inserts a repetition of * PD1-1: "Living Dependency" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public IS insertPd11_LivingDependency(int rep) throws HL7Exception { return (IS) super.insertRepetition(1, rep); } /** * Removes a repetition of * PD1-1: "Living Dependency" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public IS removeLivingDependency(int rep) throws HL7Exception { return (IS) super.removeRepetition(1, rep); } /** * Removes a repetition of * PD1-1: "Living Dependency" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public IS removePd11_LivingDependency(int rep) throws HL7Exception { return (IS) super.removeRepetition(1, rep); } /** * Returns * PD1-2: "Living Arrangement" - creates it if necessary */ public IS getLivingArrangement() { IS ret = null; try { Type t = this.getField(2, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-2: "Living Arrangement" - creates it if necessary */ public IS getPd12_LivingArrangement() { IS ret = null; try { Type t = this.getField(2, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Patient Primary Facility (PD1-3). */ public XON[] getPatientPrimaryFacility() { XON[] ret = null; try { Type[] t = this.getField(3); ret = new XON[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XON)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Patient Primary Facility (PD1-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPatientPrimaryFacilityReps() { XON[] ret = null; try { Type[] t = this.getField(3); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * PD1-3: "Patient Primary Facility" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XON getPatientPrimaryFacility(int rep) { XON ret = null; try { Type t = this.getField(3, rep); ret = (XON)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * PD1-3: "Patient Primary Facility" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XON getPd13_PatientPrimaryFacility(int rep) { XON ret = null; try { Type t = this.getField(3, rep); ret = (XON)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Patient Primary Facility (PD1-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPd13_PatientPrimaryFacilityReps() { XON[] ret = null; try { Type[] t = this.getField(3); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * PD1-3: "Patient Primary Facility" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XON insertPatientPrimaryFacility(int rep) throws HL7Exception { return (XON) super.insertRepetition(3, rep); } /** * Inserts a repetition of * PD1-3: "Patient Primary Facility" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XON insertPd13_PatientPrimaryFacility(int rep) throws HL7Exception { return (XON) super.insertRepetition(3, rep); } /** * Removes a repetition of * PD1-3: "Patient Primary Facility" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XON removePatientPrimaryFacility(int rep) throws HL7Exception { return (XON) super.removeRepetition(3, rep); } /** * Removes a repetition of * PD1-3: "Patient Primary Facility" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XON removePd13_PatientPrimaryFacility(int rep) throws HL7Exception { return (XON) super.removeRepetition(3, rep); } /** * Returns all repetitions of Patient Primary Care Provider Name & ID No. (PD1-4). */ public XCN[] getPatientPrimaryCareProviderNameIDNo() { XCN[] ret = null; try { Type[] t = this.getField(4); ret = new XCN[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XCN)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Patient Primary Care Provider Name & ID No. (PD1-4). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPatientPrimaryCareProviderNameIDNoReps() { XCN[] ret = null; try { Type[] t = this.getField(4); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * PD1-4: "Patient Primary Care Provider Name & ID No." - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getPatientPrimaryCareProviderNameIDNo(int rep) { XCN ret = null; try { Type t = this.getField(4, rep); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * PD1-4: "Patient Primary Care Provider Name & ID No." - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getPd14_PatientPrimaryCareProviderNameIDNo(int rep) { XCN ret = null; try { Type t = this.getField(4, rep); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Patient Primary Care Provider Name & ID No. (PD1-4). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPd14_PatientPrimaryCareProviderNameIDNoReps() { XCN[] ret = null; try { Type[] t = this.getField(4); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN insertPatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception { return (XCN) super.insertRepetition(4, rep); } /** * Inserts a repetition of * PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN insertPd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception { return (XCN) super.insertRepetition(4, rep); } /** * Removes a repetition of * PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN removePatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception { return (XCN) super.removeRepetition(4, rep); } /** * Removes a repetition of * PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN removePd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception { return (XCN) super.removeRepetition(4, rep); } /** * Returns * PD1-5: "Student Indicator" - creates it if necessary */ public IS getStudentIndicator() { IS ret = null; try { Type t = this.getField(5, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-5: "Student Indicator" - creates it if necessary */ public IS getPd15_StudentIndicator() { IS ret = null; try { Type t = this.getField(5, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-6: "Handicap" - creates it if necessary */ public IS getHandicap() { IS ret = null; try { Type t = this.getField(6, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-6: "Handicap" - creates it if necessary */ public IS getPd16_Handicap() { IS ret = null; try { Type t = this.getField(6, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-7: "Living Will Code" - creates it if necessary */ public IS getLivingWillCode() { IS ret = null; try { Type t = this.getField(7, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-7: "Living Will Code" - creates it if necessary */ public IS getPd17_LivingWillCode() { IS ret = null; try { Type t = this.getField(7, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-8: "Organ Donor Code" - creates it if necessary */ public IS getOrganDonorCode() { IS ret = null; try { Type t = this.getField(8, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-8: "Organ Donor Code" - creates it if necessary */ public IS getPd18_OrganDonorCode() { IS ret = null; try { Type t = this.getField(8, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-9: "Separate Bill" - creates it if necessary */ public ID getSeparateBill() { ID ret = null; try { Type t = this.getField(9, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-9: "Separate Bill" - creates it if necessary */ public ID getPd19_SeparateBill() { ID ret = null; try { Type t = this.getField(9, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Duplicate Patient (PD1-10). */ public CX[] getDuplicatePatient() { CX[] ret = null; try { Type[] t = this.getField(10); ret = new CX[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CX)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Duplicate Patient (PD1-10). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getDuplicatePatientReps() { CX[] ret = null; try { Type[] t = this.getField(10); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * PD1-10: "Duplicate Patient" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CX getDuplicatePatient(int rep) { CX ret = null; try { Type t = this.getField(10, rep); ret = (CX)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * PD1-10: "Duplicate Patient" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CX getPd110_DuplicatePatient(int rep) { CX ret = null; try { Type t = this.getField(10, rep); ret = (CX)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Duplicate Patient (PD1-10). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPd110_DuplicatePatientReps() { CX[] ret = null; try { Type[] t = this.getField(10); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * PD1-10: "Duplicate Patient" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CX insertDuplicatePatient(int rep) throws HL7Exception { return (CX) super.insertRepetition(10, rep); } /** * Inserts a repetition of * PD1-10: "Duplicate Patient" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CX insertPd110_DuplicatePatient(int rep) throws HL7Exception { return (CX) super.insertRepetition(10, rep); } /** * Removes a repetition of * PD1-10: "Duplicate Patient" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CX removeDuplicatePatient(int rep) throws HL7Exception { return (CX) super.removeRepetition(10, rep); } /** * Removes a repetition of * PD1-10: "Duplicate Patient" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CX removePd110_DuplicatePatient(int rep) throws HL7Exception { return (CX) super.removeRepetition(10, rep); } /** * Returns * PD1-11: "Publicity Code" - creates it if necessary */ public CE getPublicityCode() { CE ret = null; try { Type t = this.getField(11, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-11: "Publicity Code" - creates it if necessary */ public CE getPd111_PublicityCode() { CE ret = null; try { Type t = this.getField(11, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-12: "Protection Indicator" - creates it if necessary */ public ID getProtectionIndicator() { ID ret = null; try { Type t = this.getField(12, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-12: "Protection Indicator" - creates it if necessary */ public ID getPd112_ProtectionIndicator() { ID ret = null; try { Type t = this.getField(12, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-13: "Protection Indicator Effective Date" - creates it if necessary */ public DT getProtectionIndicatorEffectiveDate() { DT ret = null; try { Type t = this.getField(13, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-13: "Protection Indicator Effective Date" - creates it if necessary */ public DT getPd113_ProtectionIndicatorEffectiveDate() { DT ret = null; try { Type t = this.getField(13, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Place of Worship (PD1-14). */ public XON[] getPlaceOfWorship() { XON[] ret = null; try { Type[] t = this.getField(14); ret = new XON[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XON)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Place of Worship (PD1-14). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPlaceOfWorshipReps() { XON[] ret = null; try { Type[] t = this.getField(14); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * PD1-14: "Place of Worship" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XON getPlaceOfWorship(int rep) { XON ret = null; try { Type t = this.getField(14, rep); ret = (XON)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * PD1-14: "Place of Worship" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XON getPd114_PlaceOfWorship(int rep) { XON ret = null; try { Type t = this.getField(14, rep); ret = (XON)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Place of Worship (PD1-14). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPd114_PlaceOfWorshipReps() { XON[] ret = null; try { Type[] t = this.getField(14); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * PD1-14: "Place of Worship" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XON insertPlaceOfWorship(int rep) throws HL7Exception { return (XON) super.insertRepetition(14, rep); } /** * Inserts a repetition of * PD1-14: "Place of Worship" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XON insertPd114_PlaceOfWorship(int rep) throws HL7Exception { return (XON) super.insertRepetition(14, rep); } /** * Removes a repetition of * PD1-14: "Place of Worship" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XON removePlaceOfWorship(int rep) throws HL7Exception { return (XON) super.removeRepetition(14, rep); } /** * Removes a repetition of * PD1-14: "Place of Worship" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XON removePd114_PlaceOfWorship(int rep) throws HL7Exception { return (XON) super.removeRepetition(14, rep); } /** * Returns all repetitions of Advance Directive Code (PD1-15). */ public CE[] getAdvanceDirectiveCode() { CE[] ret = null; try { Type[] t = this.getField(15); ret = new CE[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CE)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Advance Directive Code (PD1-15). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getAdvanceDirectiveCodeReps() { CE[] ret = null; try { Type[] t = this.getField(15); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * PD1-15: "Advance Directive Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getAdvanceDirectiveCode(int rep) { CE ret = null; try { Type t = this.getField(15, rep); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * PD1-15: "Advance Directive Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getPd115_AdvanceDirectiveCode(int rep) { CE ret = null; try { Type t = this.getField(15, rep); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Advance Directive Code (PD1-15). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPd115_AdvanceDirectiveCodeReps() { CE[] ret = null; try { Type[] t = this.getField(15); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * PD1-15: "Advance Directive Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertAdvanceDirectiveCode(int rep) throws HL7Exception { return (CE) super.insertRepetition(15, rep); } /** * Inserts a repetition of * PD1-15: "Advance Directive Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertPd115_AdvanceDirectiveCode(int rep) throws HL7Exception { return (CE) super.insertRepetition(15, rep); } /** * Removes a repetition of * PD1-15: "Advance Directive Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeAdvanceDirectiveCode(int rep) throws HL7Exception { return (CE) super.removeRepetition(15, rep); } /** * Removes a repetition of * PD1-15: "Advance Directive Code" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removePd115_AdvanceDirectiveCode(int rep) throws HL7Exception { return (CE) super.removeRepetition(15, rep); } /** * Returns * PD1-16: "Immunization Registry Status" - creates it if necessary */ public IS getImmunizationRegistryStatus() { IS ret = null; try { Type t = this.getField(16, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-16: "Immunization Registry Status" - creates it if necessary */ public IS getPd116_ImmunizationRegistryStatus() { IS ret = null; try { Type t = this.getField(16, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-17: "Immunization Registry Status Effective Date" - creates it if necessary */ public DT getImmunizationRegistryStatusEffectiveDate() { DT ret = null; try { Type t = this.getField(17, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-17: "Immunization Registry Status Effective Date" - creates it if necessary */ public DT getPd117_ImmunizationRegistryStatusEffectiveDate() { DT ret = null; try { Type t = this.getField(17, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-18: "Publicity Code Effective Date" - creates it if necessary */ public DT getPublicityCodeEffectiveDate() { DT ret = null; try { Type t = this.getField(18, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-18: "Publicity Code Effective Date" - creates it if necessary */ public DT getPd118_PublicityCodeEffectiveDate() { DT ret = null; try { Type t = this.getField(18, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-19: "Military Branch" - creates it if necessary */ public IS getMilitaryBranch() { IS ret = null; try { Type t = this.getField(19, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-19: "Military Branch" - creates it if necessary */ public IS getPd119_MilitaryBranch() { IS ret = null; try { Type t = this.getField(19, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-20: "Military Rank/Grade" - creates it if necessary */ public IS getMilitaryRankGrade() { IS ret = null; try { Type t = this.getField(20, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-20: "Military Rank/Grade" - creates it if necessary */ public IS getPd120_MilitaryRankGrade() { IS ret = null; try { Type t = this.getField(20, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-21: "Military Status" - creates it if necessary */ public IS getMilitaryStatus() { IS ret = null; try { Type t = this.getField(21, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PD1-21: "Military Status" - creates it if necessary */ public IS getPd121_MilitaryStatus() { IS ret = null; try { Type t = this.getField(21, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new IS(getMessage(), new Integer( 223 )); case 1: return new IS(getMessage(), new Integer( 220 )); case 2: return new XON(getMessage()); case 3: return new XCN(getMessage()); case 4: return new IS(getMessage(), new Integer( 231 )); case 5: return new IS(getMessage(), new Integer( 295 )); case 6: return new IS(getMessage(), new Integer( 315 )); case 7: return new IS(getMessage(), new Integer( 316 )); case 8: return new ID(getMessage(), new Integer( 136 )); case 9: return new CX(getMessage()); case 10: return new CE(getMessage()); case 11: return new ID(getMessage(), new Integer( 136 )); case 12: return new DT(getMessage()); case 13: return new XON(getMessage()); case 14: return new CE(getMessage()); case 15: return new IS(getMessage(), new Integer( 441 )); case 16: return new DT(getMessage()); case 17: return new DT(getMessage()); case 18: return new IS(getMessage(), new Integer( 140 )); case 19: return new IS(getMessage(), new Integer( 141 )); case 20: return new IS(getMessage(), new Integer( 142 )); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy