Hih
Pet Viaa Health Diagnostic Tool: Instantly Check Your Pet's Symptoms
/* Pet Viaa Advanced Tool Styles */
#pet-viaa-container {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
max-width: 800px;
margin: 20px auto;
background-color: #f9fdfc;
border-radius: 15px;
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
padding: 30px;
border: 1px solid #e0f2f1;
}
#pet-viaa-container h2 {
color: #00695c;
text-align: center;
margin-bottom: 10px;
font-size: 2.2em;
}
#pet-viaa-container .subtitle {
text-align: center;
color: #555;
margin-bottom: 30px;
font-size: 1.1em;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #333;
}
.form-control {
width: 100%;
padding: 12px;
border: 2px solid #b2dfdb;
border-radius: 8px;
font-size: 1em;
transition: border-color 0.3s;
}
.form-control:focus {
border-color: #009688;
outline: none;
}
.symptom-section {
margin-top: 30px;
border-top: 1px solid #e0f2f1;
padding-top: 20px;
}
.symptom-category {
margin-bottom: 25px;
}
.category-title {
font-size: 1.3em;
color: #00796b;
margin-bottom: 15px;
font-weight: 600;
}
.symptom-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
}
.symptom-card {
background-color: #fff;
border: 2px solid #b2dfdb;
border-radius: 10px;
padding: 15px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 10px;
}
.symptom-card:hover {
background-color: #e0f2f1;
transform: translateY(-3px);
box-shadow: 0 5px 10px rgba(0,0,0,0.05);
}
.symptom-card.active {
background-color: #009688;
color: #fff;
border-color: #00796b;
}
.symptom-card input[type="checkbox"] {
transform: scale(1.3);
}
#analyze-btn {
display: block;
width: 100%;
padding: 15px;
background-color: #009688;
color: #fff;
border: none;
border-radius: 10px;
font-size: 1.2em;
font-weight: 700;
cursor: pointer;
transition: background-color 0.3s;
margin-top: 30px;
}
#analyze-btn:hover {
background-color: #00796b;
}
#result-container {
margin-top: 30px;
padding: 25px;
border-radius: 12px;
display: none;
}
.result-header {
font-size: 1.5em;
font-weight: 700;
margin-bottom: 15px;
text-align: center;
}
.result-content {
font-size: 1.1em;
line-height: 1.6;
}
.disclaimer {
font-size: 0.9em;
color: #777;
font-style: italic;
margin-top: 20px;
text-align: center;
}
</style>
<div id="pet-viaa-container">
<h2>Pet Viaa Symptom Assessment</h2>
<p class="subtitle">An advanced tool to evaluate your pet's well-being and get proactive guidance.</p>
<div class="form-group">
<label for="pet-species">Pet’s Species:</label>
<select id="pet-species" class="form-control">
<option value="">Select Species</option>
<option value="dog">Dog</option>
<option value="cat">Cat</option>
</select>
</div>
<div class="form-group">
<label for="pet-name">Pet’s Name (Optional):</label>
<input type="text" id="pet-name" class="form-control" placeholder="Enter name">
</div>
<div class="symptom-section">
<h3>Select Observed Symptoms:</h3>
<div class="symptom-category">
<div class="category-title">General & Constitutional</div>
<div class="symptom-grid">
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="lethargy_severe">
<span>Severe Lethargy (Unresponsive)</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="lethargy_mild">
<span>Mild Lethargy / Lower Energy</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="fever_signs">
<span>Signs of Fever (Warm Ears/Nose)</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="appetite_loss_severe">
<span>Complete Appetite Loss (>24h)</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="appetite_loss_mild">
<span>Mild Reduced Appetite</span>
</div>
</div>
</div>
<div class="symptom-category">
<div class="category-title">Respiratory & Breathing</div>
<div class="symptom-grid">
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="breathing_difficulty_severe">
<span>Severe Difficulty Breathing (Open-mouth)</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="breathing_heavy_mild">
<span>Heavier / Faster Breathing than usual</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="coughing_persistent">
<span>Persistent Coughing</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="sneezing_persistent">
<span>Persistent Sneezing</span>
</div>
</div>
</div>
<div class="symptom-category">
<div class="category-title">Digestive & Urinary</div>
<div class="symptom-grid">
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="vomiting_persistent">
<span>Persistent Vomiting (>3 times)</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="vomiting_mild">
<span>Mild / Occasional Vomiting</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="diarrhea_bloody">
<span>Bloody Diarrhea</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="diarrhea_mild">
<span>Mild / Occasional Diarrhea</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="urination_straining">
<span>Straining to Urinate (Emergency!)</span>
</div>
</div>
</div>
<div class="symptom-category">
<div class="category-title">Behavioral & Movement</div>
<div class="symptom-grid">
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="seizures">
<span>Seizures</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="ataxia">
<span>Loss of Balance (Ataxia)</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="limping">
<span>Limping or Difficulty Moving</span>
</div>
<div class="symptom-card" onclick="toggleSymptom(this)">
<input type="checkbox" value="hiding">
<span>Sudden Hiding or Aggression</span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="other-symptoms">Other Symptoms (Optional):</label>
<textarea id="other-symptoms" class="form-control" rows="3" placeholder="Describe any other symptoms..."></textarea>
</div>
<button id="analyze-btn">Analyze Pet's Health</button>
<div id="result-container">
<div class="result-header"></div>
<div class="result-content"></div>
<p class="disclaimer">Disclaimer: This is not a diagnosis. We strongly recommend consulting a veterinarian.</p>
</div>
</div>
<script>
// Function to toggle symptom card active state
function toggleSymptom(card) {
const checkbox = card.querySelector('input[type="checkbox"]');
checkbox.checked = !checkbox.checked;
card.classList.toggle('active');
}
document.getElementById('analyze-btn').addEventListener('click', function() {
const species = document.getElementById('pet-species').value;
const name = document.getElementById('pet-name').value || 'Your pet';
const otherSymptoms = document.getElementById('other-symptoms').value;
if (!species) {
alert("Please select your pet's species.");
return;
}
const selectedSymptoms = Array.from(document.querySelectorAll('.symptom-card.active input'))
.map(input => input.value);
let emergencyLevel = 0; // 0: None, 1: Mild, 2: Moderate, 3: High, 4: Emergency
let findingsCount = 0;
// Smart Triage Logic Tree (Extended & Deepened)
// Check for Critical Emergency Symptoms
if (selectedSymptoms.includes('urination_straining') || selectedSymptoms.includes('seizures') ||
selectedSymptoms.includes('breathing_difficulty_severe') || selectedSymptoms.includes('lethargy_severe') ||
selectedSymptoms.includes('diarrhea_bloody')) {
emergencyLevel = 4;
findingsCount++;
}
// Check for Moderate to Severe Symptoms
else if (selectedSymptoms.includes('appetite_loss_severe') || selectedSymptoms.includes('vomiting_persistent') ||
selectedSymptoms.includes('ataxia')) {
emergencyLevel = 3;
findingsCount++;
}
// Check for Common but Concerning Symptoms
else if (selectedSymptoms.includes('lethargy_mild') || selectedSymptoms.includes('limping') ||
selectedSymptoms.includes('sneezing_persistent') || selectedSymptoms.includes('coughing_persistent')) {
emergencyLevel = 2;
findingsCount++;
}
// Check for Mild symptoms
else if (selectedSymptoms.includes('appetite_loss_mild') || selectedSymptoms.includes('vomiting_mild') ||
selectedSymptoms.includes('diarrhea_mild') || selectedSymptoms.includes('hiding')) {
emergencyLevel = 1;
findingsCount++;
}
// Determine output text based on triage results
const resultContainer = document.getElementById('result-container');
const resultHeader = resultContainer.querySelector('.result-header');
const resultContent = resultContainer.querySelector('.result-content');
resultContainer.style.display = 'block';
// Styling result container based on level
if (emergencyLevel === 4) {
resultContainer.style.backgroundColor = '#ffcccc'; // Light Red for Emergency
resultHeader.style.color = '#b71c1c';
} else if (emergencyLevel >= 2) {
resultContainer.style.backgroundColor = '#fff3cd'; // Light Yellow for Concern
resultHeader.style.color = '#856404';
} else {
resultContainer.style.backgroundColor = '#e2e3e5'; // Light Grey for Mild
resultHeader.style.color = '#383d41';
}
// Advanced Response Generation
if (findingsCount === 0 && !otherSymptoms) {
resultHeader.textContent = "No Major Symptoms Selected";
resultContent.textContent = `Based on your selection, ${name} does not seem to exhibit the listed high-risk symptoms. However, small changes can be significant. Monitor ${name} closely for any further changes. If you are still concerned, a preventative check-up is always a good idea.`;
} else if (emergencyLevel === 4) {
resultHeader.textContent = "Potential Emergency Situation Detected!";
resultContent.textContent = `Based on the provided information, ${name} may be experiencing a high-risk symptom that requires immediate attention. Symptoms like strain to urinate, bloody diarrhea, or severe lethargy should be treated as an **animal longevity** risk. Please find your nearest 24/7 veterinarian clinic now.`;
} else if (emergencyLevel === 3) {
resultHeader.textContent = "High Concern - Professional Advice Recommended";
resultContent.textContent = `The symptoms you selected for ${name} indicate a significant deviation from normal health. Complete appetite loss, persistent vomiting, or loss of balance suggest an underlying condition that is best addressed by a professional. We strongly recommend scheduling a veterinarian appointment as soon as possible for a proper **veterinary care** evaluation.`;
} else if (emergencyLevel === 2) {
resultHeader.textContent = "Moderate Concern - Monitor Closely & Schedule Check-up";
resultContent.textContent = `Your description of ${name} includes some signs that should be monitored closely. Mild lethargy, limping, or persistent coughing can be early indicators of larger issues. We recommend organizing your observations and scheduling a check-up to ensure proactive **pet health and wellness** management. Providing your vet with this symptom history is extremely valuable.`;
} else if (emergencyLevel === 1) {
resultHeader.textContent = "Mild Concern - Observe Closely";
resultContent.textContent = `The symptoms selected for ${name} are mild but noteworthy. A slight reduction in appetite, hiding, or mild vomiting can sometimes resolve on their own, but can also be the beginning of something more. Monitor ${name} closely over the next 24 hours. Ensure they have access to water. If symptoms worsen or persist, please contact your veterinarian for advice.`;
} else {
// Fallback or combination based on otherSymptoms
resultHeader.textContent = "Multiple Concerns Noted";
resultContent.textContent = `You've noted multiple mild to moderate concerns. The interaction of symptoms can be complex. While none are listed as emergencies, we strongly suggest providing your veterinarian with a detailed history of all your observations to ensure proactive **pet health management**.`;
}
// Scroll to the result
resultContainer.scrollIntoView({ behavior: 'smooth' });
});
</script>

تعليقات
إرسال تعليق