From ddc0eeeb57a0a104b9cedd6285054bf751305141 Mon Sep 17 00:00:00 2001
From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com>
Date: Fri, 6 Dec 2024 08:38:27 -0500
Subject: [PATCH 1/3] Update `app-feature-1` JSONs
---
R/mod_review_forms.R | 1 -
.../app_feature_01/app-feature-1-002.json | 214 +++++++++-
.../app_feature_01/app-feature-1-003.json | 214 +++++++++-
.../app_feature_01/app-feature-1-004.json | 394 ++++++++++++++++--
.../app_feature_01/app-feature-1-005.json | 292 +++++++++++--
5 files changed, 1014 insertions(+), 101 deletions(-)
diff --git a/R/mod_review_forms.R b/R/mod_review_forms.R
index 2275a1e4..b9c5c147 100644
--- a/R/mod_review_forms.R
+++ b/R/mod_review_forms.R
@@ -125,7 +125,6 @@ mod_review_forms_server <- function(
observe({
req(session$userData$review_records[[active_form()]])
- # browser()
review_status <-
review_data_active()[,c("id", "reviewed")] |>
dplyr::rows_update(session$userData$review_records[[active_form()]][,c("id", "reviewed")], by = "id") |>
diff --git a/tests/testthat/_snaps/app_feature_01/app-feature-1-002.json b/tests/testthat/_snaps/app_feature_01/app-feature-1-002.json
index 39fd69f7..5861e600 100644
--- a/tests/testthat/_snaps/app_feature_01/app-feature-1-002.json
+++ b/tests/testthat/_snaps/app_feature_01/app-feature-1-002.json
@@ -9,6 +9,50 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ]
+ ],
"container": "
\n \n \n | Review Status<\/th>\n | N<\/th>\n | Name<\/th>\n | AESI<\/th>\n | Start date<\/th>\n | End date<\/th>\n | CTCAE severity<\/th>\n | Treatment related<\/th>\n | Treatment action<\/th>\n | Other action<\/th>\n | Category<\/th>\n | Awareness date<\/th>\n | Date of death<\/th>\n | Death reason<\/th>\n <\/tr>\n <\/thead>\n<\/table>",
"options": {
"scrollY": 400,
@@ -21,7 +65,7 @@
"columnDefs": [
{
"targets": 0,
- "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nreturn ``;\n}"
+ "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nvar updated = data.updated;\nreturn ``;\n}"
},
{
"className": "dt-right",
@@ -91,15 +135,9 @@
],
"autoWidth": false,
- "orderClasses": false,
- "ajax": {
- "type": "POST",
- "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
- },
- "serverSide": true,
- "processing": true
+ "orderClasses": false
},
- "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
+ "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\ncell.data().updated = review;\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
"selection": {
"mode": "none",
"selected": null,
@@ -111,7 +149,6 @@
"options.columnDefs.0.render",
"options.createdRow",
"options.initComplete",
- "options.ajax.data",
"callback"
],
"jsHooks": [
@@ -256,6 +293,150 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+ {
+ "reviewed": false,
+ "ids": [
+ 2195,
+ 2196,
+ 2197,
+ 2198,
+ 2199,
+ 2200,
+ 2201,
+ 2202,
+ 2235
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2203,
+ 2204,
+ 2205,
+ 2206,
+ 2207,
+ 2208,
+ 2209,
+ 2210,
+ 2236
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2211,
+ 2212,
+ 2213,
+ 2214,
+ 2215,
+ 2216,
+ 2217,
+ 2218,
+ 2237
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2219,
+ 2220,
+ 2221,
+ 2222,
+ 2223,
+ 2224,
+ 2225,
+ 2226,
+ 2238
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2227,
+ 2228,
+ 2229,
+ 2230,
+ 2231,
+ 2232,
+ 2233,
+ 2234,
+ 2239
+ ]
+ }
+ ],
+ [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
+ [
+ "Hypotension*<\/b>",
+ "Atrial Fibrillation*<\/b>",
+ "Tachycardia*<\/b>",
+ "Urinary Tract Infection*<\/b>",
+ "Atrial Fibrillation*<\/b>"
+ ],
+ [
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>"
+ ],
+ [
+ "2023-07-07*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-08-16*<\/b>"
+ ],
+ [
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ [
+ "Grade 1*<\/b>",
+ "Grade 2*<\/b>",
+ "Grade 2*<\/b>",
+ "Grade 1*<\/b>",
+ "Grade 2*<\/b>"
+ ],
+ [
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>"
+ ],
+ [
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>"
+ ],
+ [
+ "None*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>"
+ ],
+ [
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>"
+ ]
+ ],
"container": "\n \n \n | Review Status<\/th>\n | N<\/th>\n | Name<\/th>\n | AESI<\/th>\n | start date<\/th>\n | end date<\/th>\n | CTCAE severity<\/th>\n | Treatment related<\/th>\n | Treatment action<\/th>\n | Other action<\/th>\n | Serious Adverse Event<\/th>\n <\/tr>\n <\/thead>\n<\/table>",
"options": {
"scrollY": 400,
@@ -268,7 +449,7 @@
"columnDefs": [
{
"targets": 0,
- "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nreturn ``;\n}"
+ "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nvar updated = data.updated;\nreturn ``;\n}"
},
{
"className": "dt-right",
@@ -333,15 +514,9 @@
],
"autoWidth": false,
- "orderClasses": false,
- "ajax": {
- "type": "POST",
- "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
- },
- "serverSide": true,
- "processing": true
+ "orderClasses": false
},
- "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
+ "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\ncell.data().updated = review;\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
"selection": {
"mode": "none",
"selected": null,
@@ -353,7 +528,6 @@
"options.columnDefs.0.render",
"options.createdRow",
"options.initComplete",
- "options.ajax.data",
"callback"
],
"jsHooks": [
diff --git a/tests/testthat/_snaps/app_feature_01/app-feature-1-003.json b/tests/testthat/_snaps/app_feature_01/app-feature-1-003.json
index 653561cc..3f127320 100644
--- a/tests/testthat/_snaps/app_feature_01/app-feature-1-003.json
+++ b/tests/testthat/_snaps/app_feature_01/app-feature-1-003.json
@@ -9,6 +9,50 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ]
+ ],
"container": "\n \n \n | Review Status<\/th>\n | N<\/th>\n | Name<\/th>\n | AESI<\/th>\n | Start date<\/th>\n | End date<\/th>\n | CTCAE severity<\/th>\n | Treatment related<\/th>\n | Treatment action<\/th>\n | Other action<\/th>\n | Category<\/th>\n | Awareness date<\/th>\n | Date of death<\/th>\n | Death reason<\/th>\n <\/tr>\n <\/thead>\n<\/table>",
"options": {
"scrollY": 400,
@@ -21,7 +65,7 @@
"columnDefs": [
{
"targets": 0,
- "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nreturn ``;\n}"
+ "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nvar updated = data.updated;\nreturn ``;\n}"
},
{
"className": "dt-right",
@@ -91,15 +135,9 @@
],
"autoWidth": false,
- "orderClasses": false,
- "ajax": {
- "type": "POST",
- "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
- },
- "serverSide": true,
- "processing": true
+ "orderClasses": false
},
- "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
+ "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\ncell.data().updated = review;\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
"selection": {
"mode": "none",
"selected": null,
@@ -111,7 +149,6 @@
"options.columnDefs.0.render",
"options.createdRow",
"options.initComplete",
- "options.ajax.data",
"callback"
],
"jsHooks": [
@@ -256,6 +293,150 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+ {
+ "reviewed": false,
+ "ids": [
+ 2195,
+ 2196,
+ 2197,
+ 2198,
+ 2199,
+ 2200,
+ 2201,
+ 2202,
+ 2235
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2203,
+ 2204,
+ 2205,
+ 2206,
+ 2207,
+ 2208,
+ 2209,
+ 2210,
+ 2236
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2211,
+ 2212,
+ 2213,
+ 2214,
+ 2215,
+ 2216,
+ 2217,
+ 2218,
+ 2237
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2219,
+ 2220,
+ 2221,
+ 2222,
+ 2223,
+ 2224,
+ 2225,
+ 2226,
+ 2238
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2227,
+ 2228,
+ 2229,
+ 2230,
+ 2231,
+ 2232,
+ 2233,
+ 2234,
+ 2239
+ ]
+ }
+ ],
+ [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
+ [
+ "Hypotension*<\/b>",
+ "Atrial Fibrillation*<\/b>",
+ "Tachycardia*<\/b>",
+ "Urinary Tract Infection*<\/b>",
+ "Atrial Fibrillation*<\/b>"
+ ],
+ [
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>"
+ ],
+ [
+ "2023-07-07*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-08-16*<\/b>"
+ ],
+ [
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ [
+ "Grade 1*<\/b>",
+ "Grade 2*<\/b>",
+ "Grade 2*<\/b>",
+ "Grade 1*<\/b>",
+ "Grade 2*<\/b>"
+ ],
+ [
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>"
+ ],
+ [
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>"
+ ],
+ [
+ "None*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>"
+ ],
+ [
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>"
+ ]
+ ],
"container": "\n \n \n | Review Status<\/th>\n | N<\/th>\n | Name<\/th>\n | AESI<\/th>\n | start date<\/th>\n | end date<\/th>\n | CTCAE severity<\/th>\n | Treatment related<\/th>\n | Treatment action<\/th>\n | Other action<\/th>\n | Serious Adverse Event<\/th>\n <\/tr>\n <\/thead>\n<\/table>",
"options": {
"scrollY": 400,
@@ -268,7 +449,7 @@
"columnDefs": [
{
"targets": 0,
- "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nreturn ``;\n}"
+ "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nvar updated = data.updated;\nreturn ``;\n}"
},
{
"className": "dt-right",
@@ -333,15 +514,9 @@
],
"autoWidth": false,
- "orderClasses": false,
- "ajax": {
- "type": "POST",
- "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
- },
- "serverSide": true,
- "processing": true
+ "orderClasses": false
},
- "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
+ "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\ncell.data().updated = review;\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
"selection": {
"mode": "none",
"selected": null,
@@ -353,7 +528,6 @@
"options.columnDefs.0.render",
"options.createdRow",
"options.initComplete",
- "options.ajax.data",
"callback"
],
"jsHooks": [
diff --git a/tests/testthat/_snaps/app_feature_01/app-feature-1-004.json b/tests/testthat/_snaps/app_feature_01/app-feature-1-004.json
index bbbd9ca2..c6551b79 100644
--- a/tests/testthat/_snaps/app_feature_01/app-feature-1-004.json
+++ b/tests/testthat/_snaps/app_feature_01/app-feature-1-004.json
@@ -9,6 +9,50 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ]
+ ],
"container": "\n \n \n | Review Status<\/th>\n | N<\/th>\n | Name<\/th>\n | AESI<\/th>\n | Start date<\/th>\n | End date<\/th>\n | CTCAE severity<\/th>\n | Treatment related<\/th>\n | Treatment action<\/th>\n | Other action<\/th>\n | Category<\/th>\n | Awareness date<\/th>\n | Date of death<\/th>\n | Death reason<\/th>\n <\/tr>\n <\/thead>\n<\/table>",
"options": {
"scrollY": 400,
@@ -21,7 +65,7 @@
"columnDefs": [
{
"targets": 0,
- "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nreturn ``;\n}"
+ "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nvar updated = data.updated;\nreturn ``;\n}"
},
{
"className": "dt-right",
@@ -91,15 +135,9 @@
],
"autoWidth": false,
- "orderClasses": false,
- "ajax": {
- "type": "POST",
- "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
- },
- "serverSide": true,
- "processing": true
+ "orderClasses": false
},
- "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
+ "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\ncell.data().updated = review;\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
"selection": {
"mode": "none",
"selected": null,
@@ -111,7 +149,6 @@
"options.columnDefs.0.render",
"options.createdRow",
"options.initComplete",
- "options.ajax.data",
"callback"
],
"jsHooks": [
@@ -256,6 +293,150 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+ {
+ "reviewed": false,
+ "ids": [
+ 2195,
+ 2196,
+ 2197,
+ 2198,
+ 2199,
+ 2200,
+ 2201,
+ 2202,
+ 2235
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2203,
+ 2204,
+ 2205,
+ 2206,
+ 2207,
+ 2208,
+ 2209,
+ 2210,
+ 2236
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2211,
+ 2212,
+ 2213,
+ 2214,
+ 2215,
+ 2216,
+ 2217,
+ 2218,
+ 2237
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2219,
+ 2220,
+ 2221,
+ 2222,
+ 2223,
+ 2224,
+ 2225,
+ 2226,
+ 2238
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2227,
+ 2228,
+ 2229,
+ 2230,
+ 2231,
+ 2232,
+ 2233,
+ 2234,
+ 2239
+ ]
+ }
+ ],
+ [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
+ [
+ "Hypotension*<\/b>",
+ "Atrial Fibrillation*<\/b>",
+ "Tachycardia*<\/b>",
+ "Urinary Tract Infection*<\/b>",
+ "Atrial Fibrillation*<\/b>"
+ ],
+ [
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>"
+ ],
+ [
+ "2023-07-07*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-08-16*<\/b>"
+ ],
+ [
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ [
+ "Grade 1*<\/b>",
+ "Grade 2*<\/b>",
+ "Grade 2*<\/b>",
+ "Grade 1*<\/b>",
+ "Grade 2*<\/b>"
+ ],
+ [
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>"
+ ],
+ [
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>"
+ ],
+ [
+ "None*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>"
+ ],
+ [
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>"
+ ]
+ ],
"container": "\n \n \n | Review Status<\/th>\n | N<\/th>\n | Name<\/th>\n | AESI<\/th>\n | start date<\/th>\n | end date<\/th>\n | CTCAE severity<\/th>\n | Treatment related<\/th>\n | Treatment action<\/th>\n | Other action<\/th>\n | Serious Adverse Event<\/th>\n <\/tr>\n <\/thead>\n<\/table>",
"options": {
"scrollY": 400,
@@ -268,7 +449,7 @@
"columnDefs": [
{
"targets": 0,
- "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nreturn ``;\n}"
+ "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nvar updated = data.updated;\nreturn ``;\n}"
},
{
"className": "dt-right",
@@ -333,15 +514,9 @@
],
"autoWidth": false,
- "orderClasses": false,
- "ajax": {
- "type": "POST",
- "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
- },
- "serverSide": true,
- "processing": true
+ "orderClasses": false
},
- "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
+ "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\ncell.data().updated = review;\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
"selection": {
"mode": "none",
"selected": null,
@@ -353,7 +528,6 @@
"options.columnDefs.0.render",
"options.createdRow",
"options.initComplete",
- "options.ajax.data",
"callback"
],
"jsHooks": [
@@ -8345,6 +8519,173 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+ {
+ "reviewed": false,
+ "ids": [
+ 1217,
+ 1218,
+ 1219,
+ 1220,
+ 1221,
+ 1222,
+ 1223,
+ 1441
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 1224,
+ 1225,
+ 1226,
+ 1227,
+ 1228,
+ 1229,
+ 1230,
+ 1442
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 1231,
+ 1232,
+ 1233,
+ 1234,
+ 1235
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 1236,
+ 1237,
+ 1238,
+ 1239,
+ 1240,
+ 1241,
+ 1242,
+ 1443
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 1243,
+ 1244,
+ 1245,
+ 1246,
+ 1247
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 1248,
+ 1249,
+ 1250,
+ 1251,
+ 1252,
+ 1253,
+ 1254,
+ 1444
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 1255,
+ 1256,
+ 1257,
+ 1258,
+ 1259
+ ]
+ }
+ ],
+ [
+ "Screening",
+ "Visit 1",
+ "Visit 2",
+ "Visit 3",
+ "Visit 4",
+ "Visit 5",
+ "Visit 6"
+ ],
+ [
+ "131*<\/b> mmHg",
+ "132*<\/b> mmHg",
+ "129*<\/b> mmHg",
+ "117*<\/b> mmHg",
+ "128*<\/b> mmHg",
+ "137*<\/b> mmHg",
+ "131*<\/b> mmHg"
+ ],
+ [
+ "68*<\/b> mmHg",
+ "79*<\/b> mmHg",
+ "73*<\/b> mmHg",
+ "77*<\/b> mmHg",
+ "62*<\/b> mmHg",
+ "76*<\/b> mmHg",
+ "61*<\/b> mmHg"
+ ],
+ [
+ "76*<\/b> beats/min",
+ "63*<\/b> beats/min",
+ "73*<\/b> beats/min",
+ "70*<\/b> beats/min",
+ "70*<\/b> beats/min",
+ "75*<\/b> beats/min",
+ "72*<\/b> beats/min"
+ ],
+ [
+ "17*<\/b> breaths/min",
+ "16*<\/b> breaths/min",
+ "16*<\/b> breaths/min",
+ "18*<\/b> breaths/min",
+ "18*<\/b> breaths/min",
+ "18*<\/b> breaths/min",
+ "19*<\/b> breaths/min"
+ ],
+ [
+ "37*<\/b> °C",
+ "36.7*<\/b> °C",
+ "36.9*<\/b> °C",
+ "36*<\/b> °C",
+ "36.6*<\/b> °C",
+ "36.1*<\/b> °C",
+ "36.9*<\/b> °C"
+ ],
+ [
+ "0.01*<\/b> %",
+ "2*<\/b> %",
+ null,
+ "0.01*<\/b> %",
+ null,
+ "0.01*<\/b> %",
+ null
+ ],
+ [
+ "17.44*<\/b> kg/m2",
+ "17.1*<\/b> kg/m2",
+ null,
+ "17.1*<\/b> kg/m2",
+ null,
+ "24.13*<\/b> kg/m2",
+ null
+ ],
+ [
+ "61*<\/b> kg",
+ "62*<\/b> kg",
+ null,
+ "50*<\/b> kg",
+ null,
+ "50*<\/b> kg",
+ null
+ ]
+ ],
"container": "\n \n \n | Review Status<\/th>\n | Event<\/th>\n | Systolic blood pressure<\/th>\n | Diastolic blood pressure<\/th>\n | Pulse<\/th>\n | Resp<\/th>\n | Temperature<\/th>\n | Weight change since screening<\/th>\n | BMI<\/th>\n | Weight<\/th>\n <\/tr>\n <\/thead>\n<\/table>",
"options": {
"scrollY": 400,
@@ -8357,7 +8698,7 @@
"columnDefs": [
{
"targets": 0,
- "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nreturn ``;\n}"
+ "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nvar updated = data.updated;\nreturn ``;\n}"
},
{
"name": "Review Status",
@@ -8414,15 +8755,9 @@
],
"autoWidth": false,
- "orderClasses": false,
- "ajax": {
- "type": "POST",
- "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
- },
- "serverSide": true,
- "processing": true
+ "orderClasses": false
},
- "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
+ "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\ncell.data().updated = review;\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
"selection": {
"mode": "none",
"selected": null,
@@ -8434,7 +8769,6 @@
"options.columnDefs.0.render",
"options.createdRow",
"options.initComplete",
- "options.ajax.data",
"callback"
],
"jsHooks": [
diff --git a/tests/testthat/_snaps/app_feature_01/app-feature-1-005.json b/tests/testthat/_snaps/app_feature_01/app-feature-1-005.json
index 4308e08c..4ad1f051 100644
--- a/tests/testthat/_snaps/app_feature_01/app-feature-1-005.json
+++ b/tests/testthat/_snaps/app_feature_01/app-feature-1-005.json
@@ -9,6 +9,50 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ]
+ ],
"container": "\n \n \n | Review Status<\/th>\n | N<\/th>\n | Name<\/th>\n | AESI<\/th>\n | Start date<\/th>\n | End date<\/th>\n | CTCAE severity<\/th>\n | Treatment related<\/th>\n | Treatment action<\/th>\n | Other action<\/th>\n | Category<\/th>\n | Awareness date<\/th>\n | Date of death<\/th>\n | Death reason<\/th>\n <\/tr>\n <\/thead>\n<\/table>",
"options": {
"scrollY": 400,
@@ -21,7 +65,7 @@
"columnDefs": [
{
"targets": 0,
- "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nreturn ``;\n}"
+ "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nvar updated = data.updated;\nreturn ``;\n}"
},
{
"className": "dt-right",
@@ -91,15 +135,9 @@
],
"autoWidth": false,
- "orderClasses": false,
- "ajax": {
- "type": "POST",
- "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
- },
- "serverSide": true,
- "processing": true
+ "orderClasses": false
},
- "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
+ "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\ncell.data().updated = review;\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
"selection": {
"mode": "none",
"selected": null,
@@ -111,7 +149,6 @@
"options.columnDefs.0.render",
"options.createdRow",
"options.initComplete",
- "options.ajax.data",
"callback"
],
"jsHooks": [
@@ -256,6 +293,150 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+ {
+ "reviewed": false,
+ "ids": [
+ 2195,
+ 2196,
+ 2197,
+ 2198,
+ 2199,
+ 2200,
+ 2201,
+ 2202,
+ 2235
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2203,
+ 2204,
+ 2205,
+ 2206,
+ 2207,
+ 2208,
+ 2209,
+ 2210,
+ 2236
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2211,
+ 2212,
+ 2213,
+ 2214,
+ 2215,
+ 2216,
+ 2217,
+ 2218,
+ 2237
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2219,
+ 2220,
+ 2221,
+ 2222,
+ 2223,
+ 2224,
+ 2225,
+ 2226,
+ 2238
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 2227,
+ 2228,
+ 2229,
+ 2230,
+ 2231,
+ 2232,
+ 2233,
+ 2234,
+ 2239
+ ]
+ }
+ ],
+ [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
+ [
+ "Hypotension*<\/b>",
+ "Atrial Fibrillation*<\/b>",
+ "Tachycardia*<\/b>",
+ "Urinary Tract Infection*<\/b>",
+ "Atrial Fibrillation*<\/b>"
+ ],
+ [
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>",
+ "None*<\/b>"
+ ],
+ [
+ "2023-07-07*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-07-05*<\/b>",
+ "2023-08-16*<\/b>"
+ ],
+ [
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ [
+ "Grade 1*<\/b>",
+ "Grade 2*<\/b>",
+ "Grade 2*<\/b>",
+ "Grade 1*<\/b>",
+ "Grade 2*<\/b>"
+ ],
+ [
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>",
+ "Not related*<\/b>"
+ ],
+ [
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>",
+ "Not Applicable*<\/b>"
+ ],
+ [
+ "None*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>",
+ "Concomitant therapy/medication*<\/b>"
+ ],
+ [
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>",
+ "No*<\/b>"
+ ]
+ ],
"container": "\n \n \n | Review Status<\/th>\n | N<\/th>\n | Name<\/th>\n | AESI<\/th>\n | start date<\/th>\n | end date<\/th>\n | CTCAE severity<\/th>\n | Treatment related<\/th>\n | Treatment action<\/th>\n | Other action<\/th>\n | Serious Adverse Event<\/th>\n <\/tr>\n <\/thead>\n<\/table>",
"options": {
"scrollY": 400,
@@ -268,7 +449,7 @@
"columnDefs": [
{
"targets": 0,
- "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nreturn ``;\n}"
+ "render": "function(data, type, row, meta) {\nvar reviewed = data.reviewed;\nvar updated = data.updated;\nreturn ``;\n}"
},
{
"className": "dt-right",
@@ -333,15 +514,9 @@
],
"autoWidth": false,
- "orderClasses": false,
- "ajax": {
- "type": "POST",
- "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
- },
- "serverSide": true,
- "processing": true
+ "orderClasses": false
},
- "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
+ "callback": "function(table) {\ntable.on('click', 'input[type=\"checkbox\"]', function(){\nvar tblId = $(this).closest('.datatables').attr('id');\nvar cell = table.cell($(this).closest('td'));\nvar rowIdx = table.row($(this).closest('tr')).index();\nvar ids = cell.data().ids;\nvar review = $(this).is(':indeterminate') ? null : $(this).is(':checked');\ncell.data().updated = review;\nvar info = {review: review, ids: ids, row: tblId + '_row_' + rowIdx};\nShiny.setInputValue(tblId + '_review_selection:CS.reviewInfo', info);\n})\n}",
"selection": {
"mode": "none",
"selected": null,
@@ -353,7 +528,6 @@
"options.columnDefs.0.render",
"options.createdRow",
"options.initComplete",
- "options.ajax.data",
"callback"
],
"jsHooks": [
@@ -8346,6 +8520,71 @@
"Scroller",
"ColReorder"
],
+ "data": [
+ [
+ {
+ "reviewed": false,
+ "ids": [
+ 598,
+ 599,
+ 600,
+ 601,
+ 602,
+ 603,
+ 604,
+ 1423
+ ]
+ },
+ {
+ "reviewed": false,
+ "ids": [
+ 605,
+ 606,
+ 607,
+ 608,
+ 609,
+ 610,
+ 1424
+ ]
+ }
+ ],
+ [
+ "Screening",
+ "Visit 1"
+ ],
+ [
+ "133*<\/b> mmHg",
+ "115*<\/b> mmHg"
+ ],
+ [
+ "69*<\/b> mmHg",
+ "62*<\/b> mmHg"
+ ],
+ [
+ "56*<\/b> beats/min",
+ "84*<\/b> beats/min"
+ ],
+ [
+ "18*<\/b> breaths/min",
+ null
+ ],
+ [
+ "37*<\/b> °C",
+ "36.6*<\/b> °C"
+ ],
+ [
+ "0.01*<\/b> %",
+ " | | | | | | | | |