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

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

There is a newer version: 2.5.1
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/
 * 
 * The contents of this file are subject to the Mozilla Public License Version 1.1 
 * (the "License"); you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
 * Software distributed under the License is distributed on an "AS IS" basis, 
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
 * specific language governing rights and limitations under the License. 
 * 
 * The Original Code is "[file_name]".  Description: 
 * "[one_line_description]" 
 * 
 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
 * 2002.  All Rights Reserved. 
 * 
 * Contributor(s): ______________________________________. 
 * 
 * Alternatively, the contents of this file may be used under the terms of the 
 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
 * applicable instead of those above.  If you wish to allow use of your version of this 
 * file only under the terms of the GPL and not to allow others to use your version 
 * of this file under the MPL, indicate your decision by deleting  the provisions above 
 * and replace  them with the notice and other provisions required by the GPL License.  
 * If you do not delete the provisions above, a recipient may use your version of 
 * this file under either the MPL or the GPL. 
 * 
 */


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

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

// import ca.uhn.hl7v2.model.v24.group.*;
import ca.uhn.hl7v2.model.v24.datatype.*;
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 (CE) optional *
  • PV2-3: Admit Reason (CE) optional *
  • PV2-4: Transfer Reason (CE) 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 (TS) optional *
  • PV2-9: Expected Discharge Date/Time (TS) 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 (CE) optional *
  • PV2-31: Recurring Service Code (IS) optional *
  • PV2-32: Billing Media Code (ID) optional *
  • PV2-33: Expected Surgery Date and Time (TS) 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 (CE) optional *
  • PV2-39: Recreational Drug Use Code (CE) optional repeating *
  • PV2-40: Admission Level of Care Code (CE) optional *
  • PV2-41: Precaution Code (CE) optional repeating *
  • PV2-42: Patient Condition Code (CE) optional *
  • PV2-43: Living Will Code (IS) optional *
  • PV2-44: Organ Donor Code (IS) optional *
  • PV2-45: Advance Directive Code (CE) optional repeating *
  • PV2-46: Patient Status Effective Date (DT) optional *
  • PV2-47: Expected LOA Return Date/Time (TS) optional *
