Пример #1
0
        public CMMCResultView(string reportNo, Business.Test.AccessionOrder accessionOrder)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);

            this.m_OrderingPhysician = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianByPhysicianId(this.m_AccessionOrder.PhysicianId);
        }
Пример #2
0
        private void ButtonShowHPV1618Result_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewPantherHPV1618Orders.SelectedItem != null)
            {
                YellowstonePathology.Business.Test.PantherOrderListItem pantherOrderListItem = (YellowstonePathology.Business.Test.PantherOrderListItem) this.ListViewPantherHPV1618Orders.SelectedItem;
                YellowstonePathology.Business.Test.AccessionOrder       accessionOrder       = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(pantherOrderListItem.MasterAccessionNo, this);

                this.m_LoginPageWindow = new Login.Receiving.LoginPageWindow();
                this.m_LoginPageWindow.Show();

                Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(pantherOrderListItem.ReportNo);
                if (panelSetOrder.PanelSetId == 62)
                {
                    YellowstonePathology.UI.Test.HPV1618ResultPath hpv1618ResultPath = new Test.HPV1618ResultPath(pantherOrderListItem.ReportNo, accessionOrder, this.m_LoginPageWindow.PageNavigator, this);
                    hpv1618ResultPath.Finish += HPV1618ResultPath_Finish;
                    hpv1618ResultPath.Start();
                }
                else if (panelSetOrder.PanelSetId == 269)
                {
                    YellowstonePathology.UI.Test.HPV1618SolidTumorResultPath hpv1618SolidTumorPath = new Test.HPV1618SolidTumorResultPath(pantherOrderListItem.ReportNo, accessionOrder, this.m_LoginPageWindow.PageNavigator, this);
                    hpv1618SolidTumorPath.Finish += Hpv1618SolidTumorPath_Finish;
                    hpv1618SolidTumorPath.Start();
                }
            }
        }
        private void ButtonSetResults_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewPreviousResult.SelectedItem != null)
            {
                Business.PreviousResult          previousResult = (Business.PreviousResult) this.ListViewPreviousResult.SelectedItem;
                Business.Test.AccessionOrder     ao             = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(previousResult.MasterAccessionNo, this);
                Business.Test.PanelSetOrder      pso            = ao.PanelSetOrderCollection.GetPanelSetOrder(previousResult.ReportNo);
                Business.Audit.Model.AuditResult auditResult    = this.m_PanelSetOrder.IsOkToSetPreviousResults(pso, this.m_AccessionOrder);

                if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.Failure)
                {
                    MessageBox.Show(auditResult.Message);
                }
                else if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.Warning)
                {
                    string           message          = auditResult.Message;
                    MessageBoxResult messageBoxResult = MessageBox.Show(message, "Questionable Results", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);
                    if (messageBoxResult == MessageBoxResult.Yes)
                    {
                        pso.SetPreviousResults(this.m_PanelSetOrder);
                    }
                }
                else
                {
                    pso.SetPreviousResults(this.m_PanelSetOrder);
                }
            }
        }
Пример #4
0
        public CMMCResultView(string reportNo, Business.Test.AccessionOrder accessionOrder)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder  = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);

            this.m_OrderingPhysician = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianByPhysicianId(this.m_AccessionOrder.PhysicianId);
        }
Пример #5
0
 private void NewOrderWindow_Click(object sender, RoutedEventArgs e)
 {
     Business.Test.AccessionOrder ao         = Business.Persistence.DocumentGateway.Instance.GetAccessionOrderByMasterAccessionNo("18-19410");
     Business.Test.PanelSetOrder  pso        = ao.PanelSetOrderCollection.GetSurgical();
     Surgical.StainOrder          stainOrder = new Surgical.StainOrder(ao, pso);
     stainOrder.ShowDialog();
 }
Пример #6
0
 private void HyperLinkRemoveSelectedReport_Click(object sender, RoutedEventArgs e)
 {
     if (ListViewOtherReports.SelectedItem != null)
     {
         YellowstonePathology.Business.Test.BoneMarrowSummary.OtherReportView otherReportView = ListViewOtherReports.SelectedItem as YellowstonePathology.Business.Test.BoneMarrowSummary.OtherReportView;
         if (string.IsNullOrEmpty(otherReportView.SummaryReportNo) == false && otherReportView.SummaryReportNo == this.m_PanelSetOrder.ReportNo)
         {
             Business.Test.AccessionOrder accessionOrder = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(otherReportView.MasterAccessionNo, this);
             if (accessionOrder.AccessionLock.IsLockAquiredByMe == true)
             {
                 Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(otherReportView.ReportNo);
                 panelSetOrder.SummaryReportNo = null;
                 Business.Persistence.DocumentGateway.Instance.Save();
                 this.OtherReportViewCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetOtherReportViewCollection(this.m_AccessionOrder.PatientId, this.m_AccessionOrder.MasterAccessionNo);
             }
             else
             {
                 MessageBox.Show("Unable to remove the selected report as that accession is locked.");
             }
         }
     }
     else
     {
         MessageBox.Show("Select a report to remove");
     }
 }
