From 45e5dbcd1a819e2ba2ec605d58fb948444e22283 Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Wed, 20 Sep 2023 16:37:51 +0530 Subject: [PATCH] add classification result --- src/components/TestAnalytics.js | 2 +- src/configs/constants.js | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/TestAnalytics.js b/src/components/TestAnalytics.js index a7c8f74..c8130ee 100644 --- a/src/components/TestAnalytics.js +++ b/src/components/TestAnalytics.js @@ -67,7 +67,7 @@ const TestAnalytics = () => { const todaysTests = hposTests.filter((x) => moment(x.testTime).isBetween(moment(lastTestedDate).startOf('day'), moment(lastTestedDate).endOf('day'))); setCurDayTests(todaysTests); const dailyCategoryCounts = todaysTests.reduce(function (result, test) { - const category = test.result; + const category = test.classificationResult; if (!result[category]) { result[category] = 0; } diff --git a/src/configs/constants.js b/src/configs/constants.js index d6514d3..2fb9a1a 100644 --- a/src/configs/constants.js +++ b/src/configs/constants.js @@ -1,10 +1,12 @@ const constants = { categoryshortname: { - "SICKLECELLTRAIT": "Trait", - "SICKLECELLDISEASE": "Disease", - "NEGATIVEBORDERLINE": "-Borderline", - "POSITIVEBORDERLINE": "+Borderline", - "NORMAL": "Normal", + "Sickle Cell Trait": "Trait", + "Sickle Cell Disease": "Disease", + "Negative Borderline. Repeat Test": "-Borderline", + "Positive for Sickle Cell. HPLC for Confirmation": "+Borderline", + "Normal": "Normal", + "Inconclusive. Very low Absorbance - Repeat test with Higher Blood Volume": "Inconclusive - Low Abs", + "Inconclusive. Repeat with test with lower volume of blood": "Inconclusive - Low vol. retest", }, };