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

ca.uhn.hl7v2.model.v26.segment.PV2 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.v26.segment;

// import ca.uhn.hl7v2.model.v26.group.*;
import ca.uhn.hl7v2.model.v26.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 PV2 message segment (Patient Visit - Additional Information). * This segment has the following fields:

*
    *
  • PV2-1: Prior Pending Location (PL) optional *
  • PV2-2: Accommodation Code (CWE) optional *
  • PV2-3: Admit Reason (CWE) optional *
  • PV2-4: Transfer Reason (CWE) optional *
  • PV2-5: Patient Valuables (ST) optional repeating *
  • PV2-6: Patient Valuables Location (ST) optional *
  • PV2-7: Visit User Code (IS) optional repeating *
  • PV2-8: Expected Admit Date/Time (DTM) optional *
  • PV2-9: Expected Discharge Date/Time (DTM) optional *
  • PV2-10: Estimated Length of Inpatient Stay (NM) optional *
  • PV2-11: Actual Length of Inpatient Stay (NM) optional *
  • PV2-12: Visit Description (ST) optional *
  • PV2-13: Referral Source Code (XCN) optional repeating *
  • PV2-14: Previous Service Date (DT) optional *
  • PV2-15: Employment Illness Related Indicator (ID) optional *
  • PV2-16: Purge Status Code (IS) optional *
  • PV2-17: Purge Status Date (DT) optional *
  • PV2-18: Special Program Code (IS) optional *
  • PV2-19: Retention Indicator (ID) optional *
  • PV2-20: Expected Number of Insurance Plans (NM) optional *
  • PV2-21: Visit Publicity Code (IS) optional *
  • PV2-22: Visit Protection Indicator (ID) optional *
  • PV2-23: Clinic Organization Name (XON) optional repeating *
  • PV2-24: Patient Status Code (IS) optional *
  • PV2-25: Visit Priority Code (IS) optional *
  • PV2-26: Previous Treatment Date (DT) optional *
  • PV2-27: Expected Discharge Disposition (IS) optional *
  • PV2-28: Signature on File Date (DT) optional *
  • PV2-29: First Similar Illness Date (DT) optional *
  • PV2-30: Patient Charge Adjustment Code (CWE) optional *
  • PV2-31: Recurring Service Code (IS) optional *
  • PV2-32: Billing Media Code (ID) optional *
  • PV2-33: Expected Surgery Date and Time (DTM) optional *
  • PV2-34: Military Partnership Code (ID) optional *
  • PV2-35: Military Non-Availability Code (ID) optional *
  • PV2-36: Newborn Baby Indicator (ID) optional *
  • PV2-37: Baby Detained Indicator (ID) optional *
  • PV2-38: Mode of Arrival Code (CWE) optional *
  • PV2-39: Recreational Drug Use Code (CWE) optional repeating *
  • PV2-40: Admission Level of Care Code (CWE) optional *
  • PV2-41: Precaution Code (CWE) optional repeating *
  • PV2-42: Patient Condition Code (CWE) optional *
  • PV2-43: Living Will Code (IS) optional *
  • PV2-44: Organ Donor Code (IS) optional *
  • PV2-45: Advance Directive Code (CWE) optional repeating *
  • PV2-46: Patient Status Effective Date (DT) optional *
  • PV2-47: Expected LOA Return Date/Time (DTM) optional *
  • PV2-48: Expected Pre-admission Testing Date/Time (DTM) optional *
  • PV2-49: Notify Clergy Code (IS) optional repeating *
  • PV2-50: Advance Directive Last Verified Date (DT) optional *
