public void Execute(YellowstonePathology.Business.Amendment.Model.Amendment amendment, 
     YellowstonePathology.Business.Rules.ExecutionStatus executionStatus, YellowstonePathology.Business.User.SystemIdentity systemIdentity)
 {
     this.m_Amendment = amendment;
     this.m_ExecutionStatus = executionStatus;
     this.m_SystemIdentity = systemIdentity;
     this.m_Rule.Execute(this.m_ExecutionStatus);
 }
 public void Execute(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Amendment.Model.Amendment amendment)
 {
     this.m_AccessionOrder = accessionOrder;
     this.m_PanelSetOrder = panelSetOrder;
     this.m_Amendment = amendment;
     this.m_ExecutionStatus = new ExecutionStatus();
     this.m_Rule.Execute(m_ExecutionStatus);
 }
        private void ButtonAdd_Click(object sender, RoutedEventArgs e)
        {
            YellowstonePathology.Business.Amendment.Model.Amendment amendment = this.m_AmendmentUI.PanelSetOrder.AddAmendment();
            amendment.TestResultAmendmentFill(this.m_AmendmentUI.ReportNo, this.m_AmendmentUI.AssignedToId, "???");
            //this.m_AmendmentUI.Save(false);

            NotifyPropertyChanged("Amendments");
            this.ListViewAmendments.SelectedIndex = 0;
        }
Beispiel #4
0
        private void TreeViewAmendment_Selected(object sender, RoutedEventArgs e)
        {
            TreeViewItem item = e.OriginalSource as TreeViewItem;

            YellowstonePathology.Business.Amendment.Model.Amendment amendment = item.DataContext as YellowstonePathology.Business.Amendment.Model.Amendment;
            if (amendment != null)
            {
                TreeViewItem parent = FindParent <TreeViewItem>(item);
            }
        }
Beispiel #5
0
 public void SetAmendmentReference(YellowstonePathology.Business.Amendment.Model.Amendment amendment)
 {
     foreach (SurgicalAudit surgicalAudit in this)
     {
         if (surgicalAudit.AmendmentId == amendment.AmendmentId)
         {
             surgicalAudit.Amendment = amendment;
         }
     }
 }
Beispiel #6
0
 public void ContextMenuEditAmendment_Click(object sender, RoutedEventArgs args)
 {
     if (this.TreeViewAmendment.SelectedItem != null)
     {
         YellowstonePathology.Business.Amendment.Model.Amendment amendment = (YellowstonePathology.Business.Amendment.Model.Amendment) this.TreeViewAmendment.SelectedItem;
         YellowstonePathology.UI.AmendmentV2 amendmentV2 = new AmendmentV2(amendment, this.m_AccessionOrder, this.m_Parent);
         amendmentV2.ShowDialog();
         this.m_PanelSetOrderAmendmentViewCollection.Refresh(this.m_AccessionOrder);
     }
 }
        private void ComboBoxAmendmentUsers_SelectionChanged(object sender, RoutedEventArgs args)
        {
            ComboBox comboBox = (ComboBox)sender;

            if (comboBox.SelectedItem != null)
            {
                YellowstonePathology.Business.Amendment.Model.Amendment amendment      = (YellowstonePathology.Business.Amendment.Model.Amendment)comboBox.Tag;
                YellowstonePathology.Business.User.SystemUser           systemUserItem = (YellowstonePathology.Business.User.SystemUser)comboBox.SelectedItem;
                amendment.PathologistSignature = systemUserItem.Signature;
            }
        }
Beispiel #8
0
        public void HandleNewAmendment(YellowstonePathology.Business.Amendment.Model.Amendment amendment)
        {
            SurgicalAudit surgicalAudit = this.m_SurgicalAuditCollection.GetNextItem(amendment.AmendmentId, this, this.m_AssignedToId, this.AssignedToId);

            foreach (SurgicalSpecimen surgicalSpecimen in this.m_SurgicalSpecimenCollection)
            {
                YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenAudit surgicalSpecimenAudit = surgicalAudit.SurgicalSpecimenAuditCollection.GetNextItem(surgicalAudit.SurgicalAuditId, surgicalSpecimen, amendment.AmendmentId);
                surgicalAudit.SurgicalSpecimenAuditCollection.Add(surgicalSpecimenAudit);
            }

            this.m_SurgicalAuditCollection.Add(surgicalAudit);
        }
