Filter and select codes by priority
Users can bulk-select codes based on their priority level. The system extracts unique priority values from the loaded CSV data to populate a dropdown menu, which then triggers a selection process for all matching codes.
function selectCodesByPriority(prioVal) {
if (!prioVal) return;
allCodes.forEach(code => {
const d = dataMap[code];
if (d && String(d.codesPriority).trim() === String(prioVal).trim()) {
selectedCodes.add(code);
document.getElementById(getCodeElId(code))?.classList.add('active-code');
}
});
updateSelectedCodes();
document.getElementById('prioritySelectDropdown').value = '';
}