Example #1
0
        /// <summary>
        /// Gets an approximate count of the results that a search using the specified criteria would return.
        /// </summary>
        public bool EstimateSearchResultsCount(WorklistItemSearchArgs args, out int count)
        {
            var wisc = new SearchContext(this, args, null);
            IWorklistItemSearchExecutionStrategy strategy = new OptimizedWorklistItemSearchExecutionStrategy();

            return(strategy.EstimateSearchResultsCount(wisc, out count));
        }
Example #2
0
        /// <summary>
        /// Performs a search using the specified criteria.
        /// </summary>
        public IList <TItem> GetSearchResults <TItem>(WorklistItemSearchArgs args)
            where TItem : WorklistItem
        {
            var wisc = new SearchContext(this, args, typeof(TItem));
            IWorklistItemSearchExecutionStrategy strategy = new OptimizedWorklistItemSearchExecutionStrategy();
            var results = strategy.GetSearchResults(wisc);

            return(CollectionUtils.Map(results, (WorklistItem r) => (TItem)r));
        }
        protected override IList <TDomainItem> DoQuery(WorklistItemSearchCriteria[] where, SearchResultPage page)
        {
            var c          = (TextQueryCriteria)CollectionUtils.FirstElement(where);
            var searchArgs = new WorklistItemSearchArgs(
                _procedureStepClasses,
                where,
                _projection,
                c.IncludeDegeneratePatientItems,
                c.IncludeDegenerateProcedureItems);

            return(_broker.GetSearchResults <TDomainItem>(searchArgs));
        }
        protected override bool TestSpecificity(WorklistItemSearchCriteria[] where, int threshold)
        {
            var c          = (TextQueryCriteria)CollectionUtils.FirstElement(where);
            var searchArgs = new WorklistItemSearchArgs(
                _procedureStepClasses,
                where,
                _projection,
                c.IncludeDegeneratePatientItems,
                c.IncludeDegenerateProcedureItems,
                threshold);

            int count;

            return(_broker.EstimateSearchResultsCount(searchArgs, out count));
        }
Example #5
0
 public SearchContext(WorklistItemBrokerBase owner, WorklistItemSearchArgs args, Type worklistItemClass)
 {
     _owner             = owner;
     _args              = args;
     _worklistItemClass = worklistItemClass;
 }