public static YellowstonePathology.Business.Rules.MethodResult IsOkToOrderBRAF(KRASStandardReflexResult krasStandardReflexResult) { YellowstonePathology.Business.Rules.MethodResult result = new Business.Rules.MethodResult(); if (krasStandardReflexResult.DoesBRAFV600EKExist() == true) { result.Success = false; result.Message = "A BRAF V600E/K cannot be ordered because one already exists."; } else if (string.IsNullOrEmpty(krasStandardReflexResult.KRASStandardResult) == true) { result.Success = false; result.Message = "A BRAF V600E/K cannot be ordered because the KRAS result is not set."; } else { YellowstonePathology.Business.Test.KRASStandard.KRASStandardResultCollection resultCollection = YellowstonePathology.Business.Test.KRASStandard.KRASStandardResultCollection.GetAll(); YellowstonePathology.Business.Test.KRASStandard.KRASStandardResult standardResult = resultCollection.GetResult(krasStandardReflexResult.KRASStandardTestOrder.ResultCode); if (standardResult is YellowstonePathology.Business.Test.KRASStandard.KRASStandardDetectedResult) { result.Success = false; result.Message = "A BRAF V600E/K cannot be ordered because the KRAS result shows a mutation has been detected."; } } return(result); }
private void HyperLinkSetResults_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Rules.MethodResult methodResult = this.m_PanelSetOrder.IsOkToSetResult(); if (methodResult.Success == true) { if (this.ComboBoxResult.SelectedItem != null) { string resultString = this.ComboBoxResult.SelectedItem.ToString(); string resultDescription = null; if (this.ComboBoxResultDescription.SelectedItem != null) { resultDescription = this.ComboBoxResultDescription.SelectedItem.ToString(); } YellowstonePathology.Business.Test.KRASStandard.KRASStandardResultCollection resultCollection = YellowstonePathology.Business.Test.KRASStandard.KRASStandardResultCollection.GetAll(); if (resultCollection.IsValid(resultString, resultDescription) == true) { YellowstonePathology.Business.Test.KRASStandard.KRASStandardResult result = resultCollection.GetResult(resultString, resultDescription); result.SetResults(this.m_PanelSetOrder); } else { MessageBox.Show("The Result and the Result Description do not match."); } } else { MessageBox.Show("A result must be Selected before results can be set."); } } else { MessageBox.Show(methodResult.Message); } }