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

ca.uhn.hl7v2.model.v25.segment.PDC 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.v25.segment;

// import ca.uhn.hl7v2.model.v25.group.*;
import ca.uhn.hl7v2.model.v25.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 PDC message segment (Product Detail Country). * This segment has the following fields:

*
    *
  • PDC-1: Manufacturer/Distributor (XON) repeating *
  • PDC-2: Country (CE) *
  • PDC-3: Brand Name (ST) *
  • PDC-4: Device Family Name (ST) optional *
  • PDC-5: Generic Name (CE) optional *
  • PDC-6: Model Identifier (ST) optional repeating *
  • PDC-7: Catalogue Identifier (ST) optional *
  • PDC-8: Other Identifier (ST) optional repeating *
  • PDC-9: Product Code (CE) optional *
  • PDC-10: Marketing Basis (ID) optional *
  • PDC-11: Marketing Approval ID (ST) optional *
  • PDC-12: Labeled Shelf Life (CQ) optional *
  • PDC-13: Expected Shelf Life (CQ) optional *
  • PDC-14: Date First Marketed (TS) optional *
  • PDC-15: Date Last Marketed (TS) optional *
*/ public class PDC extends AbstractSegment { /** * Creates a new PDC segment */ public PDC(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(XON.class, true, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Manufacturer/Distributor"); this.add(CE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Country"); this.add(ST.class, true, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Brand Name"); this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Device Family Name"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Generic Name"); this.add(ST.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Model Identifier"); this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Catalogue Identifier"); this.add(ST.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Other Identifier"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Product Code"); this.add(ID.class, false, 1, 4, new Object[]{ getMessage() }, "Marketing Basis"); this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Marketing Approval ID"); this.add(CQ.class, false, 1, 12, new Object[]{ getMessage(), new Integer(0) }, "Labeled Shelf Life"); this.add(CQ.class, false, 1, 12, new Object[]{ getMessage(), new Integer(0) }, "Expected Shelf Life"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date First Marketed"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date Last Marketed"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating PDC - this is probably a bug in the source code generator.", e); } } /** * Returns all repetitions of Manufacturer/Distributor (PDC-1). */ public XON[] getManufacturerDistributor() { XON[] ret = null; try { Type[] t = this.getField(1); ret = new XON[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XON)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Manufacturer/Distributor (PDC-1). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getManufacturerDistributorReps() { XON[] 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 * PDC-1: "Manufacturer/Distributor" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XON getManufacturerDistributor(int rep) { XON ret = null; try { Type t = this.getField(1, rep); ret = (XON)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * PDC-1: "Manufacturer/Distributor" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XON getPdc1_ManufacturerDistributor(int rep) { XON ret = null; try { Type t = this.getField(1, rep); ret = (XON)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Manufacturer/Distributor (PDC-1). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPdc1_ManufacturerDistributorReps() { XON[] 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 * PDC-1: "Manufacturer/Distributor" 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 insertManufacturerDistributor(int rep) throws HL7Exception { return (XON) super.insertRepetition(1, rep); } /** * Inserts a repetition of * PDC-1: "Manufacturer/Distributor" 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 insertPdc1_ManufacturerDistributor(int rep) throws HL7Exception { return (XON) super.insertRepetition(1, rep); } /** * Removes a repetition of * PDC-1: "Manufacturer/Distributor" 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 removeManufacturerDistributor(int rep) throws HL7Exception { return (XON) super.removeRepetition(1, rep); } /** * Removes a repetition of * PDC-1: "Manufacturer/Distributor" 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 removePdc1_ManufacturerDistributor(int rep) throws HL7Exception { return (XON) super.removeRepetition(1, rep); } /** * Returns * PDC-2: "Country" - creates it if necessary */ public CE getCountry() { CE ret = null; try { Type t = this.getField(2, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PDC-2: "Country" - creates it if necessary */ public CE getPdc2_Country() { CE ret = null; try { Type t = this.getField(2, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PDC-3: "Brand Name" - creates it if necessary */ public ST getBrandName() { ST ret = null; try { Type t = this.getField(3, 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 * PDC-3: "Brand Name" - creates it if necessary */ public ST getPdc3_BrandName() { ST ret = null; try { Type t = this.getField(3, 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 * PDC-4: "Device Family Name" - creates it if necessary */ public ST getDeviceFamilyName() { ST ret = null; try { Type t = this.getField(4, 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 * PDC-4: "Device Family Name" - creates it if necessary */ public ST getPdc4_DeviceFamilyName() { ST ret = null; try { Type t = this.getField(4, 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 * PDC-5: "Generic Name" - creates it if necessary */ public CE getGenericName() { CE ret = null; try { Type t = this.getField(5, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PDC-5: "Generic Name" - creates it if necessary */ public CE getPdc5_GenericName() { CE ret = null; try { Type t = this.getField(5, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Model Identifier (PDC-6). */ public ST[] getModelIdentifier() { 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 Model Identifier (PDC-6). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getModelIdentifierReps() { 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 * PDC-6: "Model Identifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getModelIdentifier(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 * PDC-6: "Model Identifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getPdc6_ModelIdentifier(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 Model Identifier (PDC-6). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPdc6_ModelIdentifierReps() { 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 * PDC-6: "Model Identifier" 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 insertModelIdentifier(int rep) throws HL7Exception { return (ST) super.insertRepetition(6, rep); } /** * Inserts a repetition of * PDC-6: "Model Identifier" 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 insertPdc6_ModelIdentifier(int rep) throws HL7Exception { return (ST) super.insertRepetition(6, rep); } /** * Removes a repetition of * PDC-6: "Model Identifier" 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 removeModelIdentifier(int rep) throws HL7Exception { return (ST) super.removeRepetition(6, rep); } /** * Removes a repetition of * PDC-6: "Model Identifier" 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 removePdc6_ModelIdentifier(int rep) throws HL7Exception { return (ST) super.removeRepetition(6, rep); } /** * Returns * PDC-7: "Catalogue Identifier" - creates it if necessary */ public ST getCatalogueIdentifier() { ST ret = null; try { Type t = this.getField(7, 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 * PDC-7: "Catalogue Identifier" - creates it if necessary */ public ST getPdc7_CatalogueIdentifier() { ST ret = null; try { Type t = this.getField(7, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Other Identifier (PDC-8). */ public ST[] getOtherIdentifier() { ST[] ret = null; try { Type[] t = this.getField(8); 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 Other Identifier (PDC-8). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getOtherIdentifierReps() { ST[] 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 * PDC-8: "Other Identifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getOtherIdentifier(int rep) { ST ret = null; try { Type t = this.getField(8, 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 * PDC-8: "Other Identifier" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getPdc8_OtherIdentifier(int rep) { ST ret = null; try { Type t = this.getField(8, 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 Other Identifier (PDC-8). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPdc8_OtherIdentifierReps() { ST[] 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 * PDC-8: "Other Identifier" 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 insertOtherIdentifier(int rep) throws HL7Exception { return (ST) super.insertRepetition(8, rep); } /** * Inserts a repetition of * PDC-8: "Other Identifier" 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 insertPdc8_OtherIdentifier(int rep) throws HL7Exception { return (ST) super.insertRepetition(8, rep); } /** * Removes a repetition of * PDC-8: "Other Identifier" 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 removeOtherIdentifier(int rep) throws HL7Exception { return (ST) super.removeRepetition(8, rep); } /** * Removes a repetition of * PDC-8: "Other Identifier" 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 removePdc8_OtherIdentifier(int rep) throws HL7Exception { return (ST) super.removeRepetition(8, rep); } /** * Returns * PDC-9: "Product Code" - creates it if necessary */ public CE getProductCode() { CE ret = null; try { Type t = this.getField(9, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PDC-9: "Product Code" - creates it if necessary */ public CE getPdc9_ProductCode() { CE ret = null; try { Type t = this.getField(9, 0); ret = (CE)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PDC-10: "Marketing Basis" - creates it if necessary */ public ID getMarketingBasis() { ID ret = null; try { Type t = this.getField(10, 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 * PDC-10: "Marketing Basis" - creates it if necessary */ public ID getPdc10_MarketingBasis() { ID ret = null; try { Type t = this.getField(10, 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 * PDC-11: "Marketing Approval ID" - creates it if necessary */ public ST getMarketingApprovalID() { ST ret = null; try { Type t = this.getField(11, 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 * PDC-11: "Marketing Approval ID" - creates it if necessary */ public ST getPdc11_MarketingApprovalID() { ST ret = null; try { Type t = this.getField(11, 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 * PDC-12: "Labeled Shelf Life" - creates it if necessary */ public CQ getLabeledShelfLife() { CQ ret = null; try { Type t = this.getField(12, 0); ret = (CQ)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 * PDC-12: "Labeled Shelf Life" - creates it if necessary */ public CQ getPdc12_LabeledShelfLife() { CQ ret = null; try { Type t = this.getField(12, 0); ret = (CQ)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 * PDC-13: "Expected Shelf Life" - creates it if necessary */ public CQ getExpectedShelfLife() { CQ ret = null; try { Type t = this.getField(13, 0); ret = (CQ)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 * PDC-13: "Expected Shelf Life" - creates it if necessary */ public CQ getPdc13_ExpectedShelfLife() { CQ ret = null; try { Type t = this.getField(13, 0); ret = (CQ)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 * PDC-14: "Date First Marketed" - creates it if necessary */ public TS getDateFirstMarketed() { TS ret = null; try { Type t = this.getField(14, 0); ret = (TS)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 * PDC-14: "Date First Marketed" - creates it if necessary */ public TS getPdc14_DateFirstMarketed() { TS ret = null; try { Type t = this.getField(14, 0); ret = (TS)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 * PDC-15: "Date Last Marketed" - creates it if necessary */ public TS getDateLastMarketed() { TS ret = null; try { Type t = this.getField(15, 0); ret = (TS)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 * PDC-15: "Date Last Marketed" - creates it if necessary */ public TS getPdc15_DateLastMarketed() { TS ret = null; try { Type t = this.getField(15, 0); ret = (TS)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 XON(getMessage()); case 1: return new CE(getMessage()); case 2: return new ST(getMessage()); case 3: return new ST(getMessage()); case 4: return new CE(getMessage()); case 5: return new ST(getMessage()); case 6: return new ST(getMessage()); case 7: return new ST(getMessage()); case 8: return new CE(getMessage()); case 9: return new ID(getMessage(), new Integer( 330 )); case 10: return new ST(getMessage()); case 11: return new CQ(getMessage()); case 12: return new CQ(getMessage()); case 13: return new TS(getMessage()); case 14: return new TS(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy