Example #1
0
        /// <summary>
        /// Allows to use a ConceptTemplate for extracting datatables of values from an entity.
        /// This function returns columns from all the indicators found in all applicable rules
        /// </summary>
        /// <param name="entity">the entity of interest</param>
        /// <param name="template">the ConceptTemplate to apply</param>
        /// <returns></returns>
        public DataTable GetData(IPersistEntity entity, ConceptTemplate template)
        {
            // todo: there's no filter of the applicability of the template to the entity in the GetData function
            var allRules      = template.GetRecursiveRuleIds().Distinct();
            var allIndicators = allRules.Select(rule => new DataIndicator(rule)).ToList();

            return(GetData(entity, template, allIndicators));
        }