Blood Circulation & Cardiovascular Health Tracker

Log key metrics to monitor your cardiovascular health and share the progress with your healthcare provider.

Important Medical Disclaimer

This tool is for informational and tracking purposes only. It is NOT a substitute for professional medical advice, diagnosis, or treatment. Always consult with a qualified healthcare professional regarding your health and before making any lifestyle changes.

Log Today's Health Metrics

No entries yet. Add one from the 'Daily Log' tab.

`; return; } let tableHTML = ``; [...data].reverse().slice(0, 7).forEach(entry => { // Show 7 most recent tableHTML += ``; }); tableHTML += `
Date BP Heart Rate Exercise
${new Date(entry.date).toLocaleDateString()} ${entry.systolic || '-'}/${entry.diastolic || '-'} ${entry.hr || '-'} bpm ${entry.exercise} min
`; container.innerHTML = tableHTML; } function downloadPdf() { if (cardioData.length === 0) { alert("No data to download. Please log at least one entry."); return; } const { jsPDF } = window.jspdf; const doc = new jsPDF(); // Header doc.setFontSize(22); doc.setFont('helvetica', 'bold'); doc.text('Cardiovascular Health Report', 105, 20, { align: 'center' }); // Charts if (bpHrChart && exerciseChart) { doc.setFontSize(16); doc.text('Visual Overview (Last 30 Entries)', 14, 40); const bpHrImg = bpHrChart.toBase64Image(); const exerciseImg = exerciseChart.toBase64Image(); doc.addImage(bpHrImg, 'PNG', 14, 45, 90, 60); doc.addImage(exerciseImg, 'PNG', 108, 45, 90, 60); } // Log Table doc.addPage(); doc.setFontSize(16); doc.text('Detailed Log Entries', 14, 20); const tableData = cardioData.map(entry => [ new Date(entry.date).toLocaleDateString(), `${entry.systolic || '-'}/${entry.diastolic || '-'}`, entry.hr || '-', entry.exercise ]); doc.autoTable({ startY: 25, head: [['Date', 'Blood Pressure', 'Heart Rate (bpm)', 'Exercise (min)']], body: tableData, theme: 'grid', headStyles: { fillColor: [79, 70, 229] } }); doc.save('Cardiovascular-Health-Report.pdf'); } // --- EVENT LISTENERS --- Object.keys(tabButtons).forEach(key => { tabButtons[key].addEventListener('click', () => switchTab(key)); }); saveBtn.addEventListener('click', saveEntry); downloadBtn.addEventListener('click', downloadPdf); // --- INITIALIZATION --- document.getElementById('entry-date').valueAsDate = new Date(); });
Scroll to Top