fix(health imaging): studies not loading from healthimaging if imagepositionpatient is missing (#3646)

This commit is contained in:
Ibrahim 2023-09-12 10:30:02 -04:00 committed by GitHub
parent 7eda0c5f46
commit 74e62a1763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -38,6 +38,9 @@ export default function areAllImagePositionsEqual(instances: Array<any>): boolea
return false;
}
const firstImageOrientationPatient = toNumber(instances[0].ImageOrientationPatient);
if (!firstImageOrientationPatient) {
return false;
}
const scanAxisNormal = calculateScanAxisNormal(firstImageOrientationPatient);
const firstImagePositionPatient = toNumber(instances[0].ImagePositionPatient);
const lastIpp = toNumber(instances[instances.length - 1].ImagePositionPatient);

View File

@ -20,6 +20,9 @@ export default function areAllImageSpacingEqual(
return;
}
const firstImagePositionPatient = toNumber(instances[0].ImagePositionPatient);
if (!firstImagePositionPatient) {
return;
}
const lastIpp = toNumber(instances[instances.length - 1].ImagePositionPatient);
const averageSpacingBetweenFrames =

View File

@ -67,6 +67,13 @@ function defaultRouteInit(
})
);
// log the error if this fails, otherwise it's so difficult to tell what went wrong...
allRetrieves.forEach(retrieve => {
retrieve.catch(error => {
console.error(error);
});
});
// The hanging protocol matching service is fairly expensive to run multiple
// times, and doesn't allow partial matches to be made (it will simply fail
// to display anything if a required match fails), so we wait here until all metadata
@ -436,7 +443,7 @@ export default function ModeRoute({
<ImageViewerProvider
// initialState={{ StudyInstanceUIDs: StudyInstanceUIDs }}
StudyInstanceUIDs={studyInstanceUIDs}
// reducer={reducer}
// reducer={reducer}
>
<CombinedContextProvider>
<DragAndDropProvider>