Пример #7
0
        public void View(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrder panelSetOrder)
        {
            YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll().GetPanelSet(panelSetOrder.PanelSetId);
            YellowstonePathology.Business.Interface.ICaseDocument doc      = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(accessionOrder, panelSetOrder, Business.Document.ReportSaveModeEnum.Draft);
            doc.Render();
            YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(panelSetOrder.ReportNo);

            string fileName = string.Empty;

            if (panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.PublishedDocument ||
                panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.RetiredTestDocument)
            {
                fileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameXPS(orderIdParser);
            }
            else
            {
                fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser);
            }

            switch (doc.NativeDocumentFormat)
            {
            case Business.Document.NativeDocumentFormatEnum.Word:
                YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName);
                break;

            case Business.Document.NativeDocumentFormatEnum.XPS:
                YellowstonePathology.UI.XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.ViewDocument(fileName);
                xpsDocumentViewer.ShowDialog();
                break;
            }
        }
Пример #8
0
        private void MenuItemViewResultPage_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewPanelSetOrders.SelectedItem != null)
            {
                Business.Test.PanelSetOrder      panelSetOrder = (Business.Test.PanelSetOrder) this.ListViewPanelSetOrders.SelectedItem;
                Business.PanelSet.Model.PanelSet panelSet      = Business.PanelSet.Model.PanelSetCollection.GetAll().GetPanelSet(panelSetOrder.PanelSetId);
                if (panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
                {
                    YellowstonePathology.Business.User.SystemIdentity systemIdentity = Business.User.SystemIdentity.Instance;

                    YellowstonePathology.UI.Test.ResultPathFactory resultPathFactory = new Test.ResultPathFactory();
                    resultPathFactory.Finished += new Test.ResultPathFactory.FinishedEventHandler(ResultPathFactory_Finished);

                    this.m_LoginPageWindow = new Login.Receiving.LoginPageWindow();
                    bool started = resultPathFactory.Start(panelSetOrder, this.m_AccessionOrder, this.m_LoginPageWindow.PageNavigator, this.m_LoginPageWindow, System.Windows.Visibility.Collapsed);
                    if (started == true)
                    {
                        this.m_LoginPageWindow.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show("The result for this case is not available in this view.");
                    }
                }
                else
                {
                    MessageBox.Show("The result for this case is not available in this view.");
                }
            }
            else
            {
                MessageBox.Show("Select a case.");
            }
        }
