VarianAPIs / Varian-Code-Samples

Code samples for ESAPI and other Varian APIs and web services.
MIT License
117 stars 108 forks source link

Check documents #20

Closed ItumelengS closed 5 years ago

ItumelengS commented 5 years ago

Is it possible to write a script which checks for the documents type that have been uploaded in the patient database?

And also, I am trying to run one script and it tells I need my database to be research, I was wondering is it just an option to tick off or we have to create a database from scratch?

mattcschmidt commented 5 years ago

Hi ItumelengS, It is possible to write a script that queries the documents from a patient using Document Service. This service is available via an API that is already installed on your system, but you can find a copy of it in this github repository. The repository location would be Eclipse Scripting API --> Projects-->Example RBE Report. The current script will post a document to ARIA, with which you can set the document type. You could use this knowledge of how this works along with the Document Service User Guide I uploaded to think about how to query the same API for document types. Varian Document Service User Guide.pdf

mattcschmidt commented 5 years ago

Regarding the second question, I'd like to know what version of Eclipse you're using to think of how to answer this question.

ItumelengS commented 5 years ago

We are using 13.7.

jwtx1980 commented 5 years ago

If it's a writeable script(makes any modifications), I believe you have to be in research mode to run it prior to v15.

ItumelengS commented 5 years ago

Yes, I want to be in research mode, but how do I get there?

mattcschmidt commented 5 years ago

Hi Itumeleng,

When you enable research mode, you will no longer be able to approve any plans on your Eclipse system. For this reason, Varian mandates that the Research mode only be enabled in systems that are for development purposes only. Is this the case with your system - are you planning any clinical patients in this system?

ItumelengS commented 5 years ago

I can use the TBOX in research mode, but I won't touch the main box after hearing the above. The script I had planned running was the CreateVerificationPlan, I am guessing the creation of the plan is the cause of this? So basically there is no way to create a useable plan unless you are 15.1 and above or you are in research mode? And please provide me with link on how to go into research mode for my TBOX.

mattcschmidt commented 5 years ago

Hi Itumeleng,

To get research mode on your TBOX, the first thing to check is whether or not you have the license. If you go into your Platform Portal and go to Licenses under Administrative services you should see a license called EclipseScriptingIfWriteAccess or sometimes maybe called EclipseScriptingResearchAPI (I can't remember but one of those). If you have that you can proceed to the next step, but if not, you'll have to contact Varian to get the license.

Once you have that, you may go to RT Administration in the System and Facilities Workspace. In that workspace you'll find a checkbox that is labelled "Database in Research Mode" if this is checked, you can use write-enabled scripting. If you want to test Write-enabled scripting, the Eclipse Scripting API Reference Guide on MyVarian has an example script you can run as a single file plugin to test the writeable functionality.

ItumelengS commented 5 years ago

Nope, it seems like we do not have the license, and if it's for purchase I doubt our department would buy it. But thanks for the information. Actually the licence is not there but there is a database conversion check box. Ok. You have address all of my questions for this thread. Thank you very much for you help.