File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,11 @@ const DetailDrawer: React.FC<DetailDrawerProps> = ({
177
177
</ Typography >
178
178
< Typography > ID: { selectedNode . uuid } </ Typography >
179
179
< Typography > Name: { selectedNode . name } </ Typography >
180
+ { selectedNode . covariate_type && (
181
+ < Typography >
182
+ Covariate Type: { selectedNode . covariate_type }
183
+ </ Typography >
184
+ ) }
180
185
< Typography > Type: { selectedNode . type } </ Typography >
181
186
{ selectedNode . title && (
182
187
< Typography > Title: { selectedNode . title } </ Typography >
@@ -193,6 +198,11 @@ const DetailDrawer: React.FC<DetailDrawerProps> = ({
193
198
{ selectedNode . description && (
194
199
< Typography > Description: { selectedNode . description } </ Typography >
195
200
) }
201
+ { selectedNode . human_readable_id && (
202
+ < Typography >
203
+ Human Readable ID: { selectedNode . human_readable_id }
204
+ </ Typography >
205
+ ) }
196
206
197
207
{ /* {selectedNode.human_readable_id ||
198
208
(selectedNode.human_readable_id === 0 && (
Original file line number Diff line number Diff line change @@ -184,7 +184,8 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
184
184
} else if ( key === "entities" ) {
185
185
const existingNode = baseGraphData . nodes . find (
186
186
( node ) =>
187
- node . human_readable_id ?. toString ( ) === item . id . toString ( )
187
+ node . human_readable_id ?. toString ( ) === item . id . toString ( ) &&
188
+ ! node . covariate_type
188
189
) ;
189
190
if ( existingNode ) {
190
191
newNodes . push ( existingNode ) ;
@@ -206,7 +207,8 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
206
207
} else if ( key === "covariates" || key === "claims" ) {
207
208
const existingNode = baseGraphData . nodes . find (
208
209
( node ) =>
209
- node . human_readable_id ?. toString ( ) === item . id . toString ( )
210
+ node . human_readable_id ?. toString ( ) === item . id . toString ( ) &&
211
+ node . covariate_type
210
212
) ;
211
213
if ( existingNode ) {
212
214
newNodes . push ( existingNode ) ;
Original file line number Diff line number Diff line change @@ -227,7 +227,8 @@ const useGraphData = (
227
227
human_readable_id : covariate . human_readable_id ,
228
228
name : `COVARIATE ${ covariate . id } ` ,
229
229
covariate_type : covariate . covariate_type ,
230
- type : "COVARIATE" ,
230
+ // type: "COVARIATE",
231
+ type : covariate . type ,
231
232
description : covariate . description || "" ,
232
233
subject_id : covariate . subject_id ,
233
234
subject_type : covariate . subject_type ,
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export interface CustomNode extends NodeObject {
40
40
end_date ?: string ;
41
41
source_text ?: string ;
42
42
text_unit_id ?: string ;
43
-
43
+ covariate_type ?: string ;
44
44
}
45
45
46
46
export interface CustomLink extends LinkObject {
You can’t perform that action at this time.
0 commit comments