Study metadata is added on study browser click
This commit is contained in:
1 parent
757513906c
commit
521de2fad3
13 files changed
+117
-179
No files matched your search
+19
-4
@@ -3,10 +3,25 @@ Template.studyTimepointBrowser.onCreated(() => {
|
||||
|
||||
// Get the studies for a specific timepoint
|
||||
instance.getStudies = timepoint => {
|
||||
const query = {
|
||||
selected: true
|
||||
};
|
||||
return ViewerStudies.find(query);
|
||||
return timepoint.studyInstanceUids.map(studyInstanceUid => {
|
||||
const query = {
|
||||
patientId: timepoint.patientId,
|
||||
timepointId: timepoint.timepointId,
|
||||
studyInstanceUid: studyInstanceUid
|
||||
};
|
||||
|
||||
var loadedStudy = ViewerStudies.findOne(query);
|
||||
if (loadedStudy) {
|
||||
return loadedStudy;
|
||||
}
|
||||
|
||||
var notYetLoaded = Studies.findOne(query);
|
||||
if (!notYetLoaded) {
|
||||
throw "No study data available for Study: " + studyInstanceUid;
|
||||
}
|
||||
|
||||
return notYetLoaded;
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user