Пример #9
0
        public void PrintLabels(Business.Test.AccessionOrder accessionOrder, Business.Test.AliquotOrder aliquotOrder)
        {
            Business.Test.Model.Test kappa  = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("360"); // KappaByISH();
            Business.Test.Model.Test lambda = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("361"); // LambdaByISH();
            Business.Test.Model.Test u6     = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("383"); // U6();

            //add test order that need to be ordered automatically
            if (accessionOrder.PanelSetOrderCollection.DoesStainOrderExist(kappa.TestId) == true && accessionOrder.PanelSetOrderCollection.DoesStainOrderExist(lambda.TestId) == true)
            {
                if (accessionOrder.PanelSetOrderCollection.DoesStainOrderExist(u6.TestId) == false)
                {
                    Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrderByTestId(kappa.TestId);
                    YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(panelSetOrder.ReportNo, u6, null, null, false, aliquotOrder, false, false, accessionOrder.TaskOrderCollection);
                    accessionOrder.TakeATrip(orderTestVisitor);
                    this.Add(new TestOrderPanelSetOrderView(panelSetOrder, orderTestVisitor.TestOrder));
                }
            }

            //add slides and print.
            foreach (TestOrderPanelSetOrderView item in this)
            {
                Business.Test.Model.TestOrder testOrder = accessionOrder.PanelSetOrderCollection.GetTestOrderByTestOrderId(item.TestOrderId);
                if (testOrder.SlideOrderCollection.Count == 0)
                {
                    YellowstonePathology.Business.Visitor.AddSlideOrderVisitor addSlideOrderVisitor = new Business.Visitor.AddSlideOrderVisitor(aliquotOrder, testOrder);
                    accessionOrder.TakeATrip(addSlideOrderVisitor);

                    Business.HL7View.VentanaStainOrder ventanaStainOrder = new Business.HL7View.VentanaStainOrder();
                    ventanaStainOrder.HandleOrder(accessionOrder, addSlideOrderVisitor.NewSlideOrder);
                }
            }
        }
        public override void ToXml(XElement document)
        {
            PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo);

            this.AddHeader(document, panelSetOrder, "Bone Marrow Summary");
            this.AddNextObxElement("", document, "F");

            this.AddNextObxElement("SURGICAL PATHOLOGY DIAGNOSIS: ", document, "F");

            YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();
            this.AddNextObxElement("Reference Report No: " + surgicalTestOrder.ReportNo, document, "F");

            foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in surgicalTestOrder.SurgicalSpecimenCollection)
            {
                this.HandleLongString("Specimen: " + surgicalSpecimen.DiagnosisIdFormatted + "  " + surgicalSpecimen.SpecimenOrder.Description, document, "F");
                this.HandleLongString("Diagnosis: " + surgicalSpecimen.Diagnosis, document, "F");
            }

            this.AddNextObxElement("", document, "F");
            this.AddAmendments(document);

            this.AddNextObxElement("", document, "F");
            this.AddNextObxElement("TESTING SUMMARY:", document, "F");

            List <Business.Test.PanelSetOrder> testingSummaryList = this.m_AccessionOrder.PanelSetOrderCollection.GetBoneMarrowAccessionSummaryList(panelSetOrder.ReportNo, true);
            int surgicalPanelSetId = new Test.Surgical.SurgicalTest().PanelSetId;

            for (int idx = testingSummaryList.Count - 1; idx > -1; idx--)
            {
                Business.Test.PanelSetOrder pso = testingSummaryList[idx];
                if (pso.PanelSetId != surgicalPanelSetId)
                {
                    this.AddNextObxElement("Reference Report No: " + pso.ReportNo, document, "F");
                    this.AddNextObxElement("Test Name: " + pso.PanelSetName, document, "F");
                    string result = pso.ToResultString(this.m_AccessionOrder);
                    if (result == "The result string for this test has not been implemented.")
                    {
                        if (string.IsNullOrEmpty(pso.SummaryComment) == false)
                        {
                            result = pso.SummaryComment;
                        }
                        else
                        {
                            result = "Result reported separately.";
                        }
                    }
                    this.HandleLongString(result, document, "F");
                    this.AddNextObxElement("", document, "F");
                }
            }

            this.AddNextObxElement("", document, "F");
            this.AddNextObxElement("Pathologist: " + panelSetOrder.Signature, document, "F");

            if (panelSetOrder.FinalTime.HasValue == true)
            {
                this.AddNextObxElement("E-signed " + panelSetOrder.FinalTime.Value.ToString("MM/dd/yyyy HH:mm"), document, "F");
            }
        }
Пример #11
0
        public AddbyCodeWindow(string fieldDefinitions, Business.Test.PanelSetOrder panelSetOrder)
        {
            this.m_FieldDefinitions = fieldDefinitions;
            this.m_PanelSetOrder    = panelSetOrder;
            InitializeComponent();
            DataContext = this.PanelSetOrder;

            Loaded += AddbyCodeWindow_Loaded;
        }
Пример #12
0
        public CaseReportV2(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Document.ReportSaveModeEnum reportSaveMode)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder = panelSetOrder;
            this.m_ReportSaveMode = reportSaveMode;

            this.m_ReportXml = new XmlDocument();
            this.m_NativeDocumentFormat = NativeDocumentFormatEnum.Word;
            this.m_NameSpaceManager = new XmlNamespaceManager(m_ReportXml.NameTable);
            this.m_NameSpaceManager.AddNamespace("w", "http://schemas.microsoft.com/office/word/2003/wordml");
        }
