From 29b7db446e0cde13fc4ea26c78c49d8bdff60bc4 Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Sun, 6 Aug 2023 14:01:52 +0530 Subject: [PATCH] add text content in template --- firmware/hemocube_mock/hemocube_mock.ino | 47 +++++++------ scripts/report_template.html | 89 ++++++++++++++++-------- src/components/Devices.js | 16 ++++- 3 files changed, 100 insertions(+), 52 deletions(-) diff --git a/firmware/hemocube_mock/hemocube_mock.ino b/firmware/hemocube_mock/hemocube_mock.ino index 307e329..883b722 100644 --- a/firmware/hemocube_mock/hemocube_mock.ino +++ b/firmware/hemocube_mock/hemocube_mock.ino @@ -7,32 +7,39 @@ void loop() { // put your main code here, to run repeatedly: Serial.println("SN:182829"); - while (Serial.available() == 0) {} //wait for data available - String bufferCommand = Serial.readString(); //read until timeout - bufferCommand.trim(); // remove any \r \n whitespace at the end of the String - if (bufferCommand == "B") { - Serial.println("#Start Buffer"); - delay(2000); - Serial.println("#Buffer Completed"); - } + // while (Serial.available() == 0) {} //wait for data available + // String bufferCommand = Serial.readString(); //read until timeout + // bufferCommand.trim(); // remove any \r \n whitespace at the end of the String + // if (bufferCommand == "B") { + // Serial.println("#Start Buffer"); + // delay(2000); + // Serial.println("#Buffer Completed"); + // } - while (Serial.available() == 0) {} //wait for data available - String SampleCommand = Serial.readString(); //read until timeout - SampleCommand.trim(); // remove any \r \n whitespace at the end of the String - if (SampleCommand == "S") { - Serial.println("#Sample Started"); - delay(2000); - Serial.println("#Sample Completed"); - } + // while (Serial.available() == 0) {} //wait for data available + // String SampleCommand = Serial.readString(); //read until timeout + // SampleCommand.trim(); // remove any \r \n whitespace at the end of the String + // if (SampleCommand == "S") { + // Serial.println("#Sample Started"); + // delay(2000); + // Serial.println("#Sample Completed"); + // } + + // while (Serial.available() == 0) {} //wait for data available + // String resultCommand = Serial.readString(); //read until timeout + // resultCommand.trim(); // remove any \r \n whitespace at the end of the String + // if (resultCommand == "R") { + // delay(3000); + // Serial.println("RESULT SN 18291 1937.23 2828.11 28211.20 121829.12 REND"); + // delay(15000); + // } while (Serial.available() == 0) {} //wait for data available String resultCommand = Serial.readString(); //read until timeout resultCommand.trim(); // remove any \r \n whitespace at the end of the String - if (resultCommand == "R") { + if (resultCommand == "B") { delay(3000); - Serial.println("RESULT SN 18291 1937.23 2828.11 28211.20 121829.12 REND"); + Serial.println("ERROR 500 REND"); delay(15000); } - - // Serial.println("#ERROR 100"); } diff --git a/scripts/report_template.html b/scripts/report_template.html index 13377a5..260c553 100644 --- a/scripts/report_template.html +++ b/scripts/report_template.html @@ -1,39 +1,68 @@ + -Report - + Report + + - - - - - -
-
Person Name :
-
Age & Sex :
-
Sample type :
-
Family History of Sickle Cell Anemia (Yes / No):
-
-
Received on :
-
Reported on :
-
Ref. Doctor :
-
Serial No:
-
+ + + + + +
+
Person Name :
+
Age & Sex :
+
Sample type :
+
Family History of Sickle Cell Anemia (Yes / No):
+
+
Received on :
+
Reported on :
+
Ref. Doctor :
+
Serial No:
+
+ +
+ INTERPRETATION: + + Test Principle: The diagnostic test work on the principle of absorption spectroscopy. The test helps in + differentiating heterozygous/homozygous hemoglobin from normal hemoglobin. + + Method: High Performance Optical Spectroscopy for detection of Sickle cell trail and sickle cell disease + + Note: a. Blood transfusion may have an impact on the test results. + + b. Patients already on sickle-cell medications may impact test results. + + DATE: Hematologist + + This report is for the perusal of doctor only. Not for medico legal cases. Clinical correlation is essential. + Please contact us in case of unexpected result. + + Test Description RESULT ABSORBANCE RATIO REFERENCE RANGE INTERPRETATION + + Sickle Cell + + Anemia Normal < 0.29 Normal Sickle Cell Trait 0.32 – 0.5 Sickle Cell Trait Sickle Cell Disease> 0.55 Sickle Cell + Disease Negative Borderline 0.29-0.32 Recommended for HPLC or Electrophoresis Tests Positive Borderline 0.5 + – 0.55 Recommended for HPLC or Electrophore +
- + \ No newline at end of file diff --git a/src/components/Devices.js b/src/components/Devices.js index c9ff806..a012e97 100644 --- a/src/components/Devices.js +++ b/src/components/Devices.js @@ -152,13 +152,25 @@ const Devices = () => { result {curTestData?.result} {curTestData?.testType === 'HEMOCUBE' && - device data + calculatedRatio {curTestData?.calculatedRatio} } {curTestData?.testType === 'HEMOCUBE' && - device data + deviceRatio {curTestData?.deviceRatio} } + {curTestData?.testType === 'HEMOCUBE' && + green led Average + {curTestData?.led1Average} + } + {curTestData?.testType === 'HEMOCUBE' && + blue led Average + {curTestData?.led2Average} + } + {curTestData?.testType === 'HEMOCUBE' && + blue led Average + {curTestData?.led2Average} + } {/* */} }