Beispiel #9
0
 public void ContextMenuEditAmendment_Click(object sender, RoutedEventArgs args)
 {
     if (this.TreeViewAmendment.SelectedItem != null)
     {
         if (this.TreeViewAmendment.SelectedItem.GetType().Name == "Amendment")
         {
             YellowstonePathology.Business.Amendment.Model.Amendment amendment = (YellowstonePathology.Business.Amendment.Model.Amendment) this.TreeViewAmendment.SelectedItem;
             YellowstonePathology.UI.AmendmentV2 amendmentV2 = new AmendmentV2(amendment, this.m_AccessionOrder);
             amendmentV2.ShowDialog();
         }
     }
 }
Beispiel #10
0
        private void HyperLinkFinalize_Click(object sender, RoutedEventArgs e)
        {
            bool canFinal = false;

            YellowstonePathology.Business.Audit.Model.AuditResult auditResult = this.m_PanelSetOrder.IsOkToFinalize(this.m_AccessionOrder);
            if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.OK)
            {
                canFinal = true;
            }
            else if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.Warning)
            {
                MessageBoxResult messageBoxResult = MessageBox.Show(auditResult.Message, "Additional testing required", MessageBoxButton.OKCancel, MessageBoxImage.Information, MessageBoxResult.OK);
                if (messageBoxResult == MessageBoxResult.OK)
                {
                    canFinal = true;
                    YellowstonePathology.Business.Test.Her2AmplificationByIHC.Her2AmplificationByIHCTest her2AmplificationByIHCTest = new Business.Test.Her2AmplificationByIHC.Her2AmplificationByIHCTest();
                    this.OrderATest(her2AmplificationByIHCTest);
                    YellowstonePathology.Business.Test.HER2AnalysisSummary.HER2AnalysisSummaryTest her2AmplificationSummaryTest = new Business.Test.HER2AnalysisSummary.HER2AnalysisSummaryTest();
                    this.OrderATest(her2AmplificationSummaryTest);
                }
            }
            else
            {
                MessageBox.Show(auditResult.Message);
            }

            if (canFinal == true)
            {
                YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder      = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
                YellowstonePathology.Business.Test.FinalizeTestResult      finalizeTestResult = this.m_PanelSetOrder.Finish(this.m_AccessionOrder);
                this.HandleFinalizeTestResult(finalizeTestResult);

                if (this.m_PanelSetOrder.Result != YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationResultEnum.Equivocal.ToString())
                {
                    YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest();

                    if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true)
                    {
                        YellowstonePathology.Business.Test.PanelSetOrder surgicalPanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId);
                        YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(surgicalPanelSetOrder.ReportNo);
                        if (amendmentCollection.HasAmendmentForReport(this.m_PanelSetOrder.ReportNo) == false)
                        {
                            string amendmentText = YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHSystemGeneratedAmendmentText.AmendmentText(this.m_PanelSetOrder);
                            YellowstonePathology.Business.Amendment.Model.Amendment amendment = this.m_AccessionOrder.AddAmendment(surgicalPanelSetOrder.ReportNo);
                            amendment.TestResultAmendmentFill(surgicalPanelSetOrder.ReportNo, surgicalPanelSetOrder.AssignedToId, amendmentText);
                            amendment.ReferenceReportNo = this.m_PanelSetOrder.ReportNo;
                            amendment.SystemGenerated   = true;
                        }
                    }
                }
            }
        }
