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

ca.uhn.hl7v2.model.v25.segment.PCR 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 PCR message segment (Possible Causal Relationship). * This segment has the following fields:

*
    *
  • PCR-1: Implicated Product (CE) *
  • PCR-2: Generic Product (IS) optional *
  • PCR-3: Product Class (CE) optional *
  • PCR-4: Total Duration Of Therapy (CQ) optional *
  • PCR-5: Product Manufacture Date (TS) optional *
  • PCR-6: Product Expiration Date (TS) optional *
  • PCR-7: Product Implantation Date (TS) optional *
  • PCR-8: Product Explantation Date (TS) optional *
  • PCR-9: Single Use Device (IS) optional *
  • PCR-10: Indication For Product Use (CE) optional *
  • PCR-11: Product Problem (IS) optional *
  • PCR-12: Product Serial/Lot Number (ST) optional repeating *
  • PCR-13: Product Available For Inspection (IS) optional *
  • PCR-14: Product Evaluation Performed (CE) optional *
  • PCR-15: Product Evaluation Status (CE) optional *
  • PCR-16: Product Evaluation Results (CE) optional *
  • PCR-17: Evaluated Product Source (ID) optional *
  • PCR-18: Date Product Returned To Manufacturer (TS) optional *
  • PCR-19: Device Operator Qualifications (ID) optional *
  • PCR-20: Relatedness Assessment (ID) optional *
  • PCR-21: Action Taken In Response To The Event (ID) optional repeating *
  • PCR-22: Event Causality Observations (ID) optional repeating *
  • PCR-23: Indirect Exposure Mechanism (ID) optional repeating *