Пример #13
0
        public CaseReportV2(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Document.ReportSaveModeEnum reportSaveMode)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder  = panelSetOrder;
            this.m_ReportSaveMode = reportSaveMode;

            this.m_ReportXml            = new XmlDocument();
            this.m_NativeDocumentFormat = NativeDocumentFormatEnum.Word;
            this.m_NameSpaceManager     = new XmlNamespaceManager(m_ReportXml.NameTable);
            this.m_NameSpaceManager.AddNamespace("w", "http://schemas.microsoft.com/office/word/2003/wordml");
        }
 private void HandleWHP(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder)
 {
     Business.PanelSet.Model.PanelSetCollection womensHealthTests = Business.PanelSet.Model.PanelSetCollection.GetWomensHealthTests();
     foreach (Business.PanelSet.Model.PanelSet ps in womensHealthTests)
     {
         if (accessionOrder.PanelSetOrderCollection.Exists(ps.PanelSetId))
         {
             Business.Test.PanelSetOrder pso = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(ps.PanelSetId);
             pso.HoldDistribution = false;
         }
     }
 }
Пример #15
0
        public AmendmentSuggestedPage(Business.Test.PanelSetOrder testOrder,
                                      Business.Test.AccessionOrder accessionOrder)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder  = testOrder;
            this.m_PageHeaderText = "Amendment to surgical suggested For: " + this.m_AccessionOrder.PatientDisplayName;

            this.m_AmdendmentDesiredText = "If the diagnosis for this case has changed, an amendment to the surgical should be created.  " +
                                           "Would you like to add an amendment to the surgical?";
            InitializeComponent();

            DataContext = this;
        }
Пример #16
0
 private void HandleBigSkyDermWarning()
 {
     if (this.m_PathologistUI.AccessionOrder.ClientId == 1203)
     {
         MessageBox.Show("Warning!!! Big Sky Dermatology has a problem with their system.  When amendments are sent across the interface the providers are not notified of the new report.  We are working with E-Clinical Works to resolve this issue.  If the changes in this amendment will affect how a patient is going to be treated, it is best that you contact the provider and communicate the changes directly with them.");
         Business.Test.PanelSetOrder psoSurgical = this.m_PathologistUI.AccessionOrder.PanelSetOrderCollection.GetSurgical();
         Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution = psoSurgical.TestOrderReportDistributionCollection.GetFirstEclinical();
         if (testOrderReportDistribution != null)
         {
             testOrderReportDistribution.DistributionType = "Fax";
         }
     }
 }
Пример #17
0
        public TestOrderPanelSetOrderView(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Test.Model.TestOrder testOrder)
        {
            this.m_PanelSetOrder = panelSetOrder;
            this.m_TestOrder     = testOrder;

            this.m_ReportNo         = panelSetOrder.ReportNo;
            this.m_PanelSetName     = panelSetOrder.PanelSetName;
            this.m_TestAbbreviation = testOrder.TestAbbreviation;
            this.m_TestOrderId      = testOrder.TestOrderId;
            this.m_OrderedAsDual    = testOrder.OrderedAsDual;

            this.Update();
        }
Пример #18
0
        public BaseReport(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Document.ReportSaveModeEnum reportSaveMode)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder = panelSetOrder;
            this.m_ReportSaveMode = reportSaveMode;

            this.m_SqlStatements = new ArrayList();
            this.m_TableNames = new ArrayList();
            this.m_Data = new YellowstonePathology.Business.Document.Old.DataClasses.BaseData();
            this.m_ReportXml = new XmlDocument();
            this.m_NameSpaceManager = new XmlNamespaceManager(m_ReportXml.NameTable);
            this.m_NameSpaceManager.AddNamespace("w", "http://schemas.microsoft.com/office/word/2003/wordml");
        }
Пример #19
0
        public BaseReport(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Document.ReportSaveModeEnum reportSaveMode)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder  = panelSetOrder;
            this.m_ReportSaveMode = reportSaveMode;

            this.m_SqlStatements    = new ArrayList();
            this.m_TableNames       = new ArrayList();
            this.m_Data             = new YellowstonePathology.Business.Document.Old.DataClasses.BaseData();
            this.m_ReportXml        = new XmlDocument();
            this.m_NameSpaceManager = new XmlNamespaceManager(m_ReportXml.NameTable);
            this.m_NameSpaceManager.AddNamespace("w", "http://schemas.microsoft.com/office/word/2003/wordml");
        }
Пример #20
0
 private void AddOtherReport(YellowstonePathology.Business.Test.BoneMarrowSummary.OtherReportView otherReportView)
 {
     Business.Test.AccessionOrder accessionOrder = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(otherReportView.MasterAccessionNo, this);
     if (accessionOrder.AccessionLock.IsLockAquiredByMe == true)
     {
         Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(otherReportView.ReportNo);
         panelSetOrder.SummaryReportNo = this.m_PanelSetOrder.ReportNo;
         Business.Persistence.DocumentGateway.Instance.Save();
         this.OtherReportViewCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetOtherReportViewCollection(this.m_AccessionOrder.PatientId, this.m_AccessionOrder.MasterAccessionNo);
     }
     else
     {
         MessageBox.Show("Unable to add the selected report to the summary as that accession is locked.");
     }
 }
