In the current implementation, the storage plugins only gets a uuid and a binary buffer to store → no information about the patient. You would need to parse the buffer to extract the patient info.
Then, you’ll need to remember this mapping (e.g, where this uuid has been stored) → you’ll need an external DB for that.
These 2 first problems can be solved once we release a new SDK that is currently under development but has been delayed + we need to make it available in python.
Then, come the real problems:
each time you’ll receive a new file, you’ll have to load the existing zip, append the new file, zip it again and save the whole zip again → terribly inefficient.
each time Orthanc will try to read a file, you’ll have to load the full zip, unzip it, get the file → terribly inefficient as well.
of course, you can improve that with caching but I’m pretty sure you’ll never reach decent performances.