Esempio n. 1
0
        public override void ToXml(XElement document)
        {
            KRASStandardReflexResult krasStandardReflexResult = KRASStandardReflexResultFactory.GetResult(this.m_ReportNo, this.m_AccessionOrder);

            this.AddHeader(document, krasStandardReflexResult.KRASStandardReflexTestOrder, "KRAS with BRAF reflex");
            this.AddNextObxElement("", document, "F");


            string krasResultString = "KRAS Result: " + krasStandardReflexResult.KRASStandardResult;

            if (krasStandardReflexResult.KRASStandardTestOrder.Result == "Detected")
            {
                krasResultString += " " + krasStandardReflexResult.KRASStandardTestOrder.MutationDetected;
            }
            this.AddNextObxElement(krasResultString, document, "F");

            this.AddNextObxElement("BRAF Result: " + krasStandardReflexResult.BRAFV600EKResult, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");

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

            this.AddNextObxElement("Specimen Description:", document, "F");
            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(krasStandardReflexResult.KRASStandardReflexTestOrder.OrderedOn, krasStandardReflexResult.KRASStandardReflexTestOrder.OrderedOnId);
            this.AddNextObxElement(specimenOrder.Description, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");

            this.HandleLongString("Comment: " + krasStandardReflexResult.KRASStandardReflexTestOrder.Comment, document, "F");
            this.AddNextObxElement("", document, "F");

            this.AddNextObxElement("Indication: " + krasStandardReflexResult.KRASStandardReflexTestOrder.Indication, document, "F");
            this.AddNextObxElement("", document, "F");

            this.AddNextObxElement("Interpretation: ", document, "F");
            this.HandleLongString(krasStandardReflexResult.KRASStandardReflexTestOrder.Interpretation, document, "F");
            this.AddNextObxElement("", document, "F");

            if (krasStandardReflexResult.KRASStandardReflexTestOrder.TumorNucleiPercentage != null)
            {
                this.AddNextObxElement("Tumor Nuclei Percent: ", document, "F");
                this.HandleLongString(krasStandardReflexResult.KRASStandardReflexTestOrder.TumorNucleiPercentage, document, "F");
                this.AddNextObxElement("", document, "F");
            }

            this.AddNextObxElement("Method: ", document, "F");
            this.HandleLongString(krasStandardReflexResult.KRASStandardReflexTestOrder.Method, document, "F");
            this.AddNextObxElement("", document, "F");

            this.AddNextObxElement("References: ", document, "F");
            this.HandleLongString(krasStandardReflexResult.KRASStandardReflexTestOrder.ReportReferences, document, "F");
            this.AddNextObxElement("", document, "F");

            string asr = "This test was developed and its performance characteristics determined by Yellowstone Pathology Institute, Inc.  It has not been cleared or approved by the U.S. Food and Drug Administration. The FDA has determined that such clearance or approval is not necessary.  This test is used for clinical purposes.  It should not be regarded as investigational or for research.  This laboratory is certified under the Clinical Laboratory Improvement Amendments of 1988 (CLIA-88) as qualified to perform high complexity clinical laboratory testing.";

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

            string locationPerformed = krasStandardReflexResult.KRASStandardReflexTestOrder.GetLocationPerformedComment();

            this.HandleLongString(locationPerformed, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");
        }
Esempio n. 2
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();
        }