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

ca.uhn.hl7v2.model.v23.segment.FAC Maven / Gradle / Ivy

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

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

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

/**
 *

Represents an HL7 FAC message segment (Facility). * This segment has the following fields:

*
    *
  • FAC-1: Facility ID (EI) repeating *
  • FAC-2: Facility Type (ID) optional *
  • FAC-3: Facility Address (XAD) *
  • 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) *
  • FAC-10: Signature Authority Title (ST) optional *
  • FAC-11: Signature Authority Address (XAD) optional *
  • FAC-12: Signature Authority Telecommunication (XTN) optional *
*/ 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, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Facility ID"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Facility Type"); this.add(XAD.class, true, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Facility Address"); this.add(XTN.class, true, 1, 44, new Object[]{ getMessage(), new Integer(0) }, "Facility Telecommunication"); this.add(XCN.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Contact Person"); this.add(ST.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Contact Title"); this.add(XAD.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Contact Address"); this.add(XTN.class, false, 0, 44, new Object[]{ getMessage(), new Integer(0) }, "Contact Telecommunication"); this.add(XCN.class, true, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Signature Authority"); this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Signature Authority Title"); this.add(XAD.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Signature Authority Address"); this.add(XTN.class, false, 1, 44, new Object[]{ getMessage(), new Integer(0) }, "Signature Authority Telecommunication"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating FAC - this is probably a bug in the source code generator.", e); } } /** * Returns all repetitions of Facility ID (FAC-1). */ public EI[] getFacilityID() { EI[] ret = null; try { Type[] t = this.getField(1); ret = new EI[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (EI)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Facility ID (FAC-1). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFacilityIDReps() { EI[] ret = null; try { Type[] t = this.getField(1); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * FAC-1: "Facility ID" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public EI getFacilityID(int rep) { EI ret = null; try { Type t = this.getField(1, rep); ret = (EI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * FAC-1: "Facility ID" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public EI getFac1_FacilityID(int rep) { EI ret = null; try { Type t = this.getField(1, rep); ret = (EI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Facility ID (FAC-1). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getFac1_FacilityIDReps() { EI[] ret = null; try { Type[] t = this.getField(1); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * FAC-1: "Facility ID" 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 EI insertFacilityID(int rep) throws HL7Exception { return (EI) super.insertRepetition(1, rep); } /** * Inserts a repetition of * FAC-1: "Facility ID" 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 EI insertFac1_FacilityID(int rep) throws HL7Exception { return (EI) super.insertRepetition(1, rep); } /** * Removes a repetition of * FAC-1: "Facility ID" 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 EI removeFacilityID(int rep) throws HL7Exception { return (EI) super.removeRepetition(1, rep); } /** * Removes a repetition of * FAC-1: "Facility ID" 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 EI removeFac1_FacilityID(int rep) throws HL7Exception { return (EI) super.removeRepetition(1, rep); } /** * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * FAC-3: "Facility Address" - creates it if necessary */ public XAD getFacilityAddress() { XAD ret = null; try { Type t = this.getField(3, 0); ret = (XAD)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * FAC-3: "Facility Address" - creates it if necessary */ public XAD getFac3_FacilityAddress() { XAD ret = null; try { Type t = this.getField(3, 0); ret = (XAD)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * 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 * FAC-9: "Signature Authority" - creates it if necessary */ public XCN getSignatureAuthority() { XCN ret = null; try { Type t = this.getField(9, 0); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * FAC-9: "Signature Authority" - creates it if necessary */ public XCN getFac9_SignatureAuthority() { XCN ret = null; try { Type t = this.getField(9, 0); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * FAC-11: "Signature Authority Address" - creates it if necessary */ public XAD getSignatureAuthorityAddress() { XAD ret = null; try { Type t = this.getField(11, 0); ret = (XAD)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * FAC-11: "Signature Authority Address" - creates it if necessary */ public XAD getFac11_SignatureAuthorityAddress() { XAD ret = null; try { Type t = this.getField(11, 0); ret = (XAD)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * 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) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new 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