feat(actions): simplify action corner api through the toolbarService (#5033)
This commit is contained in:
1 parent
f71b88e639
commit
7c15bb8901
246 files changed
+7930
-4270
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import React, { useState, useEffect, useCallback, useRef } from 'react';
|
||||
import { useImageViewer } from '@ohif/ui-next';
|
||||
import { useSystem, utils } from '@ohif/core';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@@ -31,6 +31,7 @@ function PanelStudyBrowser({
|
||||
|
||||
const internalImageViewer = useImageViewer();
|
||||
const StudyInstanceUIDs = internalImageViewer.StudyInstanceUIDs;
|
||||
const fetchedStudiesRef = useRef(new Set());
|
||||
|
||||
const [{ activeViewportId, viewports, isHangingProtocolLayout }] = useViewportGrid();
|
||||
const [activeTabName, setActiveTabName] = useState(studyMode);
|
||||
@@ -105,6 +106,13 @@ function PanelStudyBrowser({
|
||||
useEffect(() => {
|
||||
// Fetch all studies for the patient in each primary study
|
||||
async function fetchStudiesForPatient(StudyInstanceUID) {
|
||||
// Skip fetching if we've already fetched this study
|
||||
if (fetchedStudiesRef.current.has(StudyInstanceUID)) {
|
||||
return;
|
||||
}
|
||||
|
||||
fetchedStudiesRef.current.add(StudyInstanceUID);
|
||||
|
||||
// current study qido
|
||||
const qidoForStudyUID = await dataSource.query.studies.search({
|
||||
studyInstanceUid: StudyInstanceUID,
|
||||
|
||||
Reference in new issue
Block a user