Beispiel #11
0
 private void ButtonDelete_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewAmendments.SelectedItem != null)
     {
         MessageBoxResult result = MessageBox.Show("Are you sure you want to delete this amendment?", "Delete", MessageBoxButton.YesNo, MessageBoxImage.Question);
         if (result == MessageBoxResult.Yes)
         {
             YellowstonePathology.Business.Amendment.Model.Amendment selectedAmendment = (YellowstonePathology.Business.Amendment.Model.Amendment) this.ListViewAmendments.SelectedItem;
             this.m_AmendmentUI.AccessionOrder.DeleteAmendment(selectedAmendment.AmendmentId);
             this.ListViewAmendments.SelectedIndex = -1;
         }
     }
 }
        private void BuildAmendment(Test.PanelSetOrder panelSetOrder, XElement panelSetOrderElement)
        {
            List <XElement> amendmentElements = (from item in panelSetOrderElement.Elements("AmendmentCollection")
                                                 select item).ToList <XElement>();

            foreach (XElement amendmentElement in amendmentElements.Elements("Amendment"))
            {
                YellowstonePathology.Business.Amendment.Model.Amendment     amendment         = new YellowstonePathology.Business.Amendment.Model.Amendment();
                YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(amendmentElement, amendment);
                xmlPropertyWriter.Write();
                panelSetOrder.AmendmentCollection.Add(amendment);
            }
        }
Beispiel #13
0
        private void HyperLinkFinalizeResults_Click(object sender, RoutedEventArgs e)
        {
            bool okToFinal = false;

            YellowstonePathology.Business.Audit.Model.AuditResult auditResult = this.m_PanelSetOrder.IsOkToFinalize(this.m_AccessionOrder);
            if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.OK)
            {
                okToFinal = true;
            }
            else if (auditResult.Status == Business.Audit.Model.AuditStatusEnum.Warning)
            {
                MessageBoxResult messageBoxResult = MessageBox.Show(auditResult.Message, "Results do not match the finaled summary results",
                                                                    MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);
                if (messageBoxResult == MessageBoxResult.Yes)
                {
                    okToFinal = true;
                }
            }
            else
            {
                MessageBox.Show(auditResult.Message);
            }

            if (okToFinal == true)
            {
                YellowstonePathology.Business.Test.FinalizeTestResult finalizeTestResult = this.m_PanelSetOrder.Finish(this.m_AccessionOrder);
                this.HandleFinalizeTestResult(finalizeTestResult);
                if (this.m_PanelSetOrder.Accepted == false)
                {
                    this.m_PanelSetOrder.Accept();
                }

                YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);

                YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest();

                if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true)
                {
                    YellowstonePathology.Business.Test.PanelSetOrder surgicalPanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId);
                    YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(surgicalPanelSetOrder.ReportNo);
                    if (amendmentCollection.HasAmendmentForReport(this.m_PanelSetOrder.ReportNo) == false)
                    {
                        string amendmentText = YellowstonePathology.Business.Test.PDL122C3.PDL1SP22C3SystemGeneratedAmendmentText.AmendmentText(this.m_PanelSetOrder);
                        YellowstonePathology.Business.Amendment.Model.Amendment amendment = this.m_AccessionOrder.AddAmendment(surgicalPanelSetOrder.ReportNo);
                        amendment.TestResultAmendmentFill(surgicalPanelSetOrder.ReportNo, surgicalPanelSetOrder.AssignedToId, amendmentText);
                        amendment.ReferenceReportNo = this.m_PanelSetOrder.ReportNo;
                        amendment.SystemGenerated   = true;
                    }
                }
            }
        }
        public AmendmentV2(YellowstonePathology.Business.Amendment.Model.Amendment amendment, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            this.m_Amendment = amendment;
            this.m_AccessionOrder = accessionOrder;

            this.m_Users = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.AmendmentSigner, true);
            InitializeComponent();

            this.DataContext = this.m_Amendment;
            this.comboBoxAmendmentUsers.ItemsSource = this.m_Users;

            Loaded += AmendmentV2_Loaded;
            Unloaded += AmendmentV2_Unloaded;
        }
