Hi,
I’m trying to create a new button next to “Basic Viewer” on the Studylist screen.
I can create it by creating a Mode based on the mode “basic-test-mode”
When the button is clicked, an external app is launched successfully and then a URL (/newroute?StudyInstanceUIDs=xxxxx) is redirected.
After clicking the new button, I expect to keep my Studylist screen state the same as before clicking the new button.
I’d appreciate it if anyone helps
Note: the ‘newroute’ is the name of the routeName in modeFactory()
My Mode code: (no extension is created)
import { id } from ‘./id’;
const extensionDependencies = {
};function modeFactory() {
return {
id,
routeName: ‘newroute’,
displayName: i18n.t(‘Modes:Open XXX’),
onModeEnter: () => {
},
onModeExit: () => {
},
validationTags: {
study: ,
series: ,
},
isValidMode: () => {
return { valid: true };
},
routes: [
{
layoutTemplate: ({studyInstanceUIDs}) => {
// open external app here
},
},
],
extensions: extensionDependencies,
sopClassHandlers: ,
hotkeys: ,
};
}const mode = {
id,
modeFactory,
extensionDependencies,
};export default mode;