public static PNHResult GetResult(PNHTestOrder pnhTestOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            PNHResult result = new PNHResult();
            List<YellowstonePathology.Business.Test.AccessionOrder> accessionOrders = result.GetPreviousAccessions(accessionOrder.PatientId);

            result.SetTotals(pnhTestOrder);

            if (result.IsNegativeWithPreviousPositiveResult(accessionOrders, pnhTestOrder.MasterAccessionNo, pnhTestOrder.OrderDate.Value) == true)
            {
                result = new PNHNegativeWithPreviousPositiveResult();
            }
            else if (result.IsPersistentResult(accessionOrders, pnhTestOrder.MasterAccessionNo, pnhTestOrder.OrderDate.Value) == true)
            {
                result = new PNHPersistentPositiveResult();
            }
            else if (result.IsNegativeResult == true)
            {
                result = new PNHNegativeResult();
            }
            else if (result.IsSmallPositiveResult == true)
            {
                result = new PNHSmallPositiveResult();
            }
            else if (result.IsSignificantPositiveResult == true)
            {
                result = new PNHSignificantPositiveResult();
            }
            else if (result.IsGpiDeficientResult == true)
            {
                result = new PNHGpiDeficientResult();
            }
            result.SetTotals(pnhTestOrder);
            return result;
        }
 public override void SetResults(PNHTestOrder testOrder)
 {
     string result = this.m_Comment;
     result = result.Replace("GRANULOCYTETOTAL", this.GranulocytesTotal.ToString("F"));
     result = result.Replace("MONOCYTETOTAL", this.MonocytesTotal.ToString("F"));
     result = result.Replace("REDBLOODTOTAL", this.RedBloodTotal.ToString("F"));
     this.m_Comment = result;
     base.SetResults(testOrder);
 }
Example #3
0
        private void NegativeToXml(XElement document, PNHTestOrder testOrder)
        {
            this.AddHeader(document, testOrder, "PNH, Highly Sensitive(FLAER)");
            this.AddNextObxElement("", document, "F");

            this.AddNextObxElement("Result: Negative (No evidence of paroxysmal nocturnal hemoglobinuria)", document, "F");
            this.AddNextObxElement("", document, "F");
            this.AddNextObxElement("Comment:", document, "F");
            this.AddNextObxElement("Flow cytometric analysis does not identify any evidence of a PNH clone, based on analysis of several different GPI-linked antibodies on 3 separate cell populations (red blood cells, monocytes and granulocytes).  These findings do not support the diagnosis of PNH.", document, "F");
            this.AddNextObxElement("", document, "F");

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

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

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.AddNextObxElement("Collection Date/Time: " + collectionDateTimeString, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");

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

            this.AddNextObxElement("Result Data: ", document, "F");
            this.AddNextObxElement("RBC: No evidence of PNH Clone or GPI - linked antibodies", document, "F");
            this.AddNextObxElement("WBC - Granulocytes:	No evidence of PNH Clone or GPI - linked antibodies", document, "F");
            this.AddNextObxElement("WBC - Monocytes:	No evidence of PNH Clone or GPI - linked antibodies", document, "F");
            this.AddNextObxElement("", document, "F");

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

            this.HandleLongString(testOrder.ASRComment, document, "F");
            this.AddNextObxElement("", document, "F");

            string locationPerformed = testOrder.GetLocationPerformedComment();
            this.HandleLongString(locationPerformed, document, "F");
            this.AddNextObxElement(string.Empty, document, "F");
        }
Example #4
0
        private void PositiveToXml(XElement document, PNHTestOrder testOrder)
        {
            this.AddNextNteElement("Result: " + testOrder.Result, document);
            this.AddBlankNteElement(document);

            if (string.IsNullOrEmpty(testOrder.Comment) == false)
            {
                this.AddNextNteElement("Comment: ", document);
                this.AddNextNteElement(testOrder.Comment, document);
                this.AddBlankNteElement(document);
            }

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

            this.AddBlankNteElement(document);
            this.AddAmendments(document, testOrder);

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

            string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime);
            this.AddNextNteElement("Collection Date/Time: " + collectionDateTimeString, document);
            this.AddBlankNteElement(document);

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

            PNHResult pnhResult = new PNHResult();
            pnhResult.SetTotals(testOrder);
            this.AddNextNteElement("Result Data:)", document);
            this.AddNextNteElement("RBC(Total)", document);
            this.AddNextNteElement("PNH Clone (Type II + Type III):", document);
            this.AddNextNteElement("Type III (complete CD59 deficiency) = " + pnhResult.RedBloodCellsTypeIIIResult.ToString("F") + "%", document);
            this.AddNextNteElement("Type II (partial CD59 deficiency) = " + pnhResult.RedBloodCellsTypeIIResult.ToString("F") + "%", document);
            this.AddNextNteElement("Result: " + pnhResult.RedBloodTotal.ToString("F") + "%", document);
            this.AddNextNteElement("", document);
            this.AddNextNteElement("WBC - Granulocytes(Total)", document);
            this.AddNextNteElement("PNH Clone (Type II + Type III):", document);
            this.AddNextNteElement("TypeIII (complete FLAER/CD24 deficiency) = " + pnhResult.GranulocytesTypeIIIResult.ToString("F") + "%", document);
            if (pnhResult.GranulocytesTypeIIResult > 0.0m && pnhResult.GranulocytesTypeIIIResult > 0.0m)
            {
                this.AddNextNteElement("TypeII (partial FLAER/CD24 deficiency) = " + pnhResult.GranulocytesTypeIIResult.ToString("F") + "%", document);
            }

            this.AddNextNteElement("Result: " + pnhResult.GranulocytesTotal.ToString("F") + "%", document);
            this.AddNextNteElement("", document);
            this.AddNextNteElement("WBC-Monocytes (Total)", document);
            this.AddNextNteElement("TypeIII (complete FLAER/CD14 deficiency) = " + pnhResult.MonocytesTypeIIIResult.ToString("F") + "%", document);
            if (pnhResult.MonocytesTypeIIResult > 0.0m)
            {
                this.AddNextNteElement("TypeII (partial FLAER/CD14 deficiency) = " + pnhResult.MonocytesTypeIIResult.ToString("F") + "%", document);
            }

            this.AddNextNteElement("Result: " + pnhResult.MonocytesTotal.ToString("F") + "%", document);
            this.AddBlankNteElement(document);

            if (testOrder.ResultCode == PNHPersistentPositiveResult.PNHPersistentPositiveResultResultCode || testOrder.ResultCode == PNHNegativeWithPreviousPositiveResult.PNHNegativeWithPreviousPositiveResultResultCode)
            {
                string dateString = string.Empty;
                if (testOrder.FinalDate.HasValue)
                {
                    dateString = testOrder.FinalDate.Value.ToShortDateString();
                }

                this.AddNextNteElement("Current Result: " + dateString, document);
                this.AddNextNteElement("RBC: " + pnhResult.RedBloodTotal.ToString("F") + "%", document);
                this.AddNextNteElement("WBC-Granulocytes: " + pnhResult.GranulocytesTotal.ToString("F") + "%", document);
                this.AddNextNteElement("WBC-Monocytes: " + pnhResult.MonocytesTotal.ToString("F") + "%", document);
                this.AddBlankNteElement(document);

                this.SetPreviousResults(document, testOrder);
            }

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

            this.AddBlankNteElement(document);
            this.HandleLongString(testOrder.ASRComment, document);
            this.AddBlankNteElement(document);

            string locationPerformed = testOrder.GetLocationPerformedComment();
            this.HandleLongString(locationPerformed, document);
            this.AddBlankNteElement(document);
        }
