예제 #1
0
파일: GT1.cs 프로젝트: liddictm/nHapi
  ///<summary>
  /// Returns all repetitions of Guarantor Employer Address (GT1-17).
   ///</summary>
  public XAD[] GetGuarantorEmployerAddress() {
     XAD[] ret = null;
    try {
        IType[] t = this.GetField(17);  
        ret = new XAD[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (XAD)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;
}
예제 #2
0
 /// <summary>
 /// Returns all repetitions of Patient Address (PID-11).
 /// 
 /// </summary>
 public XAD[] GetPatientAddress()
 {
   XAD[] xadArray;
   try
   {
     IType[] field = this.GetField(11);
     xadArray = new XAD[field.Length];
     for (int index = 0; index < xadArray.Length; ++index)
       xadArray[index] = (XAD) field[index];
   }
   catch (HL7Exception ex)
   {
     HapiLogFactory.GetHapiLog(this.GetType()).Error((object) "Unexpected problem obtaining field value.  This is a bug.", (Exception) ex);
     throw new Exception("An unexpected error ocurred", (Exception) ex);
   }
   catch (Exception ex)
   {
     HapiLogFactory.GetHapiLog(this.GetType()).Error((object) "Unexpected problem obtaining field value.  This is a bug.", ex);
     throw new Exception("An unexpected error ocurred", ex);
   }
   return xadArray;
 }