Пример #1
0
	/**
	* Returns a single repetition of Batch Totals(BTS-3).
	* @param rep the repetition number (this is a repeating field)
	* @throws HL7Exception if the repetition number is invalid.
	*/
	public CM_BATCH_TOTAL getBatchTotals(int rep)
	{
			CM_BATCH_TOTAL ret = null;
			try
			{
			Type t = this.getField(3, rep);
				ret = (CM_BATCH_TOTAL)t;
		} catch (System.Exception ex) {
			HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", ex);
				throw new System.Exception("An unexpected error ocurred", ex);
    }
			return ret;
  }
Пример #2
0
        /// <summary> Returns a single repetition of Batch Totals (BTS-3).</summary>
        /// <param name="rep">the repetition number (this is a repeating field)
        /// </param>
        /// <throws>  HL7Exception if the repetition number is invalid. </throws>
        public virtual CM_BATCH_TOTAL getBatchTotals(int rep)
        {
            CM_BATCH_TOTAL ret = null;

            try
            {
                Type t = this.getField(3, rep);
                ret = (CM_BATCH_TOTAL)t;
            }
            catch (System.InvalidCastException)
            {
                throw new Exception();
            }
            return(ret);
        }
Пример #3
0
  /**
   * Returns all repetitions of Batch Totals (BTS-3).
   */
  public CM_BATCH_TOTAL[] getBatchTotals() {
     CM_BATCH_TOTAL[] ret = null;
    try {
        Type[] t = this.getField(3);  
        ret = new CM_BATCH_TOTAL[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (CM_BATCH_TOTAL)t[i];
        }
    } catch (HL7Exception he) {
        HapiLogFactory.getHapiLog(this.GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } catch (System.Exception cce) {
        HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
        throw new System.Exception("An unexpected error ocurred", cce);
  }
 return ret;
}
Пример #4
0
 /// <summary> Returns all repetitions of Batch Totals (BTS-3).</summary>
 public virtual CM_BATCH_TOTAL[] getBatchTotals()
 {
     CM_BATCH_TOTAL[] ret = null;
     try
     {
         Type[] t = this.getField(3);
         ret = new CM_BATCH_TOTAL[t.Length];
         for (int i = 0; i < ret.Length; i++)
         {
             ret[i] = (CM_BATCH_TOTAL)t[i];
         }
     }
     catch (System.InvalidCastException)
     {
         throw new Exception();
     }
     catch (NuGenHL7Exception)
     {
         throw new Exception();
     }
     return(ret);
 }