示例#1
0
        public void LoadWomenBloodPanelResult(WomenBloodPanelTestResult testResult, HtmlDocument doc, List <OrderedPair <long, string> > technicianIdNamePairs, bool isFromNewBloodLab)
        {
            if (testResult != null)
            {
                if (isFromNewBloodLab)
                {
                    var selectedNode = doc.DocumentNode.SelectSingleNode("//div[@id='WomenBloodPanelNewLab-rpp-section']");
                    if (selectedNode != null && (testResult.UnableScreenReason == null || testResult.UnableScreenReason.Count == 0) && (testResult.TestNotPerformed == null || testResult.TestNotPerformed.TestNotPerformedReasonId <= 0) &&
                        (testResult.RepeatStudy == null || testResult.RepeatStudy.Reading == false))
                    {
                        selectedNode.SetAttributeValue("style", "display:block;");
                    }
                }
                else
                {
                    var selectedNode = doc.DocumentNode.SelectSingleNode("//div[@id='WomenBloodPanel-rpp-section']");
                    if (selectedNode != null && (testResult.UnableScreenReason == null || testResult.UnableScreenReason.Count == 0) && (testResult.RepeatStudy == null || testResult.RepeatStudy.Reading == false))
                    {
                        selectedNode.SetAttributeValue("style", "display:block;");
                    }
                }


                WomenBloodPanelCrpResult(testResult, doc, technicianIdNamePairs, isFromNewBloodLab);
                WomenBloodPanelThyroidResult(testResult, doc, technicianIdNamePairs, isFromNewBloodLab);
                WomenBloodPanelVitaminDResult(testResult, doc, technicianIdNamePairs, isFromNewBloodLab);
            }
            else
            {
                _resultPdfHelper.SetUnableToScreenReasons(doc, TestType.WomenBloodPanel, "WomenBloodPanelUnableToScreen", null);
            }
        }
示例#2
0
        public override TestResult CreateActualTestResult(CustomerEventScreeningTestsEntity customerEventScreeningTestEntity)
        {
            var testResult = new WomenBloodPanelTestResult(customerEventScreeningTestEntity.CustomerEventScreeningTestId);
            var customerEventReadingEntities = customerEventScreeningTestEntity.CustomerEventReading.ToList();

            testResult.LCRP   = CreateResultReadingforInputValues((int)ReadingLabels.LCRP, customerEventReadingEntities);
            testResult.TSHSCR = CreateResultReadingforInputValues((int)ReadingLabels.TSHSCR, customerEventReadingEntities);
            testResult.VitD   = CreateResultReadingforInputValues((int)ReadingLabels.VitD, customerEventReadingEntities);

            testResult.TechnicallyLimitedbutReadable = CreateResultReading((int)ReadingLabels.TechnicallyLimitedbutReadable, customerEventReadingEntities);
            testResult.RepeatStudy = CreateResultReading((int)ReadingLabels.RepeatStudy, customerEventReadingEntities);

            return(testResult);
        }
