add classification result

This commit is contained in:
Pritimay Sarkar
2023-09-20 16:37:51 +05:30
parent 97b592ce72
commit 45e5dbcd1a
2 changed files with 8 additions and 6 deletions

View File

@@ -67,7 +67,7 @@ const TestAnalytics = () => {
const todaysTests = hposTests.filter((x) => moment(x.testTime).isBetween(moment(lastTestedDate).startOf('day'), moment(lastTestedDate).endOf('day'))); const todaysTests = hposTests.filter((x) => moment(x.testTime).isBetween(moment(lastTestedDate).startOf('day'), moment(lastTestedDate).endOf('day')));
setCurDayTests(todaysTests); setCurDayTests(todaysTests);
const dailyCategoryCounts = todaysTests.reduce(function (result, test) { const dailyCategoryCounts = todaysTests.reduce(function (result, test) {
const category = test.result; const category = test.classificationResult;
if (!result[category]) { if (!result[category]) {
result[category] = 0; result[category] = 0;
} }

View File

@@ -1,10 +1,12 @@
const constants = { const constants = {
categoryshortname: { categoryshortname: {
"SICKLECELLTRAIT": "Trait", "Sickle Cell Trait": "Trait",
"SICKLECELLDISEASE": "Disease", "Sickle Cell Disease": "Disease",
"NEGATIVEBORDERLINE": "-Borderline", "Negative Borderline. Repeat Test": "-Borderline",
"POSITIVEBORDERLINE": "+Borderline", "Positive for Sickle Cell. HPLC for Confirmation": "+Borderline",
"NORMAL": "Normal", "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",
}, },
}; };