public override void Run() { this.m_Status = AuditStatusEnum.OK; YellowstonePathology.Business.Test.Surgical.SurgicalTest surgicalTest = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if(this.m_AccessionOrder.PanelSetOrderCollection.Exists(surgicalTest.PanelSetId)) { YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical(); if(this.m_AccessionOrder.SpecimenOrderCollection.ContainsString("Fine") == true) { this.m_Status = AuditStatusEnum.Failure; foreach(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in surgicalTestOrder.SurgicalSpecimenCollection) { if(surgicalSpecimen.IntraoperativeConsultationResultCollection.Count > 0) { this.m_Status = AuditStatusEnum.OK; break; } } if(this.m_Status == AuditStatusEnum.Failure) { this.m_Message.Append("FNA without Frozen."); } } } }
private void HyperLinkFinalizeResults_Click(object sender, RoutedEventArgs e) { if (this.m_PanelSetOrder.Final == true && this.m_PanelSetOrder.StainPercent.Contains("%") == false) { MessageBoxResult noPercentResult = MessageBox.Show("The result for PDL should have a % which is not present. Are you sure you want to continue?", "Continue?", MessageBoxButton.OKCancel); if (noPercentResult == MessageBoxResult.Cancel) { return; } } bool okToFinal = false; YellowstonePathology.Business.Audit.Model.AuditResult auditResult = this.m_PanelSetOrder.IsOkToFinalize(this.m_AccessionOrder); if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.OK) { okToFinal = true; } else if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.Warning) { MessageBoxResult messageBoxResult = MessageBox.Show(auditResult.Message, "Results do not match the finaled summary results", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No); if (messageBoxResult == MessageBoxResult.Yes) { okToFinal = true; } } else { MessageBox.Show(auditResult.Message); } if (okToFinal == true) { YellowstonePathology.Business.Test.FinalizeTestResult finalizeTestResult = this.m_PanelSetOrder.Finish(this.m_AccessionOrder); this.HandleFinalizeTestResult(finalizeTestResult); if (this.m_PanelSetOrder.Accepted == false) { this.m_PanelSetOrder.Accept(); } YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId); YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true) { YellowstonePathology.Business.Test.PanelSetOrder surgicalPanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId); YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(surgicalPanelSetOrder.ReportNo); if (amendmentCollection.HasAmendmentForReport(this.m_PanelSetOrder.ReportNo) == false) { string amendmentText = YellowstonePathology.Business.Test.PDL1SP142.PDL1SP142SystemGeneratedAmendmentText.AmendmentText(this.m_PanelSetOrder); YellowstonePathology.Business.Amendment.Model.Amendment amendment = this.m_AccessionOrder.AddAmendment(surgicalPanelSetOrder.ReportNo); amendment.TestResultAmendmentFill(surgicalPanelSetOrder.ReportNo, surgicalPanelSetOrder.AssignedToId, amendmentText); amendment.ReferenceReportNo = this.m_PanelSetOrder.ReportNo; amendment.SystemGenerated = true; } } } }
private void HyperLinkFinalize_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Rules.MethodResult methodResult = this.m_PanelSetOrder.IsOkToFinalize(); if (methodResult.Success == true) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId); this.m_PanelSetOrder.Finalize(); YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true) { YellowstonePathology.Business.Test.PanelSetOrder surgicalPanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId); if (surgicalPanelSetOrder.AmendmentCollection.HasAmendmentForReport(this.m_PanelSetOrder.ReportNo) == false) { string amendmentText = YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHSystemGeneratedAmendmentText.AmendmentText(this.m_PanelSetOrder); YellowstonePathology.Business.Amendment.Model.Amendment amendment = surgicalPanelSetOrder.AddAmendment(); amendment.TestResultAmendmentFill(surgicalPanelSetOrder.ReportNo, surgicalPanelSetOrder.AssignedToId, amendmentText); amendment.ReferenceReportNo = this.m_PanelSetOrder.ReportNo; amendment.SystemGenerated = true; } } } else { MessageBox.Show(methodResult.Message); } }
public override void Run() { this.m_Status = AuditStatusEnum.OK; YellowstonePathology.Business.Test.Surgical.SurgicalTest surgicalTest = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(surgicalTest.PanelSetId)) { YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical(); if (this.m_AccessionOrder.SpecimenOrderCollection.ContainsString("Fine") == true) { this.m_Status = AuditStatusEnum.Failure; foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in surgicalTestOrder.SurgicalSpecimenCollection) { if (surgicalSpecimen.IntraoperativeConsultationResultCollection.Count > 0) { this.m_Status = AuditStatusEnum.OK; break; } } if (this.m_Status == AuditStatusEnum.Failure) { this.m_Message.Append("FNA without Frozen."); } } } }
private void BuildSurgicalSpecific(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, XElement panelSetOrderElement) { YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (panelSetOrder.PanelSetId == panelSetSurgical.PanelSetId) { YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)panelSetOrder; List <XElement> surgicalSpecimenElements = (from item in panelSetOrderElement.Elements("SurgicalSpecimenCollection") select item).ToList <XElement>(); foreach (XElement surgicalSpecimenElement in surgicalSpecimenElements.Elements("SurgicalSpecimen")) { YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen(); YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(surgicalSpecimenElement, surgicalSpecimen); xmlPropertyWriter.Write(); BuildICD9Code(surgicalSpecimen, surgicalSpecimenElement); BuildIntraoperativeConsultationResult(surgicalSpecimen, surgicalSpecimenElement); BuildStainResult(surgicalSpecimen, surgicalSpecimenElement); panelSetOrderSurgical.SurgicalSpecimenCollection.Add(surgicalSpecimen); } BuildSurgicalAudit(panelSetOrderSurgical, panelSetOrderElement); SetSurgicalAuditAmendment(panelSetOrderSurgical); SetSurgicalSpecimenSpecimenOrder(accessionOrder, panelSetOrderSurgical); SetSurgicalSpecimenAuditSpecimenOrder(accessionOrder, panelSetOrderSurgical); SetSurgicalSpecimenOrderItemCollection(accessionOrder, panelSetOrderSurgical); } }
public InvasiveBreastPanelResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { this.m_AccessionOrder = accessionOrder; YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanelTest panelSetInvasiveBreastPanel = new YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanelTest(); this.m_InvasiveBreastPanel = (YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanel)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetInvasiveBreastPanel.PanelSetId); this.m_InvasiveBreastPanel.SetStatus(this.m_AccessionOrder.PanelSetOrderCollection); this.m_SpecimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(this.m_InvasiveBreastPanel.OrderedOnId); if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(46) == true) { this.m_PanelSetOrderHer2ByIsh = (YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(46); this.m_HER2ResultString = this.m_PanelSetOrderHer2ByIsh.Result; } YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest erPrSemiQuantitativeTest = new YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest(); if (this.m_AccessionOrder.PanelSetOrderCollection.HasSurgical() == true && this.m_AccessionOrder.PanelSetOrderCollection.Exists(erPrSemiQuantitativeTest.PanelSetId) == false) { this.m_HasSurgical = true; YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId); this.m_SurgicalSpecimen = panelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(this.m_SpecimenOrder.SpecimenOrderId); YellowstonePathology.Business.Test.Model.TestOrder testOrderER = this.m_AccessionOrder.PanelSetOrderCollection.GetTestOrderByTestId(99); this.m_StainResultER = panelSetOrderSurgical.GetStainResult(testOrderER.TestOrderId); this.m_ERResultString = this.m_StainResultER.Result; YellowstonePathology.Business.Test.Model.TestOrder testOrderPR = this.m_AccessionOrder.PanelSetOrderCollection.GetTestOrderByTestId(145); this.m_StainResultPR = panelSetOrderSurgical.GetStainResult(testOrderPR.TestOrderId); this.m_PRResultString = this.m_StainResultPR.Result; } else if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(erPrSemiQuantitativeTest.PanelSetId) == true) { this.m_PanelSetOrderErPrSemiQuantitative = (YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(erPrSemiQuantitativeTest.PanelSetId); this.m_ERResultString = this.m_PanelSetOrderErPrSemiQuantitative.ErResult; this.m_PRResultString = this.m_PanelSetOrderErPrSemiQuantitative.PrResult; } if (this.m_HER2ResultString == YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder.EquivocalResult) this.m_IsHER2ByFISHRequired = true; YellowstonePathology.Business.PanelSet.Model.PanelSetHer2AmplificationByFishRetired3 panelSetHer2AmplificationByFishRetired3 = new YellowstonePathology.Business.PanelSet.Model.PanelSetHer2AmplificationByFishRetired3(); YellowstonePathology.Business.Test.Her2AmplificationByFish.Her2AmplificationByFishTest panelSetHer2AmplificationByFish = new YellowstonePathology.Business.Test.Her2AmplificationByFish.Her2AmplificationByFishTest(); if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetHer2AmplificationByFishRetired3.PanelSetId) == true) { this.m_HER2ByFISHHasBeenOrdered = true; YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetHer2AmplificationByFishRetired3.PanelSetId); this.m_HER2ByFISHResultString = "Result in Report " + panelSetOrder.ReportNo; } else if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetHer2AmplificationByFish.PanelSetId) == true) { this.m_HER2ByFISHHasBeenOrdered = true; YellowstonePathology.Business.Test.Her2AmplificationByFish.PanelSetOrderHer2AmplificationByFish panelSetOrderHer2AmplificationByFish = (YellowstonePathology.Business.Test.Her2AmplificationByFish.PanelSetOrderHer2AmplificationByFish)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetHer2AmplificationByFish.PanelSetId); this.m_HER2ByFISHResultString = panelSetOrderHer2AmplificationByFish.Result; } else this.m_HER2ByFISHResultString = "Not Required."; }
private void HyperLinkFinalize_Click(object sender, RoutedEventArgs e) { bool canFinal = false; YellowstonePathology.Business.Audit.Model.AuditResult auditResult = this.m_PanelSetOrder.IsOkToFinalize(this.m_AccessionOrder); if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.OK) { canFinal = true; } else if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.Warning) { MessageBoxResult messageBoxResult = MessageBox.Show(auditResult.Message, "Additional testing required", MessageBoxButton.OKCancel, MessageBoxImage.Information, MessageBoxResult.OK); if (messageBoxResult == MessageBoxResult.OK) { canFinal = true; YellowstonePathology.Business.Test.Her2AmplificationByIHC.Her2AmplificationByIHCTest her2AmplificationByIHCTest = new Business.Test.Her2AmplificationByIHC.Her2AmplificationByIHCTest(); this.OrderATest(her2AmplificationByIHCTest); YellowstonePathology.Business.Test.HER2AnalysisSummary.HER2AnalysisSummaryTest her2AmplificationSummaryTest = new Business.Test.HER2AnalysisSummary.HER2AnalysisSummaryTest(); this.OrderATest(her2AmplificationSummaryTest); } } else { MessageBox.Show(auditResult.Message); } if (canFinal == true) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId); YellowstonePathology.Business.Test.FinalizeTestResult finalizeTestResult = this.m_PanelSetOrder.Finish(this.m_AccessionOrder); this.HandleFinalizeTestResult(finalizeTestResult); if (this.m_PanelSetOrder.Result != YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationResultEnum.Equivocal.ToString()) { YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true) { YellowstonePathology.Business.Test.PanelSetOrder surgicalPanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId); YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(surgicalPanelSetOrder.ReportNo); if (amendmentCollection.HasAmendmentForReport(this.m_PanelSetOrder.ReportNo) == false) { string amendmentText = YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHSystemGeneratedAmendmentText.AmendmentText(this.m_PanelSetOrder); YellowstonePathology.Business.Amendment.Model.Amendment amendment = this.m_AccessionOrder.AddAmendment(surgicalPanelSetOrder.ReportNo); amendment.TestResultAmendmentFill(surgicalPanelSetOrder.ReportNo, surgicalPanelSetOrder.AssignedToId, amendmentText); amendment.ReferenceReportNo = this.m_PanelSetOrder.ReportNo; amendment.SystemGenerated = true; } } } } }
private void HyperLinkGrossDescription_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (this.m_AccessionOrder != null && this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true) { if (this.ShowSurgicalGrossDescription != null) { this.ShowSurgicalGrossDescription(this, new EventArgs()); } } else { MessageBox.Show("A surgical report must be ordered first."); } }
public override string ToResultString(AccessionOrder accessionOrder) { StringBuilder result = new StringBuilder(); result.AppendLine("Her2 By Ish"); YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTest her2AmplificationByISHTest = new YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTest(); if (accessionOrder.PanelSetOrderCollection.Exists(her2AmplificationByISHTest.PanelSetId) == true) { YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder panelSetOrderHer2ByIsh = (YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(her2AmplificationByISHTest.PanelSetId); result.AppendLine(panelSetOrderHer2ByIsh.ToResultString(accessionOrder)); } result.AppendLine(); YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true) { result.Append("Estrogen/Progesterone Receptor, Semi-Quantitative - Estrogen Receptor : "); YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId); YellowstonePathology.Business.Test.Model.Test er = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("99"); // EstrogenReceptorSemiquant(); YellowstonePathology.Business.Test.Model.Test pr = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("145"); // ProgesteroneReceptorSemiquant(); YellowstonePathology.Business.Test.Model.TestOrderCollection testOrders = panelSetOrderSurgical.GetTestOrders(); if (testOrders.ExistsByTestId(er.TestId) == true) { YellowstonePathology.Business.Test.Model.TestOrder testOrder = testOrders.GetTestOrder(er.TestId); YellowstonePathology.Business.SpecialStain.StainResultItem stainResultItem = panelSetOrderSurgical.GetStainResult(testOrder.TestOrderId); result.AppendLine(stainResultItem.Result); } if (testOrders.ExistsByTestId(pr.TestId) == true) { YellowstonePathology.Business.Test.Model.TestOrder testOrder = testOrders.GetTestOrder(pr.TestId); YellowstonePathology.Business.SpecialStain.StainResultItem stainResultItem = panelSetOrderSurgical.GetStainResult(testOrder.TestOrderId); result.AppendLine("Progesterone Receptor : " + stainResultItem.Result); } } else { YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest erPrSemiQuantitativeTest = new YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest(); if (accessionOrder.PanelSetOrderCollection.Exists(erPrSemiQuantitativeTest.PanelSetId) == true) { YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTestOrder panelSetOrderErPrSemiQuantitative = (YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(erPrSemiQuantitativeTest.PanelSetId); result.AppendLine(panelSetOrderErPrSemiQuantitative.ToResultString(accessionOrder)); } } result.AppendLine(); return(result.ToString()); }
private void HyperLinkAddAmendment_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true) { YellowstonePathology.Business.Test.PanelSetOrder surgicalPanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId); YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(surgicalPanelSetOrder.ReportNo); if (amendmentCollection.HasAmendmentForReport(this.m_PanelSetOrder.ReportNo) == false) { YellowstonePathology.Business.Amendment.Model.Amendment amendment = this.m_AccessionOrder.AddAmendment(surgicalPanelSetOrder.ReportNo); amendment.TestResultAmendmentFill(surgicalPanelSetOrder.ReportNo, surgicalPanelSetOrder.AssignedToId, "Bone Marrow Summary:" + Environment.NewLine); amendment.ReferenceReportNo = this.m_PanelSetOrder.ReportNo; amendment.SystemGenerated = true; amendment.RevisedDiagnosis = true; } } this.Next(this, new EventArgs()); }
public InvasiveBreastPanelResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { this.m_AccessionOrder = accessionOrder; YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanelTest panelSetInvasiveBreastPanel = new YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanelTest(); this.m_InvasiveBreastPanel = (YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanel) this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetInvasiveBreastPanel.PanelSetId); this.m_InvasiveBreastPanel.SetStatus(this.m_AccessionOrder.PanelSetOrderCollection); this.m_SpecimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(this.m_InvasiveBreastPanel.OrderedOnId); if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(46) == true) { this.m_PanelSetOrderHer2ByIsh = (YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder) this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(46); this.m_HER2ResultString = this.m_PanelSetOrderHer2ByIsh.Result; } YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest erPrSemiQuantitativeTest = new YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest(); if (this.m_AccessionOrder.PanelSetOrderCollection.HasSurgical() == true && this.m_AccessionOrder.PanelSetOrderCollection.Exists(erPrSemiQuantitativeTest.PanelSetId) == false) { this.m_HasSurgical = true; YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder) this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId); this.m_SurgicalSpecimen = panelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(this.m_SpecimenOrder.SpecimenOrderId); YellowstonePathology.Business.Test.Model.TestOrder testOrderER = this.m_AccessionOrder.PanelSetOrderCollection.GetTestOrderByTestId(99); this.m_StainResultER = panelSetOrderSurgical.GetStainResult(testOrderER.TestOrderId); this.m_ERResultString = this.m_StainResultER.Result; YellowstonePathology.Business.Test.Model.TestOrder testOrderPR = this.m_AccessionOrder.PanelSetOrderCollection.GetTestOrderByTestId(145); this.m_StainResultPR = panelSetOrderSurgical.GetStainResult(testOrderPR.TestOrderId); this.m_PRResultString = this.m_StainResultPR.Result; } else if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(erPrSemiQuantitativeTest.PanelSetId) == true) { this.m_PanelSetOrderErPrSemiQuantitative = (YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTestOrder) this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(erPrSemiQuantitativeTest.PanelSetId); this.m_ERResultString = this.m_PanelSetOrderErPrSemiQuantitative.ErResult; this.m_PRResultString = this.m_PanelSetOrderErPrSemiQuantitative.PrResult; } if (this.m_HER2ResultString == YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder.EquivocalResult) { this.m_IsHER2ByFISHRequired = true; } YellowstonePathology.Business.PanelSet.Model.PanelSetHer2AmplificationByFishRetired3 panelSetHer2AmplificationByFishRetired3 = new YellowstonePathology.Business.PanelSet.Model.PanelSetHer2AmplificationByFishRetired3(); YellowstonePathology.Business.Test.Her2AmplificationByFish.Her2AmplificationByFishTest panelSetHer2AmplificationByFish = new YellowstonePathology.Business.Test.Her2AmplificationByFish.Her2AmplificationByFishTest(); if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetHer2AmplificationByFishRetired3.PanelSetId) == true) { this.m_HER2ByFISHHasBeenOrdered = true; YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetHer2AmplificationByFishRetired3.PanelSetId); this.m_HER2ByFISHResultString = "Result in Report " + panelSetOrder.ReportNo; } else if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetHer2AmplificationByFish.PanelSetId) == true) { this.m_HER2ByFISHHasBeenOrdered = true; YellowstonePathology.Business.Test.Her2AmplificationByFish.PanelSetOrderHer2AmplificationByFish panelSetOrderHer2AmplificationByFish = (YellowstonePathology.Business.Test.Her2AmplificationByFish.PanelSetOrderHer2AmplificationByFish) this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetHer2AmplificationByFish.PanelSetId); this.m_HER2ByFISHResultString = panelSetOrderHer2AmplificationByFish.Result; } else { this.m_HER2ByFISHResultString = "Not Required."; } }
private void BuildSurgicalSpecific(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, XElement panelSetOrderElement) { YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (panelSetOrder.PanelSetId == panelSetSurgical.PanelSetId) { YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)panelSetOrder; List<XElement> surgicalSpecimenElements = (from item in panelSetOrderElement.Elements("SurgicalSpecimenCollection") select item).ToList<XElement>(); foreach (XElement surgicalSpecimenElement in surgicalSpecimenElements.Elements("SurgicalSpecimen")) { YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen(); YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(surgicalSpecimenElement, surgicalSpecimen); xmlPropertyWriter.Write(); BuildICD9Code(surgicalSpecimen, surgicalSpecimenElement); BuildIntraoperativeConsultationResult(surgicalSpecimen, surgicalSpecimenElement); BuildStainResult(surgicalSpecimen, surgicalSpecimenElement); panelSetOrderSurgical.SurgicalSpecimenCollection.Add(surgicalSpecimen); } BuildSurgicalAudit(panelSetOrderSurgical, panelSetOrderElement); SetSurgicalAuditAmendment(panelSetOrderSurgical); SetSurgicalSpecimenSpecimenOrder(accessionOrder, panelSetOrderSurgical); SetSurgicalSpecimenAuditSpecimenOrder(accessionOrder, panelSetOrderSurgical); SetSurgicalSpecimenOrderItemCollection(accessionOrder, panelSetOrderSurgical); } }
public override string ToResultString(AccessionOrder accessionOrder) { StringBuilder result = new StringBuilder(); result.AppendLine("Her2 By Ish"); YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTest her2AmplificationByISHTest = new YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTest(); if (accessionOrder.PanelSetOrderCollection.Exists(her2AmplificationByISHTest.PanelSetId) == true) { YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder panelSetOrderHer2ByIsh = (YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(her2AmplificationByISHTest.PanelSetId); result.AppendLine(panelSetOrderHer2ByIsh.ToResultString(accessionOrder)); } result.AppendLine(); YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if(accessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true) { result.Append("Estrogen/Progesterone Receptor, Semi-Quantitative - Estrogen Receptor : "); YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId); YellowstonePathology.Business.Test.Model.EstrogenReceptorSemiquant er = new YellowstonePathology.Business.Test.Model.EstrogenReceptorSemiquant(); YellowstonePathology.Business.Test.Model.ProgesteroneReceptorSemiquant pr = new YellowstonePathology.Business.Test.Model.ProgesteroneReceptorSemiquant(); YellowstonePathology.Business.Test.Model.TestOrderCollection testOrders = panelSetOrderSurgical.GetTestOrders(); if(testOrders.Exists(er.TestId) == true) { YellowstonePathology.Business.Test.Model.TestOrder testOrder = testOrders.GetTestOrder(er.TestId); YellowstonePathology.Business.SpecialStain.StainResultItem stainResultItem = panelSetOrderSurgical.GetStainResult(testOrder.TestOrderId); result.AppendLine(stainResultItem.Result); } if(testOrders.Exists(pr.TestId) == true) { YellowstonePathology.Business.Test.Model.TestOrder testOrder = testOrders.GetTestOrder(pr.TestId); YellowstonePathology.Business.SpecialStain.StainResultItem stainResultItem = panelSetOrderSurgical.GetStainResult(testOrder.TestOrderId); result.AppendLine("Progesterone Receptor : " + stainResultItem.Result); } } else { YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest erPrSemiQuantitativeTest = new YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest(); if (accessionOrder.PanelSetOrderCollection.Exists(erPrSemiQuantitativeTest.PanelSetId) == true) { YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTestOrder panelSetOrderErPrSemiQuantitative = (YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(erPrSemiQuantitativeTest.PanelSetId); result.AppendLine(panelSetOrderErPrSemiQuantitative.ToResultString(accessionOrder)); } } result.AppendLine(); return result.ToString(); }
private void HyperLinkSurgicalDiagnosis_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest(); if (this.m_AccessionOrder != null && this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true) { if (this.ShowSurgicalDiagnosis != null) { this.ShowSurgicalDiagnosis(this, new EventArgs()); } } else { MessageBox.Show("A surgical report must be ordered first."); } }