Tick & Insect Bite Symptom Analyzer

Tick & Insect Bite Symptom Analyzer

An informational tool to help you assess symptoms after a bite.

Step 1: About the Bite

Was a tick found on the skin?

Describe the appearance of the bite area:

Step 2: Current Symptoms

Select all symptoms you are currently experiencing. (Check all that apply)

Step 3: Timeline

Symptom Analysis & Recommendations

This tool is for informational purposes ONLY and is NOT a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition.

`; elements.analysisResultContainer.innerHTML = analysisHTML; }; const downloadPDF = () => { if (typeof window.jspdf === 'undefined') { alert('Could not generate PDF. The required library is missing.'); return; } const { jsPDF } = window.jspdf; const doc = new jsPDF(); const { tickFound, appearance, symptoms, timeline, riskLevel, summary, recommendations } = analysisData; const colors = { primary: '#be123c', secondary: '#f43f5e', textPrimary: '#1f2937', textSecondary: '#6b7280' }; doc.setFillColor(colors.primary); doc.rect(0, 0, 210, 28, 'F'); doc.setFont('helvetica', 'bold'); doc.setFontSize(20); doc.setTextColor('#FFFFFF'); doc.text('My Bite Symptom Analysis Summary', 105, 18, { align: 'center' }); let yPos = 40; const printSection = (title, content) => { doc.setFontSize(12); doc.setFont('helvetica', 'bold'); doc.setTextColor(colors.textPrimary); doc.text(title, 14, yPos); doc.setFont('helvetica', 'normal'); doc.text(doc.splitTextToSize(content, 120), 70, yPos); yPos += 10; }; doc.setFontSize(14); doc.setFont('helvetica', 'bold'); doc.setTextColor(colors.primary); doc.text('Your Inputs:', 14, yPos); yPos += 8; printSection('Tick Found:', tickFound.charAt(0).toUpperCase() + tickFound.slice(1)); printSection('Bite Appearance:', appearance.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase())); printSection('Symptoms:', symptoms.length > 0 ? symptoms.join(', ').replace(/_/g, ' ') : 'None selected'); printSection('Timeline:', timeline.replace('_', ' ')); yPos += 10; doc.setFontSize(14); doc.setFont('helvetica', 'bold'); doc.setTextColor(colors.primary); doc.text('Analysis & Recommendations:', 14, yPos); yPos += 8; doc.setFontSize(11); doc.setFont('helvetica', 'normal'); doc.text(doc.splitTextToSize(summary, 180), 14, yPos); yPos += 15; recommendations.forEach(rec => { doc.text(`• ${rec}`, 20, yPos); yPos += 7; }); yPos = Math.max(yPos, 250); doc.setFillColor('#fee2e2'); // red-50 doc.rect(14, yPos, 182, 30, 'F'); doc.setFontSize(12); doc.setFont('helvetica', 'bold'); doc.setTextColor('#b91c1c'); // red-700 doc.text('CRITICAL DISCLAIMER', 105, yPos + 8, { align: 'center' }); doc.setFontSize(9); doc.setFont('helvetica', 'normal'); doc.setTextColor('#991b1b'); // red-800 const disclaimer = "This tool is for informational purposes ONLY and is NOT a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition."; doc.text(doc.splitTextToSize(disclaimer, 170), 20, yPos + 14); doc.save('My_Bite_Symptom_Summary.pdf'); }; // --- Event Listeners --- elements.nextBtn.addEventListener('click', nextStep); elements.prevBtn.addEventListener('click', prevStep); elements.downloadPdfBtn.addEventListener('click', downloadPDF); // --- Initialization --- updateFormUI(); });
Scroll to Top