public void SetResults(PanelSetOrderHer2AmplificationByFish panelSetOrderHer2AmplificationByFish)
 {
     panelSetOrderHer2AmplificationByFish.Result = this.m_Result;
     if (string.IsNullOrEmpty(panelSetOrderHer2AmplificationByFish.AverageHER2SignalsPerNucleus) == false) this.m_Interpretation = this.m_Interpretation.Replace("$AVGHER2SIGNALS$", panelSetOrderHer2AmplificationByFish.AverageHER2SignalsPerNucleus);
     if (string.IsNullOrEmpty(panelSetOrderHer2AmplificationByFish.AverageCEN17SignalsPerNucleus) == false) this.m_Interpretation = this.m_Interpretation.Replace("$AVGCEN17SIGNALS$", panelSetOrderHer2AmplificationByFish.AverageCEN17SignalsPerNucleus);
     if (string.IsNullOrEmpty(panelSetOrderHer2AmplificationByFish.HER2CEN17SignalRatio) == false) this.m_Interpretation = this.m_Interpretation.Replace("$HER2CEN17SIGNALRATIO$", panelSetOrderHer2AmplificationByFish.HER2CEN17SignalRatio);
     panelSetOrderHer2AmplificationByFish.Interpretation = this.m_Interpretation;
     panelSetOrderHer2AmplificationByFish.Comment = this.m_Comment;
     panelSetOrderHer2AmplificationByFish.Reference = this.m_Reference;
     panelSetOrderHer2AmplificationByFish.ReferenceRanges = Her2AmplificationByFishResult.ReferenceRanges;
     panelSetOrderHer2AmplificationByFish.NucleiScored = Her2AmplificationByFishResult.NucleiScored;
 }