Пример #21
0
        public static void SerializePanelSetOrderCPTCode(Business.Test.AccessionOrder ao, string reportNo, string fileName)
        {
            JsonSerializer serializer = new JsonSerializer();

            serializer.Converters.Add(new Newtonsoft.Json.Converters.JavaScriptDateTimeConverter());
            serializer.NullValueHandling  = NullValueHandling.Include;
            serializer.DateFormatHandling = DateFormatHandling.MicrosoftDateFormat;

            using (System.IO.StreamWriter sw = new System.IO.StreamWriter(fileName))
                using (JsonWriter writer = new JsonTextWriter(sw))
                {
                    Business.Test.PanelSetOrder pso = ao.PanelSetOrderCollection.GetPanelSetOrder(reportNo);
                    serializer.Serialize(writer, pso.PanelSetOrderCPTCodeCollection);
                }
        }
Пример #22
0
        public PreviousResultDialog(Business.Test.PanelSetOrder panelSetOrder, Business.Test.AccessionOrder accessionOrder)
        {
            this.m_PanelSetOrder  = panelSetOrder;
            this.m_AccessionOrder = accessionOrder;

            this.m_TableName = Business.Persistence.PersistenceHelper.GetTableName(panelSetOrder.GetType());

            Business.Gateway.PreviousResultGateway previousResultGateway = new Business.Gateway.PreviousResultGateway();
            this.m_PreviousResultCollection = previousResultGateway.GetPreviousResultsByTestFinal(this.m_PanelSetOrder.PanelSetId, DateTime.Today.AddDays(-90), DateTime.Today, this.m_TableName);

            InitializeComponent();
            DataContext = this;

            this.Left = (SystemParameters.PrimaryScreenWidth / 2);
            this.Top  = (SystemParameters.PrimaryScreenHeight / 2) - (this.Height / 2);
        }
Пример #23
0
        private void ContextMenuDeleteReview_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewReviews.SelectedItems.Count != 0)
            {
                foreach (UI.RetrospectiveReviewListItem item in this.ListViewReviews.SelectedItems)
                {
                    Business.Test.AccessionOrder ao  = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(item.MasterAccessionNo, this);
                    Business.Test.PanelSetOrder  pso = ao.PanelSetOrderCollection.GetPanelSetOrder(item.ReportNo);
                    ao.PanelSetOrderCollection.Remove(pso);
                    Business.Persistence.DocumentGateway.Instance.Push(this);
                }

                this.m_RetrospectiveReviewList = YellowstonePathology.Business.Gateway.ReportSearchGateway.GetRetrospectiveReviews(this.m_WorkDate);
                this.NotifyPropertyChanged("RetrospectiveReviewList");
            }
        }
Пример #24
0
        public static void HandleException(Business.Test.PanelSetOrder panelSetOrder, string errorMessage)
        {
            string message = "ReportNo: " + panelSetOrder.ReportNo + ", Test: " + panelSetOrder.PanelSetName + Environment.NewLine + errorMessage;

            System.Net.Mail.MailMessage mailMessage = new System.Net.Mail.MailMessage("*****@*****.**", "*****@*****.**", System.Windows.Forms.SystemInformation.UserName, message);
            mailMessage.To.Add("*****@*****.**");
            System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("10.1.2.111");

            Uri uri = new Uri("http://tempuri.org/");

            System.Net.ICredentials      credentials = System.Net.CredentialCache.DefaultCredentials;
            System.Net.NetworkCredential credential  = credentials.GetCredential(uri, "Basic");

            client.Credentials = credential;
            client.Send(mailMessage);
        }
