public static DualStainCollection GetCollection(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection) { DualStainCollection result = new DualStainCollection(); DualStainCollection allDualStains = DualStainCollection.GetAll(); foreach (DualStain ds in allDualStains) { if (testOrderCollection.Exists(ds.FirstTest.TestId) == true && testOrderCollection.Exists(ds.SecondTest.TestId) == true) { TestOrder firstTestOrder = testOrderCollection.GetTestOrder(ds.FirstTest.TestId); TestOrder secondTestOrder = testOrderCollection.GetTestOrder(ds.SecondTest.TestId); if (firstTestOrder.NoCharge == false && secondTestOrder.NoCharge == false) { if (firstTestOrder.OrderedAsDual == true && secondTestOrder.OrderedAsDual == true) { if (result.Exists(ds) == false) { result.Add(ds); } } } } } return(result); }
public YellowstonePathology.Business.Test.Model.TestOrderCollection GetSelectedTestOrders() { YellowstonePathology.Business.Test.Model.TestOrderCollection result = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); foreach (XElement specimenElement in this.m_View.Elements("SpecimenOrder")) { foreach (XElement aliquotElement in specimenElement.Elements("AliquotOrder")) { foreach (XElement testOrderElement in aliquotElement.Elements("TestOrder")) { bool selected = Convert.ToBoolean(testOrderElement.Element("IsSelected").Value); if (selected == true) { string testOrderId = testOrderElement.Element("TestOrderId").Value; foreach (YellowstonePathology.Business.Test.PanelOrder panelOrder in this.m_PanelSetOrder.PanelOrderCollection) { foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in panelOrder.TestOrderCollection) { if (testOrderId == testOrder.TestOrderId) { result.Add(testOrder); break; } } } } } } } return(result); }
public virtual int GetBillableSinglePlexIHCTestOrderCount() { YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection = this.TestOrderCollection.GetBillableSinglePlexIHCTestOrders(); int result = testOrderCollection.GetUniqueTestCount(); return(result); }
public override void Visit(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection) { if (testOrderCollection.ExistsByTestId(this.m_Test.TestId) == true) { this.m_TestOrder = testOrderCollection.GetTestOrder(this.m_Test.TestId); } }
private void ButtonDelete_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.Model.TestOrderCollection selectedTestOrders = this.m_AliquotAndStainOrderView.GetSelectedTestOrders(); if (selectedTestOrders.Count != 0) { foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in selectedTestOrders) { if (this.m_AliquotAndStainOrderView.HaveSlidesBeenMadeForTestOrder(testOrder) == false) { YellowstonePathology.Business.Visitor.RemoveTestOrderVisitor removeTestOrderVisitor = new Business.Visitor.RemoveTestOrderVisitor(testOrder.TestOrderId); this.m_AccessionOrder.TakeATrip(removeTestOrderVisitor); this.m_StainAcknowledgementTaskOrderVisitor.RemoveTestOrder(testOrder); } else { MessageBox.Show("The test " + testOrder.TestName + " cannot be deleted because slides have been made."); } } this.m_AccessionOrder.TakeATrip(this.m_StainAcknowledgementTaskOrderVisitor); this.m_AliquotAndStainOrderView.Refresh(false, this.m_PanelSetOrder); this.NotifyPropertyChanged("AliquotAndStainOrderView"); } else { MessageBox.Show("No tests selected."); } }
public override int GetBillableSinglePlexIHCTestOrderCount() { YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection = this.TestOrderCollection.GetBillableSinglePlexIHCTestOrders(); this.m_StainResultCollection.RemoveGradedStains(testOrderCollection); int uniqueTestCount = testOrderCollection.GetUniqueTestCount(); return(uniqueTestCount); }
public SurgicalStainSpecimen(YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder, YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection, YellowstonePathology.Business.SpecialStain.StainResultItemCollection stainResultCollection) : base(specimenOrder, testOrderCollection) { this.m_StainResultCollection = stainResultCollection; this.UpdateNoChargeStatus(); }
public StainAcknowledgementTaskOrderVisitor(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder) : base(true, true) { this.m_PanelSetOrder = panelSetOrder; this.m_SystemIdentity = YellowstonePathology.Business.User.SystemIdentity.Instance; this.m_AddedTestOrderCollection = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); this.m_CancelledTestOrderCollection = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); }
public StainAcknowledgementTaskOrderVisitor(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder) : base(true, true) { this.m_PanelSetOrder = panelSetOrder; this.m_SystemIdentity = YellowstonePathology.Business.User.SystemIdentity.Instance; this.m_AddedTestOrderCollection = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); this.m_CancelledTestOrderCollection = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); }
private void ButtonOrderHMB45_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.Model.HMB45 test = new YellowstonePathology.Business.Test.Model.HMB45(); YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_PanelSetOrder.ReportNo, test, test.OrderComment, null, false, this.m_AliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection); this.m_AccessionOrder.TakeATrip(orderTestVisitor); this.m_TestOrderCollection = this.m_PanelSetOrder.GetTestOrderCollection(this.m_AliquotOrder.AliquotOrderId); this.NotifyPropertyChanged("TestOrderCollection"); }
private bool SpecimenHasERPR(YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder, SurgicalTestOrder panelSetOrder) { bool result = false; YellowstonePathology.Business.Test.Model.TestOrderCollection testOrders = specimenOrder.GetTestOrders(panelSetOrder.GetTestOrders()); if (testOrders.ExistsByTestId("99") == true) { result = true; } return(result); }
public void RemoveGradedStains(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection) { foreach (StainResultItem stainResultItem in this) { if (stainResultItem.IsGraded == true) { YellowstonePathology.Business.Test.Model.TestOrder testOrder = testOrderCollection.Get(stainResultItem.TestOrderId); testOrderCollection.Remove(testOrder); } } }
public YellowstonePathology.Business.Test.Model.TestOrderCollection GetTestOrders(YellowstonePathology.Business.Test.Model.TestOrderCollection testForPanelSetCollection) { YellowstonePathology.Business.Test.Model.TestOrderCollection result = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in testForPanelSetCollection) { if (testOrder.AliquotOrder.SpecimenOrderId == this.SpecimenOrderId) { result.Add(testOrder); } } return(result); }
private void ButtonAddSlideOrder_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection = this.m_AliquotAndStainOrderView.GetSelectedTestOrders(); foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in testOrderCollection) { YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(testOrder.AliquotOrder.AliquotOrderId); YellowstonePathology.Business.Visitor.AddSlideOrderVisitor addSlideOrderVisitor = new Business.Visitor.AddSlideOrderVisitor(aliquotOrder, testOrder); this.m_AccessionOrder.TakeATrip(addSlideOrderVisitor); } this.m_AliquotAndStainOrderView = new AliquotAndStainOrderView(this.m_AccessionOrder, this.m_PanelSetOrder); this.NotifyPropertyChanged("AliquotAndStainOrderView"); }
public StainResultItemCollection GetCytochemicalStains(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection) { StainResultItemCollection result = new StainResultItemCollection(); foreach (StainResultItem stainresult in this) { if (stainresult.StainType == "Cytochemical" && stainresult.ClientAccessioned == false) { result.Add(stainresult); } } return(result); }
private void ButtonOrderPancytokeratin_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.Model.Test test = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("136"); // Pancytokeratin(); YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_PanelSetOrder.ReportNo, test, test.OrderComment, null, false, this.m_AliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection); this.m_AccessionOrder.TakeATrip(orderTestVisitor); YellowstonePathology.Business.Visitor.StainAcknowledgementTaskOrderVisitor stainAcknowledgementTaskOrderVisitor = new Business.Visitor.StainAcknowledgementTaskOrderVisitor(this.m_PanelSetOrder); stainAcknowledgementTaskOrderVisitor.AddTestOrder(orderTestVisitor.TestOrder); this.m_AccessionOrder.TakeATrip(stainAcknowledgementTaskOrderVisitor); this.m_TestOrderCollection = this.m_PanelSetOrder.GetTestOrderCollection(this.m_AliquotOrder.AliquotOrderId); this.NotifyPropertyChanged("TestOrderCollection"); }
public StainOrderPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder, YellowstonePathology.Business.Test.AliquotOrder aliquotOrder, YellowstonePathology.Business.User.SystemIdentity systemIdentity) { this.m_AccessionOrder = accessionOrder; this.m_AliquotOrder = aliquotOrder; this.m_SpecimenOrder = specimenOrder; this.m_SystemIdentity = systemIdentity; this.m_PanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical(); this.m_TestOrderCollection = this.m_PanelSetOrder.GetTestOrderCollection(this.m_AliquotOrder.AliquotOrderId); InitializeComponent(); DataContext = this; }
public StainOrderPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder, YellowstonePathology.Business.Test.AliquotOrder aliquotOrder, YellowstonePathology.Business.User.SystemIdentity systemIdentity) { this.m_AccessionOrder = accessionOrder; this.m_AliquotOrder = aliquotOrder; this.m_SpecimenOrder = specimenOrder; this.m_SystemIdentity = systemIdentity; this.m_PanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical(); this.m_TestOrderCollection = this.m_PanelSetOrder.GetTestOrderCollection(this.m_AliquotOrder.AliquotOrderId); InitializeComponent(); DataContext = this; }
private bool ERPRExistsInCollection(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrders) { bool result = false; if (testOrders.ExistsByTestId("98") == true || testOrders.ExistsByTestId("99") == true || testOrders.ExistsByTestId("144") == true || testOrders.ExistsByTestId("145") == true || testOrders.ExistsByTestId("278") == true) { result = true; } return(result); }
public StainResultItemCollection GetGradedStains(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection) { StainResultItemCollection result = new StainResultItemCollection(); foreach (StainResultItem stainresult in this) { YellowstonePathology.Business.Test.Model.TestOrder testOrder = testOrderCollection.Get(stainresult.TestOrderId); YellowstonePathology.Business.Test.Model.GradedTest gradedTest = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone(testOrder.TestId) as YellowstonePathology.Business.Test.Model.GradedTest; if (gradedTest != null) { result.Add(stainresult); } } return(result); }
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()); }
public StainResultItemCollection GetMultiplexStains(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection) { StainResultItemCollection result = new StainResultItemCollection(); foreach (StainResultItem stainresult in this) { if (stainresult.StainType == "Immunohistochemical" && stainresult.ClientAccessioned == false) { YellowstonePathology.Business.Test.Model.TestOrder testOrder = testOrderCollection.Get(stainresult.TestOrderId); if (testOrder.OrderedAsDual == true) { result.Add(stainresult); } } } return(result); }
public YellowstonePathology.Business.Test.Model.TestOrderCollection GetTestOrderCollection(string reportNo, YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection) { YellowstonePathology.Business.Test.Model.TestOrderCollection result = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.GetPanelSetOrder(reportNo); foreach (YellowstonePathology.Business.Test.PanelOrder panelOrder in panelSetOrder.PanelOrderCollection) { foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in panelOrder.TestOrderCollection) { if (aliquotOrderCollection.Exists(testOrder.AliquotOrderId) == true) { result.Add(testOrder); } } } return(result); }
private void GradedStainsAreHandled() { YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection = this.m_PanelSetOrderSurgical.GetTestOrders(); YellowstonePathology.Business.SpecialStain.StainResultItemCollection allStaints = this.m_PanelSetOrderSurgical.GetAllStains(); YellowstonePathology.Business.SpecialStain.StainResultItemCollection gradedStains = allStaints.GetGradedStains(testOrderCollection); foreach (YellowstonePathology.Business.SpecialStain.StainResultItem stainResult in gradedStains) { if (stainResult.IsResultPositive() == true) { if (stainResult.ReportCommentContainsNumber() == false) { this.m_ExecutionStatus.AddMessage("Graded stain " + stainResult.ProcedureName + " is not graded.", true); break; } } } }
public override void Run() { this.m_Status = AuditStatusEnum.OK; this.m_Message.Clear(); YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection = this.m_SurgicalTestOrder.GetTestOrders(); YellowstonePathology.Business.SpecialStain.StainResultItemCollection allStaints = this.m_SurgicalTestOrder.GetAllStains(); YellowstonePathology.Business.SpecialStain.StainResultItemCollection gradedStains = allStaints.GetGradedStains(testOrderCollection); foreach (YellowstonePathology.Business.SpecialStain.StainResultItem stainResult in gradedStains) { if (stainResult.IsResultPositive() == true) { if (stainResult.ReportCommentContainsNumber() == false) { this.m_Status = AuditStatusEnum.Failure; this.m_Message.AppendLine("Graded stain " + stainResult.ProcedureName + " is not graded."); } } } }
public YellowstonePathology.Business.Test.Model.TestOrder GetTestOrder(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection, int stainNumber) { YellowstonePathology.Business.Test.Model.TestOrder result = null; foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in testOrderCollection) { if (stainNumber == 1) { if (testOrder.TestId == this.m_FirstTest.TestId || testOrder.TestId == this.m_DepricatedFirstTestId) { result = testOrder; } } else if (stainNumber == 2) { if (testOrder.TestId == this.m_SecondTest.TestId || testOrder.TestId == this.m_DepricatedSecondTestId) { result = testOrder; } } } return(result); }
public static StainSpecimenCollection GetCollection(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo) { StainSpecimenCollection result = new StainSpecimenCollection(); YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo); foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in accessionOrder.SpecimenOrderCollection) { YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection = panelSetOrder.GetTestOrderCollection(specimenOrder.AliquotOrderCollection); if (panelSetOrder.PanelSetId == 13) { YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)panelSetOrder; YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = panelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(specimenOrder.SpecimenOrderId); if (surgicalSpecimen != null) { YellowstonePathology.Business.SpecialStain.StainResultItemCollection stainResultCollection = surgicalSpecimen.StainResultItemCollection; SurgicalStainSpecimen surgicalStainSpecimen = new SurgicalStainSpecimen(specimenOrder, testOrderCollection, stainResultCollection); result.Add(surgicalStainSpecimen); } } else { if (panelSetOrder is YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeEvaluation) { if (result.HasLSEIHCSpecimen() == false) { LSEIHCStainSpecimen lseIHCStainSpecimen = new LSEIHCStainSpecimen(); result.Add(lseIHCStainSpecimen); } } else { StainSpecimen stainSpecimen = new StainSpecimen(specimenOrder, testOrderCollection); result.Add(stainSpecimen); } } } return(result); }
private void ButtonDelete_Click(object sender, RoutedEventArgs e) { List <string> selectedSlideOrderIds = this.m_AliquotAndStainOrderView.GetSelectedSlideOrderIds(); foreach (string slideOrderId in selectedSlideOrderIds) { YellowstonePathology.Business.Slide.Model.SlideOrder slideOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSlideOrder(slideOrderId); YellowstonePathology.Business.Visitor.RemoveSlideOrderVisitor removeSlideOrderVisitor = new Business.Visitor.RemoveSlideOrderVisitor(slideOrder); this.m_AccessionOrder.TakeATrip(removeSlideOrderVisitor); } YellowstonePathology.Business.Test.Model.TestOrderCollection selectedTestOrders = this.m_AliquotAndStainOrderView.GetSelectedTestOrders(); YellowstonePathology.Business.Test.Model.TestCollection allTests = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests(); foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in selectedTestOrders) { YellowstonePathology.Business.Visitor.RemoveTestOrderVisitor removeTestOrderVisitor = new Business.Visitor.RemoveTestOrderVisitor(testOrder.TestOrderId); this.m_AccessionOrder.TakeATrip(removeTestOrderVisitor); YellowstonePathology.Business.Test.Model.Test test = allTests.GetTest(testOrder.TestId); if (test.NeedsAcknowledgement == true) { this.m_StainAcknowledgementTaskOrderVisitor.RemoveTestOrder(testOrder); } } this.m_AccessionOrder.TakeATrip(this.m_StainAcknowledgementTaskOrderVisitor); YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots(); foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in selectedAliquots) { YellowstonePathology.Business.Visitor.RemoveAliquotOrderVisitor removeAliquotOrderVisitor = new Business.Visitor.RemoveAliquotOrderVisitor(aliquotOrder); this.m_AccessionOrder.TakeATrip(removeAliquotOrderVisitor); this.m_AccessionOrder.SpecimenOrderCollection.SetAliquotRequestCount(); } //YellowstonePathology.Business.Persistence.DocumentGateway.Instance.SubmitChanges(this.m_AccessionOrder, false); this.m_AliquotAndStainOrderView.Refresh(true, this.m_PanelSetOrder); this.NotifyPropertyChanged("AliquotAndStainOrderView"); }
public PanelOrder(string reportNo, string objectId, string panelOrderId, YellowstonePathology.Business.Panel.Model.Panel panel, int orderedById) { this.m_ReportNo = reportNo; this.m_ObjectId = objectId; this.m_PanelOrderId = panelOrderId; this.m_PanelId = panel.PanelId; this.m_PanelName = panel.PanelName; this.m_OrderedById = orderedById; this.m_OrderDate = DateTime.Today; this.m_OrderTime = DateTime.Now; this.m_ResultCode = panel.ResultCode; if (panel.AcknowledgeOnOrder == true) { this.m_Acknowledged = true; this.m_AcknowledgedById = orderedById; this.m_AcknowledgedDate = DateTime.Today; this.m_AcknowledgedTime = DateTime.Now; } this.m_TestOrderCollection = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); this.NotifyPropertyChanged(string.Empty); }
public PanelOrder(string reportNo, string objectId, string panelOrderId, YellowstonePathology.Business.Panel.Model.Panel panel, int orderedById) { this.m_ReportNo = reportNo; this.m_ObjectId = objectId; this.m_PanelOrderId = panelOrderId; this.m_PanelId = panel.PanelId; this.m_PanelName = panel.PanelName; this.m_OrderedById = orderedById; this.m_OrderDate = DateTime.Today; this.m_OrderTime = DateTime.Now; this.m_ResultCode = panel.ResultCode; if (panel.AcknowledgeOnOrder == true) { this.m_Acknowledged = true; this.m_AcknowledgedById = orderedById; this.m_AcknowledgedDate = DateTime.Today; this.m_AcknowledgedTime = DateTime.Now; } this.m_TestOrderCollection = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); this.NotifyPropertyChanged(string.Empty); }
public YellowstonePathology.Business.Test.Model.TestOrderCollection GetSelectedTestOrders() { YellowstonePathology.Business.Test.Model.TestOrderCollection result = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); foreach (XElement specimenElement in this.m_View.Elements("SpecimenOrder")) { foreach (XElement aliquotElement in specimenElement.Elements("AliquotOrder")) { foreach (XElement testOrderElement in aliquotElement.Elements("TestOrder")) { bool selected = Convert.ToBoolean(testOrderElement.Element("IsSelected").Value); if (selected == true) { string testOrderId = testOrderElement.Element("TestOrderId").Value; foreach (YellowstonePathology.Business.Test.PanelOrder panelOrder in this.m_PanelSetOrder.PanelOrderCollection) { foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in panelOrder.TestOrderCollection) { if (testOrderId == testOrder.TestOrderId) { result.Add(testOrder); break; } } } } } } } return result; }
public override void Render() { SurgicalTestOrder panelSetOrderSurgical = (SurgicalTestOrder)this.m_PanelSetOrder; this.m_TemplateName = @"\\Cfileserver\Documents\ReportTemplates\XmlTemplates\Surgical.3.xml"; base.OpenTemplate(); YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(this.m_PanelSetOrder.ReportNo); panelSetOrderSurgical.GrossX = YellowstonePathology.Business.Common.SpellChecker.FixString(panelSetOrderSurgical.GrossX); panelSetOrderSurgical.MicroscopicX = YellowstonePathology.Business.Common.SpellChecker.FixString(panelSetOrderSurgical.MicroscopicX); panelSetOrderSurgical.CancerSummary = YellowstonePathology.Business.Common.SpellChecker.FixString(panelSetOrderSurgical.CancerSummary); this.m_AccessionOrder.ClinicalHistory = YellowstonePathology.Business.Common.SpellChecker.FixString(this.m_AccessionOrder.ClinicalHistory); panelSetOrderSurgical.Comment = YellowstonePathology.Business.Common.SpellChecker.FixString(panelSetOrderSurgical.Comment); foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection) { surgicalSpecimen.Diagnosis = YellowstonePathology.Business.Common.SpellChecker.FixString(surgicalSpecimen.Diagnosis); } foreach (YellowstonePathology.Business.Amendment.Model.Amendment amendment in amendmentCollection) { amendment.Text = YellowstonePathology.Business.Common.SpellChecker.FixString(amendment.Text); } this.SetDemographicsV2(); this.SetReportDistribution(); this.SetCaseHistory(); string amendmentTitle = string.Empty; if (amendmentCollection.Count > 0) { for (int i = amendmentCollection.Count - 1; i >= 0; i--) { if (amendmentCollection[i].Final == true) { amendmentTitle = amendmentCollection[i].AmendmentType; if (amendmentTitle == "Correction") { amendmentTitle = "Corrected"; } if (amendmentCollection[i].RevisedDiagnosis == true) { this.SetXmlNodeData("Amendment", "Revised"); } else { this.SetXmlNodeData("Amendment", amendmentTitle); } break; } } } this.SetXmlNodeData("Amendment", amendmentTitle); XmlNode mainTableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='microscopic_description']", this.m_NameSpaceManager); XmlNode diagnosisTableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='s_id']", this.m_NameSpaceManager); XmlNode rowSpecimenNode = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='s_id']", this.m_NameSpaceManager); XmlNode rowDiagnosisNode = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='diagnosis']", this.m_NameSpaceManager); XmlNode rowSpecimenBlankRow = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_blank_row']", this.m_NameSpaceManager); XmlNode insertAfterRow = rowSpecimenNode; foreach (SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection) { XmlNode rowSpecimenNodeClone = rowSpecimenNode.Clone(); string diagnosisID = surgicalSpecimen.DiagnosisId + "."; string specimenType = surgicalSpecimen.SpecimenOrder.Description + ":"; rowSpecimenNodeClone.SelectSingleNode("descendant::w:r[w:t='s_id']/w:t", this.m_NameSpaceManager).InnerText = diagnosisID; rowSpecimenNodeClone.SelectSingleNode("descendant::w:r[w:t='specimen_type']/w:t", this.m_NameSpaceManager).InnerText = specimenType; diagnosisTableNode.InsertAfter(rowSpecimenNodeClone, insertAfterRow); XmlNode rowDiagnosisNodeClone = rowDiagnosisNode.Clone(); string diagnosis = surgicalSpecimen.Diagnosis; this.SetXMLNodeParagraphDataNode(rowDiagnosisNodeClone, "diagnosis", diagnosis); diagnosisTableNode.InsertAfter(rowDiagnosisNodeClone, rowSpecimenNodeClone); insertAfterRow = rowDiagnosisNodeClone; } if (string.IsNullOrEmpty(panelSetOrderSurgical.Comment) == true | panelSetOrderSurgical.Comment.ToUpper() == "NONE") { XmlNode rowComment = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='report_comment']", this.m_NameSpaceManager); diagnosisTableNode.RemoveChild(rowComment); } else { this.SetXMLNodeParagraphData("report_comment", panelSetOrderSurgical.Comment); } YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection(); amendmentSection.SetAmendment(amendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true); diagnosisTableNode.RemoveChild(rowSpecimenNode); diagnosisTableNode.RemoveChild(rowDiagnosisNode); diagnosisTableNode.RemoveChild(rowSpecimenBlankRow); XmlNode tableNodeP = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='sidp']", this.m_NameSpaceManager); XmlNode rowPreviousDiagnosis = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='previous_diagnosis_header']", this.m_NameSpaceManager); XmlNode rowSpecimenNodeP = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='sidp']", this.m_NameSpaceManager); XmlNode rowDiagnosisNodeP = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='diagnosis_previous']", this.m_NameSpaceManager); XmlNode rowCommentP = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='report_comment_previous']", this.m_NameSpaceManager); XmlNode rowPreviousSignatureP = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='previous_signature']", this.m_NameSpaceManager); XmlNode rowBlankLine1P = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='previous_diagnosis_blank_line1']", this.m_NameSpaceManager); XmlNode rowBlankLine2P = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='previous_diagnosis_blank_line2']", this.m_NameSpaceManager); if (amendmentCollection.Count != 0) { if (amendmentCollection.HasFinalRevisedDiagnosis() == true) { YellowstonePathology.Business.Amendment.Model.Amendment revisedDiagnosisAmendment = amendmentCollection.GetMostRecentFinalRevisedDiagnosis(); XmlNode rowRevisedDiagnosisHeader = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Diagnosis:']", this.m_NameSpaceManager); string finalDateHead = YellowstonePathology.Business.BaseData.GetShortDateString(revisedDiagnosisAmendment.FinalDate); finalDateHead += " " + YellowstonePathology.Business.BaseData.GetMillitaryTimeString(revisedDiagnosisAmendment.FinalTime); rowRevisedDiagnosisHeader.SelectSingleNode("descendant::w:r[w:t='Diagnosis:']/w:t", this.m_NameSpaceManager).InnerText = "Revised Diagnosis: " + finalDateHead; } XmlNode insertAfterRowP = rowPreviousDiagnosis; for (int counter = 0; counter < amendmentCollection.Count; counter++) { YellowstonePathology.Business.Amendment.Model.Amendment amendment = amendmentCollection[counter]; if (amendment.RevisedDiagnosis == true || amendment.ShowPreviousDiagnosis == true) { string amendmentId = amendment.AmendmentId; foreach (YellowstonePathology.Business.Test.Surgical.SurgicalAudit surgicalAudit in panelSetOrderSurgical.SurgicalAuditCollection) { if (surgicalAudit.AmendmentId == amendmentId) { string finalDateP = string.Empty; finalDateP = YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate); finalDateP += " " + YellowstonePathology.Business.BaseData.GetMillitaryTimeString(panelSetOrderSurgical.FinalTime); XmlNode rowSpecimenBlankRowP = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_blank_row_previous']", this.m_NameSpaceManager); XmlNode rowPreviousDiagnosisHeaderClone = rowPreviousDiagnosis.Clone(); string previousDiagnosisHeader = "Previous diagnosis on " + finalDateP; rowPreviousDiagnosisHeaderClone.SelectSingleNode("descendant::w:r[w:t='previous_diagnosis_header']/w:t", this.m_NameSpaceManager).InnerText = previousDiagnosisHeader; tableNodeP.InsertAfter(rowPreviousDiagnosisHeaderClone, insertAfterRowP); insertAfterRowP = rowPreviousDiagnosisHeaderClone; foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenAudit specimenAudit in surgicalAudit.SurgicalSpecimenAuditCollection) { if (specimenAudit.AmendmentId == amendmentId) { XmlNode rowSpecimenNodeCloneP = rowSpecimenNodeP.Clone(); string diagnosisIDP = specimenAudit.DiagnosisId + "."; string specimenTypeP = specimenAudit.SpecimenOrder.Description + ":"; rowSpecimenNodeCloneP.SelectSingleNode("descendant::w:r[w:t='sidp']/w:t", this.m_NameSpaceManager).InnerText = diagnosisIDP; rowSpecimenNodeCloneP.SelectSingleNode("descendant::w:r[w:t='specimen_type_previous']/w:t", this.m_NameSpaceManager).InnerText = specimenTypeP; tableNodeP.InsertAfter(rowSpecimenNodeCloneP, insertAfterRowP); XmlNode rowDiagnosisNodeCloneP = rowDiagnosisNodeP.Clone(); string diagnosisP = specimenAudit.Diagnosis; this.SetXMLNodeParagraphDataNode(rowDiagnosisNodeCloneP, "diagnosis_previous", diagnosisP); mainTableNode.InsertAfter(rowDiagnosisNodeCloneP, rowSpecimenNodeCloneP); insertAfterRowP = rowDiagnosisNodeCloneP; } } XmlNode rowCommentPClone = rowCommentP.Clone(); string reportCommentP = surgicalAudit.Comment; rowCommentPClone.SelectSingleNode("descendant::w:r[w:t='report_comment_previous']/w:t", this.m_NameSpaceManager).InnerText = reportCommentP; tableNodeP.InsertAfter(rowCommentPClone, insertAfterRowP); insertAfterRowP = rowCommentPClone; XmlNode rowPreviousSignaturePClone = rowPreviousSignatureP.Clone(); YellowstonePathology.Business.User.SystemUser pathologistUser = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetSystemUserById(surgicalAudit.PathologistId); string previousSignautreP = pathologistUser.Signature; rowPreviousSignaturePClone.SelectSingleNode("descendant::w:r[w:t='previous_signature']/w:t", this.m_NameSpaceManager).InnerText = previousSignautreP; tableNodeP.InsertAfter(rowPreviousSignaturePClone, insertAfterRowP); insertAfterRowP = rowPreviousSignaturePClone; } } } } } tableNodeP.RemoveChild(rowSpecimenNodeP); tableNodeP.RemoveChild(rowDiagnosisNodeP); tableNodeP.RemoveChild(rowPreviousDiagnosis); tableNodeP.RemoveChild(rowCommentP); tableNodeP.RemoveChild(rowPreviousSignatureP); tableNodeP.RemoveChild(rowBlankLine1P); tableNodeP.RemoveChild(rowBlankLine2P); if (this.m_PanelSetOrder.Final == true) { this.SetXmlNodeData("pathologist_signature", this.m_PanelSetOrder.Signature); } else { this.SetXmlNodeData("pathologist_signature", "THIS CASE IS NOT FINAL"); } XmlNode rowCancerSummaryHeader = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Cancer Case Summary']", this.m_NameSpaceManager); XmlNode rowCancerSummary = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='cancer_summary']", this.m_NameSpaceManager); XmlNode rowAJCCStage = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='ajcc_stage']", this.m_NameSpaceManager); if (panelSetOrderSurgical.CancerSummary == string.Empty) { mainTableNode.RemoveChild(rowCancerSummaryHeader); mainTableNode.RemoveChild(rowCancerSummary); } else { this.SetXMLNodeParagraphData("cancer_summary", panelSetOrderSurgical.CancerSummary); if (panelSetOrderSurgical.AJCCStage != string.Empty) { this.SetXmlNodeData("ajcc_stage", "Pathologic TNM Stage: " + panelSetOrderSurgical.AJCCStage); } else { this.SetXmlNodeData("ajcc_stage", string.Empty); } } this.SetXmlNodeData("client_case", this.m_AccessionOrder.PCAN); this.SetXMLNodeParagraphData("microscopic_description", panelSetOrderSurgical.MicroscopicX); //Stains XmlNode rowAncillaryCommentNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='ancillary_studies_comment']", this.m_NameSpaceManager); XmlNode tableNodeSS = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='specimen_type']", this.m_NameSpaceManager); XmlNode rowSpecimenTypeNode = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_type']", this.m_NameSpaceManager); XmlNode rowSinglePlexNode = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Immunohistochemistry(single)']", this.m_NameSpaceManager); XmlNode rowMultiPlexNode = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Immunohistochemistry(dual)']", this.m_NameSpaceManager); XmlNode rowCytochemicalNode = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Cytochemical']", this.m_NameSpaceManager); XmlNode rowTestHeaderNode = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Result']", this.m_NameSpaceManager); XmlNode rowSpecialStainNode = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='stain_description']", this.m_NameSpaceManager); bool commentSet = false; string ancillaryComment = panelSetOrderSurgical.GetAncillaryStudyComment(); if (this.m_PanelSetOrder.FinalDate.HasValue == false || this.m_PanelSetOrder.FinalDate >= DateTime.Parse("11/7/07")) { XmlNode insertAfterRowSS = rowAncillaryCommentNode; YellowstonePathology.Business.Test.Model.TestOrderCollection allTests = this.m_PanelSetOrder.GetTestOrders(); foreach (SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection) { YellowstonePathology.Business.Test.Model.TestOrderCollection specimenTestCollection = surgicalSpecimen.SpecimenOrder.GetTestOrders(allTests); YellowstonePathology.Business.SpecialStain.StainResultItemCollection singleplexStainResultCollection = surgicalSpecimen.StainResultItemCollection.GetSingleplexStains(specimenTestCollection); YellowstonePathology.Business.SpecialStain.StainResultItemCollection multiplexStainResultCollection = surgicalSpecimen.StainResultItemCollection.GetMultiplexStains(specimenTestCollection); YellowstonePathology.Business.SpecialStain.StainResultItemCollection cytochemicalStainResultCollection = surgicalSpecimen.StainResultItemCollection.GetCytochemicalStains(specimenTestCollection); if ((singleplexStainResultCollection.Count > 0 || multiplexStainResultCollection.Count > 0 || cytochemicalStainResultCollection.Count > 0)) { if (commentSet == false) { this.SetXMLNodeParagraphData("ancillary_studies_comment", ancillaryComment); commentSet = true; } XmlNode rowSpecimenTypeClone = rowSpecimenTypeNode.Clone(); string specimenType = surgicalSpecimen.DiagnosisId + ". " + surgicalSpecimen.SpecimenOrder.Description; rowSpecimenTypeClone.SelectSingleNode("descendant::w:r[w:t='specimen_type']/w:t", this.m_NameSpaceManager).InnerText = specimenType; tableNodeSS.InsertAfter(rowSpecimenTypeClone, insertAfterRowSS); insertAfterRowSS = rowSpecimenTypeClone; if (singleplexStainResultCollection.Count > 0) { insertAfterRowSS = this.SetStains(tableNodeSS, rowSinglePlexNode, rowTestHeaderNode, insertAfterRowSS, rowSpecialStainNode, surgicalSpecimen, singleplexStainResultCollection); } if (multiplexStainResultCollection.Count > 0) { insertAfterRowSS = this.SetStains(tableNodeSS, rowMultiPlexNode, rowTestHeaderNode, insertAfterRowSS, rowSpecialStainNode, surgicalSpecimen, multiplexStainResultCollection); } if (cytochemicalStainResultCollection.Count > 0) { insertAfterRowSS = this.SetStains(tableNodeSS, rowCytochemicalNode, rowTestHeaderNode, insertAfterRowSS, rowSpecialStainNode, surgicalSpecimen, cytochemicalStainResultCollection); } } } } tableNodeSS.RemoveChild(rowSpecimenTypeNode); tableNodeSS.RemoveChild(rowTestHeaderNode); tableNodeSS.RemoveChild(rowSpecialStainNode); tableNodeSS.RemoveChild(rowSinglePlexNode); tableNodeSS.RemoveChild(rowMultiPlexNode); tableNodeSS.RemoveChild(rowCytochemicalNode); if (commentSet == false) { XmlNode rowAncillaryStudiesNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Ancillary Studies']", this.m_NameSpaceManager); mainTableNode.RemoveChild(rowAncillaryStudiesNode); mainTableNode.RemoveChild(rowAncillaryCommentNode); } this.SetXMLNodeParagraphData("clinical_information", this.m_AccessionOrder.ClinicalHistory); XmlNode rowICHeaderNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='intraoperative_consultation_header']", this.m_NameSpaceManager); XmlNode rowICSpecimenNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='intraoperative_consultation_specimen']", this.m_NameSpaceManager); XmlNode rowICTextNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='intraoperative_consultation_text']", this.m_NameSpaceManager); XmlNode insertAfterRowIC = rowICHeaderNode; int icCount = 0; this.SetXMLNodeParagraphDataNode(rowICHeaderNode, "intraoperative_consultation_header", "Intraoperative Consultation"); foreach (SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection) { foreach (IntraoperativeConsultationResult icItem in surgicalSpecimen.IntraoperativeConsultationResultCollection) { XmlNode rowICSpecimenNodeClone = rowICSpecimenNode.Clone(); string specimenString = surgicalSpecimen.DiagnosisId + ". " + surgicalSpecimen.SpecimenOrder.Description + ":"; this.SetXMLNodeParagraphDataNode(rowICSpecimenNodeClone, "intraoperative_consultation_specimen", specimenString); mainTableNode.InsertAfter(rowICSpecimenNodeClone, insertAfterRowIC); insertAfterRowIC = rowICSpecimenNodeClone; XmlNode rowICTextNodeClone = rowICTextNode.Clone(); this.SetXMLNodeParagraphDataNode(rowICTextNodeClone, "intraoperative_consultation_text", icItem.Result); mainTableNode.InsertAfter(rowICTextNodeClone, insertAfterRowIC); insertAfterRowIC = rowICTextNodeClone; icCount += 1; } } if (icCount == 0) { mainTableNode.RemoveChild(rowICHeaderNode); } mainTableNode.RemoveChild(rowICSpecimenNode); mainTableNode.RemoveChild(rowICTextNode); XmlNode rowSpecimenDescriptionNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_description']", this.m_NameSpaceManager); XmlNode rowFixationTypeNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_fixation_type']", this.m_NameSpaceManager); XmlNode rowTimeToFixationNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='time_to_fixation']", this.m_NameSpaceManager); XmlNode rowFixationDurationNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='duration_of_fixation']", this.m_NameSpaceManager); XmlNode rowFixationCommentNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='fixation_comment']", this.m_NameSpaceManager); XmlNode rowInsertSpecimenDescriptionAfterNode = rowSpecimenDescriptionNode; foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in this.m_AccessionOrder.SpecimenOrderCollection) { XmlNode rowSpecimenDescriptionClone = rowSpecimenDescriptionNode.Clone(); rowSpecimenDescriptionClone.SelectSingleNode("descendant::w:r[w:t='specimen_description']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.GetSpecimenDescriptionString(); YellowstonePathology.Business.Helper.DateTimeJoiner collectionDateTimeJoiner = new YellowstonePathology.Business.Helper.DateTimeJoiner(specimenOrder.CollectionDate.Value, specimenOrder.CollectionTime); rowSpecimenDescriptionClone.SelectSingleNode("descendant::w:r[w:t='date_time_collected']/w:t", this.m_NameSpaceManager).InnerText = collectionDateTimeJoiner.DisplayString; mainTableNode.InsertAfter(rowSpecimenDescriptionClone, rowInsertSpecimenDescriptionAfterNode); rowInsertSpecimenDescriptionAfterNode = rowSpecimenDescriptionClone; bool specimenHasERPR = this.SpecimenHasERPR(specimenOrder); if (specimenHasERPR == true) { XmlNode rowFixationTypeNodeClone = rowFixationTypeNode.Clone(); rowFixationTypeNodeClone.SelectSingleNode("descendant::w:r[w:t='specimen_fixation_type']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.LabFixation; mainTableNode.InsertAfter(rowFixationTypeNodeClone, rowInsertSpecimenDescriptionAfterNode); rowInsertSpecimenDescriptionAfterNode = rowFixationTypeNodeClone; XmlNode rowTimeToFixationNodeClone = rowTimeToFixationNode.Clone(); rowTimeToFixationNodeClone.SelectSingleNode("descendant::w:r[w:t='time_to_fixation']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.TimeToFixationHourString; mainTableNode.InsertAfter(rowTimeToFixationNodeClone, rowInsertSpecimenDescriptionAfterNode); rowInsertSpecimenDescriptionAfterNode = rowTimeToFixationNodeClone; XmlNode rowFixationDurationNodeClone = rowFixationDurationNode.Clone(); rowFixationDurationNodeClone.SelectSingleNode("descendant::w:r[w:t='duration_of_fixation']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.FixationDurationString; mainTableNode.InsertAfter(rowFixationDurationNodeClone, rowInsertSpecimenDescriptionAfterNode); rowInsertSpecimenDescriptionAfterNode = rowFixationDurationNodeClone; XmlNode rowFixationCommentNodeClone = rowFixationCommentNode.Clone(); rowFixationCommentNodeClone.SelectSingleNode("descendant::w:r[w:t='fixation_comment']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.FixationComment; mainTableNode.InsertAfter(rowFixationCommentNodeClone, rowInsertSpecimenDescriptionAfterNode); rowInsertSpecimenDescriptionAfterNode = rowFixationCommentNodeClone; } } mainTableNode.RemoveChild(rowSpecimenDescriptionNode); mainTableNode.RemoveChild(rowFixationTypeNode); mainTableNode.RemoveChild(rowTimeToFixationNode); mainTableNode.RemoveChild(rowFixationDurationNode); mainTableNode.RemoveChild(rowFixationCommentNode); this.SetXMLNodeParagraphData("gross_description", panelSetOrderSurgical.GrossX); this.SetXMLNodeParagraphData("client_name", this.m_AccessionOrder.ClientName); string finalDate = YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate) + " - " + YellowstonePathology.Business.BaseData.GetMillitaryTimeString(this.m_PanelSetOrder.FinalTime); this.SetXmlNodeData("final_date", finalDate); string immunoComment = panelSetOrderSurgical.GetImmunoComment(); if (immunoComment.Length > 0) { this.SetXmlNodeData("immuno_comment", immunoComment); } else { this.DeleteRow("immuno_comment"); } this.SetXMLNodeParagraphData("additional_testing", this.m_AccessionOrder.PanelSetOrderCollection.GetAdditionalTestingString(this.m_PanelSetOrder.ReportNo)); this.HandleERPRStatements(); this.SaveReport(); }
public YellowstonePathology.Business.Test.Model.TestOrderCollection GetTestOrders(YellowstonePathology.Business.Test.Model.TestOrderCollection testForPanelSetCollection) { YellowstonePathology.Business.Test.Model.TestOrderCollection result = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in testForPanelSetCollection) { if (testOrder.AliquotOrder.SpecimenOrderId == this.SpecimenOrderId) { result.Add(testOrder); } } return result; }
public PanelOrder() { this.m_TestOrderCollection = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); }
private void ButtonOrderHMB45_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.Model.HMB45 test = new YellowstonePathology.Business.Test.Model.HMB45(); YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_PanelSetOrder.ReportNo, test, test.OrderComment, null, false, this.m_AliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection); this.m_AccessionOrder.TakeATrip(orderTestVisitor); this.m_TestOrderCollection = this.m_PanelSetOrder.GetTestOrderCollection(this.m_AliquotOrder.AliquotOrderId); this.NotifyPropertyChanged("TestOrderCollection"); }
public StainSpecimen(YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder, YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection) { this.m_SpecimenOrder = specimenOrder; this.m_TestOrderCollection = testOrderCollection; }
public YellowstonePathology.Business.Test.Model.TestOrderCollection GetTestOrderCollection(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection) { YellowstonePathology.Business.Test.Model.TestOrderCollection result = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); foreach (YellowstonePathology.Business.Test.PanelOrder panelOrder in this.PanelOrderCollection) { foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in panelOrder.TestOrderCollection) { if (aliquotOrderCollection.Exists(testOrder.AliquotOrderId) == true) { result.Add(testOrder); } } } return result; }
public YellowstonePathology.Business.Test.Model.TestOrderCollection GetTestOrders() { YellowstonePathology.Business.Test.Model.TestOrderCollection result = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); foreach (YellowstonePathology.Business.Test.PanelOrder panelOrder in this.PanelOrderCollection) { foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in panelOrder.TestOrderCollection) { result.Add(testOrder); } } return result; }
public virtual void Visit(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection) { }
public override void ToXml(XElement document) { SurgicalTestOrder panelSetOrderSurgical = (SurgicalTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo); this.AddHeader(document, panelSetOrderSurgical, "Surgical Pathology Report"); this.AddNextObxElement("", document, "F"); YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(panelSetOrderSurgical.ReportNo); this.InformRevisedDiagnosis(document, amendmentCollection); foreach (SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection) { this.AddNextObxElement("Specimen: " + surgicalSpecimen.SpecimenOrder.SpecimenNumber.ToString(), document, "F"); this.HandleLongString(surgicalSpecimen.SpecimenOrder.Description, document, "F"); YellowstonePathology.Business.Helper.DateTimeJoiner collectionDateTimeJoiner = new YellowstonePathology.Business.Helper.DateTimeJoiner(surgicalSpecimen.SpecimenOrder.CollectionDate.Value, surgicalSpecimen.SpecimenOrder.CollectionTime); this.AddNextObxElement("Collection Date/Time: " + collectionDateTimeJoiner.DisplayString, document, "F"); YellowstonePathology.Business.Test.Model.TestOrderCollection specimenTestOrders = surgicalSpecimen.SpecimenOrder.GetTestOrders(panelSetOrderSurgical.GetTestOrders()); if (this.ERPRExistsInCollection(specimenTestOrders) == true) { this.AddNextObxElement("Fixation type: " + surgicalSpecimen.SpecimenOrder.LabFixation, document, "F"); this.AddNextObxElement("Time to fixation: " + surgicalSpecimen.SpecimenOrder.TimeToFixationHourString, document, "F"); this.AddNextObxElement("Duration of Fixation: " + surgicalSpecimen.SpecimenOrder.FixationDurationString, document, "F"); } this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Diagnosis: ", document, "F"); this.HandleLongString(surgicalSpecimen.Diagnosis, document, "F"); this.AddNextObxElement("", document, "F"); } if (string.IsNullOrEmpty(panelSetOrderSurgical.Comment) == false) { this.AddNextObxElement("Comment: ", document, "F"); this.HandleLongString(panelSetOrderSurgical.Comment, document, "F"); this.AddNextObxElement("", document, "F"); } if (string.IsNullOrEmpty(panelSetOrderSurgical.CancerSummary) == false) { this.AddNextObxElement("Cancer Summary: ", document, "F"); this.HandleLongString(panelSetOrderSurgical.CancerSummary, document, "F"); this.AddNextObxElement("", document, "F"); if (string.IsNullOrEmpty(panelSetOrderSurgical.AJCCStage) == false) { this.HandleLongString("Pathologic TNM Stage: " + panelSetOrderSurgical.AJCCStage, document, "F"); this.AddNextObxElement(string.Empty, document, "F"); } } this.AddNextObxElement("Pathologist: " + panelSetOrderSurgical.Signature, document, "F"); if (panelSetOrderSurgical.FinalTime.HasValue == true) { this.AddNextObxElement("E-signed " + panelSetOrderSurgical.FinalTime.Value.ToString("MM/dd/yyyy HH:mm"), document, "F"); } this.AddNextObxElement("", document, "F"); this.AddAmendments(document); this.AddNextObxElement("Microscopic Description: ", document, "F"); this.HandleLongString(panelSetOrderSurgical.MicroscopicX, document, "F"); this.AddNextObxElement(string.Empty, document, "F"); if (panelSetOrderSurgical.SurgicalSpecimenCollection.HasIC() == true) { foreach (SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection) { if (surgicalSpecimen.IntraoperativeConsultationResultCollection.Count != 0) { foreach (IntraoperativeConsultationResult icItem in surgicalSpecimen.IntraoperativeConsultationResultCollection) { this.AddNextObxElement(surgicalSpecimen.DiagnosisId + ". " + surgicalSpecimen.SpecimenOrder.Description, document, "F"); this.HandleLongString(icItem.Result, document, "F"); } } } this.AddNextObxElement(string.Empty, document, "F"); } if (panelSetOrderSurgical.TypingStainCollection.Count > 0) { this.AddNextObxElement("Ancillary Studies:", document, "F"); string ancillaryComment = panelSetOrderSurgical.GetAncillaryStudyComment(); this.HandleLongString(ancillaryComment, document, "F"); foreach (SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection) { if (surgicalSpecimen.StainResultItemCollection.Count > 0) { this.HandleLongString(surgicalSpecimen.SpecimenOrder.SpecimenNumber.ToString() + ". " + surgicalSpecimen.SpecimenOrder.Description, document, "F"); foreach (YellowstonePathology.Business.SpecialStain.StainResultItem stainResultItem in surgicalSpecimen.StainResultItemCollection) { if (stainResultItem.Reportable) { string stainResult = stainResultItem.Result; if (string.IsNullOrEmpty(stainResult) == true) { stainResult = "Pending"; } else if (stainResult.ToUpper() == "SEE COMMENT") { stainResult = stainResultItem.ReportComment; } else { string specialStainReportComment = stainResultItem.ReportComment; if (!string.IsNullOrEmpty(specialStainReportComment)) { stainResult += " - " + specialStainReportComment; } } this.HandleLongString("Test: " + stainResultItem.ProcedureName + " Result: " + stainResult, document, "F"); } } this.AddNextObxElement(string.Empty, document, "F"); } } } this.AddNextObxElement("Clinical Information: ", document, "F"); if (string.IsNullOrEmpty(this.m_AccessionOrder.ClinicalHistory) == false) { this.HandleLongString(this.m_AccessionOrder.ClinicalHistory, document, "F"); } else { this.AddNextObxElement("none", document, "F"); } this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Gross Description: ", document, "F"); this.HandleLongString(panelSetOrderSurgical.GrossX, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Additional Testing: ", document, "F"); this.HandleLongString(this.m_AccessionOrder.PanelSetOrderCollection.GetAdditionalTestingString(panelSetOrderSurgical.ReportNo), document, "F"); this.AddNextObxElement("", document, "F"); string immunoComment = panelSetOrderSurgical.GetImmunoComment(); if (immunoComment.Length > 0) { this.HandleLongString(immunoComment, document, "F"); this.AddNextObxElement(string.Empty, document, "F"); } YellowstonePathology.Business.Test.Model.TestOrderCollection testOrders = panelSetOrderSurgical.GetTestOrders(); if (this.ERPRExistsInCollection(testOrders) == true) { YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeResult result = new ErPrSemiQuantitative.ErPrSemiQuantitativeResult(); this.AddNextObxElement("ER/PR References:", document, "F"); this.HandleLongString(result.ReportReferences, document, "F"); this.AddNextObxElement("", document, "F"); } string locationPerformed = panelSetOrderSurgical.GetLocationPerformedComment(); this.AddNextObxElement(locationPerformed, document, "F"); this.AddNextObxElement(string.Empty, document, "F"); }