Example #1
0
        /// <summary>
        /// Converts an <see cref="EntityTelecomAddress"/> instance to an <see cref="NHapi.Model.V231.Datatype.XTN"/> instance.
        /// </summary>
        /// <param name="tel">The entity telecom address instance to be converted.</param>
        /// <param name="instance">The converted XTN instance.</param>
        public static void XTNFromTel(EntityTelecomAddress tel, NHapi.Model.V231.Datatype.XTN instance)
        {
            var v25Instance = new NHapi.Model.V25.Datatype.XTN(instance.Message);

            XTNFromTel(tel, v25Instance);

            for (var i = 0; i < v25Instance.Components.Length; i++)
            {
                if (v25Instance.Components[i] is AbstractPrimitive && i < instance.Components.Length)
                {
                    (instance.Components[i] as AbstractPrimitive).Value = (v25Instance.Components[i] as AbstractPrimitive).Value;
                }
            }
        }
Example #2
0
  ///<summary>
  /// Returns all repetitions of Insurance Co Phone Number (IN1-7).
   ///</summary>
  public XTN[] GetInsuranceCoPhoneNumber() {
     XTN[] ret = null;
    try {
        IType[] t = this.GetField(7);  
        ret = new XTN[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (XTN)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;
}