Ejemplo n.º 1
0
        public List <CalculatedMetric> CalculateMetric(List <CaseNotesRow> rows, MetricType type)
        {
            List <CalculatedMetric> metrics = new List <CalculatedMetric>();

            foreach (Metric metric in this.Metrics)
            {
                CalculatedMetric cMetric = new CalculatedMetric();
                foreach (CaseNotesRow row in rows)
                {
                    if (row.EntryContent.Contains(metric.StartingValue) && metric.Type == type)
                    {
                        cMetric.StartValue = row.EntryDateTime.Value;
                    }

                    if (row.EntryContent.Contains(metric.EndingValue) && metric.Type == type)
                    {
                        cMetric.EndValue = row.EntryDateTime.Value;
                    }

                    metrics.Add(cMetric);
                }
            }

            return(metrics);
        }
Ejemplo n.º 2
0
        public List <CalculatedMetric> CalculateMetrics(Metric metric)
        {
            List <CalculatedMetric> metrics = new List <CalculatedMetric>();

            foreach (CaseNotesRow row in this.Rows)
            {
                CalculatedMetric cMetric = new CalculatedMetric();
                if (row.EntryContent.Contains(metric.StartingValue))
                {
                    cMetric.StartValue = row.EntryDateTime.Value;
                }
                if (row.EntryContent.Contains(metric.EndingValue))
                {
                    cMetric.EndValue = row.EntryDateTime.Value;
                }

                metrics.Add(cMetric);
            }

            return(metrics);
        }