public void LoadMenBloodPanelResult(MenBloodPanelTestResult testResult, HtmlDocument doc, List <OrderedPair <long, string> > technicianIdNamePairs, bool isFromNewBloodLab) { if (testResult != null) { if (isFromNewBloodLab) { var selectedNode = doc.DocumentNode.SelectSingleNode("//div[@id='MenBloodPanelNewLab-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='MenBloodPanel-rpp-section']"); if (selectedNode != null && (testResult.UnableScreenReason == null || testResult.UnableScreenReason.Count == 0) && (testResult.RepeatStudy == null || testResult.RepeatStudy.Reading == false)) { selectedNode.SetAttributeValue("style", "display:block;"); } } MenBloodPanelPsaResult(testResult, doc, technicianIdNamePairs, isFromNewBloodLab); MenBloodPanelCrpResult(testResult, doc, technicianIdNamePairs, isFromNewBloodLab); MenBloodPanelTestosteroneResult(testResult, doc, technicianIdNamePairs, isFromNewBloodLab); } else { _resultPdfHelper.SetUnableToScreenReasons(doc, TestType.MenBloodPanel, "MenBloodPanelUnableToScreen", null); } }
public override TestResult CreateActualTestResult(CustomerEventScreeningTestsEntity customerEventScreeningTestEntity) { var testResult = new MenBloodPanelTestResult(customerEventScreeningTestEntity.CustomerEventScreeningTestId); var customerEventReadingEntities = customerEventScreeningTestEntity.CustomerEventReading.ToList(); testResult.PSASCR = CreateResultReadingforInputValues((int)ReadingLabels.PSASCR, customerEventReadingEntities); testResult.LCRP = CreateResultReadingforInputValues((int)ReadingLabels.LCRP, customerEventReadingEntities); testResult.TESTSCRE = CreateResultReadingforInputValues((int)ReadingLabels.TESTSCRE, customerEventReadingEntities); testResult.TechnicallyLimitedbutReadable = CreateResultReading((int)ReadingLabels.TechnicallyLimitedbutReadable, customerEventReadingEntities); testResult.RepeatStudy = CreateResultReading((int)ReadingLabels.RepeatStudy, customerEventReadingEntities); return(testResult); }
private void MenBloodPanelTestosteroneResult(MenBloodPanelTestResult testResult, HtmlDocument doc, List <OrderedPair <long, string> > technicianIdNamePairs, bool isFromNewBloodLab) { if (testResult != null && testResult.TESTSCRE != null && !string.IsNullOrEmpty(testResult.TESTSCRE.Reading)) { HtmlNode selectedNode; if (isFromNewBloodLab) { selectedNode = doc.DocumentNode.SelectSingleNode("//div[@id='MenBloodPanelNewLabTestosterone-rpp-section']"); if (selectedNode != null) { selectedNode.SetAttributeValue("style", "display:block;"); } } else { selectedNode = doc.DocumentNode.SelectSingleNode("//div[@id='MenBloodPanelTestosterone-rpp-section']"); if (selectedNode != null) { selectedNode.SetAttributeValue("style", "display:block;"); } } _resultPdfHelper.SetInputBox(doc, "MenBloodPanelTestosteronetextbox", testResult.TESTSCRE); _resultPdfHelper.SetUnableToScreenReasons(doc, TestType.MenBloodPanel, "MenBloodPanelTestosteroneUnableToScreen", testResult.UnableScreenReason); _resultPdfHelper.SetPhysicianRemarks(doc, testResult, "followUpMenBloodPanelTestosterone", "criticalMenBloodPanelTestosterone", "physicianRemarksMenBloodPanelTestosterone"); _resultPdfHelper.SetTechnician(doc, testResult, "techMenBloodPanelTestosterone", "technotesMenBloodPanelTestosterone", technicianIdNamePairs); var selectedNodes = doc.DocumentNode.SelectNodes("//span[@id='MenBloodPanelTestosterone-rpp-resultspan']"); if (selectedNodes != null) { foreach (var node in selectedNodes) { node.InnerHtml = testResult.TESTSCRE.Reading.Replace("<", "<").Replace(">", ">"); } } } }
private void ParseDataForMenBloodPanel(DataRow dr, BloodTestResultParserLog log, long customerId, long eventId) { string message; var isPsaEmpty = IsDataRowItemEmpty(dr[ColumnPsa]); ResultReading <string> psaResultReading = null; if (isPsaEmpty) { message = string.Format("For Customer Id {0} and EventId {1}, no data for PSA", customerId, eventId); _logger.Info(message); AppendTestResultLog(log, message, false); } else { psaResultReading = new ResultReading <string>(ReadingLabels.PSASCR) { ReadingSource = ReadingSource.Automatic, Reading = dr[ColumnPsa].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 isTestosteroneEmpty = IsDataRowItemEmpty(dr[ColumnTestosterone]); ResultReading <string> testosteroneResultReading = null; if (isTestosteroneEmpty) { message = string.Format("For Customer Id {0} and EventId {1}, no data for Testosterone", customerId, eventId); _logger.Info(message); AppendTestResultLog(log, message, false); } else { testosteroneResultReading = new ResultReading <string>(ReadingLabels.TESTSCRE) { ReadingSource = ReadingSource.Automatic, Reading = dr[ColumnTestosterone].ToString() }; } if (psaResultReading != null || crpResultResultReading != null || testosteroneResultReading != null) { var testResult = new MenBloodPanelTestResult { PSASCR = psaResultReading, LCRP = crpResultResultReading, TESTSCRE = testosteroneResultReading }; _resultParserHelper.AddTestResulttoEventCustomerAggregate(_eventCustomerScreeningAggregates, eventId, customerId, testResult); _resultParserHelper.AddResultArchiveLog("", TestType.MenBloodPanel, customerId, MedicalEquipmentTag.Bloodworks); } }