Skip to content

Commit dd7670c

Browse files
committed
write study and specimen too in pathdb
1 parent e422428 commit dd7670c

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

common/PathdbMods.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,12 @@ async function PathDbMods() {
5757
throw "no iip path in pathdb data"
5858
}
5959
// identifier fields for display name
60-
var subject_id = ""
6160
var image_id = ""
62-
var study_id = ""
6361
if(data.field_subject_id && data.field_subject_id.length >= 1){
64-
subject_id = data.field_subject_id[0].value
62+
x.specimen = data.field_subject_id[0].value
6563
}
6664
if(data.clinicaltrialsubjectid && data.clinicaltrialsubjectid.length >= 1){
67-
subject_id = data.clinicaltrialsubjectid[0].value
65+
x.specimen = data.clinicaltrialsubjectid[0].value
6866
}
6967
if(data.field_image_id && data.field_image_id.length >=1){
7068
image_id = data.field_image_id[0].value
@@ -73,14 +71,14 @@ async function PathDbMods() {
7371
image_id = data.imageid[0].value
7472
}
7573
if(data.field_study_id && data.field_study_id.length >=1){
76-
study_id = data.field_study_id[0].value
74+
x.study = data.field_study_id[0].value
7775
}
7876
if(data.studyid && data.studyid.length >=1){
79-
study_id = data.studyid[0].value
77+
x.study = data.studyid[0].value
8078
}
8179
// if we have the triple, add it
82-
if (subject_id && image_id && study_id){
83-
x.name = study_id + ' | ' + subject_id + ' | ' + image_id;
80+
if (x.specimen && image_id && x.study){
81+
x.name = x.study + ' | ' + x.specimen + ' | ' + image_id;
8482
}
8583
return x
8684
}

0 commit comments

Comments
 (0)