public KRASStandardResultPage(YellowstonePathology.Business.Test.KRASStandard.KRASStandardTestOrder panelSetOrderKRASStandard, YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.User.SystemIdentity systemIdentity, YellowstonePathology.UI.Navigation.PageNavigator pageNavigator) : base(panelSetOrderKRASStandard, accessionOrder) { this.m_PanelSetOrder = panelSetOrderKRASStandard; this.m_AccessionOrder = accessionOrder; this.m_SystemIdentity = systemIdentity; this.m_PageNavigator = pageNavigator; this.m_PageHeaderText = "KRAS Standard Mutation Analysis Results For: " + this.m_AccessionOrder.PatientDisplayName + " (" + this.m_PanelSetOrder.ReportNo + ")"; YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetByAliquotOrderId(this.m_PanelSetOrder.OrderedOnId); YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(this.m_PanelSetOrder.OrderedOnId); this.m_OrderedOnDescription = specimenOrder.Description + ": " + aliquotOrder.Label; this.m_KRASStandardResultCollection = YellowstonePathology.Business.Test.KRASStandard.KRASStandardResultCollection.GetAll(); this.m_IndicationCollection = YellowstonePathology.Business.Test.IndicationCollection.GetAll(); this.m_KRASStandardMutationCollection = new YellowstonePathology.Business.Test.KRASStandard.KRASStandardMutationCollection(); this.m_KRASStandardResultSelectionCollection = new YellowstonePathology.Business.Test.KRASStandard.KRASStandardResultSelectionCollection(); InitializeComponent(); DataContext = this; this.m_ControlsNotDisabledOnFinal.Add(this.ButtonNext); this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockShowDocument); this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockUnfinalResults); }
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); } }