Example #5
0
        private void SetPreviousResults(XElement document, PNHTestOrder testOrder)
        {
            PNHResult pnhResult = new PNHResult();
            List<YellowstonePathology.Business.Test.AccessionOrder> accessionOrders = pnhResult.GetPreviousAccessions(this.m_AccessionOrder.PatientId);
            List<PNHTestOrder> pnhTestOrders = pnhResult.GetPreviousPanelSetOrders(accessionOrders, testOrder.MasterAccessionNo, testOrder.OrderDate.Value);

            for (int idx = 0; idx < pnhTestOrders.Count; idx++)
            {
                if (idx > 2) break;

                pnhResult.SetTotals(pnhTestOrders[idx]);
                this.AddNextNteElement("Previous Result: " + pnhTestOrders[idx].FinalDate.Value.ToShortDateString(), document);
                this.AddNextNteElement("RBC: " + pnhResult.RedBloodTotal.ToString("F") + "%", document);
                this.AddNextNteElement("WBC-Granulocytes: " + pnhResult.GranulocytesTotal.ToString("F") + "%", document);
                this.AddNextNteElement("WBC-Monocytes: " + pnhResult.MonocytesTotal.ToString("F") + "%", document);
                this.AddBlankNteElement(document);
            }
        }
Example #6
0
        public void SetTotals(PNHTestOrder pnhTestOrder)
        {
            this.m_cellLines[(int)PNHCellLineEnum.RBC].Type1 = Convert.ToDecimal(pnhTestOrder.TypeIRedBloodCells);
            this.m_cellLines[(int)PNHCellLineEnum.RBC].Type2 = Convert.ToDecimal(pnhTestOrder.TypeIIRedBloodCells);
            this.m_cellLines[(int)PNHCellLineEnum.RBC].Type3 = Convert.ToDecimal(pnhTestOrder.TypeIIIRedBloodCells);

            this.m_cellLines[(int)PNHCellLineEnum.GRAN].Type2 = Convert.ToDecimal(pnhTestOrder.TypeIIGranulocytes);
            this.m_cellLines[(int)PNHCellLineEnum.GRAN].Type3 = Convert.ToDecimal(pnhTestOrder.TypeIIIGranulocytes);

            this.m_cellLines[(int)PNHCellLineEnum.MONO].Type2 = Convert.ToDecimal(pnhTestOrder.TypeIIMonocytes);
            this.m_cellLines[(int)PNHCellLineEnum.MONO].Type3 = Convert.ToDecimal(pnhTestOrder.TypeIIIMonocytes);
        }
Example #7
0
 public virtual void SetResults(PNHTestOrder testOrder)
 {
     testOrder.Result = this.m_Result;
     testOrder.ResultCode = this.m_ResultCode;
     testOrder.Comment = this.m_Comment;
     testOrder.Method = this.m_Method;
     testOrder.References = this.m_References;
     testOrder.ASRComment = this.m_ASRComment;
 }