public override void Render()
        {
            YellowstonePathology.Business.Test.MPNExtendedReflex.MPNExtendedReflexResult mpnExtendedReflexResult = new Test.MPNExtendedReflex.MPNExtendedReflexResult(this.m_AccessionOrder);
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\MPNExtendedReflex.2.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("panelset_name", mpnExtendedReflexResult.PanelSetOrderMPNExtendedReflex.PanelSetName);
            this.ReplaceText("jak2v617_result", mpnExtendedReflexResult.JAK2V617FResult.Result);
            this.ReplaceText("calr_result", mpnExtendedReflexResult.CALRResult.Result);
            this.ReplaceText("mpl_result", mpnExtendedReflexResult.MPLResult.Result);
            this.ReplaceText("report_comment", mpnExtendedReflexResult.PanelSetOrderMPNExtendedReflex.Comment);

            base.ReplaceText("specimen_description", mpnExtendedReflexResult.SpecimenOrder.Description);
            this.ReplaceText("report_interpretation", mpnExtendedReflexResult.PanelSetOrderMPNExtendedReflex.Interpretation);
            this.ReplaceText("report_method", mpnExtendedReflexResult.PanelSetOrderMPNExtendedReflex.Method);
            this.ReplaceText("report_reference", mpnExtendedReflexResult.PanelSetOrderMPNExtendedReflex.References);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(mpnExtendedReflexResult.SpecimenOrder.CollectionDate, mpnExtendedReflexResult.SpecimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));
            this.ReplaceText("pathologist_signature", mpnExtendedReflexResult.PanelSetOrderMPNExtendedReflex.Signature);

            this.SaveReport();
        }
        public override void Render()
        {
            PanelSetOrderMDSExtendedByFish panelSetOrderMDSExtendedPanelByFish = (PanelSetOrderMDSExtendedByFish)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\MDSExtendedByFish.1.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_result", panelSetOrderMDSExtendedPanelByFish.Result);
            this.ReplaceText("report_interpretation", panelSetOrderMDSExtendedPanelByFish.Interpretation);
            this.ReplaceText("probe_set_detail", panelSetOrderMDSExtendedPanelByFish.ProbeSetDetail);
            this.ReplaceText("nuclei_scored", panelSetOrderMDSExtendedPanelByFish.NucleiScored);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            TrichomonasTestOrder reportOrderTrichomonas = (TrichomonasTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\Trichomonas.5.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(reportOrderTrichomonas.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, false);

            this.SetXmlNodeData("test_result", reportOrderTrichomonas.Result);
            this.SetXmlNodeData("test_method", reportOrderTrichomonas.Method);

            this.SetXmlNodeData("final_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.SaveReport();
        }
示例#4
0
        public override void Render()
        {
            PanelSetOrderFLT3 panelSetOrderFLT3 = (PanelSetOrderFLT3)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\FLT3.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_result", panelSetOrderFLT3.Result);
            this.ReplaceText("itd_mutation", panelSetOrderFLT3.ITDMutation);
            this.ReplaceText("itd_percentage", panelSetOrderFLT3.ITDPercentage);
            this.ReplaceText("tkd_mutation", panelSetOrderFLT3.TKDMutation);
            this.ReplaceText("report_interpretation", panelSetOrderFLT3.Interpretation);
            this.ReplaceText("report_method", panelSetOrderFLT3.Method);
            this.ReplaceText("report_references", panelSetOrderFLT3.References);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            ZAP70LymphoidPanelTestOrder panelSetOrderZap70 = (ZAP70LymphoidPanelTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\Zap70.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_result", panelSetOrderZap70.Result);
            this.SetXMLNodeParagraphData("report_comment", panelSetOrderZap70.Comment);
            this.ReplaceText("report_lymphocytes", panelSetOrderZap70.Lymphocytes);
            this.ReplaceText("report_lymphocytes", panelSetOrderZap70.Lymphocytes);
            this.ReplaceText("report_population_analysis", panelSetOrderZap70.PopulationAnalysis);
            this.ReplaceText("report_markers_performed", panelSetOrderZap70.MarkersPerformed);
            this.SetXMLNodeParagraphData("report_references", panelSetOrderZap70.References);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            YellowstonePathology.Business.Test.HPV1618ByPCR.HPV1618ByPCRTestOrder panelSetOrder = (YellowstonePathology.Business.Test.HPV1618ByPCR.HPV1618ByPCRTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HPV1618GenotypingByPCR.1.xml";
            base.OpenTemplate();

            base.SetDemographicsV2();

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(this.m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, false);

            base.ReplaceText("hpv16_result", panelSetOrder.HPV16Result);
            base.ReplaceText("hpv18_result", panelSetOrder.HPV18Result);

            if (panelSetOrder.Indication == YellowstonePathology.Business.Test.HPV1618ByPCR.HPV1618ByPCRIndication.SquamousCellCarcinoma)
            {
                base.ReplaceText("report_interpretation_header", "Interpretation");
                base.ReplaceText("report_interpretation", panelSetOrder.Interpretation);
                base.ReplaceText("pathologist_signature", panelSetOrder.Signature);

                if (panelSetOrder.FinalTime.HasValue == true)
                {
                    string esignedHeader = "*** E-signed " + panelSetOrder.FinalTime.Value.ToString("MM/dd/yyyy HH:mm") + "***";
                    base.ReplaceText("esigned_header", esignedHeader);
                }
            }
            else
            {
                base.DeleteRow("report_interpretation_header");
                base.DeleteRow("report_interpretation");
                base.DeleteRow("pathologist_signature");
                base.DeleteRow("esigned_header");
            }

            if (string.IsNullOrEmpty(panelSetOrder.Comment) == false)
            {
                base.ReplaceText("report_comment", panelSetOrder.Comment);
            }
            else
            {
                base.DeleteRow("report_comment");
            }

            base.ReplaceText("report_method", panelSetOrder.Method);

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

            this.SetReportDistribution();
            this.SetCaseHistory();

            this.SaveReport();
        }
        public override void Render()
        {
            ChromosomeAnalysisForFetalAnomalyTestOrder testOrder = (ChromosomeAnalysisForFetalAnomalyTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ChromosomeAnalysisForFetalAnomaly.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_result", testOrder.Result);
            this.ReplaceText("report_karyotype", testOrder.Karyotype);
            this.ReplaceText("report_interpretation", testOrder.Interpretation);
            this.ReplaceText("test_details", testOrder.TestDetails);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("reference_lab_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            TCellSubsetAnalysisTestOrder testOrder = (TCellSubsetAnalysisTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\TCellSubsetAnalysis.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_cd3_percent", testOrder.CD3Percent.ToString().StringAsPercent());
            this.ReplaceText("report_cd4_percent", testOrder.CD4Percent.ToString().StringAsPercent());
            this.ReplaceText("report_cd8_percent", testOrder.CD8Percent.ToString().StringAsPercent());
            string value = string.Empty;
            if(testOrder.CD4CD8Ratio.HasValue) value = Math.Round(testOrder.CD4CD8Ratio.Value, 2).ToString();
            this.ReplaceText("report_cd4cd8_ratio", value);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.References);
            this.ReplaceText("asr_comment", testOrder.ASRComment);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

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

            this.SaveReport();
        }
        public override void Render()
        {
            PDL1SP142TestOrder testOrder = (PDL1SP142TestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\PDL1SP142.1.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("stain_percent", testOrder.StainPercent);
            this.ReplaceText("report_comment", testOrder.Comment);
            this.ReplaceText("report_interpretation", testOrder.Interpretation);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.ReportReferences);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

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

            this.SaveReport();
        }
        public override void Render()
        {
            PanelSetOrderHer2AmplificationByIHC panelSetOrder = (PanelSetOrderHer2AmplificationByIHC)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\Her2AmplificationByIHC.1.xml";
            base.OpenTemplate();

            base.SetDemographicsV2();

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(this.m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            base.ReplaceText("report_result", panelSetOrder.Result);
            base.ReplaceText("report_score", panelSetOrder.Score);
            base.ReplaceText("report_percent", panelSetOrder.IntenseCompleteMembraneStainingPercent);
            base.ReplaceText("report_fixative", panelSetOrder.BreastTestingFixative);
            base.ReplaceText("report_method", panelSetOrder.Method);
            base.ReplaceText("report_interpretation", panelSetOrder.Interpretation);
            base.ReplaceText("report_reference", panelSetOrder.Reference);
            base.ReplaceText("report_disclaimer", panelSetOrder.ReportDisclaimer);

            this.ReplaceText("report_date", BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.SetXmlNodeData("pathologist_signature", this.m_PanelSetOrder.Signature);

            this.SetReportDistribution();
            this.SetCaseHistory();

            this.SaveReport();
        }
        public override void Render()
        {
            NeoARRAYSNPCytogeneticProfileTestOrder testOrder = (YellowstonePathology.Business.Test.NeoARRAYSNPCytogeneticProfile.NeoARRAYSNPCytogeneticProfileTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\NeoARRAYSNPCytogeneticProfile.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_result", testOrder.Result);
            this.ReplaceText("report_copy_number_variant", testOrder.CopyNumberVariant);
            this.ReplaceText("report_uniparental_disomy", testOrder.UniparentalDisomy);
            this.ReplaceText("report_microarray_results", testOrder.MicroarrayResults);
            this.ReplaceText("report_interpretation", testOrder.Interpretation);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.References);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            BladderCancerFISHUrovysionTestOrder testOrder = (BladderCancerFISHUrovysionTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\BladderCancerFISHUrovysion.1.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            string result = testOrder.Result;
            if (string.IsNullOrEmpty(testOrder.ResultDescription) == false) result = testOrder.ResultDescription;
            this.ReplaceText("report_result", result);
            this.SetXMLNodeParagraphData("report_interpretation", testOrder.Interpretation);
            this.SetXMLNodeParagraphData("probe_set_detail", testOrder.ProbeSetDetail);
            this.ReplaceText("nuclei_scored", testOrder.NucleiScored);
            this.SetXMLNodeParagraphData("report_references", testOrder.ReportReferences);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            YellowstonePathology.Business.Test.TestCancelled.TestCancelledTestOrder reportOrderTestCancelled = (YellowstonePathology.Business.Test.TestCancelled.TestCancelledTestOrder)this.m_PanelSetOrder;
            this.m_PanelSetOrder = reportOrderTestCancelled;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\TestCancelled.8.xml";
            base.OpenTemplate();

            base.SetDemographicsV2();

            string testName = "Test Canceled";
            if (string.IsNullOrEmpty(reportOrderTestCancelled.CancelledTestName) == false)
            {
                testName = reportOrderTestCancelled.CancelledTestName;
            }

            this.ReplaceText("test_canceled_name", testName);
            this.ReplaceText("test_cancelled_comment",  reportOrderTestCancelled.Comment);
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.Signature);

            string finalDate = YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate) + " - " + YellowstonePathology.Business.BaseData.GetMillitaryTimeString(this.m_PanelSetOrder.FinalTime);
            this.SetXmlNodeData("final_date", finalDate);

            this.SetReportDistribution();
            this.SetCaseHistory();

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.SaveReport();
        }
        public override void Render()
        {
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\LynchSyndromeIHCPanel.5.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC panelSetOrder = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)this.m_PanelSetOrder;

            YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(panelSetOrder.OrderedOnId);
            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(panelSetOrder.OrderedOn, panelSetOrder.OrderedOnId);

            string specimenDescription = specimenOrder.Description + ", Block " + aliquotOrder.Label;
            this.ReplaceText("specimen_description", specimenDescription);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.SetXmlNodeData("mlh1_result", panelSetOrder.MLH1Result);
            this.SetXmlNodeData("msh2_result", panelSetOrder.MSH2Result);
            this.SetXmlNodeData("msh6_result", panelSetOrder.MSH6Result);
            this.SetXmlNodeData("pms2_result", panelSetOrder.PMS2Result);

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

            this.SaveReport();
        }
        public override void Render()
        {
            KRASStandardReflexResult krasStandardReflexResult = KRASStandardReflexResultFactory.GetResult(this.m_PanelSetOrder.ReportNo, this.m_AccessionOrder);
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\KRASStandardReflex.2.xml";

            base.OpenTemplate();

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

            this.SetXmlNodeData("kras_result", krasStandardReflexResult.KRASStandardResult);
            this.SetXmlNodeData("braf_result", krasStandardReflexResult.BRAFV600EKResult);
            this.SetXmlNodeData("final_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            if (m_PanelSetOrder.AmendmentCollection.Count == 0)
            {
                this.SetXmlNodeData("test_result_header", "Test Result");
            }
            else // If an amendment exists show as corrected
            {
                this.SetXmlNodeData("test_result_header", "Corrected Test Result");
            }

            //delete the kras_result_detail line if not used
            YellowstonePathology.Business.Test.KRASStandard.KRASStandardNotDetectedResult krasStandardNotDetectedResult = new YellowstonePathology.Business.Test.KRASStandard.KRASStandardNotDetectedResult();
            if (krasStandardReflexResult.KRASStandardResult == krasStandardNotDetectedResult.ResultCode)
            {
                this.DeleteRow("kras_result_detail");
            }

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

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            if (string.IsNullOrEmpty(krasStandardReflexResult.KRASStandardReflexTestOrder.Comment) == false)
            {
                this.SetXMLNodeParagraphData("result_comment", krasStandardReflexResult.KRASStandardReflexTestOrder.Comment);
            }
            else
            {
                this.DeleteRow("result_comment");
            }

            this.SetXMLNodeParagraphData("tumor_nuclei_percent", krasStandardReflexResult.KRASStandardReflexTestOrder.TumorNucleiPercentage);
            this.SetXMLNodeParagraphData("report_indication_comment", krasStandardReflexResult.KRASStandardReflexTestOrder.IndicationComment);
            this.SetXMLNodeParagraphData("report_interpretation", krasStandardReflexResult.KRASStandardReflexTestOrder.Interpretation);
            this.SetXMLNodeParagraphData("report_references", krasStandardReflexResult.KRASStandardReflexTestOrder.ReportReferences);
            this.SetXMLNodeParagraphData("report_method", krasStandardReflexResult.KRASStandardReflexTestOrder.Method);
            this.SetXMLNodeParagraphData("report_disclaimer", krasStandardReflexResult.KRASStandardReflexTestOrder.GetLocationPerformedComment());

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));
            this.SetXmlNodeData("pathologist_signature", m_PanelSetOrder.Signature);
            this.SaveReport();
        }
        public override void Render()
        {
            RASRAFPanelTestOrder testOrder = (RASRAFPanelTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\RASRAFPanel.1.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("braf_result", testOrder.BRAFResult);
            this.ReplaceText("kras_result", testOrder.KRASResult);
            this.ReplaceText("nras_result", testOrder.NRASResult);
            this.ReplaceText("hras_result", testOrder.HRASResult);

            this.ReplaceText("braf_mn", testOrder.BRAFMutationName);
            this.ReplaceText("kras_mn", testOrder.KRASMutationName);
            this.ReplaceText("nras_mn", testOrder.NRASMutationName);
            this.ReplaceText("hras_mn", testOrder.HRASMutationName);

            this.ReplaceText("braf_anmn", testOrder.BRAFAlternateNucleotideMutationName);
            this.ReplaceText("kras_anmn", testOrder.KRASAlternateNucleotideMutationName);
            this.ReplaceText("nras_anmn", testOrder.NRASAlternateNucleotideMutationName);
            this.ReplaceText("hras_anmn", testOrder.HRASAlternateNucleotideMutationName);

            this.ReplaceText("braf_cons", testOrder.BRAFConsequence);
            this.ReplaceText("kras_cons", testOrder.KRASConsequence);
            this.ReplaceText("nras_cons", testOrder.NRASConsequence);
            this.ReplaceText("hras_cons", testOrder.HRASConsequence);

            this.ReplaceText("braf_peop", testOrder.BRAFPredictedEffectOnProtein);
            this.ReplaceText("kras_peop", testOrder.KRASPredictedEffectOnProtein);
            this.ReplaceText("nras_peop", testOrder.NRASPredictedEffectOnProtein);
            this.ReplaceText("hras_peop", testOrder.HRASPredictedEffectOnProtein);

            this.ReplaceText("report_interpretation", testOrder.Interpretation);
            this.ReplaceText("report_comment", testOrder.Comment);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.ReportReferences);
            this.ReplaceText("report_disclaimer", testOrder.ReportDisclaimer);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("referencelab_finaldate", BaseData.GetShortDateTimeString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            KRASStandardTestOrder panelSetOrder = (KRASStandardTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\KRASStandard.1.xml";
            base.OpenTemplate();

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

            this.SetXmlNodeData("report_result", panelSetOrder.Result);
            this.SetXmlNodeData("final_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            if (m_PanelSetOrder.AmendmentCollection.Count == 0)
            {
                this.SetXmlNodeData("test_result_header", "Test Result");
            }
            else // If an amendment exists show as corrected
            {
                this.SetXmlNodeData("test_result_header", "Corrected Test Result");
            }

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

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            if (string.IsNullOrEmpty(panelSetOrder.Comment) == false) this.ReplaceText("result_comment", panelSetOrder.Comment);
            else this.DeleteRow("result_comment");
            this.ReplaceText("report_interpretation", panelSetOrder.Interpretation);
            this.ReplaceText("kras_result_detail", panelSetOrder.MutationDetected);
            this.ReplaceText("report_indication_comment", panelSetOrder.IndicationComment);
            this.ReplaceText("tumor_nuclei_percent", panelSetOrder.TumorNucleiPercentage);
            this.ReplaceText("report_method", panelSetOrder.Method);
            this.ReplaceText("report_reference", panelSetOrder.References);

            if (this.m_PanelSetOrder.ProfessionalComponentFacilityId == "YPBLGS" && this.m_PanelSetOrder.TechnicalComponentFacilityId == "YPIBLGS")
            {
                this.ReplaceText("test_developed_comment", TestDevelopedComment);
            }
            else
            {
                this.DeleteRow("test_developed_comment");
            }

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));
            this.SetXmlNodeData("pathologist_signature", m_PanelSetOrder.Signature);
            this.SaveReport();
        }
        public override void Render()
        {
            base.OpenTemplate(m_TemplateName);

            YellowstonePathology.Business.Test.LLP.PanelSetOrderLeukemiaLymphoma panelSetOrderLeukemiaLymphoma = (YellowstonePathology.Business.Test.LLP.PanelSetOrderLeukemiaLymphoma)this.m_PanelSetOrder;

            string finalDate = BaseData.GetShortDateString(panelSetOrderLeukemiaLymphoma.FinalDate) + " - " + BaseData.GetMillitaryTimeString(panelSetOrderLeukemiaLymphoma.FinalTime);
            this.SetXmlNodeData("final_date", finalDate);
            this.SetXmlNodeData("report_comment", panelSetOrderLeukemiaLymphoma.ReportComment);

            this.SetXmlNodeData("client_case", this.m_AccessionOrder.PCAN);

            if (this.m_AccessionOrder.AccessionTime.HasValue == true)
            {
                this.SetXmlNodeData("accession_time", this.m_AccessionOrder.AccessionTime.Value.ToShortTimeString());
            }
            else
            {
                this.SetXmlNodeData("accession_time", string.Empty);
            }

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

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(panelSetOrderLeukemiaLymphoma.OrderedOn, panelSetOrderLeukemiaLymphoma.OrderedOnId);
            this.SetXmlNodeData("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(panelSetOrderLeukemiaLymphoma.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, false);

            if (panelSetOrderLeukemiaLymphoma.AmendmentCollection.Count > 0)
            {
                string amendmentTitle = panelSetOrderLeukemiaLymphoma.AmendmentCollection[0].AmendmentType;
                if (amendmentTitle == "Correction") amendmentTitle = "Corrected Report";
                this.SetXmlNodeData("Amendment", amendmentTitle);
            }
            else
            {
                this.SetXmlNodeData("Amendment", "");
            }

            string result = string.Empty;
            if (panelSetOrderLeukemiaLymphoma.FlowMarkerCollection.Count == 1)
            {
                result = panelSetOrderLeukemiaLymphoma.FlowMarkerCollection[0].Result;
            }
            this.SetXmlNodeData("test_result", result);

            this.SaveReport();
        }
        public override void Render()
        {
            ErPrSemiQuantitativeTestOrder panelSetOrderErPrSemiQuantitative = (ErPrSemiQuantitativeTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ERPRSemiQuantitative.6.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("er_result", panelSetOrderErPrSemiQuantitative.ErResult);
            this.ReplaceText("er_intensity", panelSetOrderErPrSemiQuantitative.ErIntensity);
            this.ReplaceText("er_percent_of_cells", panelSetOrderErPrSemiQuantitative.ErPercentageOfCells);
            this.ReplaceText("pr_result", panelSetOrderErPrSemiQuantitative.PrResult);
            this.ReplaceText("pr_intensity", panelSetOrderErPrSemiQuantitative.PrIntensity);
            this.ReplaceText("pr_percent_of_cells", panelSetOrderErPrSemiQuantitative.PrPercentageOfCells);
            this.ReplaceText("report_references", panelSetOrderErPrSemiQuantitative.ReportReferences);
            this.ReplaceText("report_method", panelSetOrderErPrSemiQuantitative.Method);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(panelSetOrderErPrSemiQuantitative.OrderedOnId);
            if(specimenOrder == null) specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection[0];
            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.ReplaceText("specimen_description", specimenOrder.Description);
            this.ReplaceText("specimen_fixation_type", specimenOrder.LabFixation);
            this.ReplaceText("time_to_fixation", specimenOrder.TimeToFixationHourString);

            this.ReplaceText("duration_of_fixation", specimenOrder.FixationDurationString);
            this.ReplaceText("specimen_adequacy", panelSetOrderErPrSemiQuantitative.SpecimenAdequacy);
            this.ReplaceText("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_interpretation", panelSetOrderErPrSemiQuantitative.Interpretation);

            if (string.IsNullOrEmpty(panelSetOrderErPrSemiQuantitative.ResultComment) == true)
            {
                this.DeleteRow("result_comment");
            }
            else
            {
                this.ReplaceText("result_comment", panelSetOrderErPrSemiQuantitative.ResultComment);
            }

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

            this.SaveReport();
        }
        public override void Render()
        {
            CysticFibrosisTestOrder panelSetOrderCF = (CysticFibrosisTestOrder)this.m_PanelSetOrder;

            if (panelSetOrderCF.TemplateId == 1)
            {
                this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\CysticFibrosisCarrierScreening.1.xml";
            }
            else if (panelSetOrderCF.TemplateId == 2)
            {
                this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\CysticFibrosisCarrierScreeningUnknownEthnicGroup.1.xml";
            }
            else
            {
                return;
            }

            base.OpenTemplate();

            base.SetDemographicsV2();

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(this.m_PanelSetOrder.OrderedOnId);
            this.SetXmlNodeData("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.SetReportDistribution();
            this.SetCaseHistory();

            base.ReplaceText("report_result", panelSetOrderCF.Result);
            base.ReplaceText("mutations_detected", panelSetOrderCF.MutationsDetected);
            base.ReplaceText("report_comment", panelSetOrderCF.Comment);

            YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisEthnicGroupCollection cysticFibrosisEthnicGroupCollection = new CysticFibrosisEthnicGroupCollection();
            YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisEthnicGroup cysticFibrosisEthnicGroup = cysticFibrosisEthnicGroupCollection.GetCysticFibrosisEthnicGroup(panelSetOrderCF.EthnicGroupId);

            base.ReplaceText("report_ethnic_group", cysticFibrosisEthnicGroup.EthnicGroupName);
            base.ReplaceText("report_interpretation", panelSetOrderCF.Interpretation);
            base.ReplaceText("mutations_tested", panelSetOrderCF.MutationsTested);
            base.ReplaceText("report_method", panelSetOrderCF.Method);
            base.ReplaceText("report_references", panelSetOrderCF.ReportReferences);

            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.Signature);

            YellowstonePathology.Business.Document.AmendmentSection amendment = new YellowstonePathology.Business.Document.AmendmentSection();
            amendment.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.SaveReport();
        }
        public override void Render()
        {
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\EGFRMutationAnalysis.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            YellowstonePathology.Business.Test.EGFRMutationAnalysis.EGFRMutationAnalysisTestOrder egfrMutationAnalysisTestOrder = (YellowstonePathology.Business.Test.EGFRMutationAnalysis.EGFRMutationAnalysisTestOrder)this.m_PanelSetOrder;

            YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(egfrMutationAnalysisTestOrder.OrderedOnId);
            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(egfrMutationAnalysisTestOrder.OrderedOn, egfrMutationAnalysisTestOrder.OrderedOnId);

            string specimenDescription = specimenOrder.Description + ", Block " + aliquotOrder.Label;
            this.ReplaceText("specimen_description", specimenDescription);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.SetXMLNodeParagraphData("report_result", egfrMutationAnalysisTestOrder.Result);
            this.SetXMLNodeParagraphData("report_comment", egfrMutationAnalysisTestOrder.Comment);
            this.SetXMLNodeParagraphData("report_interpretation", egfrMutationAnalysisTestOrder.Interpretation);

            this.ReplaceText("report_indication", egfrMutationAnalysisTestOrder.Indication);
            this.ReplaceText("tumor_nuclei_percentage", egfrMutationAnalysisTestOrder.TumorNucleiPercentage);

            if (egfrMutationAnalysisTestOrder.MicrodissectionPerformed == true)
            {
                this.ReplaceText("microdissection_performed", "Yes");
            }
            else
            {
                this.ReplaceText("microdissection_performed", "No");
            }

            this.SetXMLNodeParagraphData("report_method", egfrMutationAnalysisTestOrder.Method);
            this.SetXMLNodeParagraphData("report_references", egfrMutationAnalysisTestOrder.ReportReferences);
            this.SetXMLNodeParagraphData("report_disclaimer", egfrMutationAnalysisTestOrder.ReportDisclaimer);

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

            this.SaveReport();
        }
示例#22
0
        public override void Render()
        {
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HPV.1.xml";
            base.OpenTemplate();

            base.SetDemographicsV2();

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(this.m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, false);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            HPVTestOrder panelSetOrder = (HPVTestOrder)this.m_PanelSetOrder;

            if(string.IsNullOrEmpty(panelSetOrder.Result) == false) base.ReplaceText("test_result", panelSetOrder.Result);

            if (string.IsNullOrEmpty(panelSetOrder.Comment) == false) base.ReplaceText("report_comment", panelSetOrder.Comment);
            else base.DeleteRow("report_comment");

            bool hpv1618HasBeenOrdered = this.m_AccessionOrder.PanelSetOrderCollection.Exists(62);

            string additionalTestingComment = string.Empty;
            if (hpv1618HasBeenOrdered == true)
            {
                additionalTestingComment = YellowstonePathology.Business.Test.ThinPrepPap.ThinPrepPapWordDocument.HPV1618HasBeenOrderedComment;
            }
            else
            {
                additionalTestingComment = YellowstonePathology.Business.Test.ThinPrepPap.ThinPrepPapWordDocument.NoAdditionalTestingOrderedComment;
            }

            this.ReplaceText("additional_testing", additionalTestingComment);

            base.ReplaceText("test_information", panelSetOrder.TestInformation);
            base.ReplaceText("report_references", panelSetOrder.ReportReferences);
            base.ReplaceText("asr_comment", panelSetOrder.ASRComment);

            this.SetReportDistribution();
            this.SetCaseHistory();

            this.SaveReport();
        }
        public override void Render()
        {
            FactorVLeidenTestOrder testOrder = (FactorVLeidenTestOrder)this.m_PanelSetOrder;
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\FactorVLeiden.6.xml";

            this.OpenTemplate();
            this.SetDemographicsV2();
            this.SetReportDistribution();
            this.SetCaseHistory();

            if (this.m_PanelSetOrder.Final)
            {
                this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.Signature);
            }

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            //remove unused comment line

            if (string.IsNullOrEmpty(testOrder.Comment) == true)
            {
                this.DeleteRow("report_comment");
            }
            else
            {
                this.ReplaceText("report_comment", testOrder.Comment);
            }

            this.SetXmlNodeData("report_result", testOrder.Result);
            this.ReplaceText("result_description", testOrder.ResultDescription);
            this.ReplaceText("report_interpretation", testOrder.Interpretation);
            this.ReplaceText("report_indication", testOrder.Indication);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("test_development", testOrder.TestDevelopment);
            this.ReplaceText("report_references", testOrder.References);

            YellowstonePathology.Business.Document.AmendmentSection amendment = new YellowstonePathology.Business.Document.AmendmentSection();
            amendment.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.SaveReport();
        }
        public override void Render()
        {
            base.OpenTemplate(m_TemplateName);

            YellowstonePathology.Business.Test.LLP.PanelSetOrderLeukemiaLymphoma panelSetOrderLeukemiaLymphoma = (YellowstonePathology.Business.Test.LLP.PanelSetOrderLeukemiaLymphoma)this.m_PanelSetOrder;

            string finalDate = BaseData.GetShortDateString(panelSetOrderLeukemiaLymphoma.FinalDate) + " - " + BaseData.GetMillitaryTimeString(panelSetOrderLeukemiaLymphoma.FinalTime);
            this.SetXmlNodeData("final_date", finalDate);

            this.SetXmlNodeData("client_case", this.m_AccessionOrder.PCAN);

            string accessionTime = this.m_AccessionOrder.AccessionTime.Value.ToString("MM/dd/yyyy - HH:mm");
            this.SetXmlNodeData("accession_date", accessionTime);

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

            string collectionDate = this.m_AccessionOrder.CollectionDate.Value.ToShortDateString();
            this.SetXmlNodeData("collection_date", collectionDate);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(this.m_PanelSetOrder.OrderedOnId);
            this.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            foreach (YellowstonePathology.Business.Flow.FlowMarkerItem markerItem in panelSetOrderLeukemiaLymphoma.FlowMarkerCollection)
            {
                switch(markerItem.Name.ToUpper())
                {
                    case "HB-F":
                        this.SetXmlNodeData("test_result", markerItem.Result);
                        break;
                }
            }

            this.SetXmlNodeData("report_comment", panelSetOrderLeukemiaLymphoma.ReportComment);

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(panelSetOrderLeukemiaLymphoma.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, false);

            this.SaveReport();
        }
示例#25
0
        public override void Render()
        {
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HPV.3.xml";
            base.OpenTemplate();

            base.SetDemographicsV2();

            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, false);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            HPVTestOrder panelSetOrder = (HPVTestOrder)this.m_PanelSetOrder;

            if (string.IsNullOrEmpty(panelSetOrder.Result) == false)
            {
                base.ReplaceText("test_result", panelSetOrder.Result);
            }

            if (string.IsNullOrEmpty(panelSetOrder.Comment) == false)
            {
                base.ReplaceText("report_comment", panelSetOrder.Comment);
            }
            else
            {
                base.DeleteRow("report_comment");
            }

            base.ReplaceText("test_information", panelSetOrder.TestInformation);
            base.ReplaceText("report_references", panelSetOrder.ReportReferences);
            base.ReplaceText("asr_comment", panelSetOrder.ASRComment);

            this.SetReportDistribution();
            this.SetCaseHistory();

            this.SaveReport();
        }
        public override void Render()
        {
            BCRABLByPCRTestOrder testOrder = (BCRABLByPCRTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\BCRABLByPCR.2.xml";
            base.OpenTemplate();

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

            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);

            if (string.IsNullOrEmpty(testOrder.DetectedLogReduction) == false)
            {
                this.ReplaceText("log_reduction", testOrder.DetectedLogReduction);
            }
            else
            {
                this.DeleteRow("log_reduction");
            }

            this.ReplaceText("report_result", testOrder.Result);
            this.ReplaceText("fusion_transcript_type", testOrder.FusionTranscriptType);
            this.ReplaceText("percent_bcrabl", testOrder.PercentBCRABL);
            this.ReplaceText("report_interpretation", testOrder.Interpretation);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.ReportReferences);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
示例#27
0
        public override void Render()
        {
            MultipleMyelomaMGUSByFishTestOrder panelSetOrderMultipleMyelomaMGUSByFish = (MultipleMyelomaMGUSByFishTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\PlasmaCellMyelomaFISHPanel.2.xml";
            base.OpenTemplate();

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

            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_result", panelSetOrderMultipleMyelomaMGUSByFish.Result);

            if (string.IsNullOrEmpty(panelSetOrderMultipleMyelomaMGUSByFish.ReportComment) == false)
            {
                this.ReplaceText("report_comment", panelSetOrderMultipleMyelomaMGUSByFish.ReportComment);
            }
            else
            {
                this.DeleteRow("report_comment");
            }

            this.ReplaceText("report_interpretation", panelSetOrderMultipleMyelomaMGUSByFish.Interpretation);
            this.ReplaceText("probe_set_detail", panelSetOrderMultipleMyelomaMGUSByFish.ProbeSetDetail);
            this.ReplaceText("nuclei_scored", panelSetOrderMultipleMyelomaMGUSByFish.NucleiScored);
            this.ReplaceText("report_references", panelSetOrderMultipleMyelomaMGUSByFish.ReportReferences);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
示例#28
0
        public override void Render()
        {
            YellowstonePathology.Business.Test.NGCT.NGCTTestOrder testOrder = (YellowstonePathology.Business.Test.NGCT.NGCTTestOrder) this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\NGCT.1.xml";
            base.OpenTemplate();

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

            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, false);

            this.SetXmlNodeData("final_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            base.ReplaceText("neisseria_gonorrhoeae_result", testOrder.NeisseriaGonorrhoeaeResult);
            base.ReplaceText("chlamydia_trachomatis_result", testOrder.ChlamydiaTrachomatisResult);

            if (string.IsNullOrEmpty(testOrder.Comment) == false)
            {
                base.ReplaceText("report_comment", testOrder.Comment);
            }
            else
            {
                base.DeleteRow("report_comment");
            }

            base.ReplaceText("report_method", testOrder.Method);
            base.ReplaceText("report_references", testOrder.ReportReferences);
            base.ReplaceText("test_information", testOrder.TestInformation);

            this.SaveReport();
        }
示例#29
0
        public override void Render()
        {
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ThrombocytopeniaProfileV2.xml";
            base.OpenTemplate();

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

            ThrombocytopeniaProfileV2TestOrder testOrder = (ThrombocytopeniaProfileV2TestOrder)this.m_PanelSetOrder;

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

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(testOrder.OrderedOn, testOrder.OrderedOnId);
            this.SetXmlNodeData("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.SetXmlNodeData("apa_igg", testOrder.AntiPlateletAntibodyIgG);
            this.SetXmlNodeData("apa_igm", testOrder.AntiPlateletAntibodyIgM);
            this.SetXmlNodeData("apa_igg_reference", testOrder.AntiPlateletAntibodyIgGReference);

            if (string.IsNullOrEmpty(testOrder.ReticulatedPlateletAnalysis) == false)
            {
                this.SetXmlNodeData("r_p_a", testOrder.ReticulatedPlateletAnalysis);
                this.SetXmlNodeData("r_p_a_reference", testOrder.ReticulatedPlateletAnalysisReference);
            }
            else
            {
                this.DeleteRow("r_p_a");
            }
            this.SetXmlNodeData("apa_igm_reference", testOrder.AntiPlateletAntibodyIgMReference);
            this.SetXMLNodeParagraphData("report_interpretation", testOrder.Interpretation);
            this.SetXMLNodeParagraphData("report_method", testOrder.Method);
            this.SetXmlNodeData("asr_comment", testOrder.ASRComment);

            this.SaveReport();
        }
        public override void Render()
        {
            CalreticulinMutationAnalysisTestOrder reportOrderCalreticulinMutationAnalysis = (CalreticulinMutationAnalysisTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\CalreticulinMutationAnalysis.1.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            string reportResult = reportOrderCalreticulinMutationAnalysis.Result;
            if (string.IsNullOrEmpty(reportResult))
            {
                reportResult = string.Empty;
            }

            if(reportOrderCalreticulinMutationAnalysis.Result == "Detected")
            {
                reportResult = reportResult + "(" + reportOrderCalreticulinMutationAnalysis.Mutations + ")";
            }

            this.ReplaceText("report_result", reportResult);

            this.ReplaceText("report_interpretation", reportOrderCalreticulinMutationAnalysis.Interpretation);
            this.ReplaceText("report_method", reportOrderCalreticulinMutationAnalysis.Method);
            this.ReplaceText("report_references", reportOrderCalreticulinMutationAnalysis.ReportReferences);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", reportOrderCalreticulinMutationAnalysis.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\AMLNonFavorableRisk.2.xml";
            base.OpenTemplate();

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

            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);

            YellowstonePathology.Business.Test.AMLNonFavorableRisk.AMLNonFavorableRiskTestOrder testOrder = (YellowstonePathology.Business.Test.AMLNonFavorableRisk.AMLNonFavorableRiskTestOrder) this.m_PanelSetOrder;

            YellowstonePathology.Business.Test.AliquotOrder            aliquotOrder  = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(testOrder.OrderedOnId);
            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(testOrder.OrderedOn, testOrder.OrderedOnId);

            string specimenDescription = specimenOrder.Description;

            if (aliquotOrder != null)
            {
                specimenDescription += ", Block " + aliquotOrder.Label;
            }
            this.ReplaceText("specimen_description", specimenDescription);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.SetXMLNodeParagraphData("report_result", testOrder.Result);
            this.SetXMLNodeParagraphData("report_interpretation", testOrder.Interpretation);
            this.SetXMLNodeParagraphData("nuclei_scored", testOrder.NucleiScored);
            this.SetXMLNodeParagraphData("probeset_details", testOrder.ProbeSetDetail);

            this.ReplaceText("report_date", BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.ReplaceText("report_disclaimer", testOrder.ReportDisclaimer);

            this.SaveReport();
        }
        public override void Render()
        {
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\WomensHealthProfile.3.xml";
            this.OpenTemplate();

            this.SetCurrentPapResults();
            this.SetCurrentMolecularResults();
            this.SetPriorResults();

            WomensHealthProfileTestOrder womensHealthProfileTestOrder = (WomensHealthProfileTestOrder)this.m_PanelSetOrder;
            WomensHealthProfileResult womensHealthProfileResult = new WomensHealthProfileResult(this.m_AccessionOrder);

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(womensHealthProfileTestOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(womensHealthProfileTestOrder.OrderedOnId);
            this.SetXmlNodeData("specimen_source", specimenOrder.SpecimenSource);
            string collectionDateTimeString = specimenOrder.GetCollectionDateTimeString();
            this.SetXmlNodeData("collection_date_time", collectionDateTimeString);
            this.SetXmlNodeData("specimen_description", specimenOrder.Description);

            if (this.m_PanelSetOrder.FinalTime.HasValue == true)
            {
                string finalDateTime = YellowstonePathology.Business.Document.CaseReportV2.ReportDateTimeFormat(this.m_PanelSetOrder.FinalTime.Value);
                this.SetXmlNodeData("final_date", finalDateTime);
            }
            else
            {
                this.SetXmlNodeData("final_date", string.Empty);
            }

            string clinicalHistory = this.m_AccessionOrder.ClinicalHistory;
            this.SetXMLNodeParagraphData("clinical_history", clinicalHistory);
            this.SetXMLNodeParagraphData("report_method", womensHealthProfileResult.Method);
            this.SetXMLNodeParagraphData("report_references", womensHealthProfileResult.References);

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

            this.SaveReport();
        }
示例#33
0
        public override void Render()
        {
            JAK2V617FTestOrder panelSetOrderJAK2V617F = (JAK2V617FTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\JAK2V617F.4.xml";
            base.OpenTemplate();

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

            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);

            string reportResult = panelSetOrderJAK2V617F.Result;

            if (string.IsNullOrEmpty(reportResult))
            {
                reportResult = string.Empty;
            }

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_result", reportResult);
            this.ReplaceText("result_comment", panelSetOrderJAK2V617F.Comment);
            this.ReplaceText("report_interpretation", panelSetOrderJAK2V617F.Interpretation);
            this.ReplaceText("report_method", panelSetOrderJAK2V617F.Method);
            this.ReplaceText("report_reference", panelSetOrderJAK2V617F.Reference);
            this.ReplaceText("disclosure_statement", panelSetOrderJAK2V617F.Disclosure);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            BCRABLByPCRTestOrder testOrder = (BCRABLByPCRTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\BCRABLByPCR.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            if (string.IsNullOrEmpty(testOrder.DetectedLogReduction) == false)
            {
                this.ReplaceText("log_reduction", testOrder.DetectedLogReduction);
            }
            else
            {
                this.DeleteRow("log_reduction");
            }

            this.ReplaceText("report_result", testOrder.Result);
            this.ReplaceText("fusion_transcript_type", testOrder.FusionTranscriptType);
            this.ReplaceText("percent_bcrabl", testOrder.PercentBCRABL);
            this.ReplaceText("report_interpretation", testOrder.Interpretation);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.References);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            ReviewForAdditionalTestingTestOrder reviewForAdditionalTestingTestOrder = (YellowstonePathology.Business.Test.ReviewForAdditionalTesting.ReviewForAdditionalTestingTestOrder) this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ReviewForAdditionalTesting.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_comment", reviewForAdditionalTestingTestOrder.Comment);

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

            this.SaveReport();
        }
        public override void Render()
        {
            ReviewForAdditionalTestingTestOrder reviewForAdditionalTestingTestOrder = (YellowstonePathology.Business.Test.ReviewForAdditionalTesting.ReviewForAdditionalTestingTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ReviewForAdditionalTesting.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_comment", reviewForAdditionalTestingTestOrder.Comment);

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

            this.SaveReport();
        }
示例#37
0
        public override void Render()
        {
            YellowstonePathology.Business.Test.NGCT.NGCTTestOrder testOrder = (YellowstonePathology.Business.Test.NGCT.NGCTTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\NGCT.7.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(this.m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, false);

            this.SetXmlNodeData("final_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            base.ReplaceText("neisseria_gonorrhoeae_result", testOrder.NeisseriaGonorrhoeaeResult);
            base.ReplaceText("chlamydia_trachomatis_result", testOrder.ChlamydiaTrachomatisResult);

            if (string.IsNullOrEmpty(testOrder.Comment) == false)
            {
                base.ReplaceText("report_comment", testOrder.Comment);
            }
            else
            {
                base.DeleteRow("report_comment");
            }

            base.ReplaceText("report_method", testOrder.Method);
            base.ReplaceText("report_references", testOrder.ReportReferences);
            base.ReplaceText("test_information", testOrder.TestInformation);

            this.SaveReport();
        }
示例#38
0
        public override void Render()
        {
            TCellSubsetAnalysisTestOrder testOrder = (TCellSubsetAnalysisTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\TCellSubsetAnalysis.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_cd3_percent", testOrder.CD3Percent.ToString().StringAsPercent());
            this.ReplaceText("report_cd4_percent", testOrder.CD4Percent.ToString().StringAsPercent());
            this.ReplaceText("report_cd8_percent", testOrder.CD8Percent.ToString().StringAsPercent());
            string value = string.Empty;

            if (testOrder.CD4CD8Ratio.HasValue)
            {
                value = Math.Round(testOrder.CD4CD8Ratio.Value, 2).ToString();
            }
            this.ReplaceText("report_cd4cd8_ratio", value);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.References);
            this.ReplaceText("asr_comment", testOrder.ASRComment);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

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

            this.SaveReport();
        }
示例#39
0
        public override void Render()
        {
            ChromosomeAnalysisTestOrder panelSetOrderChromosomeAnalysis = (ChromosomeAnalysisTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ChromosomeAnalysis.3.xml";
            base.OpenTemplate();

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

            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_result", panelSetOrderChromosomeAnalysis.Result);
            this.ReplaceText("report_karyotype", panelSetOrderChromosomeAnalysis.Karyotype);
            this.ReplaceText("report_interpretation", panelSetOrderChromosomeAnalysis.Interpretation);
            this.ReplaceText("report_comment", panelSetOrderChromosomeAnalysis.Comment);
            this.ReplaceText("metaphases_counted", panelSetOrderChromosomeAnalysis.MetaphasesCounted);
            this.ReplaceText("metaphases_analyzed", panelSetOrderChromosomeAnalysis.MetaphasesAnalyzed);
            this.ReplaceText("metaphases_karyotyped", panelSetOrderChromosomeAnalysis.MetaphasesKaryotyped);
            this.ReplaceText("culture_type", panelSetOrderChromosomeAnalysis.CultureType);
            this.ReplaceText("banding_technique", panelSetOrderChromosomeAnalysis.BandingTechnique);
            this.ReplaceText("banding_resolution", panelSetOrderChromosomeAnalysis.BandingResolution);
            this.ReplaceText("asr_comment", panelSetOrderChromosomeAnalysis.ASR);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
示例#40
0
        public override void Render()
        {
            BCellEnumerationTestOrder testOrder = (BCellEnumerationTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\BCellEnumeration.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("wbc_count", testOrder.WBC.ToString());
            this.ReplaceText("lymphocyte_percentage", testOrder.LymphocytePercentage.ToString().StringAsPercent());
            this.ReplaceText("cd19_bcell_positive_count", testOrder.CD19BCellPositiveCount.ToString());
            this.ReplaceText("cd19_bcell_positive_percent", testOrder.CD19BCellPositivePercent.ToString().StringAsPercent());
            this.ReplaceText("cd20_bcell_positive_count", testOrder.CD20BCellPositiveCount.ToString());
            this.ReplaceText("cd20_bcell_positive_percent", testOrder.CD20BCellPositivePercent.ToString().StringAsPercent());
            this.ReplaceText("cd19_absolute_count", testOrder.CD19AbsoluteCount.ToString());
            this.ReplaceText("cd20_absolute_count", testOrder.CD20AbsoluteCount.ToString());

            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.References);
            this.ReplaceText("asr_comment", testOrder.ASRComment);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

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

            this.SaveReport();
        }
        public override void Render()
        {
            base.OpenTemplate(m_TemplateName);

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

            YellowstonePathology.Business.Test.LLP.PanelSetOrderLeukemiaLymphoma panelSetOrderLeukemiaLymphoma = (YellowstonePathology.Business.Test.LLP.PanelSetOrderLeukemiaLymphoma) this.m_PanelSetOrder;

            YellowstonePathology.Business.Document.AmendmentSection amendment = new YellowstonePathology.Business.Document.AmendmentSection();
            amendment.SetAmendment(panelSetOrderLeukemiaLymphoma.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(panelSetOrderLeukemiaLymphoma.OrderedOn, panelSetOrderLeukemiaLymphoma.OrderedOnId);
            this.SetXmlNodeData("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            foreach (YellowstonePathology.Business.Flow.FlowMarkerItem markerItem in panelSetOrderLeukemiaLymphoma.FlowMarkerCollection)
            {
                switch (markerItem.Name)
                {
                case "Stem Cell Enumeration":
                    this.SetXmlNodeData("stemcell_result", markerItem.Result);
                    break;

                case "Viability":
                    this.SetXmlNodeData("viability_result", markerItem.Result);
                    break;

                case "WBC Count":
                    this.SetXmlNodeData("wbccount_result", markerItem.Result);
                    break;
                }
            }
            this.SaveReport();
        }
示例#42
0
        public override void Render()
        {
            YellowstonePathology.Business.Test.HPV1618.PanelSetOrderHPV1618 panelSetOrderHPV1618 = (YellowstonePathology.Business.Test.HPV1618.PanelSetOrderHPV1618) this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HPV1618Genotyping.7.xml";
            base.OpenTemplate();

            base.SetDemographicsV2();

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(this.m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, false);

            base.ReplaceText("hpv16_result", panelSetOrderHPV1618.HPV16Result);
            base.ReplaceText("hpv18_result", panelSetOrderHPV1618.HPV18Result);

            if (string.IsNullOrEmpty(panelSetOrderHPV1618.Comment) == false)
            {
                base.ReplaceText("report_comment", panelSetOrderHPV1618.Comment);
            }
            else
            {
                base.DeleteRow("report_comment");
            }

            base.ReplaceText("report_method", panelSetOrderHPV1618.Method);
            base.ReplaceText("report_references", panelSetOrderHPV1618.References);

            this.SetReportDistribution();
            this.SetCaseHistory();

            this.SaveReport();
        }
示例#43
0
        public override void Render()
        {
            DeletionsForGlioma1p19qTestOrder testOrder = (DeletionsForGlioma1p19qTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\DeletionsForGlioma1p19q.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            string result = testOrder.Result;

            if (string.IsNullOrEmpty(testOrder.ResultDescription) == false)
            {
                result = testOrder.ResultDescription;
            }
            this.ReplaceText("report_result", result);
            this.SetXMLNodeParagraphData("report_interpretation", testOrder.Interpretation);
            this.SetXMLNodeParagraphData("probe_set_detail", testOrder.ProbeSetDetail);
            this.ReplaceText("nuclei_scored", testOrder.NucleiScored);
            this.SetXMLNodeParagraphData("report_references", testOrder.References);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
示例#44
0
        public override void Render()
        {
            MicrosatelliteInstabilityAnalysisTestOrder testOrder = (MicrosatelliteInstabilityAnalysisTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\MicrosatelliteInstabilityAnalysis.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("report_result", testOrder.Result);
            this.ReplaceText("report_instability_level", testOrder.InstabilityLevel);
            this.ReplaceText("report_bat25_instability", testOrder.BAT25Instability);
            this.ReplaceText("report_bat26_instability", testOrder.BAT26Instability);
            this.ReplaceText("report_d5s346_instability", testOrder.D5S346Instability);
            this.ReplaceText("report_d17s250_instability", testOrder.D17S250Instability);
            this.ReplaceText("report_d2s123_instability", testOrder.D2S123Instability);
            this.ReplaceText("report_interpretation", testOrder.Interpretation);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.References);
            this.ReplaceText("test_development", testOrder.TestDevelopment);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);

            this.SaveReport();
        }
        public override void Render()
        {
            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\LynchSyndromeIHCPanel.1.xml";
            base.OpenTemplate();

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

            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);

            YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC panelSetOrder = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC) this.m_PanelSetOrder;

            YellowstonePathology.Business.Test.AliquotOrder            aliquotOrder  = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(panelSetOrder.OrderedOnId);
            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(panelSetOrder.OrderedOn, panelSetOrder.OrderedOnId);

            string specimenDescription = specimenOrder.Description + ", Block " + aliquotOrder.Label;

            this.ReplaceText("specimen_description", specimenDescription);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.SetXmlNodeData("mlh1_result", panelSetOrder.MLH1Result);
            this.SetXmlNodeData("msh2_result", panelSetOrder.MSH2Result);
            this.SetXmlNodeData("msh6_result", panelSetOrder.MSH6Result);
            this.SetXmlNodeData("pms2_result", panelSetOrder.PMS2Result);

            this.SetXmlNodeData("report_comment", panelSetOrder.Comment);

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

            this.SaveReport();
        }
        public override void Render()
        {
            YellowstonePathology.Business.Test.HPV1618.PanelSetOrderHPV1618 panelSetOrderHPV1618 = (YellowstonePathology.Business.Test.HPV1618.PanelSetOrderHPV1618)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HPV1618Genotyping.7.xml";
            base.OpenTemplate();

            base.SetDemographicsV2();

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(this.m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, false);

            base.ReplaceText("hpv16_result", panelSetOrderHPV1618.HPV16Result);
            base.ReplaceText("hpv18_result", panelSetOrderHPV1618.HPV18Result);

            if (string.IsNullOrEmpty(panelSetOrderHPV1618.Comment) == false)
            {
                base.ReplaceText("report_comment", panelSetOrderHPV1618.Comment);
            }
            else
            {
                base.DeleteRow("report_comment");
            }

            base.ReplaceText("report_method", panelSetOrderHPV1618.Method);
            base.ReplaceText("report_references", panelSetOrderHPV1618.References);

            this.SetReportDistribution();
            this.SetCaseHistory();

            this.SaveReport();
        }
示例#47
0
        public override void Render()
        {
            PanelSetOrderHer2AmplificationByIHC panelSetOrder = (PanelSetOrderHer2AmplificationByIHC)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\Her2AmplificationByIHC.2.xml";
            base.OpenTemplate();

            base.SetDemographicsV2();

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            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);

            base.ReplaceText("report_result", panelSetOrder.Result);
            base.ReplaceText("report_score", panelSetOrder.Score);
            base.ReplaceText("report_percent", panelSetOrder.IntenseCompleteMembraneStainingPercent);
            base.ReplaceText("report_fixative", panelSetOrder.BreastTestingFixative);
            base.ReplaceText("report_method", panelSetOrder.Method);
            base.ReplaceText("report_interpretation", panelSetOrder.Interpretation);
            base.ReplaceText("report_reference", panelSetOrder.Reference);
            base.ReplaceText("report_disclaimer", panelSetOrder.ReportDisclaimer);

            this.ReplaceText("report_date", BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            this.SetXmlNodeData("pathologist_signature", this.m_PanelSetOrder.Signature);

            this.SetReportDistribution();
            this.SetCaseHistory();

            this.SaveReport();
        }
示例#48
0
        public override void Render()
        {
            YellowstonePathology.Business.Test.MPNStandardReflex.MPNStandardReflexResult mpnStandardReflexResult = new Test.MPNStandardReflex.MPNStandardReflexResult(this.m_AccessionOrder);

            YellowstonePathology.Business.Test.MPNStandardReflex.MPNStandardReflexTest          mpnStandardReflex = new YellowstonePathology.Business.Test.MPNStandardReflex.MPNStandardReflexTest();
            YellowstonePathology.Business.Test.MPNStandardReflex.PanelSetOrderMPNStandardReflex panelSetOrderMPNStandardReflex = (YellowstonePathology.Business.Test.MPNStandardReflex.PanelSetOrderMPNStandardReflex) this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(mpnStandardReflex.PanelSetId);

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\MPNStandardReflex.2.xml";
            base.OpenTemplate();

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

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.ReplaceText("panelset_name", mpnStandardReflexResult.PanelSetOrderMPNStandardReflex.PanelSetName);
            this.ReplaceText("jak2v617f_result", mpnStandardReflexResult.JAK2V617FResult);
            this.ReplaceText("jak2exon1214_result", mpnStandardReflexResult.JAK2Exon1214Result);
            base.ReplaceText("specimen_description", mpnStandardReflexResult.SpecimenOrder.Description);
            this.ReplaceText("result_comment", panelSetOrderMPNStandardReflex.Comment);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(mpnStandardReflexResult.SpecimenOrder.CollectionDate, mpnStandardReflexResult.SpecimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_interpretation", panelSetOrderMPNStandardReflex.Interpretation);
            this.ReplaceText("report_reference", panelSetOrderMPNStandardReflex.References);
            this.ReplaceText("report_method", panelSetOrderMPNStandardReflex.Method);

            this.ReplaceText("report_date", BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));
            this.ReplaceText("pathologist_signature", panelSetOrderMPNStandardReflex.Signature);
            this.ReplaceText("global_location_performed", this.m_AccessionOrder.GetLocationPerformedComment());

            this.SaveReport();
        }
        public override void Render()
        {
            PanelSetOrderHer2AmplificationByFish panelSetOrderHer2AmplificationByFish = (PanelSetOrderHer2AmplificationByFish)this.m_PanelSetOrder;

            if (panelSetOrderHer2AmplificationByFish.NonBreast == false)
            {
                this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HER2AmplificationByFish.6.xml";
            }
            else
            {
                this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HER2AmplificationByFishNonBreast.6.xml";
            }

            base.OpenTemplate();

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

            if (this.m_AccessionOrder.OrderCancelled == false)
            {
                YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
                amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

                YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
                string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

                this.SetXmlNodeData("date_time_collected", collectionDateTimeString);
                this.SetXmlNodeData("test_result", panelSetOrderHer2AmplificationByFish.Result);

                if (string.IsNullOrEmpty(panelSetOrderHer2AmplificationByFish.HER2CEN17SignalRatio) == false)
                {
                    this.SetXmlNodeData("test_ratio", "Ratio = " + panelSetOrderHer2AmplificationByFish.HER2CEN17SignalRatio);
                }
                else
                {
                    this.SetXmlNodeData("test_ratio", string.Empty);
                }

                this.SetXmlNodeData("averageher2_copynumber", "Average HER2 Copy Number = " + panelSetOrderHer2AmplificationByFish.AverageHER2SignalsPerNucleus);

                this.SetXmlNodeData("final_date", BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
                this.SetXmlNodeData("result_comment", panelSetOrderHer2AmplificationByFish.Comment);

                this.SetXmlNodeData("cell_cnt", panelSetOrderHer2AmplificationByFish.NucleiScored);
                this.SetXmlNodeData("avg_her", panelSetOrderHer2AmplificationByFish.AverageHER2SignalsPerNucleus);
                this.SetXmlNodeData("avg_chr", panelSetOrderHer2AmplificationByFish.AverageCEN17SignalsPerNucleus);
                this.SetXmlNodeData("tst_ratio", panelSetOrderHer2AmplificationByFish.HER2CEN17SignalRatio);
                this.SetXmlNodeData("report_reference_ranges", panelSetOrderHer2AmplificationByFish.ReferenceRanges);

                XmlNode tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='report_interpretation']", this.m_NameSpaceManager);
                this.SetXMLNodeParagraphDataNode(tableNode, "report_interpretation", panelSetOrderHer2AmplificationByFish.Interpretation);

                YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(this.m_PanelSetOrder.OrderedOnId);
                string blockDescription = string.Empty;
                if (aliquotOrder != null)
                {
                    blockDescription = " - Block " + aliquotOrder.Label;
                }

                SetXmlNodeData("specimen_type", specimenOrder.Description + blockDescription);
                SetXmlNodeData("specimen_fixation", specimenOrder.LabFixation);
                SetXmlNodeData("time_to_fixation", specimenOrder.TimeToFixationHourString);

                this.SetXmlNodeData("report_reference", panelSetOrderHer2AmplificationByFish.Reference);
                SetXmlNodeData("duration_of_fixation", specimenOrder.FixationDurationString);

                if (panelSetOrderHer2AmplificationByFish.Result != "NOT INTERPRETABLE")
                {
                    this.SetXmlNodeData("fixation_comment", specimenOrder.FixationComment);
                }
                else
                {
                    this.DeleteRow("fixation_comment");
                    SetXmlNodeData("avg_her", string.Empty);
                    SetXmlNodeData("tst_ratio", string.Empty);
                }

                SetXmlNodeData("date_time_collected", collectionDateTimeString);
                SetXmlNodeData("report_distribution", "No Distribution Selected");

                this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.ReferenceLabSignature);
            }
            else
            {
                this.SetXmlNodeData("result_comment", panelSetOrderHer2AmplificationByFish.Comment);
                this.SetXmlNodeData("final_date", BaseData.GetShortDateString(this.m_PanelSetOrder.ReferenceLabFinalDate));
            }

            this.SaveReport();
        }
        public override void Render()
        {
            YellowstonePathology.Business.Test.LLP.PanelSetOrderLeukemiaLymphoma panelSetOrderLeukemiaLymphoma = (YellowstonePathology.Business.Test.LLP.PanelSetOrderLeukemiaLymphoma) this.m_PanelSetOrder;

            base.OpenTemplate(m_TemplateName);

            string finalDate = BaseData.GetShortDateTimeString(this.m_PanelSetOrder.FinalTime);

            this.SetXmlNodeData("final_date", finalDate);

            this.SetXmlNodeData("report_comment", panelSetOrderLeukemiaLymphoma.ReportComment);

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

            if (this.m_PanelSetOrder.AmendmentCollection.Count > 0)
            {
                string amendmentTitle = this.m_PanelSetOrder.AmendmentCollection[0].AmendmentType;
                if (amendmentTitle == "Correction")
                {
                    amendmentTitle = "Corrected Report";
                }
                this.SetXmlNodeData("Amendment", amendmentTitle);
            }
            else
            {
                this.SetXmlNodeData("Amendment", "");
            }

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(this.m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, false);

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

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            XmlNode tableNode      = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='marker_name']", this.m_NameSpaceManager);
            XmlNode rowMarkerNode  = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='marker_name']", this.m_NameSpaceManager);
            XmlNode insertAfterRow = rowMarkerNode;

            foreach (YellowstonePathology.Business.Flow.FlowMarkerItem markerItem in panelSetOrderLeukemiaLymphoma.FlowMarkerCollection)
            {
                XmlNode rowMarkerNodeClone = rowMarkerNode.Clone();

                rowMarkerNodeClone.SelectSingleNode("descendant::w:r[w:t='marker_name']/w:t", this.m_NameSpaceManager).InnerText   = markerItem.Name;
                rowMarkerNodeClone.SelectSingleNode("descendant::w:r[w:t='marker_result']/w:t", this.m_NameSpaceManager).InnerText = markerItem.Result;

                foreach (YellowstonePathology.Business.Flow.FlowMarkerPanelListItem panelItem in this.m_PanelList)
                {
                    if (panelItem.MarkerName == markerItem.Name)
                    {
                        rowMarkerNodeClone.SelectSingleNode("descendant::w:r[w:t='marker_reference']/w:t", this.m_NameSpaceManager).InnerText = panelItem.Reference;
                    }
                }

                tableNode.InsertAfter(rowMarkerNodeClone, insertAfterRow);
                insertAfterRow = rowMarkerNodeClone;
            }

            tableNode.RemoveChild(rowMarkerNode);

            this.SaveReport();
        }
示例#51
0
        public override void Render()
        {
            ErPrSemiQuantitativeTestOrder panelSetOrderErPrSemiQuantitative = (ErPrSemiQuantitativeTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ERPRSemiQuantitative.1.xml";
            base.OpenTemplate();

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

            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("er_result", panelSetOrderErPrSemiQuantitative.ErResult);
            this.ReplaceText("er_intensity", panelSetOrderErPrSemiQuantitative.ErIntensity);
            this.ReplaceText("er_percent_of_cells", panelSetOrderErPrSemiQuantitative.ErPercentageOfCells);
            this.ReplaceText("pr_result", panelSetOrderErPrSemiQuantitative.PrResult);
            this.ReplaceText("pr_intensity", panelSetOrderErPrSemiQuantitative.PrIntensity);
            this.ReplaceText("pr_percent_of_cells", panelSetOrderErPrSemiQuantitative.PrPercentageOfCells);
            this.ReplaceText("report_references", panelSetOrderErPrSemiQuantitative.ReportReferences);
            this.ReplaceText("report_method", panelSetOrderErPrSemiQuantitative.Method);

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(panelSetOrderErPrSemiQuantitative.OrderedOnId);
            if (specimenOrder == null)
            {
                specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection[0];
            }
            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.ReplaceText("specimen_description", specimenOrder.Description);
            this.ReplaceText("specimen_fixation_type", specimenOrder.LabFixation);
            this.ReplaceText("time_to_fixation", specimenOrder.TimeToFixationHourString);

            this.ReplaceText("duration_of_fixation", specimenOrder.FixationDurationString);
            this.ReplaceText("specimen_adequacy", panelSetOrderErPrSemiQuantitative.SpecimenAdequacy);
            this.ReplaceText("date_time_collected", collectionDateTimeString);

            if (string.IsNullOrEmpty(specimenOrder.FixationComment) == false)
            {
                this.SetXmlNodeData("fixation_comment", specimenOrder.FixationComment);
            }
            else
            {
                this.SetXmlNodeData("fixation_comment", string.Empty);
            }

            this.ReplaceText("report_interpretation", panelSetOrderErPrSemiQuantitative.Interpretation);

            if (string.IsNullOrEmpty(panelSetOrderErPrSemiQuantitative.ResultComment) == true)
            {
                this.DeleteRow("result_comment");
            }
            else
            {
                this.ReplaceText("result_comment", panelSetOrderErPrSemiQuantitative.ResultComment);
            }

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

            this.SaveReport();
        }
示例#52
0
        public override void Render()
        {
            PNHTestOrder testOrder = (PNHTestOrder)this.m_PanelSetOrder;

            if (string.IsNullOrEmpty(testOrder.ResultCode) == true)
            {
                System.Windows.MessageBox.Show("Unable to create report. Template is not selected");
                return;
            }

            PNHNegativeResult pnhNegativeResult = new PNHNegativeResult();

            if (testOrder.ResultCode == pnhNegativeResult.ResultCode)
            {
                this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\PNHAnalysisNegative.8.xml";
            }
            else
            {
                this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\PNHAnalysisPositive.8.xml";
            }


            this.OpenTemplate();

            //setting date of service to date only
            if (this.m_AccessionOrder.CollectionDate.HasValue)
            {
                this.ReplaceText("collection_date", this.m_AccessionOrder.CollectionDate.Value.ToShortDateString());
            }

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

            if (this.m_PanelSetOrder.Final)
            {
                this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.Signature);
            }

            this.SetXmlNodeData("report_result", testOrder.Result);

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

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            //Handle result type
            if (testOrder.ResultCode != pnhNegativeResult.ResultCode)
            {
                this.HandleResultMonitor(testOrder.ResultCode);
            }

            this.ReplaceText("report_comment", testOrder.Comment);
            this.ReplaceText("report_method", testOrder.Method);
            this.ReplaceText("report_references", testOrder.References);
            this.ReplaceText("asr_comment", testOrder.ASRComment);


            YellowstonePathology.Business.Document.AmendmentSection amendment = new YellowstonePathology.Business.Document.AmendmentSection();
            amendment.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            this.SaveReport();
        }
        public override void Render()
        {
            KRASStandardTestOrder panelSetOrder = (KRASStandardTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\KRASStandard.1.xml";
            base.OpenTemplate();

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

            this.SetXmlNodeData("report_result", panelSetOrder.Result);
            this.SetXmlNodeData("final_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            if (m_PanelSetOrder.AmendmentCollection.Count == 0)
            {
                this.SetXmlNodeData("test_result_header", "Test Result");
            }
            else             // If an amendment exists show as corrected
            {
                this.SetXmlNodeData("test_result_header", "Corrected Test Result");
            }

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

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            if (string.IsNullOrEmpty(panelSetOrder.Comment) == false)
            {
                this.ReplaceText("result_comment", panelSetOrder.Comment);
            }
            else
            {
                this.DeleteRow("result_comment");
            }
            this.ReplaceText("report_interpretation", panelSetOrder.Interpretation);
            this.ReplaceText("kras_result_detail", panelSetOrder.MutationDetected);
            this.ReplaceText("report_indication_comment", panelSetOrder.IndicationComment);
            this.ReplaceText("tumor_nuclei_percent", panelSetOrder.TumorNucleiPercentage);
            this.ReplaceText("report_method", panelSetOrder.Method);
            this.ReplaceText("report_reference", panelSetOrder.References);

            if (this.m_PanelSetOrder.ProfessionalComponentFacilityId == "YPBLGS" && this.m_PanelSetOrder.TechnicalComponentFacilityId == "YPIBLGS")
            {
                this.ReplaceText("test_developed_comment", TestDevelopedComment);
            }
            else
            {
                this.DeleteRow("test_developed_comment");
            }

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));
            this.SetXmlNodeData("pathologist_signature", m_PanelSetOrder.Signature);
            this.SaveReport();
        }
        public override void Render()
        {
            TCellNKProfileTestOrder testOrder = (TCellNKProfileTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\TCellNKProfile.3.xml";

            base.OpenTemplate();

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

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(this.m_PanelSetOrder.OrderedOnId);
            this.ReplaceText("specimen_description", specimenOrder.Description);

            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);

            string signature = string.Empty;

            if (this.m_PanelSetOrder.Final == true && this.m_PanelSetOrder.PanelSetId != 66)
            {
                signature = this.m_PanelSetOrder.Signature;
            }
            else if (this.m_PanelSetOrder.Final == false)
            {
                signature = "This Case Is Not Final";
            }
            this.SetXmlNodeData("pathologist_signature", signature);

            string wbcCount = string.Empty;

            if (testOrder.WBC.HasValue == true)
            {
                wbcCount = testOrder.WBC.Value.ToString();
            }
            this.SetXmlNodeData("wbc_count", wbcCount + "/uL (from client)");
            this.SetXmlNodeData("lymphocyte_percentage", testOrder.LymphocytePercentage.ToString().StringAsPercent());
            this.SetXmlNodeData("tcell_percent", testOrder.CD3TPercent.ToString());
            this.SetXmlNodeData("tcell_count", testOrder.CD3TCount);
            this.SetXmlNodeData("cd4t_percent", testOrder.CD4TPercent.ToString());
            this.SetXmlNodeData("cd4t_count", testOrder.CD4TCount);
            this.SetXmlNodeData("cd8t_percent", testOrder.CD8TPercent.ToString());
            this.SetXmlNodeData("cd8t_count", testOrder.CD8TCount);
            this.SetXmlNodeData("nkcell_percent", testOrder.CD16CD56NKPercent.ToString());
            this.SetXmlNodeData("nkcell_count", testOrder.CD16CD56NKCount);
            this.SetXmlNodeData("cd4cd8_ratio", testOrder.CD4CD8Ratio);

            this.SetXmlNodeData("cd3_percent", testOrder.CD3Percent.ToString().StringAsPercent());
            this.SetXmlNodeData("cd4_percent", testOrder.CD4Percent.ToString().StringAsPercent());
            this.SetXmlNodeData("cd8_percent", testOrder.CD8Percent.ToString().StringAsPercent());
            this.SetXmlNodeData("cd16_percent", testOrder.CD16Percent.ToString().StringAsPercent());
            this.SetXmlNodeData("cd19_percent", testOrder.CD19Percent.ToString().StringAsPercent());
            this.SetXmlNodeData("cd45_percent", testOrder.CD45Percent.ToString().StringAsPercent());
            this.SetXmlNodeData("cd56_percent", testOrder.CD56Percent.ToString().StringAsPercent());

            this.SetXmlNodeData("clinical_history", this.m_AccessionOrder.ClinicalHistory);

            string dateTimeCollected = string.Empty;

            if (specimenOrder.CollectionTime.HasValue == true)
            {
                dateTimeCollected = specimenOrder.CollectionTime.Value.ToString("MM/dd/yyyy HH:mm");
            }
            else if (specimenOrder.CollectionDate.HasValue == true)
            {
                dateTimeCollected = specimenOrder.CollectionDate.Value.ToString("MM/dd/yyyy");
            }

            this.SetXmlNodeData("report_method", testOrder.Method);
            this.SetXmlNodeData("date_time_collected", dateTimeCollected);
            this.SetXmlNodeData("specimen_adequacy", specimenOrder.SpecimenAdequacy);
            this.SetXmlNodeData("report_references", testOrder.ReportReferences);
            this.SetXmlNodeData("asr_comment", testOrder.ASRComment);

            this.SaveReport();
        }
示例#55
0
        public override void Render()
        {
            SurgicalTestOrder panelSetOrderSurgical = (SurgicalTestOrder)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\Cfileserver\Documents\ReportTemplates\XmlTemplates\Surgical.3.xml";

            base.OpenTemplate();

            YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(this.m_PanelSetOrder.ReportNo);

            panelSetOrderSurgical.GrossX          = YellowstonePathology.Business.Common.SpellChecker.FixString(panelSetOrderSurgical.GrossX);
            panelSetOrderSurgical.MicroscopicX    = YellowstonePathology.Business.Common.SpellChecker.FixString(panelSetOrderSurgical.MicroscopicX);
            panelSetOrderSurgical.CancerSummary   = YellowstonePathology.Business.Common.SpellChecker.FixString(panelSetOrderSurgical.CancerSummary);
            this.m_AccessionOrder.ClinicalHistory = YellowstonePathology.Business.Common.SpellChecker.FixString(this.m_AccessionOrder.ClinicalHistory);
            panelSetOrderSurgical.Comment         = YellowstonePathology.Business.Common.SpellChecker.FixString(panelSetOrderSurgical.Comment);

            foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection)
            {
                surgicalSpecimen.Diagnosis = YellowstonePathology.Business.Common.SpellChecker.FixString(surgicalSpecimen.Diagnosis);
            }

            foreach (YellowstonePathology.Business.Amendment.Model.Amendment amendment in amendmentCollection)
            {
                amendment.Text = YellowstonePathology.Business.Common.SpellChecker.FixString(amendment.Text);
            }

            this.SetDemographicsV2();

            this.SetReportDistribution();
            this.SetCaseHistory();

            string amendmentTitle = string.Empty;

            if (amendmentCollection.Count > 0)
            {
                for (int i = amendmentCollection.Count - 1; i >= 0; i--)
                {
                    if (amendmentCollection[i].Final == true)
                    {
                        amendmentTitle = amendmentCollection[i].AmendmentType;
                        if (amendmentTitle == "Correction")
                        {
                            amendmentTitle = "Corrected";
                        }
                        if (amendmentCollection[i].RevisedDiagnosis == true)
                        {
                            this.SetXmlNodeData("Amendment", "Revised");
                        }
                        else
                        {
                            this.SetXmlNodeData("Amendment", amendmentTitle);
                        }
                        break;
                    }
                }
            }
            this.SetXmlNodeData("Amendment", amendmentTitle);

            XmlNode mainTableNode       = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='microscopic_description']", this.m_NameSpaceManager);
            XmlNode diagnosisTableNode  = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='s_id']", this.m_NameSpaceManager);
            XmlNode rowSpecimenNode     = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='s_id']", this.m_NameSpaceManager);
            XmlNode rowDiagnosisNode    = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='diagnosis']", this.m_NameSpaceManager);
            XmlNode rowSpecimenBlankRow = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_blank_row']", this.m_NameSpaceManager);
            XmlNode insertAfterRow      = rowSpecimenNode;

            foreach (SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection)
            {
                XmlNode rowSpecimenNodeClone = rowSpecimenNode.Clone();
                string  diagnosisID          = surgicalSpecimen.DiagnosisId + ".";
                string  specimenType         = surgicalSpecimen.SpecimenOrder.Description + ":";
                rowSpecimenNodeClone.SelectSingleNode("descendant::w:r[w:t='s_id']/w:t", this.m_NameSpaceManager).InnerText          = diagnosisID;
                rowSpecimenNodeClone.SelectSingleNode("descendant::w:r[w:t='specimen_type']/w:t", this.m_NameSpaceManager).InnerText = specimenType;
                diagnosisTableNode.InsertAfter(rowSpecimenNodeClone, insertAfterRow);

                XmlNode rowDiagnosisNodeClone = rowDiagnosisNode.Clone();
                string  diagnosis             = surgicalSpecimen.Diagnosis;

                this.SetXMLNodeParagraphDataNode(rowDiagnosisNodeClone, "diagnosis", diagnosis);
                diagnosisTableNode.InsertAfter(rowDiagnosisNodeClone, rowSpecimenNodeClone);

                insertAfterRow = rowDiagnosisNodeClone;
            }

            if (string.IsNullOrEmpty(panelSetOrderSurgical.Comment) == true | panelSetOrderSurgical.Comment.ToUpper() == "NONE")
            {
                XmlNode rowComment = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='report_comment']", this.m_NameSpaceManager);
                diagnosisTableNode.RemoveChild(rowComment);
            }
            else
            {
                this.SetXMLNodeParagraphData("report_comment", panelSetOrderSurgical.Comment);
            }

            YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
            amendmentSection.SetAmendment(amendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

            diagnosisTableNode.RemoveChild(rowSpecimenNode);
            diagnosisTableNode.RemoveChild(rowDiagnosisNode);
            diagnosisTableNode.RemoveChild(rowSpecimenBlankRow);

            XmlNode tableNodeP            = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='sidp']", this.m_NameSpaceManager);
            XmlNode rowPreviousDiagnosis  = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='previous_diagnosis_header']", this.m_NameSpaceManager);
            XmlNode rowSpecimenNodeP      = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='sidp']", this.m_NameSpaceManager);
            XmlNode rowDiagnosisNodeP     = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='diagnosis_previous']", this.m_NameSpaceManager);
            XmlNode rowCommentP           = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='report_comment_previous']", this.m_NameSpaceManager);
            XmlNode rowPreviousSignatureP = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='previous_signature']", this.m_NameSpaceManager);
            XmlNode rowBlankLine1P        = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='previous_diagnosis_blank_line1']", this.m_NameSpaceManager);
            XmlNode rowBlankLine2P        = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='previous_diagnosis_blank_line2']", this.m_NameSpaceManager);

            if (amendmentCollection.Count != 0)
            {
                if (amendmentCollection.HasFinalRevisedDiagnosis() == true)
                {
                    YellowstonePathology.Business.Amendment.Model.Amendment revisedDiagnosisAmendment = amendmentCollection.GetMostRecentFinalRevisedDiagnosis();
                    XmlNode rowRevisedDiagnosisHeader = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Diagnosis:']", this.m_NameSpaceManager);
                    string  finalDateHead             = YellowstonePathology.Business.BaseData.GetShortDateString(revisedDiagnosisAmendment.FinalDate);
                    finalDateHead += " " + YellowstonePathology.Business.BaseData.GetMillitaryTimeString(revisedDiagnosisAmendment.FinalTime);
                    rowRevisedDiagnosisHeader.SelectSingleNode("descendant::w:r[w:t='Diagnosis:']/w:t", this.m_NameSpaceManager).InnerText = "Revised Diagnosis: " + finalDateHead;
                }

                XmlNode insertAfterRowP = rowPreviousDiagnosis;

                for (int counter = 0; counter < amendmentCollection.Count; counter++)
                {
                    YellowstonePathology.Business.Amendment.Model.Amendment amendment = amendmentCollection[counter];
                    if (amendment.RevisedDiagnosis == true || amendment.ShowPreviousDiagnosis == true)
                    {
                        string amendmentId = amendment.AmendmentId;
                        foreach (YellowstonePathology.Business.Test.Surgical.SurgicalAudit surgicalAudit in panelSetOrderSurgical.SurgicalAuditCollection)
                        {
                            if (surgicalAudit.AmendmentId == amendmentId)
                            {
                                string finalDateP = string.Empty;

                                finalDateP  = YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate);
                                finalDateP += " " + YellowstonePathology.Business.BaseData.GetMillitaryTimeString(panelSetOrderSurgical.FinalTime);

                                XmlNode rowSpecimenBlankRowP            = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_blank_row_previous']", this.m_NameSpaceManager);
                                XmlNode rowPreviousDiagnosisHeaderClone = rowPreviousDiagnosis.Clone();
                                string  previousDiagnosisHeader         = "Previous diagnosis on " + finalDateP;
                                rowPreviousDiagnosisHeaderClone.SelectSingleNode("descendant::w:r[w:t='previous_diagnosis_header']/w:t", this.m_NameSpaceManager).InnerText = previousDiagnosisHeader;
                                tableNodeP.InsertAfter(rowPreviousDiagnosisHeaderClone, insertAfterRowP);
                                insertAfterRowP = rowPreviousDiagnosisHeaderClone;

                                foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenAudit specimenAudit in surgicalAudit.SurgicalSpecimenAuditCollection)
                                {
                                    if (specimenAudit.AmendmentId == amendmentId)
                                    {
                                        XmlNode rowSpecimenNodeCloneP = rowSpecimenNodeP.Clone();
                                        string  diagnosisIDP          = specimenAudit.DiagnosisId + ".";
                                        string  specimenTypeP         = specimenAudit.SpecimenOrder.Description + ":";

                                        rowSpecimenNodeCloneP.SelectSingleNode("descendant::w:r[w:t='sidp']/w:t", this.m_NameSpaceManager).InnerText = diagnosisIDP;
                                        rowSpecimenNodeCloneP.SelectSingleNode("descendant::w:r[w:t='specimen_type_previous']/w:t", this.m_NameSpaceManager).InnerText = specimenTypeP;
                                        tableNodeP.InsertAfter(rowSpecimenNodeCloneP, insertAfterRowP);

                                        XmlNode rowDiagnosisNodeCloneP = rowDiagnosisNodeP.Clone();
                                        string  diagnosisP             = specimenAudit.Diagnosis;
                                        this.SetXMLNodeParagraphDataNode(rowDiagnosisNodeCloneP, "diagnosis_previous", diagnosisP);
                                        mainTableNode.InsertAfter(rowDiagnosisNodeCloneP, rowSpecimenNodeCloneP);
                                        insertAfterRowP = rowDiagnosisNodeCloneP;
                                    }
                                }

                                XmlNode rowCommentPClone = rowCommentP.Clone();
                                string  reportCommentP   = surgicalAudit.Comment;
                                rowCommentPClone.SelectSingleNode("descendant::w:r[w:t='report_comment_previous']/w:t", this.m_NameSpaceManager).InnerText = reportCommentP;
                                tableNodeP.InsertAfter(rowCommentPClone, insertAfterRowP);

                                insertAfterRowP = rowCommentPClone;
                                XmlNode rowPreviousSignaturePClone = rowPreviousSignatureP.Clone();
                                YellowstonePathology.Business.User.SystemUser pathologistUser = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetSystemUserById(surgicalAudit.PathologistId);

                                string previousSignautreP = pathologistUser.Signature;
                                rowPreviousSignaturePClone.SelectSingleNode("descendant::w:r[w:t='previous_signature']/w:t", this.m_NameSpaceManager).InnerText = previousSignautreP;
                                tableNodeP.InsertAfter(rowPreviousSignaturePClone, insertAfterRowP);
                                insertAfterRowP = rowPreviousSignaturePClone;
                            }
                        }
                    }
                }
            }

            tableNodeP.RemoveChild(rowSpecimenNodeP);
            tableNodeP.RemoveChild(rowDiagnosisNodeP);
            tableNodeP.RemoveChild(rowPreviousDiagnosis);
            tableNodeP.RemoveChild(rowCommentP);
            tableNodeP.RemoveChild(rowPreviousSignatureP);
            tableNodeP.RemoveChild(rowBlankLine1P);
            tableNodeP.RemoveChild(rowBlankLine2P);


            if (this.m_PanelSetOrder.Final == true)
            {
                this.SetXmlNodeData("pathologist_signature", this.m_PanelSetOrder.Signature);
            }
            else
            {
                this.SetXmlNodeData("pathologist_signature", "THIS CASE IS NOT FINAL");
            }

            XmlNode rowCancerSummaryHeader = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Cancer Case Summary']", this.m_NameSpaceManager);
            XmlNode rowCancerSummary       = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='cancer_summary']", this.m_NameSpaceManager);
            XmlNode rowAJCCStage           = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='ajcc_stage']", this.m_NameSpaceManager);

            if (panelSetOrderSurgical.CancerSummary == string.Empty)
            {
                mainTableNode.RemoveChild(rowCancerSummaryHeader);
                mainTableNode.RemoveChild(rowCancerSummary);
            }
            else
            {
                this.SetXMLNodeParagraphData("cancer_summary", panelSetOrderSurgical.CancerSummary);
                if (panelSetOrderSurgical.AJCCStage != string.Empty)
                {
                    this.SetXmlNodeData("ajcc_stage", "Pathologic TNM Stage: " + panelSetOrderSurgical.AJCCStage);
                }
                else
                {
                    this.SetXmlNodeData("ajcc_stage", string.Empty);
                }
            }

            this.SetXmlNodeData("client_case", this.m_AccessionOrder.PCAN);
            this.SetXMLNodeParagraphData("microscopic_description", panelSetOrderSurgical.MicroscopicX);

            //Stains
            XmlNode rowAncillaryCommentNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='ancillary_studies_comment']", this.m_NameSpaceManager);
            XmlNode tableNodeSS             = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='specimen_type']", this.m_NameSpaceManager);
            XmlNode rowSpecimenTypeNode     = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_type']", this.m_NameSpaceManager);
            XmlNode rowSinglePlexNode       = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Immunohistochemistry(single)']", this.m_NameSpaceManager);
            XmlNode rowMultiPlexNode        = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Immunohistochemistry(dual)']", this.m_NameSpaceManager);
            XmlNode rowCytochemicalNode     = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Cytochemical']", this.m_NameSpaceManager);
            XmlNode rowTestHeaderNode       = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Result']", this.m_NameSpaceManager);
            XmlNode rowSpecialStainNode     = tableNodeSS.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='stain_description']", this.m_NameSpaceManager);

            bool   commentSet       = false;
            string ancillaryComment = panelSetOrderSurgical.GetAncillaryStudyComment();

            if (this.m_PanelSetOrder.FinalDate.HasValue == false || this.m_PanelSetOrder.FinalDate >= DateTime.Parse("11/7/07"))
            {
                XmlNode insertAfterRowSS = rowAncillaryCommentNode;
                YellowstonePathology.Business.Test.Model.TestOrderCollection allTests = this.m_PanelSetOrder.GetTestOrders();
                foreach (SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection)
                {
                    YellowstonePathology.Business.Test.Model.TestOrderCollection         specimenTestCollection            = surgicalSpecimen.SpecimenOrder.GetTestOrders(allTests);
                    YellowstonePathology.Business.SpecialStain.StainResultItemCollection singleplexStainResultCollection   = surgicalSpecimen.StainResultItemCollection.GetSingleplexStains(specimenTestCollection);
                    YellowstonePathology.Business.SpecialStain.StainResultItemCollection multiplexStainResultCollection    = surgicalSpecimen.StainResultItemCollection.GetMultiplexStains(specimenTestCollection);
                    YellowstonePathology.Business.SpecialStain.StainResultItemCollection cytochemicalStainResultCollection = surgicalSpecimen.StainResultItemCollection.GetCytochemicalStains(specimenTestCollection);

                    if ((singleplexStainResultCollection.Count > 0 || multiplexStainResultCollection.Count > 0 || cytochemicalStainResultCollection.Count > 0))
                    {
                        if (commentSet == false)
                        {
                            this.SetXMLNodeParagraphData("ancillary_studies_comment", ancillaryComment);
                            commentSet = true;
                        }

                        XmlNode rowSpecimenTypeClone = rowSpecimenTypeNode.Clone();
                        string  specimenType         = surgicalSpecimen.DiagnosisId + ". " + surgicalSpecimen.SpecimenOrder.Description;
                        rowSpecimenTypeClone.SelectSingleNode("descendant::w:r[w:t='specimen_type']/w:t", this.m_NameSpaceManager).InnerText = specimenType;
                        tableNodeSS.InsertAfter(rowSpecimenTypeClone, insertAfterRowSS);
                        insertAfterRowSS = rowSpecimenTypeClone;

                        if (singleplexStainResultCollection.Count > 0)
                        {
                            insertAfterRowSS = this.SetStains(tableNodeSS, rowSinglePlexNode, rowTestHeaderNode, insertAfterRowSS, rowSpecialStainNode, surgicalSpecimen, singleplexStainResultCollection);
                        }

                        if (multiplexStainResultCollection.Count > 0)
                        {
                            insertAfterRowSS = this.SetStains(tableNodeSS, rowMultiPlexNode, rowTestHeaderNode, insertAfterRowSS, rowSpecialStainNode, surgicalSpecimen, multiplexStainResultCollection);
                        }

                        if (cytochemicalStainResultCollection.Count > 0)
                        {
                            insertAfterRowSS = this.SetStains(tableNodeSS, rowCytochemicalNode, rowTestHeaderNode, insertAfterRowSS, rowSpecialStainNode, surgicalSpecimen, cytochemicalStainResultCollection);
                        }
                    }
                }
            }

            tableNodeSS.RemoveChild(rowSpecimenTypeNode);
            tableNodeSS.RemoveChild(rowTestHeaderNode);
            tableNodeSS.RemoveChild(rowSpecialStainNode);
            tableNodeSS.RemoveChild(rowSinglePlexNode);
            tableNodeSS.RemoveChild(rowMultiPlexNode);
            tableNodeSS.RemoveChild(rowCytochemicalNode);

            if (commentSet == false)
            {
                XmlNode rowAncillaryStudiesNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='Ancillary Studies']", this.m_NameSpaceManager);
                mainTableNode.RemoveChild(rowAncillaryStudiesNode);
                mainTableNode.RemoveChild(rowAncillaryCommentNode);
            }

            this.SetXMLNodeParagraphData("clinical_information", this.m_AccessionOrder.ClinicalHistory);

            XmlNode rowICHeaderNode   = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='intraoperative_consultation_header']", this.m_NameSpaceManager);
            XmlNode rowICSpecimenNode = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='intraoperative_consultation_specimen']", this.m_NameSpaceManager);
            XmlNode rowICTextNode     = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='intraoperative_consultation_text']", this.m_NameSpaceManager);

            XmlNode insertAfterRowIC = rowICHeaderNode;
            int     icCount          = 0;

            this.SetXMLNodeParagraphDataNode(rowICHeaderNode, "intraoperative_consultation_header", "Intraoperative Consultation");
            foreach (SurgicalSpecimen surgicalSpecimen in panelSetOrderSurgical.SurgicalSpecimenCollection)
            {
                foreach (IntraoperativeConsultationResult icItem in surgicalSpecimen.IntraoperativeConsultationResultCollection)
                {
                    XmlNode rowICSpecimenNodeClone = rowICSpecimenNode.Clone();
                    string  specimenString         = surgicalSpecimen.DiagnosisId + ". " + surgicalSpecimen.SpecimenOrder.Description + ":";
                    this.SetXMLNodeParagraphDataNode(rowICSpecimenNodeClone, "intraoperative_consultation_specimen", specimenString);
                    mainTableNode.InsertAfter(rowICSpecimenNodeClone, insertAfterRowIC);
                    insertAfterRowIC = rowICSpecimenNodeClone;

                    XmlNode rowICTextNodeClone = rowICTextNode.Clone();
                    this.SetXMLNodeParagraphDataNode(rowICTextNodeClone, "intraoperative_consultation_text", icItem.Result);
                    mainTableNode.InsertAfter(rowICTextNodeClone, insertAfterRowIC);
                    insertAfterRowIC = rowICTextNodeClone;
                    icCount         += 1;
                }
            }

            if (icCount == 0)
            {
                mainTableNode.RemoveChild(rowICHeaderNode);
            }
            mainTableNode.RemoveChild(rowICSpecimenNode);
            mainTableNode.RemoveChild(rowICTextNode);

            XmlNode rowSpecimenDescriptionNode            = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_description']", this.m_NameSpaceManager);
            XmlNode rowFixationTypeNode                   = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_fixation_type']", this.m_NameSpaceManager);
            XmlNode rowTimeToFixationNode                 = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='time_to_fixation']", this.m_NameSpaceManager);
            XmlNode rowFixationDurationNode               = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='duration_of_fixation']", this.m_NameSpaceManager);
            XmlNode rowFixationCommentNode                = mainTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='fixation_comment']", this.m_NameSpaceManager);
            XmlNode rowInsertSpecimenDescriptionAfterNode = rowSpecimenDescriptionNode;

            foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in this.m_AccessionOrder.SpecimenOrderCollection)
            {
                XmlNode rowSpecimenDescriptionClone = rowSpecimenDescriptionNode.Clone();
                rowSpecimenDescriptionClone.SelectSingleNode("descendant::w:r[w:t='specimen_description']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.GetSpecimenDescriptionString();

                YellowstonePathology.Business.Helper.DateTimeJoiner collectionDateTimeJoiner = new YellowstonePathology.Business.Helper.DateTimeJoiner(specimenOrder.CollectionDate.Value, specimenOrder.CollectionTime);
                rowSpecimenDescriptionClone.SelectSingleNode("descendant::w:r[w:t='date_time_collected']/w:t", this.m_NameSpaceManager).InnerText = collectionDateTimeJoiner.DisplayString;
                mainTableNode.InsertAfter(rowSpecimenDescriptionClone, rowInsertSpecimenDescriptionAfterNode);
                rowInsertSpecimenDescriptionAfterNode = rowSpecimenDescriptionClone;

                bool specimenHasERPR = this.SpecimenHasERPR(specimenOrder);
                if (specimenHasERPR == true)
                {
                    XmlNode rowFixationTypeNodeClone = rowFixationTypeNode.Clone();
                    rowFixationTypeNodeClone.SelectSingleNode("descendant::w:r[w:t='specimen_fixation_type']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.LabFixation;
                    mainTableNode.InsertAfter(rowFixationTypeNodeClone, rowInsertSpecimenDescriptionAfterNode);
                    rowInsertSpecimenDescriptionAfterNode = rowFixationTypeNodeClone;

                    XmlNode rowTimeToFixationNodeClone = rowTimeToFixationNode.Clone();
                    rowTimeToFixationNodeClone.SelectSingleNode("descendant::w:r[w:t='time_to_fixation']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.TimeToFixationHourString;
                    mainTableNode.InsertAfter(rowTimeToFixationNodeClone, rowInsertSpecimenDescriptionAfterNode);
                    rowInsertSpecimenDescriptionAfterNode = rowTimeToFixationNodeClone;

                    XmlNode rowFixationDurationNodeClone = rowFixationDurationNode.Clone();
                    rowFixationDurationNodeClone.SelectSingleNode("descendant::w:r[w:t='duration_of_fixation']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.FixationDurationString;
                    mainTableNode.InsertAfter(rowFixationDurationNodeClone, rowInsertSpecimenDescriptionAfterNode);
                    rowInsertSpecimenDescriptionAfterNode = rowFixationDurationNodeClone;

                    XmlNode rowFixationCommentNodeClone = rowFixationCommentNode.Clone();
                    rowFixationCommentNodeClone.SelectSingleNode("descendant::w:r[w:t='fixation_comment']/w:t", this.m_NameSpaceManager).InnerText = specimenOrder.FixationComment;
                    mainTableNode.InsertAfter(rowFixationCommentNodeClone, rowInsertSpecimenDescriptionAfterNode);
                    rowInsertSpecimenDescriptionAfterNode = rowFixationCommentNodeClone;
                }
            }
            mainTableNode.RemoveChild(rowSpecimenDescriptionNode);
            mainTableNode.RemoveChild(rowFixationTypeNode);
            mainTableNode.RemoveChild(rowTimeToFixationNode);
            mainTableNode.RemoveChild(rowFixationDurationNode);
            mainTableNode.RemoveChild(rowFixationCommentNode);

            this.SetXMLNodeParagraphData("gross_description", panelSetOrderSurgical.GrossX);
            this.SetXMLNodeParagraphData("client_name", this.m_AccessionOrder.ClientName);

            string finalDate = YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate) + " - " + YellowstonePathology.Business.BaseData.GetMillitaryTimeString(this.m_PanelSetOrder.FinalTime);

            this.SetXmlNodeData("final_date", finalDate);

            string immunoComment = panelSetOrderSurgical.GetImmunoComment();

            if (immunoComment.Length > 0)
            {
                this.SetXmlNodeData("immuno_comment", immunoComment);
            }
            else
            {
                this.DeleteRow("immuno_comment");
            }

            this.SetXMLNodeParagraphData("additional_testing", this.m_AccessionOrder.PanelSetOrderCollection.GetAdditionalTestingString(this.m_PanelSetOrder.ReportNo));

            this.HandleERPRStatements();

            this.SaveReport();
        }
        public override void Render()
        {
            HER2AmplificationByISHTestOrder panelSetOrderHer2ByIsh = (HER2AmplificationByISHTestOrder)this.m_PanelSetOrder;

            if (panelSetOrderHer2ByIsh.Indicator.ToUpper() == "BREAST")
            {
                if (this.m_AccessionOrder.AccessionDate >= DateTime.Parse("1/1/2014") == true)
                {
                    this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HER2AmplificationByISH.Breast.8.xml";
                }
                else
                {
                    this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HER2AmplificationByISH.ASCOPre2014.7.xml";
                }
            }
            else if (panelSetOrderHer2ByIsh.Indicator.ToUpper() == "GASTRIC")
            {
                if (this.m_AccessionOrder.AccessionDate >= DateTime.Parse("1/1/2014") == true)
                {
                    this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HER2AmplificationByISH.Gastric.7.xml";
                }
                else
                {
                    this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HER2AmplificationByISH.ASCOPre2014.7.xml";
                }
            }

            base.OpenTemplate();

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

            if (this.m_AccessionOrder.OrderCancelled == false)
            {
                YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection();
                amendmentSection.SetAmendment(m_PanelSetOrder.AmendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true);

                YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
                string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

                this.SetXmlNodeData("date_time_collected", collectionDateTimeString);
                this.SetXmlNodeData("test_result", panelSetOrderHer2ByIsh.Result);

                if (panelSetOrderHer2ByIsh.Her2Chr17Ratio.HasValue == true)
                {
                    this.SetXmlNodeData("test_ratio", "Ratio = " + panelSetOrderHer2ByIsh.Her2Chr17Ratio);
                }
                else
                {
                    this.DeleteRow("test_ratio");
                }

                if (panelSetOrderHer2ByIsh.AverageHer2NeuSignal.HasValue == true)
                {
                    this.SetXmlNodeData("averageher2_copynumber", "Average HER2 Copy Number = " + panelSetOrderHer2ByIsh.AverageHer2NeuSignal.Value.ToString());
                }
                else
                {
                    this.DeleteRow("averageher2_copynumber");
                }

                this.SetXmlNodeData("final_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));

                if (string.IsNullOrEmpty(panelSetOrderHer2ByIsh.ResultComment) == false)
                {
                    this.SetXmlNodeData("result_comment", panelSetOrderHer2ByIsh.ResultComment);
                }
                else
                {
                    this.DeleteRow("result_comment");
                }

                this.SetXmlNodeData("cell_cnt", panelSetOrderHer2ByIsh.CellsCounted.ToString());
                this.SetXmlNodeData("obs_cnt", panelSetOrderHer2ByIsh.NumberOfObservers.ToString());

                if (panelSetOrderHer2ByIsh.AverageHer2NeuSignal.HasValue == true)
                {
                    this.SetXmlNodeData("avg_her", panelSetOrderHer2ByIsh.AverageHer2NeuSignal.Value.ToString());
                }
                else
                {
                    this.SetXmlNodeData("avg_her", "Unable to calculate");
                }

                this.SetXmlNodeData("avg_chr", panelSetOrderHer2ByIsh.AverageChr17Signal);

                if (panelSetOrderHer2ByIsh.Her2Chr17Ratio.HasValue == true)
                {
                    this.SetXmlNodeData("tst_ratio", panelSetOrderHer2ByIsh.Her2Chr17Ratio.Value.ToString());
                }
                else
                {
                    this.SetXmlNodeData("tst_ratio", "Unable to calculate");
                }

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


                if (panelSetOrderHer2ByIsh.InterpretiveComment != null)
                {
                    this.SetXMLNodeParagraphDataNode(tableNode, "report_interpretation", panelSetOrderHer2ByIsh.InterpretiveComment);
                }
                else
                {
                    this.SetXMLNodeParagraphDataNode(tableNode, "report_interpretation", string.Empty);
                }

                YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(this.m_PanelSetOrder.OrderedOnId);
                string blockDescription = string.Empty;
                if (aliquotOrder != null)
                {
                    blockDescription = " - Block " + aliquotOrder.Label;
                }

                SetXmlNodeData("specimen_type", specimenOrder.Description + blockDescription);
                SetXmlNodeData("specimen_fixation", specimenOrder.LabFixation);
                SetXmlNodeData("time_to_fixation", specimenOrder.TimeToFixationHourString);

                this.SetXmlNodeData("report_reference", panelSetOrderHer2ByIsh.ReportReference);
                SetXmlNodeData("duration_of_fixation", specimenOrder.FixationDurationString);

                this.SetXmlNodeData("fixation_comment", specimenOrder.FixationComment);

                SetXmlNodeData("report_method", panelSetOrderHer2ByIsh.Method);
                SetXmlNodeData("asr_comment", panelSetOrderHer2ByIsh.ASRComment);
                SetXmlNodeData("sample_adequacy", panelSetOrderHer2ByIsh.SampleAdequacy);
                SetXmlNodeData("date_time_collected", collectionDateTimeString);
                SetXmlNodeData("report_distribution", "No Distribution Selected");

                this.SetXmlNodeData("pathologist_signature", this.m_PanelSetOrder.Signature);
            }
            else
            {
                this.SetXmlNodeData("result_comment", panelSetOrderHer2ByIsh.ResultComment);
                this.SetXmlNodeData("final_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));
            }

            this.SaveReport();
        }
示例#57
0
        public override void Render()
        {
            KRASStandardReflexResult krasStandardReflexResult = KRASStandardReflexResultFactory.GetResult(this.m_PanelSetOrder.ReportNo, this.m_AccessionOrder);

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\KRASStandardReflex.3.xml";

            base.OpenTemplate();

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


            this.SetXmlNodeData("kras_result", krasStandardReflexResult.KRASStandardResult);
            this.SetXmlNodeData("braf_result", krasStandardReflexResult.BRAFV600EKResult);
            this.SetXmlNodeData("final_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));

            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);

            if (amendmentCollection.Count == 0)
            {
                this.SetXmlNodeData("test_result_header", "Test Result");
            }
            else             // If an amendment exists show as corrected
            {
                this.SetXmlNodeData("test_result_header", "Corrected Test Result");
            }

            //delete the kras_result_detail line if not used
            YellowstonePathology.Business.Test.KRASStandard.KRASStandardNotDetectedResult krasStandardNotDetectedResult = new YellowstonePathology.Business.Test.KRASStandard.KRASStandardNotDetectedResult();
            if (krasStandardReflexResult.KRASStandardResult == krasStandardNotDetectedResult.ResultCode)
            {
                this.DeleteRow("kras_result_detail");
            }

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

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            if (string.IsNullOrEmpty(krasStandardReflexResult.KRASStandardReflexTestOrder.Comment) == false)
            {
                this.SetXMLNodeParagraphData("result_comment", krasStandardReflexResult.KRASStandardReflexTestOrder.Comment);
            }
            else
            {
                this.DeleteRow("result_comment");
            }

            this.SetXMLNodeParagraphData("tumor_nuclei_percent", krasStandardReflexResult.KRASStandardReflexTestOrder.TumorNucleiPercentage);
            this.SetXMLNodeParagraphData("report_indication_comment", krasStandardReflexResult.KRASStandardReflexTestOrder.IndicationComment);
            this.SetXMLNodeParagraphData("report_interpretation", krasStandardReflexResult.KRASStandardReflexTestOrder.Interpretation);
            this.SetXMLNodeParagraphData("report_references", krasStandardReflexResult.KRASStandardReflexTestOrder.ReportReferences);
            this.SetXMLNodeParagraphData("report_method", krasStandardReflexResult.KRASStandardReflexTestOrder.Method);
            this.SetXMLNodeParagraphData("report_disclaimer", krasStandardReflexResult.KRASStandardReflexTestOrder.GetLocationPerformedComment());

            this.ReplaceText("report_date", YellowstonePathology.Business.BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));
            this.SetXmlNodeData("pathologist_signature", m_PanelSetOrder.Signature);
            this.SaveReport();
        }
示例#58
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();
        }
示例#59
0
        public override void Render()
        {
            YellowstonePathology.Business.Test.HPV1618SolidTumor.HPV1618SolidTumorTestOrder panelSetOrder = (YellowstonePathology.Business.Test.HPV1618SolidTumor.HPV1618SolidTumorTestOrder) this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\HPV1618GenotypingSolidTumor.3.xml";
            base.OpenTemplate();

            base.SetDemographicsV2();

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            YellowstonePathology.Business.Test.AliquotOrder            aliquotOrder  = specimenOrder.AliquotOrderCollection.GetByAliquotOrderId(this.m_PanelSetOrder.OrderedOnId);
            string description = specimenOrder.Description + " - Block " + aliquotOrder.GetDescription();

            base.ReplaceText("specimen_description", description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            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, false);

            base.ReplaceText("hpvdna_result", panelSetOrder.HPVDNAResult);
            if (panelSetOrder.HPV6Result == PanelSetOrder.NotPerformedResult)
            {
                base.DeleteRow("hpv6_result");
            }
            else
            {
                base.ReplaceText("hpv6_result", panelSetOrder.HPV6Result);
            }

            if (panelSetOrder.HPV16Result == PanelSetOrder.NotPerformedResult)
            {
                base.DeleteRow("hpv16_result");
            }
            else
            {
                base.ReplaceText("hpv16_result", panelSetOrder.HPV16Result);
            }

            if (panelSetOrder.HPV18Result == PanelSetOrder.NotPerformedResult)
            {
                base.DeleteRow("hpv18_result");
            }
            else
            {
                base.ReplaceText("hpv18_result", panelSetOrder.HPV18Result);
            }

            if (panelSetOrder.HPV31Result == PanelSetOrder.NotPerformedResult)
            {
                base.DeleteRow("hpv31_result");
            }
            else
            {
                base.ReplaceText("hpv31_result", panelSetOrder.HPV31Result);
            }

            if (panelSetOrder.HPV33Result == PanelSetOrder.NotPerformedResult)
            {
                base.DeleteRow("hpv33_result");
            }
            else
            {
                base.ReplaceText("hpv33_result", panelSetOrder.HPV33Result);
            }

            if (panelSetOrder.HPV45Result == PanelSetOrder.NotPerformedResult)
            {
                base.DeleteRow("hpv45_result");
            }
            else
            {
                base.ReplaceText("hpv45_result", panelSetOrder.HPV45Result);
            }

            if (panelSetOrder.HPV58Result == PanelSetOrder.NotPerformedResult)
            {
                base.DeleteRow("hpv58_result");
            }
            else
            {
                base.ReplaceText("hpv58_result", panelSetOrder.HPV58Result);
            }

            if (panelSetOrder.Indication == YellowstonePathology.Business.Test.HPV1618SolidTumor.HPV1618SolidTumorIndication.SquamousCellCarcinomaHeadAndNeck)
            {
                base.ReplaceText("report_interpretation_header", "Interpretation");
                base.ReplaceText("report_interpretation", panelSetOrder.Interpretation);
                base.ReplaceText("pathologist_signature", panelSetOrder.Signature);

                if (panelSetOrder.FinalTime.HasValue == true)
                {
                    string esignedHeader = "*** E-signed " + panelSetOrder.FinalTime.Value.ToString("MM/dd/yyyy HH:mm") + "***";
                    base.ReplaceText("esigned_header", esignedHeader);
                }
            }
            else
            {
                base.DeleteRow("report_interpretation_header");
                base.DeleteRow("report_interpretation");
                base.DeleteRow("pathologist_signature");
                base.DeleteRow("esigned_header");
            }

            if (string.IsNullOrEmpty(panelSetOrder.Comment) == false)
            {
                base.ReplaceText("report_comment", panelSetOrder.Comment);
            }
            else
            {
                base.DeleteRow("report_comment");
            }

            base.ReplaceText("report_method", panelSetOrder.Method);
            base.ReplaceText("report_references", panelSetOrder.ReportReferences);
            this.ReplaceText("report_date", BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate));
            this.SetXmlNodeData("pathologist_signature", this.m_PanelSetOrder.Signature);

            this.SetReportDistribution();
            this.SetCaseHistory();

            this.SaveReport();
        }
示例#60
0
        public override void Render()
        {
            PanelSetOrderMPNExtendedReflex panelSetOrderMPNExtendedReflex = (PanelSetOrderMPNExtendedReflex)this.m_PanelSetOrder;

            this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\MPNExtendedReflex.3.xml";
            base.OpenTemplate();

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

            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("panelset_name", panelSetOrderMPNExtendedReflex.PanelSetName);

            if (string.IsNullOrEmpty(panelSetOrderMPNExtendedReflex.JAK2V617FResult) == false)
            {
                this.ReplaceText("jak2v617_result", panelSetOrderMPNExtendedReflex.JAK2V617FResult);
            }
            else
            {
                this.DeleteRow("jak2v617_result");
            }

            if (string.IsNullOrEmpty(panelSetOrderMPNExtendedReflex.JAK2Exon1214Result) == false)
            {
                this.ReplaceText("jak2exon1214_result", panelSetOrderMPNExtendedReflex.JAK2Exon1214Result);
            }
            else
            {
                this.DeleteRow("jak2exon1214_result");
            }

            if (string.IsNullOrEmpty(panelSetOrderMPNExtendedReflex.CalreticulinMutationAnalysisResult) == false)
            {
                this.ReplaceText("calr_result", panelSetOrderMPNExtendedReflex.CalreticulinMutationAnalysisResult);
            }
            else
            {
                this.DeleteRow("calr_result");
            }

            if (string.IsNullOrEmpty(panelSetOrderMPNExtendedReflex.MPLResult) == false)
            {
                this.ReplaceText("mpl_result", panelSetOrderMPNExtendedReflex.MPLResult);
            }
            else
            {
                this.DeleteRow("mpl_result");
            }

            if (string.IsNullOrEmpty(panelSetOrderMPNExtendedReflex.JAK2Mutation) == false)
            {
                this.ReplaceText("jak2_mutation", panelSetOrderMPNExtendedReflex.JAK2Mutation);
            }
            else
            {
                this.DeleteRow("jak2_mutation");
            }

            if (string.IsNullOrEmpty(panelSetOrderMPNExtendedReflex.Comment) == false)
            {
                this.ReplaceText("report_comment", panelSetOrderMPNExtendedReflex.Comment);
            }
            else
            {
                this.DeleteRow("report_comment");
            }

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId);
            base.ReplaceText("specimen_description", specimenOrder.Description);

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);

            this.SetXmlNodeData("date_time_collected", collectionDateTimeString);

            this.ReplaceText("report_interpretation", panelSetOrderMPNExtendedReflex.Interpretation);
            this.ReplaceText("report_method", panelSetOrderMPNExtendedReflex.Method);
            this.ReplaceText("report_reference", panelSetOrderMPNExtendedReflex.ReportReferences);

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

            this.SaveReport();
        }