Actually I think I found my answer here Filtering incoming dicom instances using metadata (with python plugin) - #2 by Alain_Mazy1
My understanding is that the information is accessible with GetInstanceMetadata() after the instance has been stored, which is something I would like to avoid. I will stay with lua then.
Follow up question: do you think it would be possible to change the orthanc.InstanceOrigin enum for an object similar to the origin table in lua for the Python Plugin?
Thanks!
Gabriel