示例#3
0
        private void WomenBloodPanelVitaminDResult(WomenBloodPanelTestResult testResult, HtmlDocument doc, List <OrderedPair <long, string> > technicianIdNamePairs, bool isFromNewBloodLab)
        {
            if (testResult != null && testResult.VitD != null && !string.IsNullOrEmpty(testResult.VitD.Reading))
            {
                HtmlNode selectedNode;
                if (isFromNewBloodLab)
                {
                    selectedNode = doc.DocumentNode.SelectSingleNode("//div[@id='WomenBloodPanelNewLabVitaminD-rpp-section']");
                    if (selectedNode != null)
                    {
                        selectedNode.SetAttributeValue("style", "display:block;");
                    }
                }
                else
                {
                    selectedNode = doc.DocumentNode.SelectSingleNode("//div[@id='WomenBloodPanelVitaminD-rpp-section']");
                    if (selectedNode != null)
                    {
                        selectedNode.SetAttributeValue("style", "display:block;");
                    }
                }

                _resultPdfHelper.SetInputBox(doc, "WomenBloodPanelVitaminDtextbox", testResult.VitD);
                _resultPdfHelper.SetUnableToScreenReasons(doc, TestType.WomenBloodPanel, "WomenBloodPanelVitaminDUnableToScreen", testResult.UnableScreenReason);
                _resultPdfHelper.SetPhysicianRemarks(doc, testResult, "followUpWomenBloodPanelVitaminD", "criticalWomenBloodPanelVitaminD", "physicianRemarksWomenBloodPanelVitaminD");
                _resultPdfHelper.SetTechnician(doc, testResult, "techWomenBloodPanelVitaminD", "technotesWomenBloodPanelVitaminD", technicianIdNamePairs);

                var selectedNodes = doc.DocumentNode.SelectNodes("//span[@id='WomenBloodPanelVitaminD-rpp-resultspan']");
                if (selectedNodes != null)
                {
                    foreach (var node in selectedNodes)
                    {
                        node.InnerHtml = testResult.VitD.Reading.Replace("<", "&lt;").Replace(">", "&gt;");
                    }
                }
            }
        }
示例#4
0
        private void ParseDataForWomenBloodPanel(DataRow dr, BloodTestResultParserLog log, long customerId, long eventId)
        {
            string message;

            var isThyroidEmpty = IsDataRowItemEmpty(dr[ColumnThyroid]);
            ResultReading <string> thyroidResultReading = null;

            if (isThyroidEmpty)
            {
                message = string.Format("For Customer Id {0} and EventId {1}, no data for TSH", customerId, eventId);
                _logger.Info(message);
                AppendTestResultLog(log, message, false);
            }
            else
            {
                thyroidResultReading = new ResultReading <string>(ReadingLabels.TSHSCR)
                {
                    ReadingSource = ReadingSource.Automatic,
                    Reading       = dr[ColumnThyroid].ToString()
                };
            }

            var isCrpEmpty = IsDataRowItemEmpty(dr[ColumnCrp]);
            ResultReading <string> crpResultResultReading = null;

            if (isCrpEmpty)
            {
                message = string.Format("For Customer Id {0} and EventId {1}, no data for CRP", customerId, eventId);
                _logger.Info(message);
                AppendTestResultLog(log, message, false);
            }
            else
            {
                crpResultResultReading = new ResultReading <string>(ReadingLabels.LCRP)
                {
                    ReadingSource = ReadingSource.Automatic,
                    Reading       = dr[ColumnCrp].ToString()
                };
            }

            var isVitaminDEmpty = IsDataRowItemEmpty(dr[ColumnVitaminD]);
            ResultReading <string> vitaminDResultResultReading = null;

            if (isVitaminDEmpty)
            {
                message = string.Format("For Customer Id {0} and EventId {1}, no data for VitaminD", customerId, eventId);
                _logger.Info(message);
                AppendTestResultLog(log, message, false);
            }
            else
            {
                vitaminDResultResultReading = new ResultReading <string>(ReadingLabels.VitD)
                {
                    ReadingSource = ReadingSource.Automatic,
                    Reading       = dr[ColumnVitaminD].ToString()
                };
            }


            if (thyroidResultReading != null || crpResultResultReading != null || vitaminDResultResultReading != null)
            {
                var testResult = new WomenBloodPanelTestResult
                {
                    TSHSCR = thyroidResultReading,
                    LCRP   = crpResultResultReading,
                    VitD   = vitaminDResultResultReading
                };

                _resultParserHelper.AddTestResulttoEventCustomerAggregate(_eventCustomerScreeningAggregates, eventId, customerId, testResult);
                _resultParserHelper.AddResultArchiveLog("", TestType.WomenBloodPanel, customerId, MedicalEquipmentTag.Bloodworks);
            }
        }