From 1a98b8203dbb8548598119bb633a093b7e900380 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Mon, 23 Feb 2026 13:10:42 -0500 Subject: [PATCH 01/16] match annotations to sources for filtering --- previewers/betatest/js/refiqdacore.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/previewers/betatest/js/refiqdacore.js b/previewers/betatest/js/refiqdacore.js index 8d40f2a..45c56f0 100644 --- a/previewers/betatest/js/refiqdacore.js +++ b/previewers/betatest/js/refiqdacore.js @@ -298,12 +298,12 @@ function parseData2(data) { guid = pdfSel.getAttribute("guid"); codes = getCodeNames(pdfSel); // Codes are on the PDF selection + let sourceGuid = source.getAttribute("guid"); + selectionMatches = sourceMatches + pdfSel.getAttribute("creatingUser") + pdfSel.getAttribute("modifyingUser") + textSel.getAttribute("creatingUser") + textSel.getAttribute("modifyingUser") + - getCodeRelatedGUIDs(pdfSel); - - let sourceGuid = source.getAttribute("guid"); + getCodeRelatedGUIDs(pdfSel) + sourceGuid; displayName = createMergedSelectionWithTooltip(selectionName, pdfSel, textSel, sourceGuid); @@ -312,9 +312,10 @@ function parseData2(data) { let selectionName = selection.getAttribute("name"); guid = selection.getAttribute("guid"); codes = getCodeNames(selection); - selectionMatches = sourceMatches + selection.getAttribute("creatingUser") + selection.getAttribute("modifyingUser") + getCodeRelatedGUIDs(selection); - let sourceGuid = source.getAttribute("guid"); + + selectionMatches = sourceMatches + selection.getAttribute("creatingUser") + selection.getAttribute("modifyingUser") + getCodeRelatedGUIDs(selection) + sourceGuid; + displayName = selectionName; // Default display name if (selection.nodeName === "PDFSelection") { From 4d063cbdef1e0caf1e5331e251f5decefdfeb9a0 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Mon, 23 Feb 2026 13:37:50 -0500 Subject: [PATCH 02/16] fix label spacing --- previewers/betatest/css/refiqdas.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/previewers/betatest/css/refiqdas.css b/previewers/betatest/css/refiqdas.css index caeea1e..8170c27 100644 --- a/previewers/betatest/css/refiqdas.css +++ b/previewers/betatest/css/refiqdas.css @@ -63,4 +63,8 @@ .tooltip-text { margin-top: 5px; +} + +.label { + margin-left:5px; } \ No newline at end of file From 4d6c85d7c99a4d42663dc9653f4b52dd4d1fd548 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Mon, 23 Feb 2026 17:11:44 -0500 Subject: [PATCH 03/16] handle no creating user on notes --- previewers/betatest/js/refiqdacore.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/previewers/betatest/js/refiqdacore.js b/previewers/betatest/js/refiqdacore.js index 45c56f0..7af9008 100644 --- a/previewers/betatest/js/refiqdacore.js +++ b/previewers/betatest/js/refiqdacore.js @@ -447,14 +447,21 @@ function parseData2(data) { desc = desc[0].childNodes[0]; } let matches = ''; - if (note.getAttribute("creatingUser")) { - matches = matches + note.getAttribute("creatingUser"); + let name = ''; + let user = note.getAttribute("creatingUser"); + if (user) { + matches = matches + user; + name = userMap.get(user).getAttribute("name"); } - if (note.getAttribute("modifyingUser")) { - matches = matches + note.getAttribute("modifyingUser"); + user = note.getAttribute("modifyingUser"); + if (user) { + matches = matches + user; + if(name === '') { + name = userMap.get(user).getAttribute("name"); + } } - let tr = addRow(noteTable, note.getAttribute("name"), ptc, desc, userMap.get(note.getAttribute("creatingUser")).getAttribute("name")); + let tr = addRow(noteTable, note.getAttribute("name"), ptc, desc, name); tr.attr('data-guid', note.getAttribute("guid")); tr.attr('data-matches', matches); From ff15e2799dcd3e202ca7f3b51b6ecf875259b975 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Tue, 24 Feb 2026 10:10:38 -0500 Subject: [PATCH 04/16] multiple names in notes, new case vs var table, ; sep for set codes --- previewers/betatest/js/refiqdacore.js | 84 +++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/previewers/betatest/js/refiqdacore.js b/previewers/betatest/js/refiqdacore.js index 7af9008..da0f804 100644 --- a/previewers/betatest/js/refiqdacore.js +++ b/previewers/betatest/js/refiqdacore.js @@ -448,18 +448,26 @@ function parseData2(data) { } let matches = ''; let name = ''; - let user = note.getAttribute("creatingUser"); - if (user) { - matches = matches + user; - name = userMap.get(user).getAttribute("name"); + let creatingUserGuid = note.getAttribute("creatingUser"); + let modifyingUserGuid = note.getAttribute("modifyingUser"); + let userNames = new Set(); + + if (creatingUserGuid) { + matches += creatingUserGuid; + let user = userMap.get(creatingUserGuid); + if (user) { + userNames.add(user.getAttribute("name")); + } } - user = note.getAttribute("modifyingUser"); - if (user) { - matches = matches + user; - if(name === '') { - name = userMap.get(user).getAttribute("name"); + + if (modifyingUserGuid) { + matches += modifyingUserGuid; + let user = userMap.get(modifyingUserGuid); + if (user) { + userNames.add(user.getAttribute("name")); } } + name = Array.from(userNames).join(', '); let tr = addRow(noteTable, note.getAttribute("name"), ptc, desc, name); tr.attr('data-guid', note.getAttribute("guid")); @@ -476,6 +484,62 @@ function parseData2(data) { tables.push(noteDataTable); } + let variables = xmlDoc.getElementsByTagName("Variable"); + let cases = xmlDoc.getElementsByTagName("Case"); + + if (variables.length > 0 && cases.length > 0) { + let variableMap = new Map(); + let variableHeaders = ["Source"]; // First column is the source document + + for (let variable of variables) { + let guid = variable.getAttribute("guid"); + let name = variable.getAttribute("name"); + // Store the variable name and its column index in the table + variableMap.set(guid, { name: name, index: variableHeaders.length }); + variableHeaders.push(name); + } + + let caseBlock = $('
').width(tableWidth).appendTo($(".preview")); + caseBlock.append($("

").html("Cases")); + let caseTable = createTable("Cases", ...variableHeaders).appendTo(caseBlock); + caseTable.addClass("casetable compact stripe"); + + for (let caseNode of cases) { + let rowData = new Array(variableHeaders.length).fill(""); // Initialize row with empty strings + + // Find the source document for the case + let sourceRef = caseNode.getElementsByTagName("SourceRef")[0]; + if (sourceRef) { + let sourceGuid = sourceRef.getAttribute("targetGUID"); + let source = sourceMap.get(sourceGuid); + if (source) { + rowData[0] = createSourceReference(source, zipUrl); + } + } + + // Populate variable values for the case + let variableValues = caseNode.getElementsByTagName("VariableValue"); + for (let varValue of variableValues) { + let varRef = varValue.getElementsByTagName("VariableRef")[0]; + let textValue = varValue.getElementsByTagName("TextValue")[0]; + if (varRef && textValue) { + let varGuid = varRef.getAttribute("targetGUID"); + let variableInfo = variableMap.get(varGuid); + if (variableInfo) { + rowData[variableInfo.index] = textValue.textContent; + } + } + } + addRow(caseTable, ...rowData); + } + + // Initialize DataTable for cases, but don't add to filterable tables + new DataTable(".casetable", { + select: false // This table should not be selectable + }); + } + + let sets = xmlDoc.getElementsByTagName("Set"); if (sets != null && sets.length > 0) { $('#filterby').append($('