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");
            }
        }
 public override void Run()
 {
     this.m_Status = AuditStatusEnum.OK;
     this.m_Message.Clear();
     YellowstonePathology.Business.Test.Surgical.SurgicalTest surgicalTest = new Test.Surgical.SurgicalTest();
     YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest lynchSyndromeIHCPanelTest = new Test.LynchSyndrome.LynchSyndromeIHCPanelTest();
     YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeEvaluationTest lynchSyndromeEvaluationTest = new Test.LynchSyndrome.LynchSyndromeEvaluationTest();
     YellowstonePathology.Business.Test.ComprehensiveColonCancerProfile.ComprehensiveColonCancerProfileTest comprehensiveColonCancerProfileTest = new Test.ComprehensiveColonCancerProfile.ComprehensiveColonCancerProfileTest();
     if (this.m_AccessionOrder.PanelSetOrderCollection.Count == 4 &&
         this.m_AccessionOrder.PanelSetOrderCollection.Exists(surgicalTest.PanelSetId) &&
         this.m_AccessionOrder.PanelSetOrderCollection.Exists(lynchSyndromeIHCPanelTest.PanelSetId) &&
         this.m_AccessionOrder.PanelSetOrderCollection.Exists(lynchSyndromeEvaluationTest.PanelSetId) &&
         this.m_AccessionOrder.PanelSetOrderCollection.Exists(comprehensiveColonCancerProfileTest.PanelSetId))
     {
         this.m_Status = AuditStatusEnum.Failure;
         this.m_Message.Append("This Comprehensive Colon Cancer Profile Test is not necessary. Notify IT to remove it.");
     }
 }
 public override void Visit(YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder)
 {
     if (this.m_TestOrderInfo.PanelSet.PanelSetId == 13)
     {
         Test.Surgical.SurgicalTest surgicalTest = new Test.Surgical.SurgicalTest();
         foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in this.m_AccessionOrder.SpecimenOrderCollection)
         {
             if (surgicalTest.OrderTargetTypeCollectionExclusions.Exists(specimenOrder) == false)
             {
                 if (surgicalTestOrder.SurgicalSpecimenCollection.SpecimenOrderExists(specimenOrder.SpecimenOrderId) == false)
                 {
                     YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = surgicalTestOrder.SurgicalSpecimenCollection.Add(this.m_ReportNo);
                     surgicalSpecimen.FromSpecimenOrder(specimenOrder);
                 }
             }
         }
     }
 }
Exemple #4
0
 public override void Run()
 {
     this.m_Status = AuditStatusEnum.OK;
     this.m_Message.Clear();
     YellowstonePathology.Business.Test.Surgical.SurgicalTest surgicalTest = new Test.Surgical.SurgicalTest();
     YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest   lynchSyndromeIHCPanelTest   = new Test.LynchSyndrome.LynchSyndromeIHCPanelTest();
     YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeEvaluationTest lynchSyndromeEvaluationTest = new Test.LynchSyndrome.LynchSyndromeEvaluationTest();
     YellowstonePathology.Business.Test.ComprehensiveColonCancerProfile.ComprehensiveColonCancerProfileTest comprehensiveColonCancerProfileTest = new Test.ComprehensiveColonCancerProfile.ComprehensiveColonCancerProfileTest();
     if (this.m_AccessionOrder.PanelSetOrderCollection.Count == 4 &&
         this.m_AccessionOrder.PanelSetOrderCollection.Exists(surgicalTest.PanelSetId) &&
         this.m_AccessionOrder.PanelSetOrderCollection.Exists(lynchSyndromeIHCPanelTest.PanelSetId) &&
         this.m_AccessionOrder.PanelSetOrderCollection.Exists(lynchSyndromeEvaluationTest.PanelSetId) &&
         this.m_AccessionOrder.PanelSetOrderCollection.Exists(comprehensiveColonCancerProfileTest.PanelSetId))
     {
         this.m_Status = AuditStatusEnum.Failure;
         this.m_Message.Append("This Comprehensive Colon Cancer Profile Test is not necessary. Notify IT to remove it.");
     }
 }
Exemple #5
0
        public override void Render()
        {
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\BoneMarrowSummary.2.xml";
            base.OpenTemplate();

            this.SetDemographicsV2();
            this.SetReportDistribution();

            YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(m_PanelSetOrder.ReportNo);
            YellowstonePathology.Business.Document.AmendmentSection           amendmentSection    = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(amendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.Signature);

            string surgicalResult = string.Empty;

            YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();
            string reportNo = surgicalTestOrder.ReportNo;

            XmlNode surgicalTableNode  = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='surgical_description']", this.m_NameSpaceManager);
            XmlNode descriptionRowNode = surgicalTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='surgical_description']", this.m_NameSpaceManager);
            XmlNode diagnosisRowNode   = surgicalTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='surgical_diagnosis']", this.m_NameSpaceManager);

            foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in surgicalTestOrder.SurgicalSpecimenCollection)
            {
                string description = surgicalSpecimen.DiagnosisIdFormatted + "  " + surgicalSpecimen.SpecimenOrder.Description;

                if (surgicalSpecimen.DiagnosisId > 1)
                {
                    reportNo = string.Empty;
                }

                XmlNode descriptionRowClone = descriptionRowNode.Clone();
                descriptionRowClone.SelectSingleNode("descendant::w:r[w:t='surgical_description']/w:t", this.m_NameSpaceManager).InnerText = description;
                descriptionRowClone.SelectSingleNode("descendant::w:r[w:t='surgical_report_no']/w:t", this.m_NameSpaceManager).InnerText   = reportNo;

                XmlNode diagnosisRowClone = diagnosisRowNode.Clone();
                this.SetXMLNodeParagraphDataNode(diagnosisRowClone, "surgical_diagnosis", surgicalSpecimen.Diagnosis);

                surgicalTableNode.InsertBefore(descriptionRowClone, descriptionRowNode);
                surgicalTableNode.InsertBefore(diagnosisRowClone, descriptionRowNode);
            }

            surgicalTableNode.RemoveChild(descriptionRowNode);
            surgicalTableNode.RemoveChild(diagnosisRowNode);


            XmlNode testTableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='test_name']", this.m_NameSpaceManager);
            XmlNode rowTestNode   = testTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='test_name']", this.m_NameSpaceManager);

            List <Business.Test.PanelSetOrder> testingSummaryList = this.m_AccessionOrder.PanelSetOrderCollection.GetBoneMarrowAccessionSummaryList(this.m_PanelSetOrder.ReportNo, true);
            //this.GetOtherCases(testingSummaryList);

            int surgicalPanelSetId = new Test.Surgical.SurgicalTest().PanelSetId;

            foreach (Business.Test.PanelSetOrder pso in testingSummaryList)
            {
                if (pso.PanelSetId != surgicalPanelSetId)
                {
                    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.";
                        }
                    }

                    XmlNode rowTestNodeClone = rowTestNode.Clone();
                    rowTestNodeClone.SelectSingleNode("descendant::w:r[w:t='test_name']/w:t", this.m_NameSpaceManager).InnerText      = pso.PanelSetName;
                    rowTestNodeClone.SelectSingleNode("descendant::w:r[w:t='test_report_no']/w:t", this.m_NameSpaceManager).InnerText = pso.ReportNo;

                    this.SetXMLNodeParagraphDataNode(rowTestNodeClone, "test_result", result);

                    testTableNode.InsertAfter(rowTestNodeClone, rowTestNode);
                }
            }

            testTableNode.RemoveChild(rowTestNode);
            this.ReplaceText("disclosure_statement", string.Empty);

            this.SaveReport();
        }