*/ @SuppressWarnings("unused") 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() }, "Prior Pending Location"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Accommodation Code"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Admit Reason"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Transfer Reason"); this.add(ST.class, false, 0, 25, new Object[]{ getMessage() }, "Patient Valuables"); this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Patient Valuables Location"); this.add(IS.class, false, 0, 2, new Object[]{ getMessage(), new Integer(130) }, "Visit User Code"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Admit Date/Time"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Discharge Date/Time"); this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Estimated Length of Inpatient Stay"); this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Actual Length of Inpatient Stay"); this.add(ST.class, false, 1, 50, new Object[]{ getMessage() }, "Visit Description"); this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Referral Source Code"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Service Date"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Employment Illness Related Indicator"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(213) }, "Purge Status Code"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Purge Status Date"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(214) }, "Special Program Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Retention Indicator"); this.add(NM.class, false, 1, 1, new Object[]{ getMessage() }, "Expected Number of Insurance Plans"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(215) }, "Visit Publicity Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Visit Protection Indicator"); this.add(XON.class, false, 0, 250, new Object[]{ getMessage() }, "Clinic Organization Name"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(216) }, "Patient Status Code"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(217) }, "Visit Priority Code"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Treatment Date"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(112) }, "Expected Discharge Disposition"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Signature on File Date"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "First Similar Illness Date"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Patient Charge Adjustment Code"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(219) }, "Recurring Service Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Billing Media Code"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Surgery Date and Time"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Partnership Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Non-Availability Code"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Newborn Baby Indicator"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Baby Detained Indicator"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Mode of Arrival Code"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Recreational Drug Use Code"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Admission Level of Care Code"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Precaution Code"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Patient Condition Code"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(315) }, "Living Will Code"); this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(316) }, "Organ Donor Code"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Advance Directive Code"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Patient Status Effective Date"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected LOA Return Date/Time"); } catch(HL7Exception e) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getAccommodationCode() { CE ret = null; try { Type t = this.getField(2, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv22_AccommodationCode() { CE ret = null; try { Type t = this.getField(2, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getAdmitReason() { CE ret = null; try { Type t = this.getField(3, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv23_AdmitReason() { CE ret = null; try { Type t = this.getField(3, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getTransferReason() { CE ret = null; try { Type t = this.getField(4, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv24_TransferReason() { CE ret = null; try { Type t = this.getField(4, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 TS getExpectedAdmitDateTime() { TS ret = null; try { Type t = this.getField(8, 0); ret = (TS)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 TS getPv28_ExpectedAdmitDateTime() { TS ret = null; try { Type t = this.getField(8, 0); ret = (TS)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 TS getExpectedDischargeDateTime() { TS ret = null; try { Type t = this.getField(9, 0); ret = (TS)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 TS getPv29_ExpectedDischargeDateTime() { TS ret = null; try { Type t = this.getField(9, 0); ret = (TS)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPatientChargeAdjustmentCode() { CE ret = null; try { Type t = this.getField(30, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv230_PatientChargeAdjustmentCode() { CE ret = null; try { Type t = this.getField(30, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 TS getExpectedSurgeryDateAndTime() { TS ret = null; try { Type t = this.getField(33, 0); ret = (TS)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 TS getPv233_ExpectedSurgeryDateAndTime() { TS ret = null; try { Type t = this.getField(33, 0); ret = (TS)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getModeOfArrivalCode() { CE ret = null; try { Type t = this.getField(38, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv238_ModeOfArrivalCode() { CE ret = null; try { Type t = this.getField(38, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE[] getRecreationalDrugUseCode() { CE[] ret = null; try { Type[] t = this.getField(39); ret = new CE[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CE)t[i]; } } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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() { CE[] ret = null; try { Type[] t = this.getField(39); return t.length; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getRecreationalDrugUseCode(int rep) { CE ret = null; try { Type t = this.getField(39, rep); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv239_RecreationalDrugUseCode(int rep) { CE ret = null; try { Type t = this.getField(39, rep); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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() { CE[] ret = null; try { Type[] t = this.getField(39); return t.length; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE insertRecreationalDrugUseCode(int rep) throws HL7Exception { return (CE) 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 CE insertPv239_RecreationalDrugUseCode(int rep) throws HL7Exception { return (CE) 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 CE removeRecreationalDrugUseCode(int rep) throws HL7Exception { return (CE) 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 CE removePv239_RecreationalDrugUseCode(int rep) throws HL7Exception { return (CE) super.removeRepetition(39, rep); } /** * Returns * PV2-40: "Admission Level of Care Code" - creates it if necessary */ public CE getAdmissionLevelOfCareCode() { CE ret = null; try { Type t = this.getField(40, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv240_AdmissionLevelOfCareCode() { CE ret = null; try { Type t = this.getField(40, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE[] getPrecautionCode() { CE[] ret = null; try { Type[] t = this.getField(41); ret = new CE[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CE)t[i]; } } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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() { CE[] ret = null; try { Type[] t = this.getField(41); return t.length; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPrecautionCode(int rep) { CE ret = null; try { Type t = this.getField(41, rep); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv241_PrecautionCode(int rep) { CE ret = null; try { Type t = this.getField(41, rep); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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() { CE[] ret = null; try { Type[] t = this.getField(41); return t.length; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE insertPrecautionCode(int rep) throws HL7Exception { return (CE) 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 CE insertPv241_PrecautionCode(int rep) throws HL7Exception { return (CE) 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 CE removePrecautionCode(int rep) throws HL7Exception { return (CE) 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 CE removePv241_PrecautionCode(int rep) throws HL7Exception { return (CE) super.removeRepetition(41, rep); } /** * Returns * PV2-42: "Patient Condition Code" - creates it if necessary */ public CE getPatientConditionCode() { CE ret = null; try { Type t = this.getField(42, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv242_PatientConditionCode() { CE ret = null; try { Type t = this.getField(42, 0); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE[] getAdvanceDirectiveCode() { CE[] ret = null; try { Type[] t = this.getField(45); ret = new CE[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CE)t[i]; } } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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() { CE[] ret = null; try { Type[] t = this.getField(45); return t.length; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getAdvanceDirectiveCode(int rep) { CE ret = null; try { Type t = this.getField(45, rep); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE getPv245_AdvanceDirectiveCode(int rep) { CE ret = null; try { Type t = this.getField(45, rep); ret = (CE)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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() { CE[] ret = null; try { Type[] t = this.getField(45); return t.length; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE insertAdvanceDirectiveCode(int rep) throws HL7Exception { return (CE) 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 CE insertPv245_AdvanceDirectiveCode(int rep) throws HL7Exception { return (CE) 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 CE removeAdvanceDirectiveCode(int rep) throws HL7Exception { return (CE) 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 CE removePv245_AdvanceDirectiveCode(int rep) throws HL7Exception { return (CE) 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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 TS getExpectedLOAReturnDateTime() { TS ret = null; try { Type t = this.getField(47, 0); ret = (TS)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 TS getPv247_ExpectedLOAReturnDateTime() { TS ret = null; try { Type t = this.getField(47, 0); ret = (TS)t; } catch (ClassCastException cce) { LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { LoggerFactory.getLogger(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 CE(getMessage()); case 2: return new CE(getMessage()); case 3: return new CE(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 TS(getMessage()); case 8: return new TS(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 CE(getMessage()); case 30: return new IS(getMessage(), new Integer( 219 )); case 31: return new ID(getMessage(), new Integer( 136 )); case 32: return new TS(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 CE(getMessage()); case 38: return new CE(getMessage()); case 39: return new CE(getMessage()); case 40: return new CE(getMessage()); case 41: return new CE(getMessage()); case 42: return new IS(getMessage(), new Integer( 315 )); case 43: return new IS(getMessage(), new Integer( 316 )); case 44: return new CE(getMessage()); case 45: return new DT(getMessage()); case 46: return new TS(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy