From f7afed53b163ea68b87abcf127e3ecdbb29af02b Mon Sep 17 00:00:00 2001 From: Ranjana Shenoy Date: Fri, 25 Oct 2024 00:55:01 +0530 Subject: [PATCH] Feature#492: Enhance LabTest Cards to include more details. Redirect to Hospitals page when click 'read more'. --- client/src/pages/LabTest.jsx | 74 +++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/client/src/pages/LabTest.jsx b/client/src/pages/LabTest.jsx index cd3b854f..4c6d024c 100644 --- a/client/src/pages/LabTest.jsx +++ b/client/src/pages/LabTest.jsx @@ -17,6 +17,8 @@ import usgImage from '../assets/usg.png'; import Navbar from '../components/Navbar'; import { mode } from '../store/atom'; // Importing the atom for mode import Footer from '../components/Footer'; +import { Rating } from '@mui/material'; +import { useNavigate } from 'react-router-dom'; const LabTestMedipedia = () => { const [currentItem, setCurrentItem] = useState(3); @@ -24,6 +26,8 @@ const LabTestMedipedia = () => { const [isLoading, setIsLoading] = useState(false); const dark = useRecoilValue(mode); // Using Recoil state for dark mode + const navigate = useNavigate(); + useEffect(() => { setTimeout(() => { setIsVisible(true); @@ -37,10 +41,10 @@ const LabTestMedipedia = () => { title: 'Complete Blood Count (CBC)', reportTime: '2-days', cost: '$25', - rating: 4.5, + rating: 4, testType: 'Blood Test', description: - 'A Complete Blood Count (CBC) is a common blood test that measures the levels of different types of cells in your blood, including red blood cells, white blood cells, hemoglobin, hematocrit, and platelets. This test is essential for diagnosing various conditions like infections, anemia, and other blood disorders.', + 'A Complete Blood Count (CBC) is a common blood test that measures the levels of different types of cells in your blood. This test Measures count of red blood cells, white blood cells, hemoglobin, hematocrit, and platelets.', }, { id: 2, @@ -48,7 +52,7 @@ const LabTestMedipedia = () => { title: 'Lipid Profile', reportTime: '3-days', cost: '$35', - rating: 4.7, + rating: 3, testType: 'Blood Test', description: 'A Lipid Profile measures the levels of cholesterol and triglycerides in your blood. It includes total cholesterol, HDL (good cholesterol), LDL (bad cholesterol), and triglycerides. This test helps assess your risk of developing cardiovascular disease.', @@ -59,7 +63,7 @@ const LabTestMedipedia = () => { title: 'Blood Glucose Test', reportTime: '1-day', cost: '$20', - rating: 4.6, + rating: 5, testType: 'Blood Test', description: 'The Blood Glucose Test measures the level of glucose (sugar) in your blood. It is vital for diagnosing and managing diabetes or prediabetes. Regular monitoring of blood glucose levels can prevent severe complications from diabetes.', @@ -70,10 +74,10 @@ const LabTestMedipedia = () => { title: 'Thyroid Test', reportTime: '2-days', cost: '$30', - rating: 4.8, + rating: 5, testType: 'Blood Test', description: - 'The Thyroid Test checks your thyroid function by measuring levels of T3, T4, and TSH hormones in your blood. Thyroid hormones regulate your metabolism, energy levels, and mood. This test can detect conditions such as hyperthyroidism or hypothyroidism.', + 'The Thyroid Test checks your thyroid function by measuring levels of T3, T4, and TSH hormones in your blood. This test can detect conditions such as hyperthyroidism or hypothyroidism.', }, { id: 5, @@ -81,7 +85,7 @@ const LabTestMedipedia = () => { title: 'Hemoglobin Blood Test', reportTime: '2-days', cost: '$18', - rating: 4.4, + rating: 4, testType: 'Blood Test', description: 'The Hemoglobin Test measures the amount of hemoglobin, a protein in red blood cells that carries oxygen to tissues. It is often used to diagnose anemia and assess the overall health of your red blood cells.', @@ -92,7 +96,7 @@ const LabTestMedipedia = () => { title: 'Urine Test', reportTime: '3-days', cost: '$15', - rating: 4.3, + rating: 3, testType: 'Urine Test', description: 'A Urine Test analyzes various components of your urine, such as glucose, proteins, and ketones, to detect abnormalities that may indicate conditions like kidney disease, diabetes, or urinary tract infections.', @@ -103,10 +107,10 @@ const LabTestMedipedia = () => { title: 'Sodium Test', reportTime: '1-day', cost: '$22', - rating: 4.5, + rating: 3, testType: 'Blood Test', description: - 'The Sodium Test measures the sodium level in your blood, which is crucial for maintaining fluid balance, nerve function, and muscle activity. Abnormal levels can indicate dehydration, kidney problems, or adrenal issues.', + 'The Sodium Test measures the sodium level in your blood, which is crucial for maintaining fluid balance, nerve function, and muscle activity. Abnormal levels can indicate dehydration or kidney problems.', }, { id: 8, @@ -114,7 +118,7 @@ const LabTestMedipedia = () => { title: 'Hepatitis-B Test', reportTime: '2-days', cost: '$40', - rating: 4.7, + rating: 5, testType: 'Blood Test', description: 'The Hepatitis B Test detects the presence of Hepatitis B virus (HBV) in the blood. This test is important for diagnosing acute or chronic Hepatitis B infections, which can lead to liver damage.', @@ -125,7 +129,7 @@ const LabTestMedipedia = () => { title: 'Potassium Test', reportTime: '2-days', cost: '$25', - rating: 4.4, + rating: 4, testType: 'Blood Test', description: 'The Potassium Test measures the potassium level in your blood, which is essential for heart function and muscle contraction. Abnormal levels can cause irregular heartbeats or muscle weakness.', @@ -136,10 +140,10 @@ const LabTestMedipedia = () => { title: 'Rheumatoid Arthritis (RA) Test', reportTime: '2-days', cost: '$45', - rating: 4.6, + rating: 4, testType: 'Blood Test', description: - 'The Rheumatoid Arthritis Test detects rheumatoid factor (RF) or anti-cyclic citrullinated peptide (anti-CCP) antibodies in the blood. These are commonly present in people with rheumatoid arthritis, an autoimmune condition affecting joints.', + 'The Rheumatoid Arthritis Test detects rheumatoid factor (RF) or anti-cyclic citrullinated peptide (anti-CCP) antibodies in the blood. Rheumatoid arthritis is a long-term autoimmune disease that causes inflammation of joints and tissues.', }, { id: 11, @@ -147,10 +151,10 @@ const LabTestMedipedia = () => { title: 'Electrocardiogram (ECG)', reportTime: '2-days', cost: '$50', - rating: 4.8, + rating: 5, testType: 'Non-invasive', description: - 'An Electrocardiogram (ECG) records the electrical activity of the heart over time. It helps detect arrhythmias, heart attacks, and other heart conditions.', + "An Electrocardiogram (ECG) records the electrical activity of the heart over time. It is one of the first heart tests you 'll have. It helps detect arrhythmias, heart attacks, and other heart conditions. ECG results can help diagnose an unusually fast heart rate, called tachycardia, or an unusually slow heart rate,", }, { id: 12, @@ -158,7 +162,7 @@ const LabTestMedipedia = () => { title: 'Ultrasonography (USG)', reportTime: '2-days', cost: '$60', - rating: 4.7, + rating: 3, testType: 'Imaging', description: 'Ultrasonography (USG) uses high-frequency sound waves to create images of internal organs, muscles, and other soft tissues. It is commonly used for diagnosing a wide range of medical conditions, including those affecting the abdomen, pelvis, and heart.', @@ -213,17 +217,29 @@ const LabTestMedipedia = () => { > {test.description}

- -
- +

{test.cost}

+

{test.reportTime}

+
+
+ {/* get report within {test.reportTime} + */} + + { Med-Space
+ ))} {currentItem < tests.length && ( -
Load more -
+ )}