Ejemplo n.º 1
0
        private void RefreshStudyList()
        {
            _studyItemBindingSource.Clear();

            using (QueryClient client = new QueryClient())
            {
                try
                {
                    StudyRootStudyIdentifier identifier = new StudyRootStudyIdentifier();
                    string accessionFilter = _accession.Text ?? "";
                    if (!String.IsNullOrEmpty(accessionFilter))
                    {
                        identifier.AccessionNumber = accessionFilter + "*";
                    }

                    string patientIdFilter = _patientId.Text ?? "";
                    if (!String.IsNullOrEmpty(patientIdFilter))
                    {
                        identifier.PatientId = patientIdFilter + "*";
                    }

                    var results = client.StudyQuery(identifier);

                    foreach (StudyRootStudyIdentifier study in results)
                    {
                        _studyItemBindingSource.Add(new StudyItem(study));
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(this, ex.Message);
                }
            }
        }
Ejemplo n.º 2
0
		private void RefreshStudyList()
		{
			_studyItemBindingSource.Clear();

			using (QueryClient client = new QueryClient())
			{
				try
				{
					StudyRootStudyIdentifier identifier = new StudyRootStudyIdentifier();
					string accessionFilter = _accession.Text ?? "";
					if (!String.IsNullOrEmpty(accessionFilter))
						identifier.AccessionNumber = accessionFilter + "*";

					string patientIdFilter = _patientId.Text ?? "";
					if (!String.IsNullOrEmpty(patientIdFilter))
						identifier.PatientId = patientIdFilter + "*";

					var results = client.StudyQuery(identifier);

					foreach (StudyRootStudyIdentifier study in results)
						_studyItemBindingSource.Add(new StudyItem(study));
				}
				catch (Exception ex)
				{
					MessageBox.Show(this, ex.Message);
				}
			}
		}