Esempio n. 1
0
        private void ParseDataforLipid(long customerId, string filePath)
        {
            var isTestPurchased = _testResultService.IsTestPurchasedByCustomer(_eventId, customerId, (long)TestType.Lipid);

            if (isTestPurchased)
            {
                var testResult = _kynAppLipidParser.Parse(customerId, filePath, TestType.Lipid);
                _resultParserHelper.AddTestResulttoEventCustomerAggregate(_eventCustomerScreeningAggregates, _eventId, customerId, testResult);
                _resultParserHelper.AddResultArchiveLog(_kynAppLipidParser.ErrorSummary, TestType.Lipid, customerId, MedicalEquipmentTag.KynDataProcessor, true);
            }
            else
            {
                _logger.Info(string.Format("Lipid is not availed by Customer : [{0}]", customerId));
            }
        }
        public void IsLipidDataExtracted_Valid_Test()
        {
            var testResult = (LipidTestResult)_kynAppLipidParser.Parse(12, XmlPath, TestType.Lipid);

            Assert.IsNotNull(testResult);

            Assert.IsNotNull(testResult.HDL);
            Assert.IsNotNull(testResult.HDL.Reading);
            Assert.AreEqual("32", testResult.HDL.Reading);


            Assert.IsNotNull(testResult.TotalCholestrol);
            Assert.IsNotNull(testResult.TotalCholestrol.Reading);
            Assert.AreEqual("135", testResult.TotalCholestrol.Reading);

            Assert.IsNotNull(testResult.LDL);
            Assert.IsNotNull(testResult.LDL.Reading);
            Assert.AreEqual(92, testResult.LDL.Reading);


            Assert.IsNotNull(testResult.TriGlycerides);
            Assert.IsNotNull(testResult.TriGlycerides.Reading);
            Assert.AreEqual("55", testResult.TriGlycerides.Reading);


            Assert.IsNotNull(testResult.Glucose);
            Assert.IsNotNull(testResult.Glucose.Reading);
            Assert.AreEqual(88, testResult.Glucose.Reading);


            Assert.IsNotNull(testResult.TCHDLRatio);
            Assert.IsNotNull(testResult.TCHDLRatio.Reading);
            Assert.AreEqual(4.22, testResult.TCHDLRatio.Reading);
        }