Esempio n. 1
0
        public HashSet <long?> LookupIngredientLevel(long conceptId)
        {
            if (conceptId == 0 || ingredientLevel == null)
            {
                return new HashSet <long?> {
                           conceptId
                }
            }
            ;

            var ingredientLevelConceptIds = ingredientLevel.MultiLookupValue(conceptId.ToString(), null, false).ToList();

            if (ingredientLevelConceptIds.Count == 1 && ingredientLevelConceptIds[0].ConceptId == 0)
            {
                return(new HashSet <long?> {
                    conceptId
                });
            }

            return(ingredientLevelConceptIds.Select(i => i.ConceptId).ToHashSet());
        }