Пример #25
0
        private void ButtonMatch_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewAccession.SelectedItem != null)
            {
                if (this.ListViewADT.SelectedItem != null)
                {
                    Business.Billing.Model.AccessionListItem aoItem = (Business.Billing.Model.AccessionListItem) this.ListViewAccession.SelectedItem;
                    Business.Test.AccessionOrder             ao     = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(aoItem.MasterAccessionNo, this);
                    Business.Test.PanelSetOrder pso = ao.PanelSetOrderCollection.GetPanelSetOrder(aoItem.ReportNo);

                    Business.Billing.Model.ADTListItem adtItem = (Business.Billing.Model.ADTListItem) this.ListViewADT.SelectedItem;
                    if (adtItem.MedicalRecord.StartsWith("V") == true)
                    {
                        foreach (Business.Test.PanelSetOrderCPTCodeBill psocb in pso.PanelSetOrderCPTCodeBillCollection)
                        {
                            if (psocb.BillTo == "Client")
                            {
                                psocb.MedicalRecord = adtItem.MedicalRecord;
                                psocb.Account       = adtItem.Account;
                            }

                            if (psocb.PostDate.HasValue == false)
                            {
                                psocb.PostDate = this.m_PostDate;
                            }
                        }

                        Business.Persistence.DocumentGateway.Instance.Push(ao, this);
                        this.m_AccessionList = Business.Gateway.AccessionOrderGateway.GetSVHNotPosted();
                        this.m_ADTList       = new List <Business.Billing.Model.ADTListItem>();
                        this.NotifyPropertyChanged(string.Empty);
                    }
                    else
                    {
                        MessageBox.Show("The MRN does not start with a V.");
                    }
                }
                else
                {
                    MessageBox.Show("You must first select an ADT item to Match.");
                }
            }
            else
            {
                MessageBox.Show("You must first select and Accession Order to Match.");
            }
        }
Пример #26
0
        private void AddRandomTest(DateTime workDate)
        {
            List <int> exclusionList = new List <int>();

            exclusionList.Add(262);
            exclusionList.Add(197);

            Business.Search.ReportSearchList list = YellowstonePathology.Business.Gateway.ReportSearchGateway.GetPossibleRetrospectiveReviews(workDate);
            if (list.Count != 0)
            {
                int count = list.Count;

                double tenPercentOfCount = Math.Round((count * .1), 0);

                Random rnd = new Random();
                int    i   = 0;
                while (true)
                {
                    int    nextRnd = rnd.Next(0, count - 1);
                    string nextMasterAccessionNo = list[nextRnd].MasterAccessionNo;

                    Business.Test.AccessionOrder ao = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(nextMasterAccessionNo, this);

                    if (ao.PanelSetOrderCollection.HasPanelSetBeenOrdered(exclusionList) == false)
                    {
                        YellowstonePathology.Business.Test.RetrospectiveReview.RetrospectiveReviewTest retrospectiveReviewTest = new YellowstonePathology.Business.Test.RetrospectiveReview.RetrospectiveReviewTest();
                        YellowstonePathology.Business.Test.TestOrderInfo            testOrderInfo         = new Business.Test.TestOrderInfo(retrospectiveReviewTest, null, false);
                        YellowstonePathology.Business.Visitor.OrderTestOrderVisitor orderTestOrderVisitor = new Business.Visitor.OrderTestOrderVisitor(testOrderInfo);
                        ao.TakeATrip(orderTestOrderVisitor);
                        Business.Test.PanelSetOrder pso = ao.PanelSetOrderCollection.GetPanelSetOrder(262);
                        pso.AssignedToId = 0;
                    }

                    i += 1;
                    if (i == tenPercentOfCount)
                    {
                        Business.Persistence.DocumentGateway.Instance.Push(this);
                        break;
                    }
                }
            }
            else
            {
                MessageBox.Show("There are no cases to choose from for this day.");
            }
        }
Пример #27
0
 public virtual void AddAmendments(XElement document)
 {
     Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo);
     foreach (YellowstonePathology.Business.Amendment.Model.Amendment amendment in panelSetOrder.AmendmentCollection)
     {
         if (amendment.Final == true)
         {
             this.AddNextObxElement(amendment.AmendmentType + ": " + amendment.AmendmentDate.Value.ToString("MM/dd/yyyy"), document, "C");
             this.HandleLongString(amendment.Text, document, "C");
             if (amendment.RequirePathologistSignature == true)
             {
                 this.AddNextObxElement("Signature: " + amendment.PathologistSignature, document, "C");
             }
             this.AddNextObxElement("", document, "C");
         }
     }
 }
Пример #28
0
        private bool AreAllResultsReportable()
        {
            bool result = true;

            Business.Test.PanelSetOrder        pso            = new Business.Test.PanelSetOrder();
            List <Business.Test.PanelSetOrder> panelSetOrders = this.m_AccessionOrder.PanelSetOrderCollection.GetBoneMarrowAccessionSummaryList(this.m_PanelSetOrder.ReportNo, true);

            foreach (Business.Test.PanelSetOrder panelSetOrder in panelSetOrders)
            {
                if (panelSetOrder.ToResultString(this.m_AccessionOrder) == pso.ToResultString(this.m_AccessionOrder))
                {
                    result = false;
                    break;
                }
            }
            return(result);
        }
