001    package org.vmdb.hl7;
002    
003    /**
004     * <p><Title:> Query Parameter Definition (QPD) 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 QPDSegment extends HL7Segment {
015       private String sNm = "QPD";
016       private String sRl = "DT CE[ST][{*}]";
017    
018       public QPDSegment() {
019          setName( sNm );
020          setRule( sRl );
021       }
022    
023       public QPDSegment( HL7SegmentContainer msgParent ) {
024          super( msgParent );
025          setName( sNm );
026          setRule( sRl );
027       }
028    
029       public void setQueryName( String sCode, String sText, String sSystem ) {
030          CEElement ceObsId = new CEElement( sCode, sText, sSystem );
031          try {
032             setField( ceObsId, 1 );
033          }
034          catch( ArrayIndexOutOfBoundsException ae ) {
035             ae.printStackTrace();
036          }
037          catch( MalformedSegmentException mfe ) {
038             mfe.printStackTrace();
039          }
040       }
041    
042       public void setQueryName( CEElement ceObsId ) {
043          try {
044             setField( ceObsId, 1 );
045          }
046          catch( ArrayIndexOutOfBoundsException ae ) {
047             ae.printStackTrace();
048          }
049          catch( MalformedSegmentException mfe ) {
050             mfe.printStackTrace();
051          }
052       }
053    
054       public CEElement getQueryName() { return (CEElement)getField(1); }
055    
056    } // End class MSASegment
057