Varian-Code-Samples icon indicating copy to clipboard operation
Varian-Code-Samples copied to clipboard

BeginModifications / Making changes

Open isachpaz opened this issue 5 years ago • 15 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 avatar Feb 12 '20 11:02 isachpaz

@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.

joecastelo avatar Feb 12 '20 11:02 joecastelo

Hi joecastelo, The script was already approved. image Thanks

isachpaz avatar Feb 12 '20 12:02 isachpaz

Does the script have to be approved? Some scripts have to be approved to modify patient data.

Pat

On Feb 12, 2020, at 5:50 AM, isachpaz [email protected] wrote:

 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."

Any hint?

Thanks,

Ilias

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

patm95 avatar Feb 12 '20 12:02 patm95

@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.

joecastelo avatar Feb 12 '20 12:02 joecastelo

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

isachpaz avatar Feb 12 '20 15:02 isachpaz

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.

joecastelo avatar Feb 12 '20 16:02 joecastelo

image

mattcschmidt avatar Feb 12 '20 16:02 mattcschmidt

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.

mattcschmidt avatar Feb 12 '20 16:02 mattcschmidt

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

mattcschmidt avatar Feb 12 '20 16:02 mattcschmidt

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

Kiragroh avatar Feb 12 '20 17:02 Kiragroh

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.

mtparagon5 avatar Feb 12 '20 20:02 mtparagon5

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)
        {

        }
    }
}

joecastelo avatar Feb 12 '20 20:02 joecastelo

Well duh. Thanks @joecastelo!

mtparagon5 avatar Feb 12 '20 23:02 mtparagon5

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

isachpaz avatar Feb 14 '20 10:02 isachpaz

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

keith1477 avatar Apr 26 '20 13:04 keith1477