VarianAPIs / Varian-Code-Samples

Code samples for ESAPI and other Varian APIs and web services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BeginModifications / Making changes

isachpaz opened this issue · comments

Hi,
The script that creates new structures with additional margins runs fine on the TBox.
However, on the clinical system, we receive an error message:
"No valid license to modify patient data with script."

image

Any hint?

Thanks,

Ilias

@isachpaz You have to approve the script in order to run it on clinical environment.
The tab tools/ScriptApprovals allows you to run the script!
If it has multiple dlls that as well change the database, and they're referenced by your script you need to approve them as well.
Within the script approval tab, you can either do an evaluatuon period or approve it indefinitely.

Hi joecastelo,
The script was already approved.
image
Thanks

@isachpaz See if does depend on another plugin that as well change the database.
If not somehow your user is showing no rights to do so.
But do not make sense to me, since you can approve the script itself.

To put it another way, can a script write back to ARIA (making use of BeginModifications) in a clinical environment system/database?

So far, it works when the ARIA is on "research" mode, e.g. on the TBox. However, this is not the case for our clinical system!

Having a look at https://varianapis.github.io/VarianApiBook.pdf on page 17, section: " Developer System Setup and Configuration", it says: "...... Click the “Database in Research Mode” flag".
We have such a configuration on TBox, the script is capable to make modification on patients' plans.
Now, we want to deploy this script to our clinical environment. However, in the clinical environment ( Eclipse v15.6) the database cannot be in research mode. So the script cannot modify any plan.

Is there any other way to run ESAPI scripts, that modify patients' plans, on a clinical database?
Are there any user permissions to setup on the clinical database?

All the best,

Ilias

Yes, it can modify. However the user needs the rights to do so.
In example, in system adminsitration you can see the rights of each kind of user.
For running approved eclipse you need at least to have permission to eit treatment image, edit structure set, edit plan and edit course.
I maybe missing something, maybe @mattcschmidt can clear this out for you.

The script only needs to be approved. Then anyone that has access to External Beam planning can run it. Also, interesting thing we found out here:
Even if the HIPAA features in ARIA do not allow a user to access a patient from outside of their department, a script can still gather data on that patient. Just something to keep in mind.

Sorry I didn't read up far enough. Can you check and see if you have the following license:
image

Matthew is right but one additional requirement has to be met.
On a TBox you can modify structures etc in SingleFilePlugins. For ScriptApproval is a compiled script (binary or standalone) necessary.
Reason: Otherwise the .cs file could be changed after approval and still work that could be a problem for the script creator if something funky happens

Anyone know how to remedy this error:
writeable

Edit: The script is approved on a test box and I've added patient.BeginModification() to the code prior to making changes.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VMS.TPS.Common.Model.API;

[assembly: ESAPIScript(IsWriteable = true)]

namespace VMS.TPS
{
    public class Script
    {
        public static void Execute(ScriptContext context)
        {

        }
    }
}

Well duh. Thanks @joecastelo!

Thanks to everyone. The issue was related to the EclipseScriptingClinicalWrite license, as mentioned by mattcschmidt.
Now we are able to write back to the clinical database.
-IS

Hi everyone. I have the same question. I have installed the EclipseScriptingClinicalWrite license and added the "[assembly: ESAPIScript(IsWriteable = true)]" in my script. However, it didn't work.
WeChat Work Screenshot_20200426213907