///<summary> /// Creates a TQ. /// <param name="message">The Message to which this Type belongs</param> /// <param name="description">The description of this type</param> ///</summary> public TQ(IMessage message, string description) : base(message, description){ data = new IType[12]; data[0] = new CQ(message,"Quantity"); data[1] = new RI(message,"Interval"); data[2] = new ST(message,"Duration"); data[3] = new TS(message,"Start Date/Time"); data[4] = new TS(message,"End Date/Time"); data[5] = new ST(message,"Priority"); data[6] = new ST(message,"Condition"); data[7] = new TX(message,"Text"); data[8] = new ID(message, 472,"Conjunction"); data[9] = new OSD(message,"Order Sequencing"); data[10] = new CE(message,"Occurrence Duration"); data[11] = new NM(message,"Total Occurrences"); }
///<summary> /// Returns all repetitions of Relative Time and Units (TQ1-5). ///</summary> public CQ[] GetRelativeTimeAndUnits() { CQ[] ret = null; try { IType[] t = this.GetField(5); ret = new CQ[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CQ)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; }