Пример #29
0
        public void MatchAccessionOrdersToADT(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            this.m_BackgroundWorker.ReportProgress(1, "Starting matching SVH ADT: " + DateTime.Now.ToLongTimeString());
            List <Business.Billing.Model.AccessionListItem> accessionList = Business.Gateway.AccessionOrderGateway.GetSVHNotPosted();

            foreach (Business.Billing.Model.AccessionListItem accessionListItem in accessionList)
            {
                this.m_BackgroundWorker.ReportProgress(1, "Looking for a match for: " + accessionListItem.MasterAccessionNo);

                Business.ClientOrder.Model.ClientOrderCollection clientOrdersNeedingRegistration = Business.Gateway.ClientOrderGateway.GetClientOrdersByMasterAccessionNo(accessionListItem.MasterAccessionNo);
                Business.ClientOrder.Model.ClientOrder           clientOrderNeedingRegistration  = clientOrdersNeedingRegistration[0];

                Business.ClientOrder.Model.ClientOrderCollection possibleNewClientOrders = Business.Gateway.ClientOrderGateway.GetClientOrdersByPatientName(accessionListItem.PFirstName, accessionListItem.PLastName);
                foreach (Business.ClientOrder.Model.ClientOrder clientOrder in possibleNewClientOrders)
                {
                    if (clientOrder.OrderDate > clientOrderNeedingRegistration.OrderDate &&
                        clientOrder.PBirthdate == clientOrderNeedingRegistration.PBirthdate &&
                        clientOrder.ProviderName == "ANGELA DURDEN" &&
                        clientOrder.SvhMedicalRecord.StartsWith("V"))
                    {
                        Business.Test.AccessionOrder ao  = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(accessionListItem.MasterAccessionNo, this);
                        Business.Test.PanelSetOrder  pso = ao.PanelSetOrderCollection.GetPanelSetOrder(accessionListItem.ReportNo);

                        foreach (Business.Test.PanelSetOrderCPTCodeBill psocb in pso.PanelSetOrderCPTCodeBillCollection)
                        {
                            this.m_BackgroundWorker.ReportProgress(1, "Found a match for: " + accessionListItem.MasterAccessionNo);
                            if (psocb.BillTo == "Client")
                            {
                                psocb.MedicalRecord = clientOrder.SvhMedicalRecord;
                                psocb.Account       = clientOrder.SvhAccountNo;
                            }

                            if (psocb.PostDate.HasValue == false)
                            {
                                psocb.PostDate = this.m_PostDate;
                            }
                        }

                        Business.Persistence.DocumentGateway.Instance.Push(ao, this);
                        break;
                    }
                }
            }
            this.m_BackgroundWorker.ReportProgress(1, "Completed SVH ADT Matching: " + DateTime.Now.ToLongTimeString());
            Business.Gateway.BillingGateway.UpdateBillingEODProcess(this.m_PostDate, "ADTMatch");
        }
Пример #30
0
        private void MenuItemLinkPDF_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewFiles.SelectedItem != null)
            {
                if (this.ListViewPanelSetOrders.SelectedItem != null)
                {
                    Business.Test.PanelSetOrder panelSetOrder = (Business.Test.PanelSetOrder) this.ListViewPanelSetOrders.SelectedItem;
                    Business.PanelSet.Model.PanelSetCollection panelSetCollection = Business.PanelSet.Model.PanelSetCollection.GetAll();
                    Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);

                    string sourcePDFFileName             = (string)this.ListViewFiles.SelectedItem;
                    Business.OrderIdParser orderIdParser = new Business.OrderIdParser(panelSetOrder.ReportNo);
                    string casePath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser);

                    if (panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.PublishedDocument)
                    {
                        string pdfCaseFilePath = Business.Document.CaseDocument.GetCaseFileNamePDF(orderIdParser);
                        System.IO.File.Copy(sourcePDFFileName, pdfCaseFilePath, true);

                        string xpsCaseFilePath = Business.Document.CaseDocument.GetCaseFileNameXPS(orderIdParser);
                        this.GhostPDFToPNG(sourcePDFFileName, xpsCaseFilePath);

                        string tifCaseFilePath = Business.Document.CaseDocument.GetCaseFileNameTif(orderIdParser);
                        Business.Helper.FileConversionHelper.ConvertXPSToTIF(xpsCaseFilePath, tifCaseFilePath);
                    }
                    else
                    {
                        string neoCaseFileName = Business.Document.CaseDocument.GetCaseFileNamePDF(orderIdParser).Replace(".pdf", ".neoreport.pdf");
                        System.IO.File.Copy(sourcePDFFileName, neoCaseFileName, true);
                    }

                    this.m_CaseDocuments = System.IO.Directory.GetFiles(casePath).ToList <string>();
                    this.NotifyPropertyChanged(string.Empty);
                    MessageBox.Show("The pdf has been linked to this case.");
                }
                else
                {
                    MessageBox.Show("You must have a Test selected to perform this operation.");
                }
            }
            else
            {
                MessageBox.Show("You must have a file selected to perform this operation.");
            }
        }
