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

ca.uhn.hl7v2.model.v24.segment.FAC 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 FAC message segment (Facility). * This segment has the following fields:

*
    *
  • FAC-1: Facility ID-FAC (EI) *
  • FAC-2: Facility Type (ID) optional *
  • FAC-3: Facility Address (XAD) repeating *
  • FAC-4: Facility Telecommunication (XTN) *
  • FAC-5: Contact Person (XCN) optional repeating *
  • FAC-6: Contact Title (ST) optional repeating *
  • FAC-7: Contact Address (XAD) optional repeating *
  • FAC-8: Contact Telecommunication (XTN) optional repeating *
  • FAC-9: Signature Authority (XCN) repeating *
  • FAC-10: Signature Authority Title (ST) optional *
  • FAC-11: Signature Authority Address (XAD) optional repeating *
  • FAC-12: Signature Authority Telecommunication (XTN) optional *
*/ @SuppressWarnings("unused") public class FAC extends AbstractSegment { /** * Creates a new FAC segment */ public FAC(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(EI.class, true, 1, 20, new Object[]{ getMessage() }, "Facility ID-FAC"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(331) }, "Facility Type"); this.add(XAD.class, true, 0, 250, new Object[]{ getMessage() }, "Facility Address"); this.add(XTN.class, true, 1, 250, new Object[]{ getMessage() }, "Facility Telecommunication"); this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Contact Person"); this.add(ST.class, false, 0, 60, new Object[]{ getMessage() }, "Contact Title"); this.add(XAD.class, false, 0, 250, new Object[]{ getMessage() }, "Contact Address"); this.add(XTN.class, false, 0, 250, new Object[]{ getMessage() }, "Contact Telecommunication"); this.add(XCN.class, true, 0, 250, new Object[]{ getMessage() }, "Signature Authority"); this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "Signature Authority Title"); this.add(XAD.class, false, 0, 250, new Object[]{ getMessage() }, "Signature Authority Address"); this.add(XTN.class, false, 1, 250, new Object[]{ getMessage() }, "Signature Authority Telecommunication"); } catch(HL7Exception e) { LoggerFactory.getLogger(getClass()).error("Unexpected error creating FAC - this is probably a bug in the source code generator.", e); } } /** * Returns * FAC-1: "Facility ID-FAC" - creates it if necessary */ public EI getFacilityIDFAC() { EI ret = null; try { Type t = this.getField(1, 0); ret = (EI)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 * FAC-1: "Facility ID-FAC" - creates it if necessary */ public EI getFac1_FacilityIDFAC() { EI ret = null; try { Type t = this.getField(1, 0); ret = (EI)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 * FAC-2: "Facility Type" - creates it if necessary */ public ID getFacilityType() { ID ret = null; try { Type t = this.getField(2, 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 * FAC-2: "Facility Type" - creates it if necessary */ public ID getFac2_FacilityType() { ID ret = null; try { Type t = this.getField(2, 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 Facility Address (FAC-3). */ public XAD[] getFacilityAddress() { XAD[] ret = null; try { Type[] t = this.getField(3); ret = new XAD[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XAD)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 Facility Address (FAC-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFacilityAddressReps() { XAD[] ret = null; try { Type[] t = this.getField(3); 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 * FAC-3: "Facility Address" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XAD getFacilityAddress(int rep) { XAD ret = null; try { Type t = this.getField(3, rep); ret = (XAD)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 * FAC-3: "Facility Address" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XAD getFac3_FacilityAddress(int rep) { XAD ret = null; try { Type t = this.getField(3, rep); ret = (XAD)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 Facility Address (FAC-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFac3_FacilityAddressReps() { XAD[] ret = null; try { Type[] t = this.getField(3); 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 * FAC-3: "Facility Address" 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 XAD insertFacilityAddress(int rep) throws HL7Exception { return (XAD) super.insertRepetition(3, rep); } /** * Inserts a repetition of * FAC-3: "Facility Address" 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 XAD insertFac3_FacilityAddress(int rep) throws HL7Exception { return (XAD) super.insertRepetition(3, rep); } /** * Removes a repetition of * FAC-3: "Facility Address" 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 XAD removeFacilityAddress(int rep) throws HL7Exception { return (XAD) super.removeRepetition(3, rep); } /** * Removes a repetition of * FAC-3: "Facility Address" 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 XAD removeFac3_FacilityAddress(int rep) throws HL7Exception { return (XAD) super.removeRepetition(3, rep); } /** * Returns * FAC-4: "Facility Telecommunication" - creates it if necessary */ public XTN getFacilityTelecommunication() { XTN ret = null; try { Type t = this.getField(4, 0); ret = (XTN)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 * FAC-4: "Facility Telecommunication" - creates it if necessary */ public XTN getFac4_FacilityTelecommunication() { XTN ret = null; try { Type t = this.getField(4, 0); ret = (XTN)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 Contact Person (FAC-5). */ public XCN[] getContactPerson() { XCN[] ret = null; try { Type[] t = this.getField(5); 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 Contact Person (FAC-5). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getContactPersonReps() { XCN[] 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 * FAC-5: "Contact Person" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getContactPerson(int rep) { XCN ret = null; try { Type t = this.getField(5, 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 * FAC-5: "Contact Person" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getFac5_ContactPerson(int rep) { XCN ret = null; try { Type t = this.getField(5, 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 Contact Person (FAC-5). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFac5_ContactPersonReps() { XCN[] 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 * FAC-5: "Contact Person" 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 insertContactPerson(int rep) throws HL7Exception { return (XCN) super.insertRepetition(5, rep); } /** * Inserts a repetition of * FAC-5: "Contact Person" 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 insertFac5_ContactPerson(int rep) throws HL7Exception { return (XCN) super.insertRepetition(5, rep); } /** * Removes a repetition of * FAC-5: "Contact Person" 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 removeContactPerson(int rep) throws HL7Exception { return (XCN) super.removeRepetition(5, rep); } /** * Removes a repetition of * FAC-5: "Contact Person" 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 removeFac5_ContactPerson(int rep) throws HL7Exception { return (XCN) super.removeRepetition(5, rep); } /** * Returns all repetitions of Contact Title (FAC-6). */ public ST[] getContactTitle() { ST[] ret = null; try { Type[] t = this.getField(6); 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 Contact Title (FAC-6). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getContactTitleReps() { ST[] ret = null; try { Type[] t = this.getField(6); 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 * FAC-6: "Contact Title" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getContactTitle(int rep) { ST ret = null; try { Type t = this.getField(6, 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 * FAC-6: "Contact Title" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getFac6_ContactTitle(int rep) { ST ret = null; try { Type t = this.getField(6, 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 Contact Title (FAC-6). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFac6_ContactTitleReps() { ST[] ret = null; try { Type[] t = this.getField(6); 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 * FAC-6: "Contact Title" 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 insertContactTitle(int rep) throws HL7Exception { return (ST) super.insertRepetition(6, rep); } /** * Inserts a repetition of * FAC-6: "Contact Title" 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 insertFac6_ContactTitle(int rep) throws HL7Exception { return (ST) super.insertRepetition(6, rep); } /** * Removes a repetition of * FAC-6: "Contact Title" 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 removeContactTitle(int rep) throws HL7Exception { return (ST) super.removeRepetition(6, rep); } /** * Removes a repetition of * FAC-6: "Contact Title" 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 removeFac6_ContactTitle(int rep) throws HL7Exception { return (ST) super.removeRepetition(6, rep); } /** * Returns all repetitions of Contact Address (FAC-7). */ public XAD[] getContactAddress() { XAD[] ret = null; try { Type[] t = this.getField(7); ret = new XAD[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XAD)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 Contact Address (FAC-7). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getContactAddressReps() { XAD[] 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 * FAC-7: "Contact Address" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XAD getContactAddress(int rep) { XAD ret = null; try { Type t = this.getField(7, rep); ret = (XAD)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 * FAC-7: "Contact Address" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XAD getFac7_ContactAddress(int rep) { XAD ret = null; try { Type t = this.getField(7, rep); ret = (XAD)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 Contact Address (FAC-7). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFac7_ContactAddressReps() { XAD[] 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 * FAC-7: "Contact Address" 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 XAD insertContactAddress(int rep) throws HL7Exception { return (XAD) super.insertRepetition(7, rep); } /** * Inserts a repetition of * FAC-7: "Contact Address" 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 XAD insertFac7_ContactAddress(int rep) throws HL7Exception { return (XAD) super.insertRepetition(7, rep); } /** * Removes a repetition of * FAC-7: "Contact Address" 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 XAD removeContactAddress(int rep) throws HL7Exception { return (XAD) super.removeRepetition(7, rep); } /** * Removes a repetition of * FAC-7: "Contact Address" 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 XAD removeFac7_ContactAddress(int rep) throws HL7Exception { return (XAD) super.removeRepetition(7, rep); } /** * Returns all repetitions of Contact Telecommunication (FAC-8). */ public XTN[] getContactTelecommunication() { XTN[] ret = null; try { Type[] t = this.getField(8); ret = new XTN[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XTN)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 Contact Telecommunication (FAC-8). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getContactTelecommunicationReps() { XTN[] ret = null; try { Type[] t = this.getField(8); 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 * FAC-8: "Contact Telecommunication" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XTN getContactTelecommunication(int rep) { XTN ret = null; try { Type t = this.getField(8, rep); ret = (XTN)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 * FAC-8: "Contact Telecommunication" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XTN getFac8_ContactTelecommunication(int rep) { XTN ret = null; try { Type t = this.getField(8, rep); ret = (XTN)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 Contact Telecommunication (FAC-8). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFac8_ContactTelecommunicationReps() { XTN[] ret = null; try { Type[] t = this.getField(8); 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 * FAC-8: "Contact Telecommunication" 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 XTN insertContactTelecommunication(int rep) throws HL7Exception { return (XTN) super.insertRepetition(8, rep); } /** * Inserts a repetition of * FAC-8: "Contact Telecommunication" 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 XTN insertFac8_ContactTelecommunication(int rep) throws HL7Exception { return (XTN) super.insertRepetition(8, rep); } /** * Removes a repetition of * FAC-8: "Contact Telecommunication" 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 XTN removeContactTelecommunication(int rep) throws HL7Exception { return (XTN) super.removeRepetition(8, rep); } /** * Removes a repetition of * FAC-8: "Contact Telecommunication" 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 XTN removeFac8_ContactTelecommunication(int rep) throws HL7Exception { return (XTN) super.removeRepetition(8, rep); } /** * Returns all repetitions of Signature Authority (FAC-9). */ public XCN[] getSignatureAuthority() { XCN[] ret = null; try { Type[] t = this.getField(9); 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 Signature Authority (FAC-9). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSignatureAuthorityReps() { XCN[] ret = null; try { Type[] t = this.getField(9); 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 * FAC-9: "Signature Authority" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getSignatureAuthority(int rep) { XCN ret = null; try { Type t = this.getField(9, 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 * FAC-9: "Signature Authority" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getFac9_SignatureAuthority(int rep) { XCN ret = null; try { Type t = this.getField(9, 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 Signature Authority (FAC-9). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFac9_SignatureAuthorityReps() { XCN[] ret = null; try { Type[] t = this.getField(9); 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 * FAC-9: "Signature Authority" 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 insertSignatureAuthority(int rep) throws HL7Exception { return (XCN) super.insertRepetition(9, rep); } /** * Inserts a repetition of * FAC-9: "Signature Authority" 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 insertFac9_SignatureAuthority(int rep) throws HL7Exception { return (XCN) super.insertRepetition(9, rep); } /** * Removes a repetition of * FAC-9: "Signature Authority" 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 removeSignatureAuthority(int rep) throws HL7Exception { return (XCN) super.removeRepetition(9, rep); } /** * Removes a repetition of * FAC-9: "Signature Authority" 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 removeFac9_SignatureAuthority(int rep) throws HL7Exception { return (XCN) super.removeRepetition(9, rep); } /** * Returns * FAC-10: "Signature Authority Title" - creates it if necessary */ public ST getSignatureAuthorityTitle() { ST ret = null; try { Type t = this.getField(10, 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 * FAC-10: "Signature Authority Title" - creates it if necessary */ public ST getFac10_SignatureAuthorityTitle() { ST ret = null; try { Type t = this.getField(10, 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 Signature Authority Address (FAC-11). */ public XAD[] getSignatureAuthorityAddress() { XAD[] ret = null; try { Type[] t = this.getField(11); ret = new XAD[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XAD)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 Signature Authority Address (FAC-11). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSignatureAuthorityAddressReps() { XAD[] ret = null; try { Type[] t = this.getField(11); 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 * FAC-11: "Signature Authority Address" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XAD getSignatureAuthorityAddress(int rep) { XAD ret = null; try { Type t = this.getField(11, rep); ret = (XAD)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 * FAC-11: "Signature Authority Address" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XAD getFac11_SignatureAuthorityAddress(int rep) { XAD ret = null; try { Type t = this.getField(11, rep); ret = (XAD)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 Signature Authority Address (FAC-11). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFac11_SignatureAuthorityAddressReps() { XAD[] ret = null; try { Type[] t = this.getField(11); 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 * FAC-11: "Signature Authority Address" 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 XAD insertSignatureAuthorityAddress(int rep) throws HL7Exception { return (XAD) super.insertRepetition(11, rep); } /** * Inserts a repetition of * FAC-11: "Signature Authority Address" 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 XAD insertFac11_SignatureAuthorityAddress(int rep) throws HL7Exception { return (XAD) super.insertRepetition(11, rep); } /** * Removes a repetition of * FAC-11: "Signature Authority Address" 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 XAD removeSignatureAuthorityAddress(int rep) throws HL7Exception { return (XAD) super.removeRepetition(11, rep); } /** * Removes a repetition of * FAC-11: "Signature Authority Address" 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 XAD removeFac11_SignatureAuthorityAddress(int rep) throws HL7Exception { return (XAD) super.removeRepetition(11, rep); } /** * Returns * FAC-12: "Signature Authority Telecommunication" - creates it if necessary */ public XTN getSignatureAuthorityTelecommunication() { XTN ret = null; try { Type t = this.getField(12, 0); ret = (XTN)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 * FAC-12: "Signature Authority Telecommunication" - creates it if necessary */ public XTN getFac12_SignatureAuthorityTelecommunication() { XTN ret = null; try { Type t = this.getField(12, 0); ret = (XTN)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 EI(getMessage()); case 1: return new ID(getMessage(), new Integer( 331 )); case 2: return new XAD(getMessage()); case 3: return new XTN(getMessage()); case 4: return new XCN(getMessage()); case 5: return new ST(getMessage()); case 6: return new XAD(getMessage()); case 7: return new XTN(getMessage()); case 8: return new XCN(getMessage()); case 9: return new ST(getMessage()); case 10: return new XAD(getMessage()); case 11: return new XTN(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy