public LynchSyndromeIHCPanel() { this.m_PanelId = 66; this.m_PanelName = "Immunohistochemistry"; this.m_AcknowledgeOnOrder = false; YellowstonePathology.Business.Test.Model.Test mlh1 = new YellowstonePathology.Business.Test.Model.Test(); mlh1.TestId = 121; mlh1.TestName = "MLH1"; mlh1.TestAbbreviation = "MLH1"; this.m_TestCollection.Add(mlh1); string objectIdMsh2 = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Test.Model.Test msh2 = new YellowstonePathology.Business.Test.Model.Test(); msh2.TestId = 122; msh2.TestName = "MSH2"; msh2.TestAbbreviation = "MSH2"; this.m_TestCollection.Add(msh2); string objectIdMsh6 = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Test.Model.Test msh6 = new YellowstonePathology.Business.Test.Model.Test(); msh6.TestId = 218; msh6.TestName = "MSH6"; msh6.TestAbbreviation = "MSH6"; this.m_TestCollection.Add(msh6); string objectIdPms2 = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Test.Model.Test pms2 = new YellowstonePathology.Business.Test.Model.Test(); pms2.TestId = 217; pms2.TestName = "PMS2"; pms2.TestAbbreviation = "PMS2"; this.m_TestCollection.Add(pms2); }
private void OrderAliquotsAndTestOnSelectedSpecimen(YellowstonePathology.Business.Test.Model.Test test, bool orderedAsDual) { YellowstonePathology.Business.Specimen.Model.SpecimenOrderCollection selectedSpecimen = this.m_AliquotAndStainOrderView.GetSelectedSpecimen(); foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in selectedSpecimen) { for (int i = 0; i < this.m_Aliquots.Value; i++) { YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = null; switch (this.m_Aliquot.AliquotType) { case "Block": aliquotOrder = specimenOrder.AliquotOrderCollection.AddBlock(specimenOrder, this.m_Aliquot.IdentificationType, this.m_AccessionOrder.AccessionDate.Value); break; case "FrozenBlock": aliquotOrder = specimenOrder.AliquotOrderCollection.AddFrozenBlock(specimenOrder, this.m_Aliquot.IdentificationType, this.m_AccessionOrder.AccessionDate.Value); break; case "CellBlock": aliquotOrder = specimenOrder.AliquotOrderCollection.AddCellBlock(specimenOrder, this.m_Aliquot.IdentificationType, this.m_AccessionOrder.AccessionDate.Value); break; case "Slide": aliquotOrder = specimenOrder.AliquotOrderCollection.AddSlide(specimenOrder, this.m_Aliquot.IdentificationType, this.m_AccessionOrder.AccessionDate.Value); break; case "Specimen": aliquotOrder = specimenOrder.AliquotOrderCollection.AddSpecimen(specimenOrder, this.m_Aliquot.IdentificationType, this.m_AccessionOrder.AccessionDate.Value); break; } specimenOrder.AliquotRequestCount = specimenOrder.AliquotOrderCollection.Count; if (this.Test != null) { YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_PanelSetOrder.ReportNo, test, test.OrderComment, null, false, aliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection); this.m_AccessionOrder.TakeATrip(orderTestVisitor); if ((aliquotOrder.AliquotType == "Block" || aliquotOrder.AliquotType == "FrozenBlock" || aliquotOrder.AliquotType == "CellBlock")) { YellowstonePathology.Business.Visitor.AddSlideOrderVisitor addSlideOrderVisitor = new Business.Visitor.AddSlideOrderVisitor(aliquotOrder, orderTestVisitor.TestOrder); this.m_AccessionOrder.TakeATrip(addSlideOrderVisitor); } if (test.NeedsAcknowledgement == true) { this.m_StainAcknowledgementTaskOrderVisitor.AddTestOrder(orderTestVisitor.TestOrder); } this.m_AliquotAndStainOrderView = new AliquotAndStainOrderView(this.m_AccessionOrder, this.m_PanelSetOrder); } } } //this.Save(false); }
public ERPRSemiQuantitativePanel() { this.m_PanelId = 62; this.m_PanelName = "Estrogen/Progesterone Receptor, Semi-Quantitative"; this.m_AcknowledgeOnOrder = true; YellowstonePathology.Business.Test.Model.Test er = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("99"); // EstrogenReceptorSemiquant(); this.m_TestCollection.Add(er); YellowstonePathology.Business.Test.Model.Test pr = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("145"); // ProgesteroneReceptorSemiquant(); this.m_TestCollection.Add(pr); }
private void BuildResultItemCollection(YellowstonePathology.Business.Test.Model.Test test, XElement testElement) { List <XElement> resultElements = (from item in testElement.Elements("ResultItemCollection") select item).ToList <XElement>(); foreach (XElement resultElement in resultElements.Elements("ResultItem")) { YellowstonePathology.Test.Model.ResultItem result = new YellowstonePathology.Test.Model.ResultItem(); Domain.Persistence.SqlXmlPropertyWriter xmlPropertyWriter = new Domain.Persistence.SqlXmlPropertyWriter(resultElement); result.WriteProperties(xmlPropertyWriter); test.ResultItemCollection.Add(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 HER2AmplificationByISHPanel() { this.m_PanelId = 56; this.m_PanelName = "HER2 Amplification by D-ISH"; this.m_AcknowledgeOnOrder = true; YellowstonePathology.Business.Test.Model.Test her2DISH = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("267"); // Model.HER2DISH(); this.m_TestCollection.Add(her2DISH); YellowstonePathology.Business.Test.Model.UnstainedSlide unstainedSlide2 = new Model.UnstainedSlide(); this.m_TestCollection.Add(unstainedSlide2); YellowstonePathology.Business.Test.Model.HandE handE = new Model.HandE(); this.m_TestCollection.Add(handE); }
public bool HasTestRequiringAcknowledgement() { bool result = false; foreach (TestOrder testOrder in this) { YellowstonePathology.Business.Test.Model.Test test = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone(testOrder.TestId); if (test.NeedsAcknowledgement == true) { result = true; break; } } return(result); }
public void Build(XElement testElement) { if (testElement != null) { YellowstonePathology.Business.Test.Model.Test test = new YellowstonePathology.Business.Test.Model.Test(); YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(testElement, test); xmlPropertyWriter.Write(); this.BuildResultItemCollection(test, testElement); this.m_Test = test; } else { this.m_Test = null; } }
private void AddIC() { YellowstonePathology.Business.Test.Model.Test iCTest = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests().GetTest(194); string patientInitials = YellowstonePathology.Business.Helper.PatientHelper.GetPatientInitials(this.m_AccessionOrder.PFirstName, this.m_AccessionOrder.PLastName); YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_SpecimenOrder.AliquotOrderCollection.AddBlock(this.m_SpecimenOrder, YellowstonePathology.Business.Specimen.Model.AliquotLabelType.DirectPrint, this.m_AccessionOrder.AccessionDate.Value); YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_AccessionOrder.PanelSetOrderCollection[0].ReportNo, iCTest, iCTest.OrderComment, null, false, this.m_AliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection); this.m_AccessionOrder.TakeATrip(orderTestVisitor); YellowstonePathology.Business.Common.BlockCollection blockCollection = new Business.Common.BlockCollection(); YellowstonePathology.Business.Test.AliquotOrderCollection blocksToPrintCollection = this.m_SpecimenOrder.AliquotOrderCollection.GetUnPrintedBlocks(); blockCollection.FromAliquotOrderItemCollection(blocksToPrintCollection, this.m_AccessionOrder.PanelSetOrderCollection[0].ReportNo, patientInitials, this.m_AccessionOrder.PrintMateColumnNumber, true); YellowstonePathology.Business.Common.PrintMate.Print(blockCollection); blocksToPrintCollection.SetPrinted(); }
public OrderTestVisitor(string reportNo, YellowstonePathology.Business.Test.Model.Test test, string testOrderComment, string panelOrderComment, bool orderedAsDual, YellowstonePathology.Business.Test.AliquotOrder aliquotOrder, bool acknowledgeOnOrder, bool orderAsSlide, YellowstonePathology.Business.Task.Model.TaskOrderCollection taskOrderCollection) : base(true, true) { this.m_ReportNo = reportNo; this.m_Test = test; this.m_OrderedAsDual = orderedAsDual; this.m_TestOrderComment = testOrderComment; this.m_PanelOrderComment = panelOrderComment; this.m_AliquotOrder = aliquotOrder; this.m_SystemIdentity = YellowstonePathology.Business.User.SystemIdentity.Instance; this.m_AcknowledgeOnOrder = acknowledgeOnOrder; this.m_OrderAsSlide = orderAsSlide; this.m_TaskOrderCollection = taskOrderCollection; }
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 void SetTestOrdersCancelledComment() { StringBuilder taskOrderDetailDescription = new StringBuilder(); taskOrderDetailDescription.AppendLine("********** CANCELLED STAINS **********"); foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this.m_CancelledTestOrderCollection) { YellowstonePathology.Business.Test.Model.Test test = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone(testOrder.TestId); if (test.NeedsAcknowledgement == true) { taskOrderDetailDescription.AppendLine(testOrder.DisplayString); } } this.m_TaskOrderDetailCancelledTestOrders.Description = taskOrderDetailDescription.ToString().Trim(); this.m_TaskOrderDetailCancelledTestOrders.Comment = this.m_TaskOrderDetailComment; }
private void OrderSpecial(YellowstonePathology.Business.Test.Model.Test test) { string aliquotOrderId = ((XElement)this.ListBoxBlocks.SelectedItem).Element("AliquotOrderId").Value; foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in this.m_SpecimenOrder.AliquotOrderCollection) { if (aliquotOrder.AliquotOrderId == aliquotOrderId) { YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_ReportNoToUse, test, test.OrderComment, null, false, aliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection); this.m_AccessionOrder.TakeATrip(orderTestVisitor); break; } } this.GrossBlockManagementView = new Business.View.GrossBlockManagementView(this.m_AccessionOrder, this.m_CaseNotesDocument, this.m_SpecimenOrder); this.SetupSpecimenView(); }
public void SetTestOrdersCancelledComment() { YellowstonePathology.Business.Test.Model.TestCollection allTests = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests(); StringBuilder taskOrderDetailDescription = new StringBuilder(); taskOrderDetailDescription.AppendLine("The following stains have been cancelled:"); foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this.m_CancelledTestOrderCollection) { YellowstonePathology.Business.Test.Model.Test test = allTests.GetTest(testOrder.TestId); if (test.NeedsAcknowledgement == true) { taskOrderDetailDescription.AppendLine(testOrder.DisplayString); } } this.m_TaskOrderDetailCancelledTestOrders.Description = taskOrderDetailDescription.ToString().Trim(); this.m_TaskOrderDetailCancelledTestOrders.Comment = this.m_TaskOrderDetailComment; }
public YellowstonePathology.Business.Test.Model.TestCollection GetSelectedTests() { YellowstonePathology.Business.Test.Model.TestCollection result = new YellowstonePathology.Business.Test.Model.TestCollection(); foreach (XElement element in this.m_OrderItemElementList) { if (element.Element("ItemType").Value != "Group") { if (element.Element("Order").Value == "True") { string testId = element.Element("Id").Value; YellowstonePathology.Business.Test.Model.Test test = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone(testId); string testOrderComment = element.Element("Comment").Value; test.OrderComment = testOrderComment; result.Add(test); } } } return(result); }
private void AddIC() { YellowstonePathology.Business.Test.Model.Test iCTest = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("194"); string patientInitials = YellowstonePathology.Business.Helper.PatientHelper.GetPatientInitials(this.m_AccessionOrder.PFirstName, this.m_AccessionOrder.PLastName); YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_SpecimenOrder.AliquotOrderCollection.AddBlock(this.m_SpecimenOrder, YellowstonePathology.Business.Specimen.Model.AliquotLabelType.DirectPrint, this.m_AccessionOrder.AccessionDate.Value); YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_AccessionOrder.PanelSetOrderCollection[0].ReportNo, iCTest, iCTest.OrderComment, null, false, this.m_AliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection); this.m_AccessionOrder.TakeATrip(orderTestVisitor); //YellowstonePathology.Business.Common.BlockCollection blockCollection = new Business.Common.BlockCollection(); //YellowstonePathology.Business.Test.AliquotOrderCollection blocksToPrintCollection = this.m_SpecimenOrder.AliquotOrderCollection.GetUnPrintedBlocks(); //blockCollection.FromAliquotOrderItemCollection(blocksToPrintCollection, this.m_AccessionOrder.PanelSetOrderCollection[0].ReportNo, patientInitials, this.m_AccessionOrder.CassetteColor, true); //YellowstonePathology.Business.Common.PrintMate.Print(blockCollection); //blocksToPrintCollection.SetPrinted(); Business.Label.Model.CassettePrinterCollection printers = new Business.Label.Model.CassettePrinterCollection(); Business.Label.Model.CassettePrinter printer = printers.GetPrinter(Business.User.UserPreferenceInstance.Instance.UserPreference.CassettePrinter); printer.Print(this.m_SpecimenOrder.AliquotOrderCollection, this.m_AccessionOrder); }
public override void OrderInitialTests(AccessionOrder accessionOrder, YellowstonePathology.Business.Interface.IOrderTarget orderTarget) { bool hasSurgical = accessionOrder.PanelSetOrderCollection.Exists(13); if (hasSurgical == true) { string surgicalReportNo = accessionOrder.PanelSetOrderCollection.GetSurgical().ReportNo; YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(surgicalReportNo); if (panelSetOrder.AssignedToId != 5132 && panelSetOrder.AssignedToId != 5133) { YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = (YellowstonePathology.Business.Test.AliquotOrder)orderTarget; YellowstonePathology.Business.Test.Model.Test er = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("99"); // EstrogenReceptorSemiquant(); YellowstonePathology.Business.Visitor.OrderTestVisitor orderERTestVisitor = new Visitor.OrderTestVisitor(surgicalReportNo, er, er.OrderComment, null, false, aliquotOrder, false, false, accessionOrder.TaskOrderCollection); accessionOrder.TakeATrip(orderERTestVisitor); YellowstonePathology.Business.Test.Model.Test pr = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("145"); // ProgesteroneReceptorSemiquant(); YellowstonePathology.Business.Visitor.OrderTestVisitor orderPRTestVisitor = new Visitor.OrderTestVisitor(surgicalReportNo, pr, pr.OrderComment, null, false, aliquotOrder, false, false, accessionOrder.TaskOrderCollection); accessionOrder.TakeATrip(orderPRTestVisitor); } else { //If Dr Shannon/Smirnow order separte ERPR YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest erPrSemiQuantitativeTest = new YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest(); YellowstonePathology.Business.Test.TestOrderInfo testOrderInfoERPR = new TestOrderInfo(erPrSemiQuantitativeTest, orderTarget, true); YellowstonePathology.Business.Visitor.OrderTestOrderVisitor orderTestOrderVisitorERPR = new Visitor.OrderTestOrderVisitor(testOrderInfoERPR); accessionOrder.TakeATrip(orderTestOrderVisitorERPR); } } else { YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest erPrSemiQuantitativeTest = new YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest(); YellowstonePathology.Business.Test.TestOrderInfo testOrderInfoERPR = new TestOrderInfo(erPrSemiQuantitativeTest, orderTarget, true); YellowstonePathology.Business.Visitor.OrderTestOrderVisitor orderTestOrderVisitorERPR = new Visitor.OrderTestOrderVisitor(testOrderInfoERPR); accessionOrder.TakeATrip(orderTestOrderVisitorERPR); } YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTest her2AmplificationByISHTest = new YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTest(); YellowstonePathology.Business.Test.TestOrderInfo testOrderInfo = new TestOrderInfo(her2AmplificationByISHTest, orderTarget, true); YellowstonePathology.Business.Visitor.OrderTestOrderVisitor orderTestOrderVisitor = new Visitor.OrderTestOrderVisitor(testOrderInfo); accessionOrder.TakeATrip(orderTestOrderVisitor); }
private void AddBlocksToSpecimen(YellowstonePathology.Business.Test.Model.Test test, int quantity, string blockType, string prefix) { string patientInitials = YellowstonePathology.Business.Helper.PatientHelper.GetPatientInitials(this.m_AccessionOrder.PFirstName, this.m_AccessionOrder.PLastName); for (int i = 0; i < quantity; i++) { YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_SpecimenOrder.AliquotOrderCollection.AddBlock(this.m_SpecimenOrder, YellowstonePathology.Business.Specimen.Model.AliquotLabelType.DirectPrint, this.m_AccessionOrder.AccessionDate.Value); YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical(); if (panelSetOrder == null) { panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNoToUse); } YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(panelSetOrder.ReportNo, test, test.OrderComment, null, false, aliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection); this.m_AccessionOrder.TakeATrip(orderTestVisitor); YellowstonePathology.Business.Visitor.AddSlideOrderVisitor addSlideOrderVisitor = new Business.Visitor.AddSlideOrderVisitor(aliquotOrder, orderTestVisitor.TestOrder); this.m_AccessionOrder.TakeATrip(addSlideOrderVisitor); } }
public YellowstonePathology.Business.Test.Model.TestCollection GetSelectedTests() { YellowstonePathology.Business.Test.Model.TestCollection testCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests(); YellowstonePathology.Business.Test.Model.TestCollection result = new YellowstonePathology.Business.Test.Model.TestCollection(); foreach (XElement element in this.m_OrderItemElementList) { if (element.Element("ItemType").Value == "Test") { if (element.Element("Order").Value == "True") { int testId = Convert.ToInt32(element.Element("Id").Value); YellowstonePathology.Business.Test.Model.Test test = testCollection.GetTest(testId); string testOrderComment = element.Element("Comment").Value; test.OrderComment = testOrderComment; result.Add(test); } } } return(result); }
private void OrderTestOnSelectedAliquots(YellowstonePathology.Business.Test.Model.Test test, bool orderedAsDual) { YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots(); foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in selectedAliquots) { YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_PanelSetOrder.ReportNo, test, test.OrderComment, null, orderedAsDual, aliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection); this.m_AccessionOrder.TakeATrip(orderTestVisitor); if ((aliquotOrder.AliquotType == "Block" || aliquotOrder.AliquotType == "FrozenBlock" || aliquotOrder.AliquotType == "CellBlock")) { YellowstonePathology.Business.Visitor.AddSlideOrderVisitor addSlideOrderVisitor = new Business.Visitor.AddSlideOrderVisitor(aliquotOrder, orderTestVisitor.TestOrder); this.m_AccessionOrder.TakeATrip(addSlideOrderVisitor); } if (test.NeedsAcknowledgement == true) { this.m_StainAcknowledgementTaskOrderVisitor.AddTestOrder(orderTestVisitor.TestOrder); } } }
public PrintBlockPage(YellowstonePathology.Business.User.SystemIdentity systemIdentity, YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder) { this.m_SystemIdentity = systemIdentity; this.m_AccessionOrder = accessionOrder; this.m_SpecimenOrder = specimenOrder; this.SetReportNoToUse(); this.m_CaseNotesDocument = YellowstonePathology.Business.Gateway.XmlGateway.GetOrderComments(this.m_AccessionOrder.MasterAccessionNo); this.m_DocumentViewer = new DocumentWorkspace(); this.m_CaseDocumentCollection = new YellowstonePathology.Business.Document.CaseDocumentCollection(this.m_AccessionOrder, this.m_ReportNoToUse); this.m_GrossBlockManagementView = new Business.View.GrossBlockManagementView(this.m_AccessionOrder, this.m_CaseNotesDocument, this.m_SpecimenOrder); this.SetupSpecimenView(); this.m_BarcodeScanPort = YellowstonePathology.Business.BarcodeScanning.BarcodeScanPort.Instance; this.m_TestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests(); this.m_HandETest = this.m_TestCollection.GetTest(49); this.m_IronTest = this.m_TestCollection.GetTest(115); this.m_HPyloriTest = this.m_TestCollection.GetTest(107); this.m_FrozenTest = this.m_TestCollection.GetTest(45); this.Aliquots = 1; this.m_ListBoxBlocksMouseDownTimer = new System.Windows.Threading.DispatcherTimer(); this.m_ListBoxBlocksMouseDownTimer.Interval = new TimeSpan(0, 0, 0, 0, 750); this.m_ListBoxBlocksMouseDownTimer.Tick += new EventHandler(ListBoxBlocksMouseDownTimer_Tick); InitializeComponent(); DataContext = this; this.DocumentViewer.Content = this.m_DocumentViewer; Loaded += new RoutedEventHandler(PrintBlockPage_Loaded); Unloaded += new RoutedEventHandler(PrintBlockPage_Unloaded); }
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"); }
private void AddStainResult(YellowstonePathology.Business.Test.Model.Test test) { YellowstonePathology.Business.Test.Model.StainTest stainTest = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetStainTestByTestId(test.TestId); if (stainTest != null && !string.IsNullOrEmpty(stainTest.CptCode)) { YellowstonePathology.Business.SpecialStain.StainResultItem stainResultItem = this.m_SurgicalSpecimen.StainResultItemCollection.GetNextItem(this.m_SurgicalSpecimen.SurgicalSpecimenId); stainResultItem.TestOrderId = this.m_TestOrder.TestOrderId; stainResultItem.ProcedureName = test.TestName; stainResultItem.CptCode = stainTest.CptCode; stainResultItem.CptCodeQuantity = stainTest.CptCodeQuantity; stainResultItem.ControlComment = stainTest.ControlComment; stainResultItem.StainType = stainTest.StainType; stainResultItem.Billable = true; stainResultItem.Reportable = true; if (stainTest.ImmunoCommentId > 0) { YellowstonePathology.Business.Domain.ImmunoComment immunoComment = Business.Gateway.AccessionOrderGateway.GetImmunoCommentByImmunocommentId(stainTest.ImmunoCommentId); stainResultItem.ImmunoComment = immunoComment.Comment; } this.m_SurgicalSpecimen.StainResultItemCollection.Add(stainResultItem); } }
public LynchSyndromeIHCPanel() { this.m_PanelId = 66; this.m_PanelName = "Immunohistochemistry"; this.m_AcknowledgeOnOrder = false; YellowstonePathology.Business.Test.Model.Test mlh1 = new YellowstonePathology.Business.Test.Model.Test(); mlh1.TestId = "121"; mlh1.TestName = "MLH1"; mlh1.TestAbbreviation = "MLH1"; this.m_TestCollection.Add(mlh1); string objectIdPms2 = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Test.Model.Test pms2 = new YellowstonePathology.Business.Test.Model.Test(); pms2.TestId = "217"; pms2.TestName = "PMS2"; pms2.TestAbbreviation = "PMS2"; this.m_TestCollection.Add(pms2); string objectIdMsh2 = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Test.Model.Test msh2 = new YellowstonePathology.Business.Test.Model.Test(); msh2.TestId = "122"; msh2.TestName = "MSH2"; msh2.TestAbbreviation = "MSH2"; this.m_TestCollection.Add(msh2); string objectIdMsh6 = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Test.Model.Test msh6 = new YellowstonePathology.Business.Test.Model.Test(); msh6.TestId = "218"; msh6.TestName = "MSH6"; msh6.TestAbbreviation = "MSH6"; this.m_TestCollection.Add(msh6); }
public YellowstonePathology.Business.Test.Model.TestOrder Add(string panelOrderId, string objectId, string aliquotOrderId, YellowstonePathology.Business.Test.Model.Test test, string comment) { TestOrder testOrder = this.GetNextItem(panelOrderId, objectId, aliquotOrderId, test, comment); this.Add(testOrder); return(testOrder); }
public TestOrder(string testOrderId, string objectId, string panelOrderId, string aliquotOrderId, YellowstonePathology.Business.Test.Model.Test test, string comment) { this.m_TestOrderId = testOrderId; this.m_ObjectId = objectId; this.m_PanelOrderId = panelOrderId; this.m_AliquotOrderId = aliquotOrderId; this.m_TestId = test.TestId; this.m_TestName = test.TestName; this.m_TestAbbreviation = test.TestAbbreviation; this.m_Result = null; this.m_Comment = comment; this.m_SlideOrderCollection = new Business.Slide.Model.SlideOrderCollection(); }
public override void SetPanelSetOrderCPTCodes() { if (this.IsOkToSet() == true) { this.SetERPRPQRSCodes(); foreach (StainSpecimen stainSpecimen in this.m_StainSpecimenCollection) { foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in stainSpecimen.TestOrderCollection) { YellowstonePathology.Business.Test.Model.Test test = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone(testOrder.TestId); if (test.IsBillable == true) { if (this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.SystemGeneratedReferenceIdExists(testOrder.TestOrderId) == false) { string codeableType = test.GetCodeableType(testOrder.OrderedAsDual); YellowstonePathology.Business.Test.PanelSetOrderCPTCode panelSetOrderCPTCode = this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.GetNextItem(this.m_PanelSetOrder.ReportNo); panelSetOrderCPTCode.Quantity = 1; panelSetOrderCPTCode.CodeableType = codeableType; panelSetOrderCPTCode.CodeableDescription = "Specimen " + stainSpecimen.SpecimenOrder.SpecimenNumber + ": " + testOrder.TestName; panelSetOrderCPTCode.EntryType = YellowstonePathology.Business.Billing.Model.PanelSetOrderCPTCodeEntryType.SystemGenerated; panelSetOrderCPTCode.SpecimenOrderId = stainSpecimen.SpecimenOrder.SpecimenOrderId; panelSetOrderCPTCode.ClientId = this.m_AccessionOrder.ClientId; panelSetOrderCPTCode.ReferenceId = testOrder.TestOrderId; panelSetOrderCPTCode.MedicalRecord = this.m_AccessionOrder.SvhMedicalRecord; panelSetOrderCPTCode.Account = this.m_AccessionOrder.SvhAccount; if (this.m_PanelSetOrder.PanelSetId != 31 && this.m_PanelSetOrder.PanelSetId != 201 && this.m_PanelSetOrder.PanelSetId != 289) //Not technical only { YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder) this.m_PanelSetOrder; if (panelSetOrderSurgical.SurgicalSpecimenCollection.HasStainResult(testOrder.TestOrderId) == true) { YellowstonePathology.Business.SpecialStain.StainResultItem stainResult = panelSetOrderSurgical.SurgicalSpecimenCollection.GetStainResult(testOrder.TestOrderId); YellowstonePathology.Business.Billing.Model.CptCode cptCode = null; if (stainResult.IsGraded == true) { cptCode = test.GetGradedCptCode(false); panelSetOrderCPTCode.CPTCode = cptCode.Code; panelSetOrderCPTCode.CodeType = cptCode.CodeType.ToString(); } else { cptCode = test.GetCptCode(false); panelSetOrderCPTCode.CPTCode = cptCode.Code; panelSetOrderCPTCode.CodeType = cptCode.CodeType.ToString(); } } else { panelSetOrderCPTCode.CPTCode = test.GetCptCode(false).Code; } } else //Is technical only { YellowstonePathology.Business.Billing.Model.CptCode cptCode = test.GetCptCode(true); panelSetOrderCPTCode.CPTCode = cptCode.Code; panelSetOrderCPTCode.CodeType = cptCode.CodeType.ToString(); } this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.Add(panelSetOrderCPTCode); } } } } } }
public ReflexTestingPlanStepTest(string stepId, string stepDescription, YellowstonePathology.Business.Test.Model.Test test) : base(stepId, stepDescription) { this.m_Test = test; }
public GetTestOrderVisitor(YellowstonePathology.Business.Test.Model.Test test) : base(true, false) { this.m_Test = test; this.m_TestOrderFound = false; }
private void ButtonOrder_Click(object sender, RoutedEventArgs e) { bool isDualStain = false; YellowstonePathology.Business.Test.Model.Test test = null; YellowstonePathology.Business.Test.Model.DualStain dualStain = null; if (this.m_Test is YellowstonePathology.Business.Test.Model.Test) { test = (YellowstonePathology.Business.Test.Model.Test) this.m_Test; } else if (this.m_Test is YellowstonePathology.Business.Test.Model.DualStain) { dualStain = (YellowstonePathology.Business.Test.Model.DualStain) this.m_Test; isDualStain = true; } if (this.m_Aliquots.HasValue == true && this.m_Aliquot != null && this.m_Aliquot.AliquotType == "FNASLD") { if (this.m_PassNumber.HasValue == true) { this.AddFNASlide(true, this.m_PassNumber.Value); } else { this.AddFNASlide(false, 0); } } else if (this.m_Aliquots.HasValue == true && this.m_Aliquot != null && this.m_Aliquot.AliquotType == "NGYNSLD") { this.AddNGYNSlide(); } else if (this.m_Aliquots.HasValue == true && this.m_Aliquot != null && this.m_Aliquot.AliquotType == "CESLD") { this.AddCESlide(); } else if (this.m_Aliquots.HasValue) { if (this.m_Aliquot != null) { if (this.Test != null) { if (isDualStain == false) { this.OrderAliquotsAndTestOnSelectedSpecimen(test, isDualStain); } else { this.OrderAliquotsAndTestOnSelectedSpecimen(dualStain.FirstTest, isDualStain); this.OrderAliquotsAndTestOnSelectedSpecimen(dualStain.SecondTest, isDualStain); } } } } else if (this.Test != null) { if (isDualStain == false) { this.OrderTestOnSelectedAliquots(test, isDualStain); } else { this.OrderTestOnSelectedAliquots(dualStain.FirstTest, isDualStain); this.OrderTestOnSelectedAliquots(dualStain.SecondTest, isDualStain); } } this.m_AccessionOrder.TakeATrip(this.m_StainAcknowledgementTaskOrderVisitor); this.m_AliquotAndStainOrderView.Refresh(true, this.m_PanelSetOrder); this.NotifyPropertyChanged("AliquotAndStainOrderView"); this.Aliquots = null; this.Test = null; this.Aliquot = null; }
public YellowstonePathology.Business.Test.Model.TestOrder GetNextItem(string panelOrderId, string objectId, string aliquotOrderId, YellowstonePathology.Business.Test.Model.Test test, string comment) { string testOrderId = YellowstonePathology.Business.OrderIdParser.GetNextTestOrderId(this, panelOrderId); YellowstonePathology.Business.Test.Model.TestOrder testOrder = new TestOrder(testOrderId, objectId, panelOrderId, aliquotOrderId, test, comment); return(testOrder); }