Beispiel #15
0
        public override YellowstonePathology.Business.Amendment.Model.Amendment AddAmendment()
        {
            YellowstonePathology.Business.Amendment.Model.Amendment amendment = base.AddAmendment();
            SurgicalAudit surgicalAudit = this.m_SurgicalAuditCollection.GetNextItem(amendment.AmendmentId, this, this.m_AssignedToId, this.AssignedToId);

            foreach (SurgicalSpecimen surgicalSpecimen in this.m_SurgicalSpecimenCollection)
            {
                YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenAudit surgicalSpecimenAudit = surgicalAudit.SurgicalSpecimenAuditCollection.GetNextItem(surgicalAudit.SurgicalAuditId, surgicalSpecimen, amendment.AmendmentId);
                surgicalAudit.SurgicalSpecimenAuditCollection.Add(surgicalSpecimenAudit);
            }

            this.m_SurgicalAuditCollection.Add(surgicalAudit);
            return(amendment);
        }
Beispiel #16
0
        public AmendmentV2(YellowstonePathology.Business.Amendment.Model.Amendment amendment, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            this.m_Amendment      = amendment;
            this.m_AccessionOrder = accessionOrder;

            this.m_Users = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.AmendmentSigner, true);
            InitializeComponent();

            this.DataContext = this.m_Amendment;
            this.comboBoxAmendmentUsers.ItemsSource = this.m_Users;

            Loaded   += AmendmentV2_Loaded;
            Unloaded += AmendmentV2_Unloaded;
        }
Beispiel #17
0
        public AmendmentPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
                             YellowstonePathology.Business.Amendment.Model.Amendment amendment,
                             YellowstonePathology.Business.User.SystemIdentity systemIdentity)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_Amendment      = amendment;
            this.m_SystemIdentity = systemIdentity;
            this.AmendmentSigners = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.AmendmentSigner, true);

            this.m_PageHeaderText = "Amendment For: " + this.m_AccessionOrder.PatientDisplayName + " (" + this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical().ReportNo + ")";

            InitializeComponent();

            DataContext = this;
        }
Beispiel #18
0
        public AmendmentPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder,            
            YellowstonePathology.Business.Amendment.Model.Amendment amendment,
            YellowstonePathology.Business.User.SystemIdentity systemIdentity)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_Amendment = amendment;
            this.m_SystemIdentity = systemIdentity;
            this.AmendmentSigners = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.AmendmentSigner, true);

            this.m_PageHeaderText = "Amendment For: " + this.m_AccessionOrder.PatientDisplayName + " (" +this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical().ReportNo + ")";

            InitializeComponent();

            DataContext = this;
        }
Beispiel #19
0
        private bool ShowAmendmentPage()
        {
            bool result = false;

            if (this.SurgicalAmendmentExistsForThisSummary() == true)
            {
                result = true;
                YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder     surgicalTestOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();
                YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendments        = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(surgicalTestOrder.ReportNo);
                YellowstonePathology.Business.Amendment.Model.Amendment           amendment         = amendments.GetAmendmentForReferenceReportNo(this.m_TestOrder.ReportNo);
                AmendmentPage amendmentPage = new AmendmentPage(this.m_AccessionOrder, amendment, this.m_SystemIdentity);
                amendmentPage.Back   += AmendmentPage_Back;
                amendmentPage.Finish += AmendmentPage_Finish;
                this.m_PageNavigator.Navigate(amendmentPage);
            }
            return(result);
        }
Beispiel #20
0
 private void HyperLinkAddAmendment_Click(object sender, RoutedEventArgs e)
 {
     YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest();
     if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetSurgical.PanelSetId) == true)
     {
         YellowstonePathology.Business.Test.PanelSetOrder surgicalPanelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId);
         YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(surgicalPanelSetOrder.ReportNo);
         if (amendmentCollection.HasAmendmentForReport(this.m_PanelSetOrder.ReportNo) == false)
         {
             YellowstonePathology.Business.Amendment.Model.Amendment amendment = this.m_AccessionOrder.AddAmendment(surgicalPanelSetOrder.ReportNo);
             amendment.TestResultAmendmentFill(surgicalPanelSetOrder.ReportNo, surgicalPanelSetOrder.AssignedToId, "Bone Marrow Summary:" + Environment.NewLine);
             amendment.ReferenceReportNo = this.m_PanelSetOrder.ReportNo;
             amendment.SystemGenerated   = true;
             amendment.RevisedDiagnosis  = true;
         }
     }
     this.Next(this, new EventArgs());
 }
