Example #1
0
        public HER2AmplificationResult(PanelSetOrderCollection panelSetOrderCollection, HER2AnalysisSummary.HER2AnalysisSummaryTestOrder panelSetOrder)
        {
            Her2AmplificationByIHC.Her2AmplificationByIHCTest     her2AmplificationByIHCTest   = new Her2AmplificationByIHC.Her2AmplificationByIHCTest();
            HER2AmplificationRecount.HER2AmplificationRecountTest her2AmplificationRecountTest = new HER2AmplificationRecount.HER2AmplificationRecountTest();

            this.m_HER2AnalysisSummaryTestOrder = panelSetOrder;
            this.m_Indicator = this.m_HER2AnalysisSummaryTestOrder.Indicator;
            this.m_AverageHer2Chr17SignalAsDouble = this.m_HER2AnalysisSummaryTestOrder.AverageHer2Chr17SignalAsDouble;
            this.m_AverageHer2NeuSignal           = this.m_HER2AnalysisSummaryTestOrder.AverageHer2NeuSignal;

            this.m_IsHer2AmplificationByIHCRequired = true;
            if (panelSetOrderCollection.Exists(her2AmplificationByIHCTest.PanelSetId) == true)
            {
                this.m_IsHer2AmplificationByIHCOrdered     = true;
                this.m_PanelSetOrderHer2AmplificationByIHC = (Her2AmplificationByIHC.PanelSetOrderHer2AmplificationByIHC)panelSetOrderCollection.GetPanelSetOrder(her2AmplificationByIHCTest.PanelSetId);
                if (this.m_PanelSetOrderHer2AmplificationByIHC.Final == true)
                {
                    if (this.m_PanelSetOrderHer2AmplificationByIHC.Score == "2+")
                    {
                        this.m_IsHER2AmplificationRecountRequired = true;
                    }
                }
            }
            if (panelSetOrderCollection.Exists(her2AmplificationRecountTest.PanelSetId) == true)
            {
                this.m_IsHER2AmplificationRecountOrdered = true;
                this.m_HER2AmplificationRecountTestOrder = (HER2AmplificationRecount.HER2AmplificationRecountTestOrder)panelSetOrderCollection.GetPanelSetOrder(her2AmplificationRecountTest.PanelSetId);
            }
        }
