mRetinaAI / AI case generator.html
ameenmarashi's picture
Upload 17 files
ec07bf8 verified
<!DOCTYPE html>
<html lang="en">
<body>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI case generator</title>
<style>
<style>
body {
font-family: Arial, sans-serif;
font-size: 16px;
font-weight: bold;
line-height: 1.6;
margin: 0;
padding: 0;
background-color: #f2f2f2;
color: #333;
}
header {
background-color: #fff;
padding: 0px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
text-align: center;
}
.HEADER-image {
width: 100px; /* Adjust width as needed */
height: auto; /* Maintain aspect ratio */
margin-right: 15px;
cursor: pointer;
}
.container {
width: 99%;
max-width: 500px; /* Adjust max-width for better readability */
margin: 0 auto; /* Center container horizontally */
padding: 0 20px; /* Add padding inside the container */
box-sizing: border-box;
background-color: #f2f2f2;
color: #333;
}
h1, h2, h3 {
margin-top: 0;
font-weight: bold;
font-size: 24px;
}
p {
margin: 10px 0;
}
.main-content {
padding: 20px;
}
/* Styling for loading overlay */
.overlay {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.5); /* semi-transparent black */
display: none;
justify-content: center;
align-items: center;
z-index: 999; /* ensure it's above other content */
}
.spinner {
border: 8px solid rgba(255, 255, 255, 0.3); /* light border */
border-top: 8px solid #ffffff; /* white border on top */
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 1s linear infinite; /* spinning animation */
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
footer {
text-align: center;
background-color: #fff;
padding: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.hidden {
display: none;
}
.small-input {
height: 20px;
width: 80px;
font-weight: bold;
}
.large-input {
width: 100%;
height: 30px;
font-size: 16px;
font-weight: bold;
padding: 12px;
margin-bottom: 20px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 6px;
}
select {
width: 100%;
height: 25px;
font-size: 16px;
}
.large-textarea {
width: 100%;
height: 200px;
font-size: 16px;
font-weight: bold;
padding: 12px;
margin-bottom: 20px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 6px;
align-items: center;
}
.large-button {
display: inline-block;
padding: 1px 20px; /* Adjust padding for desired button size */
font-size: 20px; /* Adjust font size for button text */
font-weight: bold;
text-decoration: none;
color: #fff;
background-color: #007bff;
border: 2px solid #007bff; /* Add border for button consistency */
border-radius: 8px;
text-align: center;
margin-right: 10px; /* Add spacing between buttons */
box-sizing: border-box; /* Include padding in button size calculation */
width: 150px; /* Set a fixed width for both buttons */
height: 40px; /* Set a fixed height for both buttons */
line-height: 36px; /* Center button text vertically */
transition: background-color 0.3s ease;
}
.large-button:last-child {
margin-right: 10; /* Remove margin from the last button */
}
.button-container {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px; /* Add margin below the button container */
}
.large-button:hover {
background-color: #0056b3;
}
/* Media query for smartphones */
@media (max-width: 428px) {
.container {
padding: 0 10px;
}
.button-container {
margin-bottom: 10px; /* Adjust margin for smaller screens */
}
.large-button {
padding: 1px 20px; /* Further increase padding for smaller buttons */
font-size: 16px; /* Decrease font size slightly for smaller screens */
width: 180px; /* Adjust width for better fit on smartphones */
}
}
@media (min-width: 768px) {
/* Tablet styles */
.container {
padding: 0 40px;
}
.large-input {
width: 60%;
}
.large-textarea {
width: 70%;
height: 250px;
}
}
@media (min-width: 992px) {
/* Desktop styles */
.container {
max-width: 2000px;
}
.large-input {
width: 50%;
}
.large-textarea {
width: 80%;
height: 300px;
}
}
/* Modal style */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.5);
}
.modal-content {
background-color: #fefefe;
margin: 15% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
max-width: 600px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
</style>
<body>
<header>
<a href="https://ameenmarashi-mretinaai.static.hf.space">
<img src="MretinaAILogo.png" alt="Grayscale Example" class="HEADER-image">
</a>
<div class="header"> <h1>AI Case Generator</h1>
</div>
</header>
<body>
<div class="container main-content">
<div>
<div>
<label for="age">Age:</label>
<input type="number" id="age" name="age" class="small-input" placeholder="Age">
<select id="age-unit" class="small-input" name="age-unit">
<option value="years">Years</option>
<option value="Weeks">Weeks</option>
</select>
<label for="sex">Sex:</label>
<select id="sex" class="small-input" class="dropdown">
<option value="">Select</option>
<option value="male">Male</option>
<option value="female">Female</option>
</select>
<br>
<label for="clinical-findings">Clinical Findings:</label>
<select id="clinical-findings" class="large-input" class="dropdown" onchange="populateSubDropdowns()">
<option value="">Select</option>
<option value="diabetic-retinopathy">Diabetic Retinopathy</option>
<option value="retinal-artery-macroaneursums">Retinal Artery Macroaneursums</option>
<option value="retinal-vein-occlusion">Retinal Vein Occlusion</option>
<option value="retinal-artery-occlusion">Retinal Artery Occlusion</option>
<option value="macular-telangiectasia">Macular Telangiectasia</option>
<option value="rop">ROP</option>
<option value="amd">AMD</option>
<option value="central-serous-chorioretinopathy">Central Serous Chorioretinopathy</option>
<option value="Polypoidal-choroidal-vasculopathy">Polypoidal choroidal vasculopathy (PCV)</option>
<option value="pathological-myopia">Pathological Myopia</option>
<option value="pvd">PVD</option>
<option value="rrd">RRD</option>
<option value="vitreomacular-abnormalities">Vitreomacular abnormalities</option>
<option value="macular-hole">Macular Hole</option>
<option value="retinitis-pigmentosa">Retinitis Pigmentosa</option>
<option value="best-vitelliform-macular-dystrophy">Best Vitelliform Macular Dystrophy</option>
<option value="pattern-dystrophy">Pattern Dystrophy</option>
<option value="stargardt-disease">Stargardt Disease</option>
<option value="x-linked-foveal-retinoschisis">X-linked Foveal Retinoschisis</option>
<option value="pseudophakic-cystoid-macular-edema">Pseudophakic Cystoid Macular Edema</option>
<option value="endophthalmitis">Endophthalmitis</option>
<option value="posterior-segment-trauma">Posterior Segment Trauma</option>
</select>
<div id="bcva-section" class="hidden">
<label for="bcva">BCVA:</label>
<select id="bcva" class="dropdown"></select>
</div>
<div id="classification-section" class="hidden">
<label for="classification">Classification:</label>
<select id="classification" class="dropdown"></select>
</div>
<div id="investigation-section" class="hidden">
<label>Investigation Findings:</label><br>
<div class="checkbox-group" id="investigation-checkboxes"></div>
</div>
<div id="treatments-section" class="hidden">
<label>Previous Treatments:</label><br>
<div class="checkbox-group" id="treatments-checkboxes"></div>
</div>
<br>
<button class="large-button"onclick="sendTextToChatbot()">Submit</button>
<br><br>
By submitting, you acknowledge that it is essential to seek professional opinions as AI Case Generator can make mistakes. <br> To learn more, please read the
<a href="#" onclick="openInstructions()"> instructions</a>
</div>
<!-- HTML for the loading overlay -->
<div class="overlay" id="overlay">
<div class="spinner"></div>
</div>
<br>
<textarea id="chatbot-response" class="large-textarea" rows="6" cols="50" readonly placeholder="Recommendations for your case will appear here..."></textarea>
<div class="button-container">
<button class="large-button" onclick="sendTextToChatbot()">Regenerate</button> <a href="mRetinaGPT.html" class="large-button" style="Bold">Ask more</a>
</div>
<div style="text-align: center;">
<button onclick="reportError()" class="large-button" type="button" style="width: 20%; margin: 0 auto;">Report a mistake</button>
</div>
<br>
<footer>
<div class="footer"> </div>
<p>&copy; 2024 mRetina AI. All rights reserved. Created and designed by Ameen Marashi, M.D.</p>
</footer>
<div id="errorModal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">&times;</span>
<h2>Report AI Case Generator Mistake</h2>
<p>Upon pressing the submit button, we will receive a copy of your inputs along with the AI Case Generator response for further analysis. If you have any additional comments, please feel free to include them below. If you wish to receive further responses from us regarding this matter, please provide us with your email. Thank you.</p>
<textarea id="consoleLogsText" placeholder="Additional comments..." style="width: 100%; height: 100px;"></textarea>
<br><br><br>
<button onclick="sendErrorReport()" class="large-button" type="button">Submit</button>
<span id="feedbackMessage" style="display:none; color:blue;">Sending your feedback...</span>
</div>
</div>
</div>
<!-- Modal for instructions -->
<div id="instructionsModal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeInstructions()">&times;</span>
<h2>Instructions</h2>
<p>
By using AI Case Generator, you understand and agree on the following:
</p>
<ul>
<li>AI Case Generator is an online tool that uses artificial intelligence to assist ophthalmologists in diagnosing and treating retinal diseases.</li>
<li>AI Case Generator does not support uveitis, tumors, surgical retina, or image uploads.</li>
<li>AI Case Generator is not a substitute for human expertise. Always use your clinical judgment and verify results.</li>
<li>Please note that the answers provided are concise and direct treatment recommendations sourced exclusively from the Ameen Marashi Clinical Retina Pocket Guidelines book.</li>
<Li> If you're interested in learning more about clinical retina, you can utilize the ASK MORE button located on this platform. This will redirect you to mRetina GPT, where you can ask the AI-powered assistant more questions about the topic.</Li>
<li>AI Case Generator is designed for ophthalmologists and not for direct patient use.</li>
</ul>
<h3>Best practices for using AI Case Generator:</h3>
<ul>
<li>It is crucial to ensure that the options you select have a rational clinical sense. Please be aware that the AI Case Generator may produce misleading information in complex or non-rational case scenarios. Therefore, it is essential to exercise caution while selecting the options.</li>
<li>Do not expect AI Case Generator to engage in back-and-forth conversation; it can only answer one question at a time.</li>
<li>Do not rely solely on AI Case Generator for diagnosis and treatment decisions; consult other sources of information.</li>
<p>For further inquiries or support, please For further inquiries or support, please <a href="https://ameenmarashi-mretinaai.static.hf.space/feedback.html">Contact Us</a>
</p>
</ul>
</div>
<script src="https://cdn.jsdelivr.net/npm/@emailjs/browser@4/dist/email.min.js"></script>
<script>
(function() {
emailjs.init("fBOjk9QeDO8CPFMwG");
})();
const logs = [];
(function() {
const consoleLog = console.log;
console.log = function(...args) {
logs.push(args.join(' '));
consoleLog.apply(console, args);
};
})();
function closeModal() {
document.getElementById('errorModal').style.display = 'none';
}
async function reportError() {
document.getElementById('consoleLogsText').value = ''; // Clear any previous comments
document.getElementById('errorModal').style.display = 'block';
}
async function sendErrorReport() {
const consoleLogs = logs.slice(-2).join('\n'); // Get the last two logs
const consoleLogsText = document.getElementById('consoleLogsText').value.trim();
if (!consoleLogs && !consoleLogsText) {
alert('No information to report.');
return;
}
const errorReport = {
console_logs: consoleLogs,
consoleLogs_text: consoleLogsText
};
document.getElementById("feedbackMessage").style.display = "inline"; // Show feedback message
try {
await emailjs.send('service_0tpadqt', 'template_ggww06o', errorReport);
alert('We apologize for the AI Case Generator mistake you encountered. Your report has been received, and we will thoroughly investigate the issue to improve the reliability of AI Case Generator. Thank you for bringing this to our attention.');
} catch (error) {
console.log('FAILED...', error);
alert('Failed to report the error. Please try again.');
} finally {
closeModal();
}
}
</script>
<script>
function openInstructions() {
const instructionsModal = document.getElementById("instructionsModal");
instructionsModal.style.display = "block";
}
function closeInstructions() {
const instructionsModal = document.getElementById("instructionsModal");
instructionsModal.style.display = "none";
}
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
}
// Add conditions for other clinical findings
}
function populateDiabeticRetinopathy() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"20/25 and better",
"20/40 to 20/32",
"20/50 and less"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Mild or moderate NPDR",
"Severe NPDR",
"Very severe NPDR",
"Early PDR",
"High-risk PDR",
"Diabetic Vitreous hemorrhage",
"Tractional retinal detachment"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"No clear fundus view",
"B-scan shows no TRD",
"B-scan shows TRD",
"No macular edema",
"Central DME",
"Non-central CSME",
"Epiretinal membrane",
"Vitreomacular Traction",
"Fibro vascular proliferation",
"Ischemic maculopathy",
"Peripheral non-perfusion",
"Microaneurmal leakage"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [ "No previous treatment",
"Anti-VEGF with good response",
"Anti-VEGF with poor response",
"Steroids with good response",
"Steroids with poor response",
"Focal or Grid Laser",
"PRP",
"PPV"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
function sendTextToChatbot()
{
// Show loading animation
var overlay = document.getElementById('overlay');
overlay.style.display = 'flex'; // Display the overlay as a flex container
var age = document.getElementById("age").value;
var ageUnit = document.getElementById("age-unit").value;
var sex = document.getElementById("sex").value;
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcva = document.getElementById("bcva").value;
var classification = document.getElementById("classification").value;
var investigations = getCheckedValues("investigations");
var treatments = getCheckedValues("treatments");
// Create the data object to send to the chatbot
var chatbotData = {
question: `Recommendation for patient ${age} ${ageUnit}\nSex: ${sex}\nClinical Findings: ${clinicalFindings}\nBCVA: ${bcva}\nClassification: ${classification}\nInvestigation Findings: ${investigations.join(", ")}\nPrevious Treatments: ${treatments.join(", ")}`
};
chatbotData.question = chatbotData.question.replace(/\n/g, ' ');
console.log("Chatbot data sent:", JSON.stringify(chatbotData).replace(/[{}]/g, '')); // Call the chatbot API with the data
query(chatbotData)
.then(function(response) {
if (response && response.text) {
console.log("Chatbot Response: ", response.text);
const cleanText = response.text.replace(/\n/g, '\n'); // Remove newline characters
document.getElementById("chatbot-response").value = cleanText;
} else {
console.error("Invalid response from chatbot");
alert("Invalid response from chatbot");
}
})
.catch(function(err) {
console.error("Error querying chatbot: ", err);
alert("Error processing request!");
})
.finally(function() {
// Hide loading overlay after processing
overlay.style.display = 'none';
});
}
async function query(data) {
try {
const response = await fetch(
"https://ameenmarashi-mretina.hf.space/api/v1/prediction/44c58d24-dc83-4e83-bcd9-44935f5a90bb",
{
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(data)
}
);
const result = await response.json();
return result;
} catch (error) {
console.error("Error posting to chatbot: ", error);
alert("Error posting to chatbot!");
}
}
function getCheckedValues(groupName) {
var checkboxes = document.getElementsByName(groupName);
var values = [];
checkboxes.forEach(function(checkbox) {
if (checkbox.checked) {
values.push(checkbox.value);
}
});
return values;
}
</script>
<script>
// Existing code...
function populateRetinalArteryMacroaneursums() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Moderate visual loss"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Hemorrhagic",
"Exudative"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Macular edema",
"Macroaneurysmal leakage"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Laser",
"anti-VEGF"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
}
// Add conditions for other clinical findings
}
function populateRetinalArteryOcclusion() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Central",
"Branch",
"Cilioretinal",
"Combined with retinal vein occlusion",
"Giant cell arteritis"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Arterial filling defect"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Paracentesis",
"Ocular massage",
"Fibrinolytic treatment"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
function populateRetinalVeinOcclusion() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Central",
"Branch"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Widespread ischemic changes",
"Macular edema",
"NVD",
"NVE",
"NVI",
"Vitreous hemorrhage or preretinal hemorrhage"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Intravitreal anti-VEGF with good response",
"Intravitreal anti-VEGF with poor response",
"Intravitreal steroids",
"Scatter Laser"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
}
// Add conditions for other clinical findings
}
function populateMacularTelangiectasia() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Moderate visual loss"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Type one",
"Type two"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Intraretinal cavitations without increased macular thickness",
"Intra and/or subretinal fluids with increased macular thickness",
"Macular Neovascularization",
"Macular hole"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Laser with poor response",
"Anti-VEGF"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
function populateROP() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var opt = document.createElement("option");
opt.value = "Not available";
opt.innerHTML = "Not available";
bcvaDropdown.appendChild(opt);
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Mild",
"Prethreshold diseases",
"Threshold disease",
"Acute Posterior",
"Regressing",
"Recurrent",
"Stage four",
"Stage five"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Stage one",
"Stage two",
"Stage three",
"Stage 4",
"Stage 5",
"Plus disease",
"Zone One",
"Zone Two",
"Zone Three",
"Retinal Detachment"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Laser",
"Anti-VEGF"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") { // Added condition for AMD
populateAMD();
}
// Add conditions for other clinical findings
}
function populateAMD() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good",
"Moderate",
"Poor"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Early",
"Intermediate non-neovascular",
"Advanced non-neovascular",
"Advanced neovascular",
"Submacular hemorrhage"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Geographic atrophy",
"Soft Drusen",
"Subretinal scar",
"Subclinical MNV",
"Type one MNV",
"Type two MNV",
"Type three MNV",
"Subretinal hemorrhage",
"Sub-RPE hemorrhage"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Oral supplements",
"PDT",
"Anti-VEGF",
"Stable MNV after the loading dose",
"Acceptable response",
"Persisting or worsening of active MNV after the loading dose",
"Port Delivery system",
"Complement inhibitor"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
}
// Add conditions for other clinical findings
}
function populateCentralSerousChorioretinopathy() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Acute",
"Chronic",
"Complicated with MNV"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Subretinal fluids",
"Subretinal scar",
"Smokestack",
"Inkblot"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"PDT",
"Sub-threshold microsecond laser",
"Mineralocorticoid antagonists",
"Anti-VEGF"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
function populatePCV() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Branch Vascular Network"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Pachychoroid",
"Peaked or dome-shaped PED",
"Subretinal hemorrhage",
"Subretinal fluid",
"Double layer sign"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"PDT",
"Anti-VEGF monotherapy failure"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
}
// Add conditions for other clinical findings
}
function populatePathologicalMyopia() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Complicated with MNV",
"Diffuse atrophy",
"Patchy atrophy"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Subretinal scar",
"Myopic tractional maculopathy",
"Macular hole",
"RD"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"PPV",
"Anti-VEGF"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
</script>
<script>
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
// Hide all sections initially
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
// Determine which function to call based on clinical findings
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "PVD") {
populatepvd();
}
}
function populatepvd() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
// Show relevant sections
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Floaters"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Symptomatic",
"Aymptomatic"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSectionDiv = document.getElementById("investigation-checkboxes");
investigationSectionDiv.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Lattice degeneration",
"Retinal hole",
"Retinal operculum",
"Retinal horseshoe break",
"Giant tear",
"Vitreous hemorrhage"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSectionDiv.appendChild(checkbox);
investigationSectionDiv.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSectionDiv = document.getElementById("treatments-checkboxes");
treatmentsSectionDiv.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Laser retinopexy"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSectionDiv.appendChild(checkbox);
treatmentsSectionDiv.appendChild(checkboxLabel);
});
}
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
}
// Add conditions for other clinical findings
}
function populateRRD() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Sectorial visual loss",
"Floaters"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Retinal breaks extending less than two quadrants in the superior retina",
"One or multiple retinal breaks that may involve any quadrants",
"Anterior and inferior retinal breaks",
"Posterior retinal breaks",
"Retinal Dialysis",
"Giant tear"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"PVD",
"Pseudophakic",
"Phakic",
"No PVD",
"PVR"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"PPV",
"Pneumatic retinopexy",
"Scleral Buckle"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
}
// Add conditions for other clinical findings
}
function populateVitreomacularabnormalities() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Less than 20/60 with metamarphopisa"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Vitreomacular traction",
"Epiretinal membrane",
"Pseudohole"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"VMT more than 1500 microns",
"VMT less than 1500 microns",
"Macular detachment",
"ERM",
"Pseudohole"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"PPV",
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
} else if (clinicalFindings === "macular-hole") {
populateMacularHole();
}
// Add conditions for other clinical findings
}
function populateMacularHole() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Moderate visual loss"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Lamellar",
"Stage one",
"Stage two",
"Stage three",
"Stage four"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Macular hole size less than 500 microns",
"Macular hole size more than 500 microns"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"PPV with ILM peeling",
"PPV without ILM peeling",
"PPV with ILM flap"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
} else if (clinicalFindings === "macular-hole") {
populateMacularHole();
} else if (clinicalFindings === "retinitis-pigmentosa") {
populateRetinitisPigmentosa();
}
// Add conditions for other clinical findings
}
function populateRetinitisPigmentosa() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Typical Retinitis pigmentosa",
"Atypical Retinitis pigmentosa",
"Sectorial Retinitis pigmentosa"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Cataract",
"Macular edema",
"Ellipsoid zone disruption"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Vitamin A",
"Dorzolamide",
"Acetazolamide",
"Intravireal steroids",
"Intravitreal anti-VEGF"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
} else if (clinicalFindings === "macular-hole") {
populateMacularHole();
} else if (clinicalFindings === "retinitis-pigmentosa") {
populateRetinitisPigmentosa();
} else if (clinicalFindings === "best-vitelliform-macular-dystrophy") {
populateBestVitelliformMacularDystrophy();
}
// Add conditions for other clinical findings
}
function populateBestVitelliformMacularDystrophy() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Stage one to Stage four Best Vitelliform Macular Dystrophy",
"Stage five Best Vitelliform Macular Dystrophy",
"Best Vitelliform Macular Dystrophy complicated with MNV"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Subretinal vitelliform lesion",
"Empty subretinal space",
"Subretinal hemorrhage",
"Macular atrophy"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Intravitreal anti-VEGF"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
} else if (clinicalFindings === "macular-hole") {
populateMacularHole();
} else if (clinicalFindings === "retinitis-pigmentosa") {
populateRetinitisPigmentosa();
} else if (clinicalFindings === "best-vitelliform-macular-dystrophy") {
populateBestVitelliformMacularDystrophy();
} else if (clinicalFindings === "pattern-dystrophy") {
populatePatternDystrophy();
}
// Add conditions for other clinical findings
}
function populatePatternDystrophy() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Adult-onset Foveomacular Vitelliform Dystrophy",
"Butterfly-shaped Pigment Dystrophy",
"Reticular Dystrophy",
"Multifocal Pattern Dystrophy",
"Central Areolar Choroidal Dystrophy",
"Complicated with MNV"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Subretinal vitelliform lesion",
"Empty subretinal space",
"Subretinal hemorrhage",
"MNV",
"Macular atrophy"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Intravitreal anti-VEGF"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
} else if (clinicalFindings === "macular-hole") {
populateMacularHole();
} else if (clinicalFindings === "retinitis-pigmentosa") {
populateRetinitisPigmentosa();
} else if (clinicalFindings === "best-vitelliform-macular-dystrophy") {
populateBestVitelliformMacularDystrophy();
} else if (clinicalFindings === "pattern-dystrophy") {
populatePatternDystrophy();
} else if (clinicalFindings === "stargardt-disease") {
populateStargardtDisease();
}
// Add conditions for other clinical findings
}
function populateStargardtDisease() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Central visual loss",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Stargardt Disease",
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Ellipsoid zone disruption",
"Macular atrophy",
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateNonComplexRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
} else if (clinicalFindings === "macular-hole") {
populateMacularHole();
} else if (clinicalFindings === "retinitis-pigmentosa") {
populateRetinitisPigmentosa();
} else if (clinicalFindings === "best-vitelliform-macular-dystrophy") {
populateBestVitelliformMacularDystrophy();
} else if (clinicalFindings === "pattern-dystrophy") {
populatePatternDystrophy();
} else if (clinicalFindings === "stargardt-disease") {
populateStargardtDisease();
} else if (clinicalFindings === "x-linked-foveal-retinoschisis") {
populateXLFRetinoschisis();
}
// Add conditions for other clinical findings
}
function populateXLFRetinoschisis() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Central visual loss",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Degenerative Retinoschisis",
"X-linked Foveal Retinoschisis"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Retinoschisis of the inner retinal layers"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Dorzolamide",
"Acetazolamide"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
} else if (clinicalFindings === "macular-hole") {
populateMacularHole();
} else if (clinicalFindings === "retinitis-pigmentosa") {
populateRetinitisPigmentosa();
} else if (clinicalFindings === "best-vitelliform-macular-dystrophy") {
populateBestVitelliformMacularDystrophy();
} else if (clinicalFindings === "pattern-dystrophy") {
populatePatternDystrophy();
} else if (clinicalFindings === "stargardt-disease") {
populateStargardtDisease();
} else if (clinicalFindings === "x-linked-foveal-retinoschisis") {
populateXLFRetinoschisis();
} else if (clinicalFindings === "pseudophakic-cystoid-macular-edema") {
populatePseudophakicCystoidMacularEdema();
}
// Add conditions for other clinical findings
}
function populatePseudophakicCystoidMacularEdema() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"20/20",
"Reduced BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Acute",
"Chronic",
"Associated with vitreomacular abnormalities"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Cystoid Macular Edema",
"Hot disc",
"Flower patel",
"Vitreomacular traction",
"Epiretinal membrane"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"NSAIDs with topical steroids",
"Intravitreal steroids",
"Periocular steroids",
"Intravitreal anti-VEGF",
"PPV"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
} else if (clinicalFindings === "macular-hole") {
populateMacularHole();
} else if (clinicalFindings === "retinitis-pigmentosa") {
populateRetinitisPigmentosa();
} else if (clinicalFindings === "best-vitelliform-macular-dystrophy") {
populateBestVitelliformMacularDystrophy();
} else if (clinicalFindings === "pattern-dystrophy") {
populatePatternDystrophy();
} else if (clinicalFindings === "stargardt-disease") {
populateStargardtDisease();
} else if (clinicalFindings === "x-linked-foveal-retinoschisis") {
populateXLFRetinoschisis();
} else if (clinicalFindings === "pseudophakic-cystoid-macular-edema") {
populatePseudophakicCystoidMacularEdema();
} else if (clinicalFindings === "endophthalmitis") {
populateEndophthalmitis();
}
// Add conditions for other clinical findings
}
function populateEndophthalmitis() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"More than counting fingers",
"Less than counting fingers",
"No light perception"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Acute Endophthalmitis",
"Chronic Endophthalmitis",
"Endogenous Endophthalmitis"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"RD",
"Vitreous abscess"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Intravitreal antibiotics",
"PPV"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
<script>
// Existing code...
function populateSubDropdowns() {
var clinicalFindings = document.getElementById("clinical-findings").value;
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.add("hidden");
classificationSection.classList.add("hidden");
investigationSection.classList.add("hidden");
treatmentsSection.classList.add("hidden");
if (clinicalFindings === "diabetic-retinopathy") {
populateDiabeticRetinopathy();
} else if (clinicalFindings === "retinal-artery-macroaneursums") {
populateRetinalArteryMacroaneursums();
} else if (clinicalFindings === "retinal-vein-occlusion") {
populateRetinalVeinOcclusion();
} else if (clinicalFindings === "retinal-artery-occlusion") {
populateRetinalArteryOcclusion();
} else if (clinicalFindings === "macular-telangiectasia") {
populateMacularTelangiectasia();
} else if (clinicalFindings === "rop") {
populateROP();
} else if (clinicalFindings === "amd") {
populateAMD();
} else if (clinicalFindings === "central-serous-chorioretinopathy") {
populateCentralSerousChorioretinopathy();
} else if (clinicalFindings === "Polypoidal-choroidal-vasculopathy") {
populatePCV();
} else if (clinicalFindings === "pathological-myopia") {
populatePathologicalMyopia();
} else if (clinicalFindings === "pvd") {
populatepvd();
} else if (clinicalFindings === "rrd") {
populateRRD();
} else if (clinicalFindings === "vitreomacular-abnormalities") {
populateVitreomacularabnormalities();
} else if (clinicalFindings === "macular-hole") {
populateMacularHole();
} else if (clinicalFindings === "retinitis-pigmentosa") {
populateRetinitisPigmentosa();
} else if (clinicalFindings === "best-vitelliform-macular-dystrophy") {
populateBestVitelliformMacularDystrophy();
} else if (clinicalFindings === "pattern-dystrophy") {
populatePatternDystrophy();
} else if (clinicalFindings === "stargardt-disease") {
populateStargardtDisease();
} else if (clinicalFindings === "x-linked-foveal-retinoschisis") {
populateXLFRetinoschisis();
} else if (clinicalFindings === "pseudophakic-cystoid-macular-edema") {
populatePseudophakicCystoidMacularEdema();
} else if (clinicalFindings === "endophthalmitis") {
populateEndophthalmitis();
} else if (clinicalFindings === "posterior-segment-trauma") {
populatePosteriorSegmentTrauma();
}
// Add conditions for other clinical findings
}
function populatePosteriorSegmentTrauma() {
var bcvaSection = document.getElementById("bcva-section");
var classificationSection = document.getElementById("classification-section");
var investigationSection = document.getElementById("investigation-section");
var treatmentsSection = document.getElementById("treatments-section");
bcvaSection.classList.remove("hidden");
classificationSection.classList.remove("hidden");
investigationSection.classList.remove("hidden");
treatmentsSection.classList.remove("hidden");
// Populate BCVA dropdown
var bcvaDropdown = document.getElementById("bcva");
bcvaDropdown.innerHTML = ""; // Clear previous options
var bcvaOptions = [
"Good BCVA",
"Poor BCVA"
];
bcvaOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
bcvaDropdown.appendChild(opt);
});
// Populate Classification dropdown
var classificationDropdown = document.getElementById("classification");
classificationDropdown.innerHTML = ""; // Clear previous options
var classificationOptions = [
"Closed globe trauma",
"Penetrating injury",
"Perforating injury"
];
classificationOptions.forEach(function(option) {
var opt = document.createElement("option");
opt.value = option;
opt.innerHTML = option;
classificationDropdown.appendChild(opt);
});
// Populate Investigation Findings checkboxes
var investigationSection = document.getElementById("investigation-checkboxes");
investigationSection.innerHTML = ""; // Clear previous checkboxes
var investigationLabels = [
"Not available",
"Commotio retinae",
"Choroidal rupture",
"Intraocular foreign body",
"Vitreous hemorrhage",
"Retinal Break",
"RD",
"Traumatic Macular hole",
"MNV"
];
investigationLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "investigations";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
investigationSection.appendChild(checkbox);
investigationSection.appendChild(checkboxLabel);
});
// Populate Previous Treatments checkboxes
var treatmentsSection = document.getElementById("treatments-checkboxes");
treatmentsSection.innerHTML = ""; // Clear previous checkboxes
var treatmentsLabels = [
"No previous treatment",
"Intravitreal antibiotics",
"PPV",
"Laser retinopexy",
"Intravitreal anti-VEGF"
];
treatmentsLabels.forEach(function(label) {
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.name = "treatments";
checkbox.value = label;
var checkboxLabel = document.createElement("label");
checkboxLabel.innerHTML = label;
checkboxLabel.appendChild(document.createElement("br"));
treatmentsSection.appendChild(checkbox);
treatmentsSection.appendChild(checkboxLabel);
});
}
// Existing code...
</script>
</body>
</html>