Adapting OHIFStudyMetadataSource to use new retrieveMetadata call from ohif:study-list package.

This commit is contained in:
Emanuel F. Oliveira authored and Eloízio Salgado committed 2017-03-02 10:18:11 -03:00
1 parent 7dff1a815e
commit e1cc8adbad
2 files changed
+6 -3

No files matched your search

@@ -13,6 +13,11 @@ const StudyMetaDataPromises = new Map();
* @returns {Promise} that will be resolved with the metadata or rejected with the error
*/
OHIF.studylist.retrieveStudyMetadata = studyInstanceUid => {
// @TODO: Whenever a study metadata request has failed, its related promise will be rejected once and for all
// and further requests for that metadata will always fail. On failure, we probably need to remove the
// corresponding promise from the "StudyMetaDataPromises" map...
// If the StudyMetaDataPromises cache already has a pending or resolved promise related to the
// given studyInstanceUid, then that promise is returned
if (StudyMetaDataPromises.has(studyInstanceUid)) {