예제 #2
0
 public void SetResults(PanelSetOrderHer2AmplificationByFish panelSetOrderHer2AmplificationByFish)
 {
     panelSetOrderHer2AmplificationByFish.Result = this.m_Result;
     if (string.IsNullOrEmpty(panelSetOrderHer2AmplificationByFish.AverageHER2SignalsPerNucleus) == false)
     {
         this.m_Interpretation = this.m_Interpretation.Replace("$AVGHER2SIGNALS$", panelSetOrderHer2AmplificationByFish.AverageHER2SignalsPerNucleus);
     }
     if (string.IsNullOrEmpty(panelSetOrderHer2AmplificationByFish.AverageCEN17SignalsPerNucleus) == false)
     {
         this.m_Interpretation = this.m_Interpretation.Replace("$AVGCEN17SIGNALS$", panelSetOrderHer2AmplificationByFish.AverageCEN17SignalsPerNucleus);
     }
     if (string.IsNullOrEmpty(panelSetOrderHer2AmplificationByFish.HER2CEN17SignalRatio) == false)
     {
         this.m_Interpretation = this.m_Interpretation.Replace("$HER2CEN17SIGNALRATIO$", panelSetOrderHer2AmplificationByFish.HER2CEN17SignalRatio);
     }
     panelSetOrderHer2AmplificationByFish.Interpretation  = this.m_Interpretation;
     panelSetOrderHer2AmplificationByFish.Comment         = this.m_Comment;
     panelSetOrderHer2AmplificationByFish.Reference       = this.m_Reference;
     panelSetOrderHer2AmplificationByFish.ReferenceRanges = Her2AmplificationByFishResult.ReferenceRanges;
     panelSetOrderHer2AmplificationByFish.NucleiScored    = Her2AmplificationByFishResult.NucleiScored;
 }
        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 ToXml(XElement document)
        {
            PanelSetOrderHer2AmplificationByFish panelSetOrder = (PanelSetOrderHer2AmplificationByFish)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo);

            this.AddHeader(document, panelSetOrder, "HER2 Gene Amplification");
            this.AddNextObxElement("", document, "F");

            this.AddNextObxElement("HER2: " + panelSetOrder.Result, document, "F");
            this.AddNextObxElement("Ratio: " + panelSetOrder.HER2CEN17SignalRatio, document, "F");
            this.AddNextObxElement("Average HER2 Copy Number = " + panelSetOrder.AverageHER2SignalsPerNucleus, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");
            this.AddNextObxElement("Reference Range: " + panelSetOrder.ReferenceRanges, document, "F");

            if (string.IsNullOrEmpty(panelSetOrder.Comment) != true)
            {
                this.HandleLongString("Comment: " + panelSetOrder.Comment, document, "F");
            }
            this.AddNextObxElement(string.Empty, document, "F");

            this.AddNextObxElement("Pathologist: " + panelSetOrder.Signature, document, "F");
            if (panelSetOrder.FinalTime.HasValue == true)
            {
                this.AddNextObxElement("E-signed " + panelSetOrder.FinalTime.Value.ToString("MM/dd/yyyy HH:mm"), document, "F");
            }
            this.AddNextObxElement(string.Empty, document, "F");
            this.AddAmendments(document);

            this.AddNextObxElement("Number of invasive tumor cells counted: " + panelSetOrder.NucleiScored, document, "F");
            this.AddNextObxElement("HER2 average copy number per nucleus: " + panelSetOrder.AverageHER2SignalsPerNucleus, document, "F");
            this.AddNextObxElement("Chr17 average copy number per nucleus: " + panelSetOrder.AverageCEN17SignalsPerNucleus, document, "F");
            this.AddNextObxElement("Ratio of average HER2/Chr17 signals: " + panelSetOrder.HER2CEN17SignalRatio, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(panelSetOrder.OrderedOn, panelSetOrder.OrderedOnId);
            YellowstonePathology.Business.Test.AliquotOrder            aliquotOrder  = (YellowstonePathology.Business.Test.AliquotOrder) this.m_AccessionOrder.SpecimenOrderCollection.GetOrderTarget(panelSetOrder.OrderedOnId);
            string specimenDescriptionString = specimenOrder.Description + " - " + aliquotOrder.Label;

            this.AddNextObxElement("Specimen Description: " + specimenDescriptionString, document, "F");

            this.AddNextObxElement("Fixation Type: " + specimenOrder.LabFixation, document, "F");
            this.AddNextObxElement("Time to fixation: " + specimenOrder.TimeToFixationHourString, document, "F");
            this.AddNextObxElement("Duration of fixation: " + specimenOrder.FixationDurationString, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");

            this.AddNextObxElement("Interpretation: ", document, "F");
            this.HandleLongString(panelSetOrder.Interpretation, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");

            this.AddNextObxElement("Method: ", document, "F");
            string method = System.Security.SecurityElement.Escape("This test was performed using a molecular method, In Situ Hybridization (ISH) with the US FDA approved Inform HER2 DNA probe kit, modified to report results according to ASCO/CAP guidelines. The test was performed on paraffin embedded tissue in compliance with ASCO/CAP guidelines.  Probes used include a locus specific probe for HER2 and an internal hybridization control probe for the centromeric region of chromosome 17 (Chr17).");

            this.HandleLongString(method, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");

            this.AddNextObxElement("References: ", document, "F");
            this.HandleLongString(panelSetOrder.Reference, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");

            YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(panelSetOrder.ReportNo);
            foreach (YellowstonePathology.Business.Amendment.Model.Amendment amendment in amendmentCollection)
            {
                this.AddNextObxElement(amendment.AmendmentType + ": " + amendment.AmendmentDate.Value.ToString("MM/dd/yyyy"), document, "C");
                this.HandleLongString(amendment.Text, document, "C");
                if (amendment.RequirePathologistSignature == true)
                {
                    this.AddNextObxElement("Signature: " + amendment.PathologistSignature, document, "C");
                }
                this.AddNextObxElement("", document, "C");
            }

            string ldtComment = "This test was performed using a US FDA approved DNA probe kit, modified to report results according to ASCO/CAP guidelines, and the modified procedure was validated by Yellowstone Pathology Institute (YPI).  YPI assumes the responsibility for test performance.";

            this.HandleLongString(ldtComment, document, "F");

            string locationPerformed = panelSetOrder.GetLocationPerformedComment();

            this.AddNextObxElement(locationPerformed, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");
        }