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

Importing Patient / PlanSetup from XML

Open pwfick opened this issue 1 year ago • 0 comments

I would like to write unit tests for my scripts and need a way to load Patient and PlanSetup from a local file.

I came across these two wiki pages on exporting ESAPI objects to XML: https://github.com/VarianAPIs/Varian-Code-Samples/wiki/Code-Sample---Patient-XML https://github.com/VarianAPIs/Varian-Code-Samples/wiki/Code-Sample---Plan-XML

Before I found these wiki pages, I wrote something similar using XmlSerializer, which is also working fine.

I am running into problems however trying to deserialize the XML files back to a Patient / PlanSetup, because the ReadXml method is not implemented for these classes. Do you have tips on how to do this? We are using ESAPI version 16.1.4.4.

pwfick avatar Sep 22 '22 09:09 pwfick