From 57fe9ccb8c3a516d3b02be9e7e3d962d76fdcf10 Mon Sep 17 00:00:00 2001 From: dert1129 Date: Wed, 13 Nov 2024 13:09:45 -0500 Subject: [PATCH] inital implementation of filters --- src/App.js | 40 ++++- .../SpatialViewer/Facets/AllFacets.js | 143 +++++++++++++++++- 2 files changed, 175 insertions(+), 8 deletions(-) diff --git a/src/App.js b/src/App.js index 66afac7..d62bb6c 100755 --- a/src/App.js +++ b/src/App.js @@ -53,14 +53,36 @@ store.subscribe(saveState); const connector = new AppSearchAPIConnector({ searchKey: process.env.REACT_APP_SEARCH_KEY, engineName: "spatial-viewer", - endpointBase: "/spatial-viewer/search", + endpointBase: process.env.REACT_APP_SEARCH_ENDPOINT, cacheResponses: false }) const searchConfig = { apiConnector: connector, searchQuery: { - disjunctiveFacets: ["sex", "age", "redcapid", "enrollmentcategory", "imagetype", "datatype", "configtype", "level", "releaseversion"], + disjunctiveFacets: [ + "sex", + "age", + "redcapid", + "enrollmentcategory", + "imagetype", + "datatype", + "configtype", + "level", + "releaseversion", + "ethnicity", + "proteinuria", + "hypertensionhistory", + "hypertensionduration", + "onraasblockade", + "diabetesduration", + "diabeteshistory", + "kdigostage", + "a1c", + "albuminuria", + "baselineegfr", + "primaryadjudicatedcategory", + ], facets: { sex: { type: "value", size: 100}, age: { type: "value", size: 100}, @@ -70,7 +92,19 @@ const searchConfig = { datatype: { type: "value", size: 100 }, configtype: { type: "value", size: 100}, level: { type: "value", size: 100}, - releaseversion: {type: "value", size: 250} + releaseversion: {type: "value", size: 250}, + ethnicity: {type: "value", size: 250}, + proteinuria: {type: "value", size: 250}, + hypertensionhistory: {type: "value", size: 250}, + hypertensionduration: {type: "value", size: 250}, + onraasblockade:{type: "value", size: 250}, + diabetesduration: {type: "value", size: 250}, + diabeteshistory: {type: "value", size: 250}, + kdigostage: {type: "value", size: 250}, + a1c: {type: "value", size: 250}, + albuminuria: {type: "value", size: 250}, + baselineegfr: {type: "value", size: 250}, + primaryadjudicatedcategory: {type: "value", size: 250}, } }, initialState: { diff --git a/src/components/SpatialViewer/Facets/AllFacets.js b/src/components/SpatialViewer/Facets/AllFacets.js index 48c85d6..24c7a82 100644 --- a/src/components/SpatialViewer/Facets/AllFacets.js +++ b/src/components/SpatialViewer/Facets/AllFacets.js @@ -68,12 +68,145 @@ class AllFacets extends Component { - + - - Experimental Strategy + + Ethnicity + + + + + + + + + A1c % + + + + + + + + + + + Albuminuria + + + + + + + + + + + Baseline eGFR + + + + + + + + + + + Diabetes Duration + + + + + + + + + + + Diabetes History + + + + + + + + + + + Hypertension Duration + + + + + + + + + + + Hypertension History + + + + + + + + + + + KDIGO Stage + + + + + + + + + + + RAAS Blockade + + + + + + + + + + + + Primary Adjudicated Category + + + + + + + + + + + Proteinuria + + + + + + + + + + + Experimental Strategy + + @@ -82,10 +215,10 @@ class AllFacets extends Component { - + Image Type - +