*/ public class PCR extends AbstractSegment { /** * Creates a new PCR segment */ public PCR(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(CE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Implicated Product"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Generic Product"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Product Class"); this.add(CQ.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Total Duration Of Therapy"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Product Manufacture Date"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Product Expiration Date"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Product Implantation Date"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Product Explantation Date"); this.add(IS.class, false, 1, 8, new Object[]{ getMessage() }, "Single Use Device"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Indication For Product Use"); this.add(IS.class, false, 1, 8, new Object[]{ getMessage() }, "Product Problem"); this.add(ST.class, false, 0, 30, new Object[]{ getMessage(), new Integer(0) }, "Product Serial/Lot Number"); this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Product Available For Inspection"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Product Evaluation Performed"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(247) }, "Product Evaluation Status"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Product Evaluation Results"); this.add(ID.class, false, 1, 8, new Object[]{ getMessage() }, "Evaluated Product Source"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date Product Returned To Manufacturer"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Device Operator Qualifications"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Relatedness Assessment"); this.add(ID.class, false, 0, 2, new Object[]{ getMessage() }, "Action Taken In Response To The Event"); this.add(ID.class, false, 0, 2, new Object[]{ getMessage() }, "Event Causality Observations"); this.add(ID.class, false, 0, 1, new Object[]{ getMessage() }, "Indirect Exposure Mechanism"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating PCR - this is probably a bug in the source code generator.", e); } } /** * Returns * PCR-1: "Implicated Product" - creates it if necessary */ public CE getImplicatedProduct() { CE ret = null; try { Type t = this.getField(1, 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 * PCR-1: "Implicated Product" - creates it if necessary */ public CE getPcr1_ImplicatedProduct() { CE ret = null; try { Type t = this.getField(1, 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 * PCR-2: "Generic Product" - creates it if necessary */ public IS getGenericProduct() { IS ret = null; try { Type t = this.getField(2, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PCR-2: "Generic Product" - creates it if necessary */ public IS getPcr2_GenericProduct() { IS ret = null; try { Type t = this.getField(2, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PCR-3: "Product Class" - creates it if necessary */ public CE getProductClass() { CE ret = null; try { Type t = this.getField(3, 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 * PCR-3: "Product Class" - creates it if necessary */ public CE getPcr3_ProductClass() { CE ret = null; try { Type t = this.getField(3, 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 * PCR-4: "Total Duration Of Therapy" - creates it if necessary */ public CQ getTotalDurationOfTherapy() { CQ ret = null; try { Type t = this.getField(4, 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 * PCR-4: "Total Duration Of Therapy" - creates it if necessary */ public CQ getPcr4_TotalDurationOfTherapy() { CQ ret = null; try { Type t = this.getField(4, 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 * PCR-5: "Product Manufacture Date" - creates it if necessary */ public TS getProductManufactureDate() { TS ret = null; try { Type t = this.getField(5, 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 * PCR-5: "Product Manufacture Date" - creates it if necessary */ public TS getPcr5_ProductManufactureDate() { TS ret = null; try { Type t = this.getField(5, 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 * PCR-6: "Product Expiration Date" - creates it if necessary */ public TS getProductExpirationDate() { TS ret = null; try { Type t = this.getField(6, 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 * PCR-6: "Product Expiration Date" - creates it if necessary */ public TS getPcr6_ProductExpirationDate() { TS ret = null; try { Type t = this.getField(6, 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 * PCR-7: "Product Implantation Date" - creates it if necessary */ public TS getProductImplantationDate() { TS ret = null; try { Type t = this.getField(7, 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 * PCR-7: "Product Implantation Date" - creates it if necessary */ public TS getPcr7_ProductImplantationDate() { TS ret = null; try { Type t = this.getField(7, 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 * PCR-8: "Product Explantation Date" - creates it if necessary */ public TS getProductExplantationDate() { TS ret = null; try { Type t = this.getField(8, 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 * PCR-8: "Product Explantation Date" - creates it if necessary */ public TS getPcr8_ProductExplantationDate() { TS ret = null; try { Type t = this.getField(8, 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 * PCR-9: "Single Use Device" - creates it if necessary */ public IS getSingleUseDevice() { IS ret = null; try { Type t = this.getField(9, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PCR-9: "Single Use Device" - creates it if necessary */ public IS getPcr9_SingleUseDevice() { IS ret = null; try { Type t = this.getField(9, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PCR-10: "Indication For Product Use" - creates it if necessary */ public CE getIndicationForProductUse() { CE ret = null; try { Type t = this.getField(10, 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 * PCR-10: "Indication For Product Use" - creates it if necessary */ public CE getPcr10_IndicationForProductUse() { CE ret = null; try { Type t = this.getField(10, 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 * PCR-11: "Product Problem" - creates it if necessary */ public IS getProductProblem() { IS ret = null; try { Type t = this.getField(11, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PCR-11: "Product Problem" - creates it if necessary */ public IS getPcr11_ProductProblem() { IS ret = null; try { Type t = this.getField(11, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Product Serial/Lot Number (PCR-12). */ public ST[] getProductSerialLotNumber() { ST[] ret = null; try { Type[] t = this.getField(12); 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 Product Serial/Lot Number (PCR-12). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getProductSerialLotNumberReps() { ST[] ret = null; try { Type[] t = this.getField(12); 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 * PCR-12: "Product Serial/Lot Number" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getProductSerialLotNumber(int rep) { ST ret = null; try { Type t = this.getField(12, 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 * PCR-12: "Product Serial/Lot Number" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getPcr12_ProductSerialLotNumber(int rep) { ST ret = null; try { Type t = this.getField(12, 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 Product Serial/Lot Number (PCR-12). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPcr12_ProductSerialLotNumberReps() { ST[] ret = null; try { Type[] t = this.getField(12); 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 * PCR-12: "Product Serial/Lot Number" 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 insertProductSerialLotNumber(int rep) throws HL7Exception { return (ST) super.insertRepetition(12, rep); } /** * Inserts a repetition of * PCR-12: "Product Serial/Lot Number" 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 insertPcr12_ProductSerialLotNumber(int rep) throws HL7Exception { return (ST) super.insertRepetition(12, rep); } /** * Removes a repetition of * PCR-12: "Product Serial/Lot Number" 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 removeProductSerialLotNumber(int rep) throws HL7Exception { return (ST) super.removeRepetition(12, rep); } /** * Removes a repetition of * PCR-12: "Product Serial/Lot Number" 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 removePcr12_ProductSerialLotNumber(int rep) throws HL7Exception { return (ST) super.removeRepetition(12, rep); } /** * Returns * PCR-13: "Product Available For Inspection" - creates it if necessary */ public IS getProductAvailableForInspection() { IS ret = null; try { Type t = this.getField(13, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PCR-13: "Product Available For Inspection" - creates it if necessary */ public IS getPcr13_ProductAvailableForInspection() { IS ret = null; try { Type t = this.getField(13, 0); ret = (IS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PCR-14: "Product Evaluation Performed" - creates it if necessary */ public CE getProductEvaluationPerformed() { CE ret = null; try { Type t = this.getField(14, 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 * PCR-14: "Product Evaluation Performed" - creates it if necessary */ public CE getPcr14_ProductEvaluationPerformed() { CE ret = null; try { Type t = this.getField(14, 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 * PCR-15: "Product Evaluation Status" - creates it if necessary */ public CE getProductEvaluationStatus() { CE ret = null; try { Type t = this.getField(15, 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 * PCR-15: "Product Evaluation Status" - creates it if necessary */ public CE getPcr15_ProductEvaluationStatus() { CE ret = null; try { Type t = this.getField(15, 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 * PCR-16: "Product Evaluation Results" - creates it if necessary */ public CE getProductEvaluationResults() { CE ret = null; try { Type t = this.getField(16, 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 * PCR-16: "Product Evaluation Results" - creates it if necessary */ public CE getPcr16_ProductEvaluationResults() { CE ret = null; try { Type t = this.getField(16, 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 * PCR-17: "Evaluated Product Source" - creates it if necessary */ public ID getEvaluatedProductSource() { ID ret = null; try { Type t = this.getField(17, 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 * PCR-17: "Evaluated Product Source" - creates it if necessary */ public ID getPcr17_EvaluatedProductSource() { ID ret = null; try { Type t = this.getField(17, 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 * PCR-18: "Date Product Returned To Manufacturer" - creates it if necessary */ public TS getDateProductReturnedToManufacturer() { TS ret = null; try { Type t = this.getField(18, 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 * PCR-18: "Date Product Returned To Manufacturer" - creates it if necessary */ public TS getPcr18_DateProductReturnedToManufacturer() { TS ret = null; try { Type t = this.getField(18, 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 * PCR-19: "Device Operator Qualifications" - creates it if necessary */ public ID getDeviceOperatorQualifications() { ID ret = null; try { Type t = this.getField(19, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PCR-19: "Device Operator Qualifications" - creates it if necessary */ public ID getPcr19_DeviceOperatorQualifications() { ID ret = null; try { Type t = this.getField(19, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * PCR-20: "Relatedness Assessment" - creates it if necessary */ public ID getRelatednessAssessment() { ID ret = null; try { Type t = this.getField(20, 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 * PCR-20: "Relatedness Assessment" - creates it if necessary */ public ID getPcr20_RelatednessAssessment() { ID ret = null; try { Type t = this.getField(20, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Action Taken In Response To The Event (PCR-21). */ public ID[] getActionTakenInResponseToTheEvent() { ID[] ret = null; try { Type[] t = this.getField(21); ret = new ID[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (ID)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 Action Taken In Response To The Event (PCR-21). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getActionTakenInResponseToTheEventReps() { ID[] ret = null; try { Type[] t = this.getField(21); 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 * PCR-21: "Action Taken In Response To The Event" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getActionTakenInResponseToTheEvent(int rep) { ID ret = null; try { Type t = this.getField(21, rep); 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 a specific repetition of * PCR-21: "Action Taken In Response To The Event" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getPcr21_ActionTakenInResponseToTheEvent(int rep) { ID ret = null; try { Type t = this.getField(21, rep); 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 a count of the current number of repetitions of Action Taken In Response To The Event (PCR-21). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPcr21_ActionTakenInResponseToTheEventReps() { ID[] ret = null; try { Type[] t = this.getField(21); 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 * PCR-21: "Action Taken In Response To The Event" 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 ID insertActionTakenInResponseToTheEvent(int rep) throws HL7Exception { return (ID) super.insertRepetition(21, rep); } /** * Inserts a repetition of * PCR-21: "Action Taken In Response To The Event" 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 ID insertPcr21_ActionTakenInResponseToTheEvent(int rep) throws HL7Exception { return (ID) super.insertRepetition(21, rep); } /** * Removes a repetition of * PCR-21: "Action Taken In Response To The Event" 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 ID removeActionTakenInResponseToTheEvent(int rep) throws HL7Exception { return (ID) super.removeRepetition(21, rep); } /** * Removes a repetition of * PCR-21: "Action Taken In Response To The Event" 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 ID removePcr21_ActionTakenInResponseToTheEvent(int rep) throws HL7Exception { return (ID) super.removeRepetition(21, rep); } /** * Returns all repetitions of Event Causality Observations (PCR-22). */ public ID[] getEventCausalityObservations() { ID[] ret = null; try { Type[] t = this.getField(22); ret = new ID[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (ID)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 Event Causality Observations (PCR-22). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getEventCausalityObservationsReps() { ID[] ret = null; try { Type[] t = this.getField(22); 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 * PCR-22: "Event Causality Observations" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getEventCausalityObservations(int rep) { ID ret = null; try { Type t = this.getField(22, rep); 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 a specific repetition of * PCR-22: "Event Causality Observations" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getPcr22_EventCausalityObservations(int rep) { ID ret = null; try { Type t = this.getField(22, rep); 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 a count of the current number of repetitions of Event Causality Observations (PCR-22). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPcr22_EventCausalityObservationsReps() { ID[] ret = null; try { Type[] t = this.getField(22); 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 * PCR-22: "Event Causality Observations" 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 ID insertEventCausalityObservations(int rep) throws HL7Exception { return (ID) super.insertRepetition(22, rep); } /** * Inserts a repetition of * PCR-22: "Event Causality Observations" 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 ID insertPcr22_EventCausalityObservations(int rep) throws HL7Exception { return (ID) super.insertRepetition(22, rep); } /** * Removes a repetition of * PCR-22: "Event Causality Observations" 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 ID removeEventCausalityObservations(int rep) throws HL7Exception { return (ID) super.removeRepetition(22, rep); } /** * Removes a repetition of * PCR-22: "Event Causality Observations" 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 ID removePcr22_EventCausalityObservations(int rep) throws HL7Exception { return (ID) super.removeRepetition(22, rep); } /** * Returns all repetitions of Indirect Exposure Mechanism (PCR-23). */ public ID[] getIndirectExposureMechanism() { ID[] ret = null; try { Type[] t = this.getField(23); ret = new ID[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (ID)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 Indirect Exposure Mechanism (PCR-23). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getIndirectExposureMechanismReps() { ID[] ret = null; try { Type[] t = this.getField(23); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * PCR-23: "Indirect Exposure Mechanism" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getIndirectExposureMechanism(int rep) { ID ret = null; try { Type t = this.getField(23, rep); 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 a specific repetition of * PCR-23: "Indirect Exposure Mechanism" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getPcr23_IndirectExposureMechanism(int rep) { ID ret = null; try { Type t = this.getField(23, rep); 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 a count of the current number of repetitions of Indirect Exposure Mechanism (PCR-23). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getPcr23_IndirectExposureMechanismReps() { ID[] ret = null; try { Type[] t = this.getField(23); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * PCR-23: "Indirect Exposure Mechanism" 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 ID insertIndirectExposureMechanism(int rep) throws HL7Exception { return (ID) super.insertRepetition(23, rep); } /** * Inserts a repetition of * PCR-23: "Indirect Exposure Mechanism" 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 ID insertPcr23_IndirectExposureMechanism(int rep) throws HL7Exception { return (ID) super.insertRepetition(23, rep); } /** * Removes a repetition of * PCR-23: "Indirect Exposure Mechanism" 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 ID removeIndirectExposureMechanism(int rep) throws HL7Exception { return (ID) super.removeRepetition(23, rep); } /** * Removes a repetition of * PCR-23: "Indirect Exposure Mechanism" 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 ID removePcr23_IndirectExposureMechanism(int rep) throws HL7Exception { return (ID) super.removeRepetition(23, rep); } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new CE(getMessage()); case 1: return new IS(getMessage(), new Integer( 249 )); case 2: return new CE(getMessage()); case 3: return new CQ(getMessage()); case 4: return new TS(getMessage()); case 5: return new TS(getMessage()); case 6: return new TS(getMessage()); case 7: return new TS(getMessage()); case 8: return new IS(getMessage(), new Integer( 244 )); case 9: return new CE(getMessage()); case 10: return new IS(getMessage(), new Integer( 245 )); case 11: return new ST(getMessage()); case 12: return new IS(getMessage(), new Integer( 246 )); case 13: return new CE(getMessage()); case 14: return new CE(getMessage()); case 15: return new CE(getMessage()); case 16: return new ID(getMessage(), new Integer( 248 )); case 17: return new TS(getMessage()); case 18: return new ID(getMessage(), new Integer( 242 )); case 19: return new ID(getMessage(), new Integer( 250 )); case 20: return new ID(getMessage(), new Integer( 251 )); case 21: return new ID(getMessage(), new Integer( 252 )); case 22: return new ID(getMessage(), new Integer( 253 )); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy