コード例 #1
0
        void fillRdfSegment(RDF rdf, string[][] fieldDefs)
        {
            rdf.NumberOfColumnsPerRow.Value = fieldDefs.Length.ToString();

            for (int i = 0; i < fieldDefs.Length; i++)
            {
                RCD rcd = rdf.GetColumnDescription(i);
                rcd.SegmentFieldName.Value   = fieldDefs[i][0];
                rcd.HL7DateType.Value        = fieldDefs[i][1];
                rcd.MaximumColumnWidth.Value = fieldDefs[i][2];
            }
        }
コード例 #2
0
        ///<summary>
        /// Returns a single repetition of Column Description(RDF-2).
        /// throws HL7Exception if the repetition number is invalid.
        /// <param name="rep">The repetition number (this is a repeating field)</param>
        ///</summary>
        public RCD GetColumnDescription(int rep)
        {
            RCD ret = null;

            try
            {
                IType t = this.GetField(2, rep);
                ret = (RCD)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);
        }
コード例 #3
0
ファイル: RDF.cs プロジェクト: carlhuth/GenXSource
        /// <summary> Returns a single repetition of Column Description (RDF-2).</summary>
        /// <param name="rep">the repetition number (this is a repeating field)
        /// </param>
        /// <throws>  HL7Exception if the repetition number is invalid. </throws>
        public virtual RCD getColumnDescription(int rep)
        {
            RCD ret = null;

            try
            {
                Type t = this.getField(2, rep);
                ret = (RCD)t;
            }
            catch (System.InvalidCastException)
            {
                throw new Exception();
            }
            return(ret);
        }
コード例 #4
0
 ///<summary>
 /// Returns all repetitions of Column Description (RDF-2).
 ///</summary>
 public RCD[] GetColumnDescription()
 {
     RCD[] ret = null;
     try {
         IType[] t = this.GetField(2);
         ret = new RCD[t.Length];
         for (int i = 0; i < ret.Length; i++)
         {
             ret[i] = (RCD)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);
 }
コード例 #5
0
ファイル: RDF.cs プロジェクト: carlhuth/GenXSource
 /// <summary> Returns all repetitions of Column Description (RDF-2).</summary>
 public virtual RCD[] getColumnDescription()
 {
     RCD[] ret = null;
     try
     {
         Type[] t = this.getField(2);
         ret = new RCD[t.Length];
         for (int i = 0; i < ret.Length; i++)
         {
             ret[i] = (RCD)t[i];
         }
     }
     catch (System.InvalidCastException)
     {
         throw new Exception();
     }
     catch (NuGenHL7Exception)
     {
         throw new Exception();
     }
     return(ret);
 }