/// <summary>
        /// Gets the list of items to show in the table, according to the specifed first and max items.
        /// </summary>
        /// <returns></returns>
        protected override IList <PatientProfileSummary> ListItems(TextQueryRequest request)
        {
            // don't execute an open query (it will just return TooManyMatches)
            if (string.IsNullOrEmpty(_searchString))
            {
                return(new List <PatientProfileSummary>());
            }

            TextQueryResponse <PatientProfileSummary> response = null;

            Platform.GetService <IRegistrationWorkflowService>(
                service =>
            {
                request.TextQuery            = _searchString;
                request.SpecificityThreshold = PatientProfileLookupSettings.Default.QuerySpecificityThreshold;
                response = service.PatientProfileTextQuery(request);
            });

            if (response.TooManyMatches)
            {
                throw new WeakSearchCriteriaException();
            }

            return(response.Matches);
        }
        public void Search()
        {
            try
            {
                _profileTable.Items.Clear();

                TextQueryResponse <PatientProfileSummary> response = null;

                Platform.GetService(
                    delegate(IRegistrationWorkflowService service)
                {
                    var request                  = new TextQueryRequest();
                    request.TextQuery            = _searchString;
                    request.SpecificityThreshold = PatientSearchComponentSettings.Default.SearchCriteriaSpecificityThreshold;
                    response = service.PatientProfileTextQuery(request);
                });

                if (response.TooManyMatches)
                {
                    throw new WeakSearchCriteriaException();
                }

                _profileTable.Items.AddRange(response.Matches);
                this.SelectedProfile = new Selection(_profileTable.Items.Count > 0 ? _profileTable.Items[0] : null);

                if (_profileTable.Items.Count == 0)
                {
                    this.Host.DesktopWindow.ShowMessageBox(SR.MessageResultsNotFound, MessageBoxActions.Ok);
                }
            }
            catch (Exception e)
            {
                ExceptionHandler.Report(e, this.Host.DesktopWindow);
            }
        }
Exemplo n.º 3
0
        public SS13Status(TextQueryResponse query)
        {
            var parsedQuery = HttpUtility.ParseQueryString(HttpUtility.HtmlDecode(query.ToString()));

            this.Version      = parsedQuery["version"];
            this.Mode         = parsedQuery["mode"];
            this.Respawn      = parsedQuery["respawn"];
            this.Enter        = parsedQuery["enter"];
            this.Vote         = Parse(parsedQuery["vote"]);
            this.AI           = Parse(parsedQuery["ai"]);
            this.Host         = parsedQuery["host"];
            this.RoundID      = parsedQuery["round_id"];
            this.Players      = Parse(parsedQuery["players"]);
            this.Revision     = parsedQuery["revision"];
            this.RevisionDate = parsedQuery["revision_date"];
            this.HUB          = Parse(parsedQuery["hub"]);
            this.Admins       = Parse(parsedQuery["admins"]);
            this.GameState    = Parse(parsedQuery["gamestate"]);
            this.StationName  = parsedQuery["station_name"];
            this.ShuttleMode  = parsedQuery["shuttle_mode"];
            this.ShuttleTime  = Parse(parsedQuery["shuttle_time"]);
            this.Elapsed      = Parse(parsedQuery["elapsed"]);
            this.MapName      = parsedQuery["map_name"];
            FillPlayers(parsedQuery);
        }
Exemplo n.º 4
0
        protected override TextQueryResponse <ProcedureTypeSummary> DoQuery(TextQueryRequest request)
        {
            TextQueryResponse <ProcedureTypeSummary> response = null;

            Platform.GetService <IProcedureTypeAdminService>(
                service => response = service.TextQuery(request));
            return(response);
        }
        protected override TextQueryResponse <StaffGroupSummary> DoQuery(StaffGroupTextQueryRequest request)
        {
            request.ElectiveGroupsOnly = _electiveGroupsOnly;

            TextQueryResponse <StaffGroupSummary> response = null;

            Platform.GetService <IStaffGroupAdminService>(
                service => response = service.TextQuery(request));
            return(response);
        }
        protected override TextQueryResponse <ExternalPractitionerSummary> DoQuery(TextQueryRequest request)
        {
            TextQueryResponse <ExternalPractitionerSummary> response = null;

            Platform.GetService <IExternalPractitionerAdminService>(
                delegate(IExternalPractitionerAdminService service)
            {
                response = service.TextQuery(request);
            });
            return(response);
        }
        protected override TextQueryResponse <DiagnosticServiceSummary> DoQuery(TextQueryRequest request)
        {
            TextQueryResponse <DiagnosticServiceSummary> response = null;

            Platform.GetService <IDiagnosticServiceAdminService>(
                delegate(IDiagnosticServiceAdminService service)
            {
                response = service.TextQuery(request);
            });
            return(response);
        }
		protected override TextQueryResponse<PatientProfileSummary> DoQuery(TextQueryRequest request)
		{
			TextQueryResponse<PatientProfileSummary> response = null;

			Platform.GetService(
				delegate(IRegistrationWorkflowService service)
				{
					response = service.PatientProfileTextQuery(request);
				});

			return response;
		}
Exemplo n.º 9
0
        protected override TextQueryResponse <StaffSummary> DoQuery(StaffTextQueryRequest request)
        {
            if (_staffTypesFilter != null && _staffTypesFilter.Length > 0)
            {
                request.StaffTypesFilter = _staffTypesFilter;
            }

            TextQueryResponse <StaffSummary> response = null;

            Platform.GetService <IStaffAdminService>(
                service => response = service.TextQuery(request));
            return(response);
        }
        protected override TextQueryResponse <ExternalPractitionerSummary> DoQuery(ExternalPractitionerSearchParams query, int specificityThreshold)
        {
            TextQueryResponse <ExternalPractitionerSummary> response = null;

            Platform.GetService(
                delegate(IExternalPractitionerAdminService service)
            {
                var request = new TextQueryRequest {
                    TextQuery = query.TextSearch, SpecificityThreshold = specificityThreshold
                };
                response = service.TextQuery(request);
            });

            return(response);
        }
Exemplo n.º 11
0
        protected static TextQueryResponse <TItem> DoQueryCore(WorklistSearchParams query, int specificityThreshold, WorklistItemTextQueryOptions options, string procedureStepClassName)
        {
            TextQueryResponse <TItem> response = null;

            var request = new WorklistItemTextQueryRequest(
                query.TextSearch, specificityThreshold, procedureStepClassName, options);

            if (query.UseAdvancedSearch)
            {
                request.UseAdvancedSearch = query.UseAdvancedSearch;
                request.SearchFields      = query.SearchFields;
            }

            Platform.GetService <TWorklistService>(
                service => response = service.SearchWorklists(request));

            return(response);
        }
Exemplo n.º 12
0
        protected bool ResolveNameHelper(string query, int specificityThreshold, out TSummary[] results)
        {
            if (!string.IsNullOrEmpty(query) && query.Trim().Length >= _minQueryStringLength)
            {
                TRequest request = new TRequest();
                request.TextQuery            = query;
                request.SpecificityThreshold = specificityThreshold;
                request.IncludeDeactivated   = this.IncludeDeactivatedItems;

                TextQueryResponse <TSummary> response = DoQuery(request);
                if (!response.TooManyMatches)
                {
                    results = new TSummary[response.Matches.Count];
                    response.Matches.CopyTo(results);
                    return(true);
                }
            }

            // too many matches
            results = new TSummary[] {};
            return(false);
        }