///<summary> /// Creates a XTN. /// <param name="message">The Message to which this Type belongs</param> /// <param name="description">The description of this type</param> ///</summary> public XTN(IMessage message, string description) : base(message, description){ data = new IType[9]; data[0] = new TN(message,"[(999)] 999-9999 [X99999][C any text]"); data[1] = new ID(message, 0,"Telecommunication use code"); data[2] = new ID(message, 0,"Telecommunication equipment type (ID)"); data[3] = new ST(message,"Email address"); data[4] = new NM(message,"Country Code"); data[5] = new NM(message,"Area/city code"); data[6] = new NM(message,"Phone number"); data[7] = new NM(message,"Extension"); data[8] = new ST(message,"Any text"); }
/// <summary> Creates a XTN. </summary> /// /// <param name="message"> The Message to which this Type belongs. </param> /// <param name="description"> The description of this type. </param> public XTN(IMessage message, string description) : base(message, description) { data = new IType[9]; data[0] = new TN(message, "[(999)] 999-9999 [X99999][C any text]"); data[1] = new ID(message, 0, "Telecommunication use code"); data[2] = new ID(message, 0, "Telecommunication equipment type (ID)"); data[3] = new ST(message, "Email address"); data[4] = new NM(message, "Country Code"); data[5] = new NM(message, "Area/city code"); data[6] = new NM(message, "Phone number"); data[7] = new NM(message, "Extension"); data[8] = new ST(message, "Any text"); }
///<summary> /// Returns all repetitions of Phone (STF-10). ///</summary> public TN[] GetPhone() { TN[] ret = null; try { IType[] t = this.GetField(10); ret = new TN[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (TN)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; }
/// <summary> /// Returns all repetitions of Phone Number - Business (PID-14). /// /// </summary> public TN[] GetPhoneNumberBusiness() { TN[] tnArray; try { IType[] field = this.GetField(14); tnArray = new TN[field.Length]; for (int index = 0; index < tnArray.Length; ++index) tnArray[index] = (TN) 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 tnArray; }