Can I retrieve Plan Objectives from Eclipse API or Database?

Oct 24, 2016 at 3:38 PM
I need create a report for Plan Objectives in my project. Can I retrieve them from Eclipse API or Database?

Oct 27, 2016 at 7:07 PM
Edited Oct 27, 2016 at 7:08 PM
Hello heangell,

Your question has truly sent me down the rabbit hole. I thoroughly appreciate that. So after playing around in the system for a bit, I believe I have an idea of how the plan objectives are applied to the plan.

Plan objectives are attached to the clinical protocol, and CP templates are saved in the image directory location %%imagedir\FileData\ProgramData\Vision\Templates. When a protocol is applied to a patient's course, I think 2 things happen. (1) A folder named Protocol is created in the following directory %%imagedir\Patients\<patientID>\ . This folder will have an XML file that represents the template that has been applied to the course. In the case of a clinical protocol, it may have more than one XML file in order to house the necessary structure templates, plan templates, etc. (2) In the variansystem database, there is a table named Course. Inside of the Course table, there is a column named ClincalProtocolDir. This column is null if there is no clinical protocol applied to the course, otherwise it has the directory of the Protocol folder that gets created in (1). Anyway, in both locations I couldn't find the "value" of the plan objective, which maybe leads to the conclusion that it's calculated from the dose each time the patient is loaded. So now you've got a few options:

(1) The TML files that are used to generate patient reports in Eclipse is capable of printing the plan objectives. If you look at the full.tml it has the following code embedded:
# Prescription items
(2) You could also use ESAPI to regenerate your Plan Objectives, but I'm not sure how to read them directly as they're embedded in the XML for the clinical protocol. This is done easily enough by something like GetDoseAtVolume method.

(3) A combination approach for full automation would involve looking in the database to find the directory of the patient protocol directory. Searching in the directory for the XML file that has the plan objectives. And then using ESAPI to recreate the dose that is represented by the objective. This would be a very involved approach and maybe overkill for what you're looking for.

Either way you decide to go, I'm happy to help.