public override void Execute() { if (!base.CancelRequested) { NBIAPatient patientService = new NBIAPatient(); try { DataTable dtStudies = patientService.getPatientInfo(_queryParameters, SearchSettings.Default.NBIADataServiceUrl); if (dtStudies != null && dtStudies.Rows.Count > 0) { _result.Patient.PatientId = dtStudies.Rows[0]["patientId"].ToString(); _result.Patient.PatientsName = dtStudies.Rows[0]["patientName"].ToString(); _result.Patient.PatientsSex = dtStudies.Rows[0]["patientSex"].ToString(); if (!string.IsNullOrEmpty(dtStudies.Rows[0]["patientBirthDate"].ToString())) { try { _result.Patient.PatientBirthDate = DateTime.Parse(dtStudies.Rows[0]["patientBirthDate"].ToString()); } catch (Exception) { } } base.OnResultUpdated(_result); } } catch (Exception ex) { Platform.Log(LogLevel.Error, ex, "Failed to query grid for Patient data"); } } base.OnCommandExecuted(); }
private void TestNBIAPatient(NBIATestParameters testParameters, string endPointUrl) { NBIAPatient patient = new NBIAPatient(); DataTable dataTable = patient.getPatientInfo(testParameters.NBIAQueryParameters, endPointUrl); Assert.IsNotNull(dataTable.Rows, "Rows null"); Assert.IsTrue(dataTable.Rows.Count > 0, "Rows empty"); }
private void TestNBIAPatient(NBIATestParameters testParameters, string endPointUrl) { NBIAPatient patient = new NBIAPatient(); DataTable dataTable = patient.getPatientInfo(testParameters.NBIAQueryParameters, endPointUrl); Assert.IsNotNull(dataTable.Rows, "Rows null"); Assert.IsTrue(dataTable.Rows.Count > 0, "Rows empty"); }