Split packages into platform and extensions

This commit is contained in:
dannyrb committed 2019-07-08 00:41:25 -04:00
1 parent f175d4b96b
commit e8969fba11
992 files changed
+2 -1

No files matched your search

@@ -0,0 +1,22 @@
import Studies from './services/qido/studies';
const studySearchPromises = new Map();
/**
* Search for studies information by the given filter
*
* @param {Object} filter Filter that will be used on search
* @returns {Promise} resolved with an array of studies information or rejected with an error
*/
export default function searchStudies(server, filter) {
const promiseKey = JSON.stringify(filter);
if (studySearchPromises.has(promiseKey)) {
return studySearchPromises.get(promiseKey);
} else {
const promise = Studies(server, filter);
studySearchPromises.set(promiseKey, promise);
return promise;
}
}