public QueryForTrialDataProvenanceCommand(NBIAQueryParameters queryParameters, NBIASearchResult result)
 {
     _queryParameters = queryParameters;
     _result = result;
 }
            public override void Execute()
            {
                List<NBIASearchResult> results = new List<NBIASearchResult>();

                NBIAStudy studyService = new NBIAStudy();

                try
                {
                    DataTable dtStudies = studyService.getStudyInfo(_queryParameters, SearchSettings.Default.NBIADataServiceUrl);
                    if (dtStudies != null)
                    {
                        foreach (DataRow studyUid in dtStudies.Rows)
                        {
                            if (base.CancelRequested)
                                break;

                            NBIASearchResult result = new NBIASearchResult();
                            result.Study.StudyInstanceUid = studyUid["studyInstanceUID"].ToString();
                            results.Add(result);
                        }
                    }
                }
                catch (GridServicerException ex)
                {
                    base.SetError(ex.Message);
                }
                catch (Exception ex)
                {
                    Platform.Log(LogLevel.Error, ex, "Failed to query grid for Study data");
                }

                base.AddResultsToTable(results);

                foreach (NBIASearchResult result in base.SearchResults)
                {
                    if (base.CancelRequested)
                        break;

                    NBIAQueryParameters nbiaQueryParameters = _queryParameters.Clone();
                    nbiaQueryParameters.StudyInstanceUID = new QueryData(result.Study.StudyInstanceUid, QueryPredicate.EQUAL_TO);

                    base.EnqueueNextCommand(new QueryForPatientInfoCommand(nbiaQueryParameters, result));
                    base.EnqueueNextCommand(new QueryForClinicalTrialProtocolDataCommand(nbiaQueryParameters, result));
                    base.EnqueueNextCommand(new QueryForTrialDataProvenanceCommand(nbiaQueryParameters, result));
                    base.EnqueueNextCommand(new QueryForClinicalTrialSiteDataCommand(nbiaQueryParameters, result));
                    base.EnqueueNextCommand(new QueryForSeriesDataCommand(nbiaQueryParameters, result));
                }

                base.OnCommandExecuted();
            }
 public QueryForPatientInfoCommand(NBIAQueryParameters queryParameters, NBIASearchResult result)
 {
     _queryParameters = queryParameters;
     _result = result;
 }
 public QueryForSeriesDataCommand(NBIAQueryParameters queryParameters, NBIASearchResult result)
 {
     _queryParameters = queryParameters;
     _result = result;
 }
 public QueryForClinicalTrialSiteDataCommand(NBIAQueryParameters queryParameters, NBIASearchResult result)
 {
     _queryParameters = queryParameters;
     _result = result;
 }