[WIP] Moving ViewerStudies collection to TypeSafeCollection implementation + Fixing sorting bug in findAllBy method in TypeSafeCollection
This commit is contained in:
1 parent
a4e7aa86ab
commit
d25141f336
18 files changed
+143
-77
No files matched your search
+13
-7
@@ -135,16 +135,22 @@ function getActiveViewportImageId() {
|
||||
}
|
||||
|
||||
function getAbstractPriorValue(imageId) {
|
||||
const currentStudy = ViewerStudies.findOne({}, {
|
||||
sort: {
|
||||
studyDate: -1
|
||||
},
|
||||
limit: 1
|
||||
// @TypeSafeStudies
|
||||
debugger;
|
||||
// @TODO: Implement MIN and MAX methods in TypeSafeCollection
|
||||
// const currentStudy = ViewerStudies.findOne({}, {
|
||||
// sort: {
|
||||
// studyDate: -1
|
||||
// },
|
||||
// limit: 1
|
||||
// });
|
||||
const allStudies = OHIF.viewer.Studies.all({
|
||||
sort: [ ['studyDate', 'desc'] ]
|
||||
});
|
||||
|
||||
if (!currentStudy) {
|
||||
if (allStudies.length < 1) {
|
||||
return;
|
||||
}
|
||||
const currentStudy = allStudies[0];
|
||||
|
||||
const priorStudy = cornerstoneTools.metaData.get('study', imageId);
|
||||
if (!priorStudy) {
|
||||
|
||||
Reference in new issue
Block a user