Take this with a grain of salt, since my scripting knowledge in PS is even more limited than in AI or AE, but it sounds like you need to define a custom XMP data field that matches the internal data. Then the XMP engine should sync those fields and their data be accessible through scripting.
Have you searched the web for software available for dicom format data. Perhaps stating there may help fine better place to address DICOM then Photoshop. Links like this one http://www.mccauslandcenter.sc.edu/mricro/dicom/
I was able to edit the DICOM metadata with your method. Most of the fields can be altered and saved. However, there are a few fields such as SeriesInstanceUID that won't cooperate. I can temporarily alter the SeriesInstanceUID field but after I save and reload it, another value automatically generated by Photoshop replaces it. Is there a way to force the DICOM to have the SeriesInstanceUID I want?