Example #2
0
        public override AuditResult IsOkToFinalize(AccessionOrder accessionOrder)
        {
            AuditResult result = base.IsOkToFinalize(accessionOrder);

            if (result.Status == AuditStatusEnum.OK)
            {
                HER2AmplificationByISH.HER2AmplificationByISHTest ishTest = new HER2AmplificationByISH.HER2AmplificationByISHTest();
                if (accessionOrder.PanelSetOrderCollection.Exists(ishTest.PanelSetId, this.m_OrderedOnId, true) == true)
                {
                    HER2AmplificationByISH.HER2AmplificationByISHTestOrder ishTestOrder = (HER2AmplificationByISH.HER2AmplificationByISHTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(ishTest.PanelSetId, this.m_OrderedOnId, true);
                    if (ishTestOrder.Final == true)
                    {
                        if (this.m_Score.Contains("2+") == true)
                        {
                            HER2AmplificationRecount.HER2AmplificationRecountTest test = new HER2AmplificationRecount.HER2AmplificationRecountTest();
                            if (accessionOrder.PanelSetOrderCollection.Exists(test.PanelSetId, this.m_OrderedOnId, true) == false)
                            {
                                result.Status  = AuditStatusEnum.Warning;
                                result.Message = "This test will be finalized but not distributed as a " + test.PanelSetName + " is needed to determine the actual result and will be ordered.";
                            }
                        }
                    }
                }
            }

            return(result);
        }
Example #3
0
        public void SetValues(AccessionOrder accessionOrder)
        {
            HER2AmplificationByISH.HER2AmplificationByISHTest     ishTest     = new HER2AmplificationByISH.HER2AmplificationByISHTest();
            Her2AmplificationByIHC.Her2AmplificationByIHCTest     ihcTest     = new Her2AmplificationByIHC.Her2AmplificationByIHCTest();
            HER2AmplificationRecount.HER2AmplificationRecountTest recountTest = new HER2AmplificationRecount.HER2AmplificationRecountTest();

            HER2AmplificationByISH.HER2AmplificationByISHTestOrder ishTestOrder = (HER2AmplificationByISH.HER2AmplificationByISHTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(ishTest.PanelSetId, this.m_OrderedOnId, true);
            this.m_CellsCounted                    = ishTestOrder.CellsCounted;
            this.m_TotalChr17SignalsCounted        = ishTestOrder.TotalChr17SignalsCounted;
            this.m_TotalHer2SignalsCounted         = ishTestOrder.TotalHer2SignalsCounted;
            this.m_Her2byIHCOrder                  = ishTestOrder.Her2byIHCOrder;
            this.m_IncludeImmunoRecommendedComment = ishTestOrder.IncludeImmunoRecommendedComment;
            this.m_IncludeResultComment            = ishTestOrder.IncludeResultComment;
            this.m_IncludePolysomyComment          = ishTestOrder.IncludePolysomyComment;
            this.m_PolysomyPercent                 = ishTestOrder.PolysomyPercent;
            this.m_Chr17SignalRangeLow             = ishTestOrder.Chr17SignalRangeLow;
            this.m_Chr17SignalRangeHigh            = ishTestOrder.Chr17SignalRangeHigh;
            this.m_Her2SignalRangeLow              = ishTestOrder.Her2SignalRangeLow;
            this.m_Her2SignalRangeHigh             = ishTestOrder.Her2SignalRangeHigh;
            this.m_SampleAdequacy                  = ishTestOrder.SampleAdequacy;
            this.m_ProbeSignalIntensity            = ishTestOrder.ProbeSignalIntensity;
            this.m_TechComment           = ishTestOrder.TechComment;
            this.m_SourceBlock           = ishTestOrder.SourceBlock;
            this.m_GeneticHeterogeneity  = ishTestOrder.GeneticHeterogeneity;
            this.m_Her2Chr17ClusterRatio = ishTestOrder.Her2Chr17ClusterRatio;
            this.m_Indicator             = ishTestOrder.Indicator;
            this.m_NotInterpretable      = ishTestOrder.NotInterpretable;
            this.m_RecountRequired       = false;

            Her2AmplificationByIHC.PanelSetOrderHer2AmplificationByIHC ihcTestOrder = (Her2AmplificationByIHC.PanelSetOrderHer2AmplificationByIHC)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(ihcTest.PanelSetId, this.m_OrderedOnId, true);
            this.m_IHCScore = ihcTestOrder.Score;

            if (accessionOrder.PanelSetOrderCollection.Exists(recountTest.PanelSetId, this.m_OrderedOnId, true) == true)
            {
                HER2AmplificationRecount.HER2AmplificationRecountTestOrder recountTestOrder = (HER2AmplificationRecount.HER2AmplificationRecountTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(recountTest.PanelSetId, this.m_OrderedOnId, true);
                this.m_CellsRecount             = recountTestOrder.CellsCounted;
                this.m_TotalChr17SignalsRecount = recountTestOrder.Chr17SignalsCounted;
                this.m_TotalHer2SignalsRecount  = recountTestOrder.Her2SignalsCounted;
                this.m_RecountRequired          = true;
            }

            this.m_Distribute = true;
        }
Example #4
0
        public AuditResult IsOkToSetResults(AccessionOrder accessionOrder)
        {
            AuditResult result = new AuditResult();

            result.Status = AuditStatusEnum.OK;
            if (this.m_Accepted == true)
            {
                result.Status  = AuditStatusEnum.Failure;
                result.Message = "The results may not be set because they have already been accepted." + Environment.NewLine;
            }

            if (string.IsNullOrEmpty(this.m_Indicator) == true)
            {
                result.Status   = AuditStatusEnum.Failure;
                result.Message += "The indication must be set before results can be set." + Environment.NewLine;
            }

            if (this.m_NotInterpretable == false)
            {
                if (this.TotalHer2SignalsCountToUse == 0)
                {
                    result.Status = AuditStatusEnum.Failure;
                    string whichCount = this.m_RecountRequired == true ? "The Total Her2 Signals Recount " : "The Total Her2 Signals Counted ";
                    result.Message += whichCount + "must be set before results can be set." + Environment.NewLine;
                }
                if (this.m_TotalChr17SignalsCounted == 0)
                {
                    result.Status = AuditStatusEnum.Failure;
                    string whichCount = this.m_RecountRequired == true ? "The Total Chr17 Signals Recount " : "The Total Chr17 Signals Counted ";
                    result.Message += whichCount + "must be set before results can be set." + Environment.NewLine;
                }
                if (this.m_CellsCounted == 0)
                {
                    result.Status = AuditStatusEnum.Failure;
                    string whichCount = this.m_RecountRequired == true ? "The Cells Recount " : "The Cells Counted ";
                    result.Message += "must be set before results can be set." + Environment.NewLine;
                }
                if (this.m_GeneticHeterogeneity == HER2AmplificationByISH.HER2AmplificationByISHGeneticHeterogeneityCollection.GeneticHeterogeneityPresentInClusters)
                {
                    if (string.IsNullOrEmpty(this.m_Her2Chr17ClusterRatio) == true)
                    {
                        result.Status   = AuditStatusEnum.Failure;
                        result.Message += "The Her2Chr/17 Cluster Ratio must be set before results can be set." + Environment.NewLine;
                    }
                }
            }

            if (result.Status == AuditStatusEnum.OK)
            {
                Her2AmplificationByIHC.Her2AmplificationByIHCTest     ihcTest     = new Her2AmplificationByIHC.Her2AmplificationByIHCTest();
                HER2AmplificationRecount.HER2AmplificationRecountTest recountTest = new HER2AmplificationRecount.HER2AmplificationRecountTest();

                if (accessionOrder.PanelSetOrderCollection.Exists(ihcTest.PanelSetId, this.OrderedOnId, true) == true)
                {
                    Her2AmplificationByIHC.PanelSetOrderHer2AmplificationByIHC testOrder = (Her2AmplificationByIHC.PanelSetOrderHer2AmplificationByIHC)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(ihcTest.PanelSetId, this.OrderedOnId, true);
                    if (testOrder.Final == false)
                    {
                        result.Status   = AuditStatusEnum.Failure;
                        result.Message += "The " + ihcTest.PanelSetName + " must be final before results can be set." + Environment.NewLine;
                    }
                    else
                    {
                        if (testOrder.Score == "2+")
                        {
                            if (accessionOrder.PanelSetOrderCollection.Exists(recountTest.PanelSetId, this.OrderedOnId, true) == true)
                            {
                                HER2AmplificationRecount.HER2AmplificationRecountTestOrder recountTestOrder = (HER2AmplificationRecount.HER2AmplificationRecountTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(recountTest.PanelSetId, this.OrderedOnId, true);
                                if (recountTestOrder.Final == false)
                                {
                                    result.Status   = AuditStatusEnum.Failure;
                                    result.Message += "The " + recountTest.PanelSetName + " must be final before results can be set." + Environment.NewLine;
                                }
                            }
                            else
                            {
                                result.Status   = AuditStatusEnum.Failure;
                                result.Message += "A " + recountTest.PanelSetName + " must be ordered and final before results can be set." + Environment.NewLine;
                            }
                        }
                    }
                }
                else
                {
                    result.Status   = AuditStatusEnum.Failure;
                    result.Message += "A " + ihcTest.PanelSetName + " must be ordered and final before results can be set." + Environment.NewLine;
                }
            }

            return(result);
        }