I want to add a button to the study page to wrtie the study to CD along with an embedded viewer (same as this). I managed to put the button in the study page editing this. The problem I have is that I can’t get UUID of the study to use it in the code. How can I do that?
I am not sure what you are asking. It looks like you have the UUID in the query string in your example. Not sure it is the best way, but you could just use Javascript ?
var url_string = window.location.href;
var url = new URL(url_string);
var client = url.searchParams.get("uuid");
console.log(uuid);
If you look at the rendered page source for the legacy explorer and for explorer2, I think you’ll find that the uuid’s are embedded in some element of the rendered html such that you could get the uuid that way by accessing the DOM using Jquery or just plain JS.
Do you need to use the Legacy Explorer, or could you use Explorer 2 ? I do you intend to call the CD writer, etc. ? Are you just going to store the study in a temporary directory on the local machine and then write to CD or some other method ?
Hello,
You can find inspiration in the source code of other plugins for Orthanc. This is for instance implemented in the Stone Web viewer.
Check out for variable: $.mobile.pageData.uuid
Regards,
Sébastien-