public override void ToXml(XElement document)
        {
            BRAFMutationAnalysisTestOrder panelSetOrder = (BRAFMutationAnalysisTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo);

            this.AddHeader(document, panelSetOrder, "BRAF Mutation Analysis");
            this.AddNextObxElement("", document, "F");

            this.AddNextObxElement("Result: " + panelSetOrder.Result, document, "F");
            this.AddNextObxElement("", document, "F");

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

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

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

            if (string.IsNullOrEmpty(panelSetOrder.TumorNucleiPercentage) == false)
            {
                this.AddNextObxElement("Tumor Nuclei Percent: ", document, "F");
                this.HandleLongString(panelSetOrder.TumorNucleiPercentage, document, "F");
                this.AddNextObxElement("", document, "F");
            }

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

            string method = panelSetOrder.Method;

            this.HandleLongString("Method: " + method, document, "F");
            this.AddNextObxElement("", document, "F");

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

            string asr = panelSetOrder.ReportDisclaimer;

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

            string locationPerformed = panelSetOrder.GetLocationPerformedComment();

            this.AddNextObxElement(locationPerformed, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");
        }
        /*public void SetSummaryResult(YellowstonePathology.Business.Test.LynchSyndrome.LSERule lSERule)
         * {
         *  if (string.IsNullOrEmpty(this.Result) == false)
         *  {
         *      YellowstonePathology.Business.Test.BRAFMutationAnalysis.BRAFMutationAnalysisNotDetectedResult notDetectedResult = new BRAFMutationAnalysisNotDetectedResult();
         *      YellowstonePathology.Business.Test.BRAFMutationAnalysis.BRAFMutationAnalysisDetectedResult detectedResult = new BRAFMutationAnalysisDetectedResult();
         *
         *      if (this.Result.ToUpper().Contains("NOT DETECTED"))
         *      {
         *          lSERule.BRAFResult = YellowstonePathology.Business.Test.LynchSyndrome.LSEResultEnum.NotDetected;
         *      }
         *      else if (this.Result.ToUpper().Contains("DETECTED"))
         *      {
         *          lSERule.BRAFResult = YellowstonePathology.Business.Test.LynchSyndrome.LSEResultEnum.Detected;
         *      }
         *  }
         * }*/

        public override Audit.Model.AuditResult IsOkToSetPreviousResults(PanelSetOrder panelSetOrder, AccessionOrder accessionOrder)
        {
            Audit.Model.AuditResult result = base.IsOkToSetPreviousResults(panelSetOrder, accessionOrder);
            if (result.Status == Audit.Model.AuditStatusEnum.OK)
            {
                BRAFMutationAnalysisTestOrder pso = (BRAFMutationAnalysisTestOrder)panelSetOrder;
                this.DoesFinalSummaryResultMatch(accessionOrder, pso.Result, result);
                if (result.Status == Audit.Model.AuditStatusEnum.Warning)
                {
                    result.Message += AskSetPreviousResults;
                }
            }

            return(result);
        }
        public override void ToXml(XElement document)
        {
            BRAFMutationAnalysisTestOrder testOrder = (BRAFMutationAnalysisTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo);

            this.AddCompanyHeader(document);
            this.AddBlankNteElement(document);

            this.AddNextNteElement("BRAF Mutation Analysis", document);
            this.AddNextNteElement("Master Accession #: " + testOrder.MasterAccessionNo, document);
            this.AddNextNteElement("Report #: " + testOrder.ReportNo, document);
            this.AddBlankNteElement(document);

            this.AddNextNteElement("Result: " + testOrder.Result, document);
            this.AddBlankNteElement(document);

            this.AddNextNteElement("Finaled By: ", document);
            this.AddNextNteElement(testOrder.ReferenceLabSignature, document);

            if (testOrder.ReferenceLabFinalDate.HasValue == true)
            {
                this.AddNextNteElement("*** E-Signed " + testOrder.ReferenceLabFinalDate.Value.ToString("MM/dd/yyyy HH:mm") + " ***", document);
            }
            this.AddBlankNteElement(document);

            this.AddNextNteElement("Indication: " + testOrder.Indication, document);
            this.AddBlankNteElement(document);

            this.AddNextNteElement("Interpretation: ", document);
            this.HandleLongString(testOrder.Interpretation, document);
            this.AddBlankNteElement(document);

            if (string.IsNullOrEmpty(testOrder.TumorNucleiPercentage) == false)
            {
                this.AddNextNteElement("Tumor Nuclei Percent: ", document);
                this.HandleLongString(testOrder.TumorNucleiPercentage, document);
                this.AddBlankNteElement(document);
            }

            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(testOrder.OrderedOn, testOrder.OrderedOnId);
            this.AddNextNteElement("Specimen: " + specimenOrder.SpecimenNumber.ToString(), document);
            this.HandleLongString(specimenOrder.Description, document);
            this.AddBlankNteElement(document);

            string method = "Following lysis of paraffin embedded tissue; highly purified DNA was extracted from the specimen using an automated method.  PCR amplification using fluorescently labeled primers was then performed.  The products of the PCR reaction were then separated by high resolution capillary electrophoresis to look for the presence of the 107 nucleotide fragment indicative of a BRAF V600E mutation.";

            this.AddNextNteElement("Method:", document);
            this.AddNextNteElement(method, document);
            this.AddBlankNteElement(document);

            this.AddNextNteElement("References: ", document);
            this.HandleLongString(testOrder.ReportReferences, document);
            this.AddBlankNteElement(document);

            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.AddNextNteElement(asr, document);

            string locationPerformed = testOrder.GetLocationPerformedComment();

            this.AddNextNteElement(locationPerformed, document);
            this.AddBlankNteElement(document);
        }