Beispiel #21
0
        private bool ShowAmendmentPage()
        {
            bool result = false;

            if (this.m_AccessionOrder.PanelSetOrderCollection.HasSurgical() == true)
            {
                if (this.m_PanelSetOrder.Result != YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationResultEnum.Equivocal.ToString())
                {
                    YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder     surgicalTestOrder   = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();
                    YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(surgicalTestOrder.ReportNo);
                    if (amendmentCollection.HasAmendmentForReferenceReportNo(this.m_PanelSetOrder.ReportNo) == true)
                    {
                        result = true;
                        YellowstonePathology.Business.Amendment.Model.Amendment amendment = amendmentCollection.GetAmendmentForReferenceReportNo(this.m_PanelSetOrder.ReportNo);
                        AmendmentPage amendmentPage = new AmendmentPage(this.m_AccessionOrder, amendment, this.m_SystemIdentity);
                        amendmentPage.Back   += AmendmentPage_Back;
                        amendmentPage.Finish += AmendmentPage_Finish;
                        this.m_PageNavigator.Navigate(amendmentPage);
                    }
                }
            }
            return(result);
        }
 public void Execute(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Amendment.Model.Amendment amendment)
 {
     this.m_AccessionOrder  = accessionOrder;
     this.m_PanelSetOrder   = panelSetOrder;
     this.m_Amendment       = amendment;
     this.m_ExecutionStatus = new ExecutionStatus();
     this.m_Rule.Execute(m_ExecutionStatus);
 }
        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();
        }
 private void BuildAmendment(Test.PanelSetOrder panelSetOrder, XElement panelSetOrderElement)
 {
     List<XElement> amendmentElements = (from item in panelSetOrderElement.Elements("AmendmentCollection")
                                          select item).ToList<XElement>();
     foreach (XElement amendmentElement in amendmentElements.Elements("Amendment"))
     {
         YellowstonePathology.Business.Amendment.Model.Amendment amendment = new YellowstonePathology.Business.Amendment.Model.Amendment();
         YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(amendmentElement, amendment);
         xmlPropertyWriter.Write();
         panelSetOrder.AmendmentCollection.Add(amendment);
     }
 }
Beispiel #25
0
 public void DeleteAmendment(YellowstonePathology.Business.Amendment.Model.Amendment amendment)
 {
     this.m_AccessionOrder.DeleteAmendment(amendment.AmendmentId);
     this.RunWorkspaceEnableRules();
     this.RunPathologistEnableRules();
 }
Beispiel #26
0
        public AmendmentSpellCheckList(YellowstonePathology.Business.Amendment.Model.Amendment amendment)
        {
            PropertyInfo amendmentProperty = typeof(YellowstonePathology.Business.Amendment.Model.Amendment).GetProperty("Text");

            this.Add(SpellCheckListItem.CreateSpellCheckListItem(amendmentProperty, amendment));
        }
Beispiel #27
0
 public void DeleteAmendment(YellowstonePathology.Business.Amendment.Model.Amendment amendment)
 {
     this.m_PanelSetOrder.DeleteAmendment(amendment.AmendmentId);
     this.RunPathologistEnableRules();
 }
        private void BuildAmendment(Test.PanelSetOrder panelSetOrder, XElement panelSetOrderElement)
        {
            List<XElement> amendmentElements = (from item in panelSetOrderElement.Elements("AmendmentCollection")
                                                 select item).ToList<XElement>();
            foreach (XElement amendmentElement in amendmentElements.Elements("Amendment"))
            {
                string amendmentId = amendmentElement.Element("AmendmentId").Value;
                YellowstonePathology.Business.Amendment.Model.Amendment amendment = null;
                if (panelSetOrder.AmendmentCollection.Exists(amendmentId) == true)
                {
                    amendment = panelSetOrder.AmendmentCollection.GetAmendment(amendmentId);
                }
                else
                {
                    amendment = new YellowstonePathology.Business.Amendment.Model.Amendment();
                    panelSetOrder.AmendmentCollection.Add(amendment);
                }

                YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(amendmentElement, amendment);
                xmlPropertyWriter.Write();
            }
        }