public override void Execute()
            {
                if (!base.CancelRequested)
                {
                    NBIASeries seriesService = new NBIASeries();

                    try
                    {
                        DataTable dtStudies = seriesService.getSeriesInfo(_queryParameters, SearchSettings.Default.NBIADataServiceUrl);
                        if (dtStudies != null)
                        {
                            Console.WriteLine("Project: " + dtStudies.Rows[0].ToString());
                            Dictionary <string, string> modalities = new Dictionary <string, string>();
                            foreach (DataRow row in dtStudies.Rows)
                            {
                                if (!string.IsNullOrEmpty(row["modality"].ToString().Trim()))
                                {
                                    modalities[row["modality"].ToString().Trim()] = string.Empty;
                                }
                            }
                            if (modalities.Count > 0)
                            {
                                _result.Series.Modality = StringUtilities.Combine(modalities.Keys, ",");

                                base.OnResultUpdated(_result);
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        Platform.Log(LogLevel.Error, ex, "Failed to query grid for Series data");
                    }
                }
                base.OnCommandExecuted();
            }
		private void TestNBIASeries(NBIATestParameters testParameters, string endPointUrl)
        {
            NBIASeries series = new NBIASeries();
			DataTable dataTable = series.getSeriesInfo(testParameters.NBIAQueryParameters, endPointUrl);
            Assert.IsNotNull(dataTable.Rows, "Rows null");
            Assert.IsTrue(dataTable.Rows.Count > 0, "Rows empty");
        }
Ejemplo n.º 3
0
        private void TestNBIASeries(NBIATestParameters testParameters, string endPointUrl)
        {
            NBIASeries series    = new NBIASeries();
            DataTable  dataTable = series.getSeriesInfo(testParameters.NBIAQueryParameters, endPointUrl);

            Assert.IsNotNull(dataTable.Rows, "Rows null");
            Assert.IsTrue(dataTable.Rows.Count > 0, "Rows empty");
        }