001    package org.vmdb.hl7;
002    
003    /**
004     * <p><Title:> Query Parameter Definition (QAK) Segment. </p>
005     * <p>Description: HL7 Network Connectivity For VMDB. </p>
006     * <p>Copyright: Copyright (c) 2002-2003. </p>
007     * <p>Company: Veterinary Medical Database (VMDB). </p>
008     * <p>Use of this process has not yet been implemented in high level code.  See
009     * HL7 Standard Chapter 2 for details.</p>
010     * @author Michael K. Martin
011     * @version 1.0
012     */
013    
014    public class QAKSegment extends HL7Segment {
015       private String sNm = "QAK";
016       private String sRl = "DT [ST][ID][CE][NM][NM][NM]";
017    
018       public QAKSegment() {
019          setName( sNm );
020          setRule( sRl );
021       }
022    
023       public QAKSegment( HL7SegmentContainer msgParent ) {
024          super( msgParent );
025          setName( sNm );
026          setRule( sRl );
027       }
028    
029       public void setStatus( String sStatus ) {
030          try {
031             setField( sStatus, 1 );
032          }
033          catch( ArrayIndexOutOfBoundsException ae ) {
034             ae.printStackTrace();
035          }
036       }
037    
038       public String getStatus() {
039          try {
040             return getFieldValue( 1 );
041          }
042          catch( ArrayIndexOutOfBoundsException ae ) {
043             ae.printStackTrace();
044          }
045          return "";
046       }
047    
048       public void setQueryName( String sCode, String sText, String sSystem ) {
049          CEElement ceObsId = new CEElement( sCode, sText, sSystem );
050          try {
051             setField( ceObsId, 3 );
052          }
053          catch( ArrayIndexOutOfBoundsException ae ) {
054             ae.printStackTrace();
055          }
056          catch( MalformedSegmentException mfe ) {
057             mfe.printStackTrace();
058          }
059       }
060    
061       public void setQueryName( CEElement ceObsId ) {
062          try {
063             setField( ceObsId, 3 );
064          }
065          catch( ArrayIndexOutOfBoundsException ae ) {
066             ae.printStackTrace();
067          }
068          catch( MalformedSegmentException mfe ) {
069             mfe.printStackTrace();
070          }
071       }
072    
073       public CEElement getQueryName() { return (CEElement)getField(1); }
074    
075    } // End class MSASegment
076