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

ca.uhn.hl7v2.model.v24.message.RTB_Knn 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.v24.message;

import ca.uhn.hl7v2.model.v24.group.*;
import ca.uhn.hl7v2.model.v24.segment.*;

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;

/**
 * 

Represents a RTB_Knn message structure (see chapter 5). This structure contains the * following elements:

*
    *
  • 1: MSH (Message Header)
  • *
  • 2: MSA (Message Acknowledgment)
  • *
  • 3: ERR (Error) optional
  • *
  • 4: QAK (Query Acknowledgment)
  • *
  • 5: QPD (Query Parameter Definition)
  • *
  • 6: DSC (Continuation Pointer) optional
  • *
*/ public class RTB_Knn extends AbstractMessage { /** * Creates a new RTB_Knn message with DefaultModelClassFactory. */ public RTB_Knn() { this(new DefaultModelClassFactory()); } /** * Creates a new RTB_Knn message with custom ModelClassFactory. */ public RTB_Knn(ModelClassFactory factory) { super(factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(MSH.class, true, false); this.add(MSA.class, true, false); this.add(ERR.class, false, false); this.add(QAK.class, true, false); this.add(QPD.class, true, false); this.add(DSC.class, false, false); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RTB_Knn - this is probably a bug in the source code generator.", e); } } /** * Returns "2.4" */ public String getVersion() { return "2.4"; } /** * Returns * MSH (Message Header) - creates it if necessary */ public MSH getMSH() { MSH ret = null; try { ret = (MSH)this.get("MSH"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e); throw new RuntimeException(e); } return ret; } /** * Returns * MSA (Message Acknowledgment) - creates it if necessary */ public MSA getMSA() { MSA ret = null; try { ret = (MSA)this.get("MSA"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e); throw new RuntimeException(e); } return ret; } /** * Returns * ERR (Error) - creates it if necessary */ public ERR getERR() { ERR ret = null; try { ret = (ERR)this.get("ERR"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e); throw new RuntimeException(e); } return ret; } /** * Returns * QAK (Query Acknowledgment) - creates it if necessary */ public QAK getQAK() { QAK ret = null; try { ret = (QAK)this.get("QAK"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e); throw new RuntimeException(e); } return ret; } /** * Returns * QPD (Query Parameter Definition) - creates it if necessary */ public QPD getQPD() { QPD ret = null; try { ret = (QPD)this.get("QPD"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e); throw new RuntimeException(e); } return ret; } /** * Returns * DSC (Continuation Pointer) - creates it if necessary */ public DSC getDSC() { DSC ret = null; try { ret = (DSC)this.get("DSC"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e); throw new RuntimeException(e); } return ret; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy