Пример #1
0
        ///<summary>
        /// Returns a single repetition of Contact Identifiers(CTD-7).
        /// throws HL7Exception if the repetition number is invalid.
        /// <param name="rep">The repetition number (this is a repeating field)</param>
        ///</summary>
        public CM_PI GetContactIdentifiers(int rep)
        {
            CM_PI ret = null;

            try
            {
                IType t = this.GetField(7, rep);
                ret = (CM_PI)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 all repetitions of Contact Identifiers (CTD-7).
 ///</summary>
 public CM_PI[] GetContactIdentifiers()
 {
     CM_PI[] ret = null;
     try {
         IType[] t = this.GetField(7);
         ret = new CM_PI[t.Length];
         for (int i = 0; i < ret.Length; i++)
         {
             ret[i] = (CM_PI)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);
 }