Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2009 the original author or authors.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *     
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package org.openehealth.ipf.commons.ihe.hl7v2.definitions.pdq.v25.message;
 
 import java.util.Map;
 
Represents a RSP_ZV2 message structure as described in ITI TF Vol. 2a, pp. 219-220.

This structure contains the following elements:

0: MSH (Message Header)
1: MSA (Message Acknowledgment)
2: ERR (Error) optional
3: QAK (Query Acknowledgment)
4: QPD (Query Parameter Definition)
5: RSP_ZV2_QUERY_RESPONSE (a Group object) optional repeating
6: DSC (Continuation Pointer) optional
 
 @SuppressWarnings("serial")
 public class RSP_ZV2 extends AbstractMessage {

    
Creates a new RSP_ZV2 Group with custom ModelClassFactory.
 
     public RSP_ZV2(ModelClassFactory factory) {
         super(factory);
     }

    
Creates a new RSP_ZV2 Group with DefaultModelClassFactory.
 
     public RSP_ZV2() {
         super();
     }
 
     @Override
     protected Map<Class<? extends Structure>, Cardinalitystructures(
              Map<Class<? extends Structure>, Cardinalitys) {
         s.put(MSH.class.);
         s.put(MSA.class.);
         s.put(ERR.class.);
         s.put(QAK.class.);
         s.put(QPD.class.);
         s.put(DSC.class.);
         return s;
     }
 
     public String getVersion() {
         return "2.5";
     }

    
Returns MSH (Message Header) - creates it if necessary
 
     public MSH getMSH() {
         return getTyped("MSH"MSH.class);
     }

    
Returns MSA (Message Acknowledgment) - creates it if necessary
 
     public MSA getMSA() {
         return getTyped("MSA"MSA.class);
     }

    
Returns ERR (Error) - creates it if necessary
 
     public ERR getERR() {
         return getTyped("ERR"ERR.class);
     }

    
Returns QAK (Query Acknowledgment) - creates it if necessary
 
     public QAK getQAK() {
        return getTyped("QAK"QAK.class);
    }

    
Returns QPD (Query Parameter Definition) - creates it if necessary
    public QPD getQPD() {
        return getTyped("QPD"QPD.class);
    }

    
Returns first repetition of RSP_ZV2_QUERY_RESPONSE (a Group object) - creates it if necessary
        return getTyped("QUERY_RESPONSE"RSP_ZV2_QUERY_RESPONSE.class);
    }

    
Returns a specific repetition of RSP_ZV2_QUERY_RESPONSE (a Group object) - creates it if necessary throws HL7Exception if the repetition requested is more than one greater than the number of existing repetitions.
    public RSP_ZV2_QUERY_RESPONSE getQUERY_RESPONSE(int repthrows HL7Exception {
        return getTyped("QUERY_RESPONSE"repRSP_ZV2_QUERY_RESPONSE.class);
    }

    
Returns the number of existing repetitions of RSP_ZV2_QUERY_RESPONSE
    public int getQUERY_RESPONSEReps() {
        return getReps("QUERY_RESPONSE");
    }

    
Returns all repetitions of RSP_ZV2_QUERY_RESPONSE
        return getAllAsList("QUERY_RESPONSE"RSP_ZV2_QUERY_RESPONSE.class);
    }

    
Returns DSC (Continuation Pointer) - creates it if necessary
    public DSC getDSC() {
        return getTyped("DSC"DSC.class);
    }
New to GrepCode? Check out our FAQ X