*/ public class PV2 extends AbstractSegment { /** * Creates a new PV2 segment */ public PV2(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(PL.class, false, 1, 80, new Object[]{ getMessage(), new Integer(0) }, "Prior Pending Location"); this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(129) }, "Accommodation Code"); this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(0) }, "Admit Reason"); this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(0) }, "Transfer Reason"); this.add(ST.class, false, 0, 25, new Object[]{ getMessage(), new Integer(0) }, "Patient Valuables"); this.add(ST.class, false, 1, 25, new Object[]{ getMessage(), new Integer(0) }, "Patient Valuables Location"); this.add(IS.class, false, 0, 2, new Object[]{ getMessage() }, "Visit User Code"); this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Expected Admit Date/Time"); this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Expected Discharge Date/Time"); this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Estimated Length of Inpatient Stay"); this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Actual Length of Inpatient Stay"); this.add(ST.class, false, 1, 50, new Object[]{ getMessage(), new Integer(0) }, "Visit Description"); this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Referral Source Code"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Previous Service Date"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Employment Illness Related Indicator"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Purge Status Code"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Purge Status Date"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Special Program Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Retention Indicator"); this.add(NM.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "Expected Number of Insurance Plans"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Visit Publicity Code"); this.add(ID.class, false, 1, 0, new Object[]{ getMessage() }, "Visit Protection Indicator"); this.add(XON.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Clinic Organization Name"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Patient Status Code"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Visit Priority Code"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Previous Treatment Date"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Expected Discharge Disposition"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Signature on File Date"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "First Similar Illness Date"); this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(218) }, "Patient Charge Adjustment Code"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Recurring Service Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Billing Media Code"); this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Expected Surgery Date and Time"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Military Partnership Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Military Non-Availability Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Newborn Baby Indicator"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Baby Detained Indicator"); this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(430) }, "Mode of Arrival Code"); this.add(CWE.class, false, 0, 705, new Object[]{ getMessage(), new Integer(431) }, "Recreational Drug Use Code"); this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(432) }, "Admission Level of Care Code"); this.add(CWE.class, false, 0, 705, new Object[]{ getMessage(), new Integer(433) }, "Precaution Code"); this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(434) }, "Patient Condition Code"); 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(CWE.class, false, 0, 705, new Object[]{ getMessage(), new Integer(435) }, "Advance Directive Code"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Patient Status Effective Date"); this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Expected LOA Return Date/Time"); this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Expected Pre-admission Testing Date/Time"); this.add(IS.class, false, 0, 20, new Object[]{ getMessage() }, "Notify Clergy Code"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Advance Directive Last Verified Date"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating PV2 - this is probably a bug in the source code generator.", e); } } /** * Returns * PV2-1: "Prior Pending Location" - creates it if necessary */ public PL getPriorPendingLocation() { PL ret = null; try { Type t = this.getField(1, 0); ret = (PL)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 * PV2-1: "Prior Pending Location" - creates it if necessary */ public PL getPv21_PriorPendingLocation() { PL ret = null; try { Type t = this.getField(1, 0); ret = (PL)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 * PV2-2: "Accommodation Code" - creates it if necessary */ public CWE getAccommodationCode() { CWE ret = null; try { Type t = this.getField(2, 0); ret = (CWE)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 * PV2-2: "Accommodation Code" - creates it if necessary */ public CWE getPv22_AccommodationCode() { CWE ret = null; try { Type t = this.getField(2, 0); ret = (CWE)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 * PV2-3: "Admit Reason" - creates it if necessary */ public CWE getAdmitReason() { CWE ret = null; try { Type t = this.getField(3, 0); ret = (CWE)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 * PV2-3: "Admit Reason" - creates it if necessary */ public CWE getPv23_AdmitReason() { CWE ret = null; try { Type t = this.getField(3, 0); ret = (CWE)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 * PV2-4: "Transfer Reason" - creates it if necessary */ public CWE getTransferReason() { CWE ret = null; try { Type t = this.getField(4, 0); ret = (CWE)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 * PV2-4: "Transfer Reason" - creates it if necessary */ public CWE getPv24_TransferReason() { CWE ret = null; try { Type t = this.getField(4, 0); ret = (CWE)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 Valuables (PV2-5). */ public ST[] getPatientValuables() { ST[] ret = null; try { Type[] t = this.getField(5); ret = new ST[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (ST)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 Valuables (PV2-5). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPatientValuablesReps() { ST[] ret = null; try { Type[] t = this.getField(5); 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 * PV2-5: "Patient Valuables" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getPatientValuables(int rep) { ST ret = null; try { Type t = this.getField(5, rep); ret = (ST)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 * PV2-5: "Patient Valuables" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getPv25_PatientValuables(int rep) { ST ret = null; try { Type t = this.getField(5, rep); ret = (ST)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 Valuables (PV2-5). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPv25_PatientValuablesReps() { ST[] ret = null; try { Type[] t = this.getField(5); 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 * PV2-5: "Patient Valuables" 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 ST insertPatientValuables(int rep) throws HL7Exception { return (ST) super.insertRepetition(5, rep); } /** * Inserts a repetition of * PV2-5: "Patient Valuables" 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 ST insertPv25_PatientValuables(int rep) throws HL7Exception { return (ST) super.insertRepetition(5, rep); } /** * Removes a repetition of * PV2-5: "Patient Valuables" 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 ST removePatientValuables(int rep) throws HL7Exception { return (ST) super.removeRepetition(5, rep); } /** * Removes a repetition of * PV2-5: "Patient Valuables" 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 ST removePv25_PatientValuables(int rep) throws HL7Exception { return (ST) super.removeRepetition(5, rep); } /** * Returns * PV2-6: "Patient Valuables Location" - creates it if necessary */ public ST getPatientValuablesLocation() { ST ret = null; try { Type t = this.getField(6, 0); ret = (ST)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 * PV2-6: "Patient Valuables Location" - creates it if necessary */ public ST getPv26_PatientValuablesLocation() { ST ret = null; try { Type t = this.getField(6, 0); ret = (ST)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 Visit User Code (PV2-7). */ public IS[] getVisitUserCode() { IS[] ret = null; try { Type[] t = this.getField(7); 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 Visit User Code (PV2-7). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getVisitUserCodeReps() { IS[] ret = null; try { Type[] t = this.getField(7); 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 * PV2-7: "Visit User Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public IS getVisitUserCode(int rep) { IS ret = null; try { Type t = this.getField(7, 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 * PV2-7: "Visit User Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public IS getPv27_VisitUserCode(int rep) { IS ret = null; try { Type t = this.getField(7, 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 Visit User Code (PV2-7). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPv27_VisitUserCodeReps() { IS[] ret = null; try { Type[] t = this.getField(7); 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 * PV2-7: "Visit User 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 IS insertVisitUserCode(int rep) throws HL7Exception { return (IS) super.insertRepetition(7, rep); } /** * Inserts a repetition of * PV2-7: "Visit User 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 IS insertPv27_VisitUserCode(int rep) throws HL7Exception { return (IS) super.insertRepetition(7, rep); } /** * Removes a repetition of * PV2-7: "Visit User 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 IS removeVisitUserCode(int rep) throws HL7Exception { return (IS) super.removeRepetition(7, rep); } /** * Removes a repetition of * PV2-7: "Visit User 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 IS removePv27_VisitUserCode(int rep) throws HL7Exception { return (IS) super.removeRepetition(7, rep); } /** * Returns * PV2-8: "Expected Admit Date/Time" - creates it if necessary */ public DTM getExpectedAdmitDateTime() { DTM ret = null; try { Type t = this.getField(8, 0); ret = (DTM)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 * PV2-8: "Expected Admit Date/Time" - creates it if necessary */ public DTM getPv28_ExpectedAdmitDateTime() { DTM ret = null; try { Type t = this.getField(8, 0); ret = (DTM)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 * PV2-9: "Expected Discharge Date/Time" - creates it if necessary */ public DTM getExpectedDischargeDateTime() { DTM ret = null; try { Type t = this.getField(9, 0); ret = (DTM)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 * PV2-9: "Expected Discharge Date/Time" - creates it if necessary */ public DTM getPv29_ExpectedDischargeDateTime() { DTM ret = null; try { Type t = this.getField(9, 0); ret = (DTM)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 * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary */ public NM getEstimatedLengthOfInpatientStay() { NM ret = null; try { Type t = this.getField(10, 0); ret = (NM)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 * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary */ public NM getPv210_EstimatedLengthOfInpatientStay() { NM ret = null; try { Type t = this.getField(10, 0); ret = (NM)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 * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary */ public NM getActualLengthOfInpatientStay() { NM ret = null; try { Type t = this.getField(11, 0); ret = (NM)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 * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary */ public NM getPv211_ActualLengthOfInpatientStay() { NM ret = null; try { Type t = this.getField(11, 0); ret = (NM)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 * PV2-12: "Visit Description" - creates it if necessary */ public ST getVisitDescription() { ST ret = null; try { Type t = this.getField(12, 0); ret = (ST)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 * PV2-12: "Visit Description" - creates it if necessary */ public ST getPv212_VisitDescription() { ST ret = null; try { Type t = this.getField(12, 0); ret = (ST)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 Referral Source Code (PV2-13). */ public XCN[] getReferralSourceCode() { XCN[] ret = null; try { Type[] t = this.getField(13); 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 Referral Source Code (PV2-13). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getReferralSourceCodeReps() { XCN[] ret = null; try { Type[] t = this.getField(13); 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 * PV2-13: "Referral Source Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getReferralSourceCode(int rep) { XCN ret = null; try { Type t = this.getField(13, 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 * PV2-13: "Referral Source Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getPv213_ReferralSourceCode(int rep) { XCN ret = null; try { Type t = this.getField(13, 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 Referral Source Code (PV2-13). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPv213_ReferralSourceCodeReps() { XCN[] ret = null; try { Type[] t = this.getField(13); 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 * PV2-13: "Referral Source 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 XCN insertReferralSourceCode(int rep) throws HL7Exception { return (XCN) super.insertRepetition(13, rep); } /** * Inserts a repetition of * PV2-13: "Referral Source 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 XCN insertPv213_ReferralSourceCode(int rep) throws HL7Exception { return (XCN) super.insertRepetition(13, rep); } /** * Removes a repetition of * PV2-13: "Referral Source 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 XCN removeReferralSourceCode(int rep) throws HL7Exception { return (XCN) super.removeRepetition(13, rep); } /** * Removes a repetition of * PV2-13: "Referral Source 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 XCN removePv213_ReferralSourceCode(int rep) throws HL7Exception { return (XCN) super.removeRepetition(13, rep); } /** * Returns * PV2-14: "Previous Service Date" - creates it if necessary */ public DT getPreviousServiceDate() { DT ret = null; try { Type t = this.getField(14, 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 * PV2-14: "Previous Service Date" - creates it if necessary */ public DT getPv214_PreviousServiceDate() { DT ret = null; try { Type t = this.getField(14, 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 * PV2-15: "Employment Illness Related Indicator" - creates it if necessary */ public ID getEmploymentIllnessRelatedIndicator() { ID ret = null; try { Type t = this.getField(15, 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 * PV2-15: "Employment Illness Related Indicator" - creates it if necessary */ public ID getPv215_EmploymentIllnessRelatedIndicator() { ID ret = null; try { Type t = this.getField(15, 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 * PV2-16: "Purge Status Code" - creates it if necessary */ public IS getPurgeStatusCode() { 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 * PV2-16: "Purge Status Code" - creates it if necessary */ public IS getPv216_PurgeStatusCode() { 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 * PV2-17: "Purge Status Date" - creates it if necessary */ public DT getPurgeStatusDate() { 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 * PV2-17: "Purge Status Date" - creates it if necessary */ public DT getPv217_PurgeStatusDate() { 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 * PV2-18: "Special Program Code" - creates it if necessary */ public IS getSpecialProgramCode() { IS ret = null; try { Type t = this.getField(18, 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 * PV2-18: "Special Program Code" - creates it if necessary */ public IS getPv218_SpecialProgramCode() { IS ret = null; try { Type t = this.getField(18, 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 * PV2-19: "Retention Indicator" - creates it if necessary */ public ID getRetentionIndicator() { ID ret = null; try { Type t = this.getField(19, 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 * PV2-19: "Retention Indicator" - creates it if necessary */ public ID getPv219_RetentionIndicator() { ID ret = null; try { Type t = this.getField(19, 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 * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary */ public NM getExpectedNumberOfInsurancePlans() { NM ret = null; try { Type t = this.getField(20, 0); ret = (NM)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 * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary */ public NM getPv220_ExpectedNumberOfInsurancePlans() { NM ret = null; try { Type t = this.getField(20, 0); ret = (NM)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 * PV2-21: "Visit Publicity Code" - creates it if necessary */ public IS getVisitPublicityCode() { 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 * PV2-21: "Visit Publicity Code" - creates it if necessary */ public IS getPv221_VisitPublicityCode() { 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 * PV2-22: "Visit Protection Indicator" - creates it if necessary */ public ID getVisitProtectionIndicator() { ID ret = null; try { Type t = this.getField(22, 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 * PV2-22: "Visit Protection Indicator" - creates it if necessary */ public ID getPv222_VisitProtectionIndicator() { ID ret = null; try { Type t = this.getField(22, 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 Clinic Organization Name (PV2-23). */ public XON[] getClinicOrganizationName() { XON[] ret = null; try { Type[] t = this.getField(23); 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 Clinic Organization Name (PV2-23). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getClinicOrganizationNameReps() { XON[] ret = null; try { Type[] t = this.getField(23); 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 * PV2-23: "Clinic Organization Name" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XON getClinicOrganizationName(int rep) { XON ret = null; try { Type t = this.getField(23, 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 * PV2-23: "Clinic Organization Name" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XON getPv223_ClinicOrganizationName(int rep) { XON ret = null; try { Type t = this.getField(23, 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 Clinic Organization Name (PV2-23). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPv223_ClinicOrganizationNameReps() { XON[] ret = null; try { Type[] t = this.getField(23); 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 * PV2-23: "Clinic Organization Name" 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 insertClinicOrganizationName(int rep) throws HL7Exception { return (XON) super.insertRepetition(23, rep); } /** * Inserts a repetition of * PV2-23: "Clinic Organization Name" 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 insertPv223_ClinicOrganizationName(int rep) throws HL7Exception { return (XON) super.insertRepetition(23, rep); } /** * Removes a repetition of * PV2-23: "Clinic Organization Name" 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 removeClinicOrganizationName(int rep) throws HL7Exception { return (XON) super.removeRepetition(23, rep); } /** * Removes a repetition of * PV2-23: "Clinic Organization Name" 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 removePv223_ClinicOrganizationName(int rep) throws HL7Exception { return (XON) super.removeRepetition(23, rep); } /** * Returns * PV2-24: "Patient Status Code" - creates it if necessary */ public IS getPatientStatusCode() { IS ret = null; try { Type t = this.getField(24, 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 * PV2-24: "Patient Status Code" - creates it if necessary */ public IS getPv224_PatientStatusCode() { IS ret = null; try { Type t = this.getField(24, 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 * PV2-25: "Visit Priority Code" - creates it if necessary */ public IS getVisitPriorityCode() { IS ret = null; try { Type t = this.getField(25, 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 * PV2-25: "Visit Priority Code" - creates it if necessary */ public IS getPv225_VisitPriorityCode() { IS ret = null; try { Type t = this.getField(25, 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 * PV2-26: "Previous Treatment Date" - creates it if necessary */ public DT getPreviousTreatmentDate() { DT ret = null; try { Type t = this.getField(26, 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 * PV2-26: "Previous Treatment Date" - creates it if necessary */ public DT getPv226_PreviousTreatmentDate() { DT ret = null; try { Type t = this.getField(26, 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 * PV2-27: "Expected Discharge Disposition" - creates it if necessary */ public IS getExpectedDischargeDisposition() { IS ret = null; try { Type t = this.getField(27, 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 * PV2-27: "Expected Discharge Disposition" - creates it if necessary */ public IS getPv227_ExpectedDischargeDisposition() { IS ret = null; try { Type t = this.getField(27, 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 * PV2-28: "Signature on File Date" - creates it if necessary */ public DT getSignatureOnFileDate() { DT ret = null; try { Type t = this.getField(28, 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 * PV2-28: "Signature on File Date" - creates it if necessary */ public DT getPv228_SignatureOnFileDate() { DT ret = null; try { Type t = this.getField(28, 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 * PV2-29: "First Similar Illness Date" - creates it if necessary */ public DT getFirstSimilarIllnessDate() { DT ret = null; try { Type t = this.getField(29, 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 * PV2-29: "First Similar Illness Date" - creates it if necessary */ public DT getPv229_FirstSimilarIllnessDate() { DT ret = null; try { Type t = this.getField(29, 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 * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary */ public CWE getPatientChargeAdjustmentCode() { CWE ret = null; try { Type t = this.getField(30, 0); ret = (CWE)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 * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary */ public CWE getPv230_PatientChargeAdjustmentCode() { CWE ret = null; try { Type t = this.getField(30, 0); ret = (CWE)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 * PV2-31: "Recurring Service Code" - creates it if necessary */ public IS getRecurringServiceCode() { IS ret = null; try { Type t = this.getField(31, 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 * PV2-31: "Recurring Service Code" - creates it if necessary */ public IS getPv231_RecurringServiceCode() { IS ret = null; try { Type t = this.getField(31, 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 * PV2-32: "Billing Media Code" - creates it if necessary */ public ID getBillingMediaCode() { ID ret = null; try { Type t = this.getField(32, 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 * PV2-32: "Billing Media Code" - creates it if necessary */ public ID getPv232_BillingMediaCode() { ID ret = null; try { Type t = this.getField(32, 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 * PV2-33: "Expected Surgery Date and Time" - creates it if necessary */ public DTM getExpectedSurgeryDateAndTime() { DTM ret = null; try { Type t = this.getField(33, 0); ret = (DTM)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 * PV2-33: "Expected Surgery Date and Time" - creates it if necessary */ public DTM getPv233_ExpectedSurgeryDateAndTime() { DTM ret = null; try { Type t = this.getField(33, 0); ret = (DTM)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 * PV2-34: "Military Partnership Code" - creates it if necessary */ public ID getMilitaryPartnershipCode() { ID ret = null; try { Type t = this.getField(34, 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 * PV2-34: "Military Partnership Code" - creates it if necessary */ public ID getPv234_MilitaryPartnershipCode() { ID ret = null; try { Type t = this.getField(34, 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 * PV2-35: "Military Non-Availability Code" - creates it if necessary */ public ID getMilitaryNonAvailabilityCode() { ID ret = null; try { Type t = this.getField(35, 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 * PV2-35: "Military Non-Availability Code" - creates it if necessary */ public ID getPv235_MilitaryNonAvailabilityCode() { ID ret = null; try { Type t = this.getField(35, 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 * PV2-36: "Newborn Baby Indicator" - creates it if necessary */ public ID getNewbornBabyIndicator() { ID ret = null; try { Type t = this.getField(36, 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 * PV2-36: "Newborn Baby Indicator" - creates it if necessary */ public ID getPv236_NewbornBabyIndicator() { ID ret = null; try { Type t = this.getField(36, 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 * PV2-37: "Baby Detained Indicator" - creates it if necessary */ public ID getBabyDetainedIndicator() { ID ret = null; try { Type t = this.getField(37, 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 * PV2-37: "Baby Detained Indicator" - creates it if necessary */ public ID getPv237_BabyDetainedIndicator() { ID ret = null; try { Type t = this.getField(37, 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 * PV2-38: "Mode of Arrival Code" - creates it if necessary */ public CWE getModeOfArrivalCode() { CWE ret = null; try { Type t = this.getField(38, 0); ret = (CWE)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 * PV2-38: "Mode of Arrival Code" - creates it if necessary */ public CWE getPv238_ModeOfArrivalCode() { CWE ret = null; try { Type t = this.getField(38, 0); ret = (CWE)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 Recreational Drug Use Code (PV2-39). */ public CWE[] getRecreationalDrugUseCode() { CWE[] ret = null; try { Type[] t = this.getField(39); ret = new CWE[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CWE)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 Recreational Drug Use Code (PV2-39). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRecreationalDrugUseCodeReps() { CWE[] ret = null; try { Type[] t = this.getField(39); 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 * PV2-39: "Recreational Drug Use Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getRecreationalDrugUseCode(int rep) { CWE ret = null; try { Type t = this.getField(39, rep); ret = (CWE)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 * PV2-39: "Recreational Drug Use Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getPv239_RecreationalDrugUseCode(int rep) { CWE ret = null; try { Type t = this.getField(39, rep); ret = (CWE)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 Recreational Drug Use Code (PV2-39). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPv239_RecreationalDrugUseCodeReps() { CWE[] ret = null; try { Type[] t = this.getField(39); 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 * PV2-39: "Recreational Drug Use 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 CWE insertRecreationalDrugUseCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(39, rep); } /** * Inserts a repetition of * PV2-39: "Recreational Drug Use 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 CWE insertPv239_RecreationalDrugUseCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(39, rep); } /** * Removes a repetition of * PV2-39: "Recreational Drug Use 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 CWE removeRecreationalDrugUseCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(39, rep); } /** * Removes a repetition of * PV2-39: "Recreational Drug Use 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 CWE removePv239_RecreationalDrugUseCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(39, rep); } /** * Returns * PV2-40: "Admission Level of Care Code" - creates it if necessary */ public CWE getAdmissionLevelOfCareCode() { CWE ret = null; try { Type t = this.getField(40, 0); ret = (CWE)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 * PV2-40: "Admission Level of Care Code" - creates it if necessary */ public CWE getPv240_AdmissionLevelOfCareCode() { CWE ret = null; try { Type t = this.getField(40, 0); ret = (CWE)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 Precaution Code (PV2-41). */ public CWE[] getPrecautionCode() { CWE[] ret = null; try { Type[] t = this.getField(41); ret = new CWE[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CWE)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 Precaution Code (PV2-41). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPrecautionCodeReps() { CWE[] ret = null; try { Type[] t = this.getField(41); 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 * PV2-41: "Precaution Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getPrecautionCode(int rep) { CWE ret = null; try { Type t = this.getField(41, rep); ret = (CWE)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 * PV2-41: "Precaution Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getPv241_PrecautionCode(int rep) { CWE ret = null; try { Type t = this.getField(41, rep); ret = (CWE)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 Precaution Code (PV2-41). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPv241_PrecautionCodeReps() { CWE[] ret = null; try { Type[] t = this.getField(41); 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 * PV2-41: "Precaution 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 CWE insertPrecautionCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(41, rep); } /** * Inserts a repetition of * PV2-41: "Precaution 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 CWE insertPv241_PrecautionCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(41, rep); } /** * Removes a repetition of * PV2-41: "Precaution 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 CWE removePrecautionCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(41, rep); } /** * Removes a repetition of * PV2-41: "Precaution 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 CWE removePv241_PrecautionCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(41, rep); } /** * Returns * PV2-42: "Patient Condition Code" - creates it if necessary */ public CWE getPatientConditionCode() { CWE ret = null; try { Type t = this.getField(42, 0); ret = (CWE)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 * PV2-42: "Patient Condition Code" - creates it if necessary */ public CWE getPv242_PatientConditionCode() { CWE ret = null; try { Type t = this.getField(42, 0); ret = (CWE)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 * PV2-43: "Living Will Code" - creates it if necessary */ public IS getLivingWillCode() { IS ret = null; try { Type t = this.getField(43, 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 * PV2-43: "Living Will Code" - creates it if necessary */ public IS getPv243_LivingWillCode() { IS ret = null; try { Type t = this.getField(43, 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 * PV2-44: "Organ Donor Code" - creates it if necessary */ public IS getOrganDonorCode() { IS ret = null; try { Type t = this.getField(44, 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 * PV2-44: "Organ Donor Code" - creates it if necessary */ public IS getPv244_OrganDonorCode() { IS ret = null; try { Type t = this.getField(44, 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 Advance Directive Code (PV2-45). */ public CWE[] getAdvanceDirectiveCode() { CWE[] ret = null; try { Type[] t = this.getField(45); ret = new CWE[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CWE)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 (PV2-45). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getAdvanceDirectiveCodeReps() { CWE[] ret = null; try { Type[] t = this.getField(45); 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 * PV2-45: "Advance Directive Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getAdvanceDirectiveCode(int rep) { CWE ret = null; try { Type t = this.getField(45, rep); ret = (CWE)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 * PV2-45: "Advance Directive Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CWE getPv245_AdvanceDirectiveCode(int rep) { CWE ret = null; try { Type t = this.getField(45, rep); ret = (CWE)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 (PV2-45). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPv245_AdvanceDirectiveCodeReps() { CWE[] ret = null; try { Type[] t = this.getField(45); 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 * PV2-45: "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 CWE insertAdvanceDirectiveCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(45, rep); } /** * Inserts a repetition of * PV2-45: "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 CWE insertPv245_AdvanceDirectiveCode(int rep) throws HL7Exception { return (CWE) super.insertRepetition(45, rep); } /** * Removes a repetition of * PV2-45: "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 CWE removeAdvanceDirectiveCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(45, rep); } /** * Removes a repetition of * PV2-45: "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 CWE removePv245_AdvanceDirectiveCode(int rep) throws HL7Exception { return (CWE) super.removeRepetition(45, rep); } /** * Returns * PV2-46: "Patient Status Effective Date" - creates it if necessary */ public DT getPatientStatusEffectiveDate() { DT ret = null; try { Type t = this.getField(46, 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 * PV2-46: "Patient Status Effective Date" - creates it if necessary */ public DT getPv246_PatientStatusEffectiveDate() { DT ret = null; try { Type t = this.getField(46, 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 * PV2-47: "Expected LOA Return Date/Time" - creates it if necessary */ public DTM getExpectedLOAReturnDateTime() { DTM ret = null; try { Type t = this.getField(47, 0); ret = (DTM)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 * PV2-47: "Expected LOA Return Date/Time" - creates it if necessary */ public DTM getPv247_ExpectedLOAReturnDateTime() { DTM ret = null; try { Type t = this.getField(47, 0); ret = (DTM)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 * PV2-48: "Expected Pre-admission Testing Date/Time" - creates it if necessary */ public DTM getExpectedPreAdmissionTestingDateTime() { DTM ret = null; try { Type t = this.getField(48, 0); ret = (DTM)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 * PV2-48: "Expected Pre-admission Testing Date/Time" - creates it if necessary */ public DTM getPv248_ExpectedPreAdmissionTestingDateTime() { DTM ret = null; try { Type t = this.getField(48, 0); ret = (DTM)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 Notify Clergy Code (PV2-49). */ public IS[] getNotifyClergyCode() { IS[] ret = null; try { Type[] t = this.getField(49); 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 Notify Clergy Code (PV2-49). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getNotifyClergyCodeReps() { IS[] ret = null; try { Type[] t = this.getField(49); 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 * PV2-49: "Notify Clergy Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public IS getNotifyClergyCode(int rep) { IS ret = null; try { Type t = this.getField(49, 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 * PV2-49: "Notify Clergy Code" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public IS getPv249_NotifyClergyCode(int rep) { IS ret = null; try { Type t = this.getField(49, 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 Notify Clergy Code (PV2-49). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPv249_NotifyClergyCodeReps() { IS[] ret = null; try { Type[] t = this.getField(49); 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 * PV2-49: "Notify Clergy 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 IS insertNotifyClergyCode(int rep) throws HL7Exception { return (IS) super.insertRepetition(49, rep); } /** * Inserts a repetition of * PV2-49: "Notify Clergy 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 IS insertPv249_NotifyClergyCode(int rep) throws HL7Exception { return (IS) super.insertRepetition(49, rep); } /** * Removes a repetition of * PV2-49: "Notify Clergy 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 IS removeNotifyClergyCode(int rep) throws HL7Exception { return (IS) super.removeRepetition(49, rep); } /** * Removes a repetition of * PV2-49: "Notify Clergy 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 IS removePv249_NotifyClergyCode(int rep) throws HL7Exception { return (IS) super.removeRepetition(49, rep); } /** * Returns * PV2-50: "Advance Directive Last Verified Date" - creates it if necessary */ public DT getAdvanceDirectiveLastVerifiedDate() { DT ret = null; try { Type t = this.getField(50, 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 * PV2-50: "Advance Directive Last Verified Date" - creates it if necessary */ public DT getPv250_AdvanceDirectiveLastVerifiedDate() { DT ret = null; try { Type t = this.getField(50, 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; } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new PL(getMessage()); case 1: return new CWE(getMessage()); case 2: return new CWE(getMessage()); case 3: return new CWE(getMessage()); case 4: return new ST(getMessage()); case 5: return new ST(getMessage()); case 6: return new IS(getMessage(), new Integer( 130 )); case 7: return new DTM(getMessage()); case 8: return new DTM(getMessage()); case 9: return new NM(getMessage()); case 10: return new NM(getMessage()); case 11: return new ST(getMessage()); case 12: return new XCN(getMessage()); case 13: return new DT(getMessage()); case 14: return new ID(getMessage(), new Integer( 136 )); case 15: return new IS(getMessage(), new Integer( 213 )); case 16: return new DT(getMessage()); case 17: return new IS(getMessage(), new Integer( 214 )); case 18: return new ID(getMessage(), new Integer( 136 )); case 19: return new NM(getMessage()); case 20: return new IS(getMessage(), new Integer( 215 )); case 21: return new ID(getMessage(), new Integer( 136 )); case 22: return new XON(getMessage()); case 23: return new IS(getMessage(), new Integer( 216 )); case 24: return new IS(getMessage(), new Integer( 217 )); case 25: return new DT(getMessage()); case 26: return new IS(getMessage(), new Integer( 112 )); case 27: return new DT(getMessage()); case 28: return new DT(getMessage()); case 29: return new CWE(getMessage()); case 30: return new IS(getMessage(), new Integer( 219 )); case 31: return new ID(getMessage(), new Integer( 136 )); case 32: return new DTM(getMessage()); case 33: return new ID(getMessage(), new Integer( 136 )); case 34: return new ID(getMessage(), new Integer( 136 )); case 35: return new ID(getMessage(), new Integer( 136 )); case 36: return new ID(getMessage(), new Integer( 136 )); case 37: return new CWE(getMessage()); case 38: return new CWE(getMessage()); case 39: return new CWE(getMessage()); case 40: return new CWE(getMessage()); case 41: return new CWE(getMessage()); case 42: return new IS(getMessage(), new Integer( 315 )); case 43: return new IS(getMessage(), new Integer( 316 )); case 44: return new CWE(getMessage()); case 45: return new DT(getMessage()); case 46: return new DTM(getMessage()); case 47: return new DTM(getMessage()); case 48: return new IS(getMessage(), new Integer( 534 )); case 49: return new DT(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy