/// <summary> /// Вызывает проверку подключения к рабочему списку DICOM /// </summary> private void CheckWorklistConnection() { try { var connectionHelper = new WorklistConnectionHelper(); if (connectionHelper.CheckConnection(SourceSerializer.WorklistDeserialize(Source))) { IsConnected = true; _connectionMessenger.ShowConnectionSuccess("Соединение с Dicom Worklist установленно!"); } } catch (Exception e) { IsConnected = false; _connectionMessenger.ShowConnectionErrorMessage(e); } }
/// <summary> /// Возвращает коллекцию поциентов из текущего источника /// </summary> private void FindPatient() { if (!string.IsNullOrEmpty(SearchString)) { switch (_source.TypeEnum) { case SourceTypeEnum.DataBase: { try { var configuration = new DbConnectionHelper(SourceSerializer.DbDeserialize(_source)); _patientRepository = new PatientDbConnectionRepository(configuration); var patients = _patientRepository.FindPatientsByValue(SearchString); Patients = new ObservableCollection <Patient>(patients); } catch (Exception e) { _connectionMessenger.ShowConnectionErrorMessage(e); ClearSearchArea(); } } return; case SourceTypeEnum.Worklist: { try { _patientRepository = new PatientRepositoryDicom(SourceSerializer.WorklistDeserialize(_source)); var patients = _patientRepository.FindPatientsByValue(SearchString); Patients = new ObservableCollection <Patient>(patients); } catch (Exception e) { _connectionMessenger.ShowConnectionErrorMessage(e); ClearSearchArea(); } } return; } } Patients.Clear(); }
public void WorklistDeserialize_isCorrect() { var result = SourceSerializer.WorklistDeserialize(s_wl); Assert.IsTrue(result.Equals(wl)); }