Пример #31
0
        public XpsAdditionalTesting(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrder panelSetOrder)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder  = panelSetOrder;
            Business.OrderIdParser orderIdParser = new OrderIdParser(panelSetOrder.ReportNo);
            this.m_DestinationPath = Business.Document.CaseDocument.GetNotificationDocumentFilePath(orderIdParser);

            this.m_PlaceHolders = new Dictionary <string, string>();
            this.m_PlaceHolders.Add(@"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,./\-_", string.Empty);
            this.m_PlaceHolders.Add(@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,-", string.Empty);
            this.m_PlaceHolders.Add("physician_name", this.m_AccessionOrder.PhysicianName);
            this.m_PlaceHolders.Add("client_name", this.m_AccessionOrder.ClientName);
            this.m_PlaceHolders.Add("report_number", this.m_PanelSetOrder.ReportNo);
            this.m_PlaceHolders.Add("accession_date", this.m_AccessionOrder.AccessionDate.ToString());
            this.m_PlaceHolders.Add("collection_date", this.m_AccessionOrder.CollectionDate.ToString());
            this.m_PlaceHolders.Add("patient_name", this.m_AccessionOrder.PatientDisplayName);
            this.m_PlaceHolders.Add("patient_birthdate", this.m_AccessionOrder.PBirthdate.ToString());
            this.m_PlaceHolders.Add("additional_testing", this.m_PanelSetOrder.PanelSetName);
        }
Пример #32
0
 private void MenuItemCPTCodes_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewPanelSetOrders.SelectedItem != null)
     {
         Business.Test.PanelSetOrder      panelSetOrder = (Business.Test.PanelSetOrder) this.ListViewPanelSetOrders.SelectedItem;
         Business.PanelSet.Model.PanelSet panelSet      = Business.PanelSet.Model.PanelSetCollection.GetAll().GetPanelSet(panelSetOrder.PanelSetId);
         if (panelSet is YellowstonePathology.Business.PanelSet.Model.FISHTest)
         {
             this.m_LoginPageWindow = new Login.Receiving.LoginPageWindow();
             Billing.AddFISHCPTCodePage addCPTCodePage = new Billing.AddFISHCPTCodePage(panelSetOrder.ReportNo, this.m_AccessionOrder);
             addCPTCodePage.Next += ResultPathFactory_Finished;
             this.m_LoginPageWindow.PageNavigator.Navigate(addCPTCodePage);
             this.m_LoginPageWindow.ShowDialog();
         }
         else
         {
             MessageBox.Show("The selected Test is not a FISH test.");
         }
     }
 }
Пример #33
0
        private void ButtonAddSlide_Click(object sender, RoutedEventArgs e)
        {
            Business.Test.Model.Test kappa  = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("360"); // KappaByISH();
            Business.Test.Model.Test lambda = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("361"); // LambdaByISH();
            Business.Test.Model.Test u6     = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("383"); // U6();

            //add test order that need to be ordered automatically
            if (this.m_AccessionOrder.PanelSetOrderCollection.DoesStainOrderExist(kappa.TestId) == true && this.m_AccessionOrder.PanelSetOrderCollection.DoesStainOrderExist(lambda.TestId) == true)
            {
                if (this.m_AccessionOrder.PanelSetOrderCollection.DoesStainOrderExist(u6.TestId) == false)
                {
                    Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrderByTestId(kappa.TestId);
                    YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(panelSetOrder.ReportNo, u6, null, null, false, this.m_AliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection);
                    this.m_AccessionOrder.TakeATrip(orderTestVisitor);
                }
            }

            YellowstonePathology.Business.Visitor.AddSlideOrderVisitor addSlideOrderVisitor = new Business.Visitor.AddSlideOrderVisitor(this.m_AliquotOrder, this.m_TestOrder);
            this.m_AccessionOrder.TakeATrip(addSlideOrderVisitor);
        }