How to get study data after uploaded dicom?

Here you go (changes in black):

import json
import orthanc
import pprint

def OnChange(changeType, level, resource):
if changeType == orthanc.ChangeType.NEW_INSTANCE:
metadata = json.loads(orthanc.RestApiGet(‘/instances/%s/metadata?expand’ % resource))
pprint.pprint(metadata)

tags = json.loads(orthanc.RestApiGet(‘/instances/%s/tags?simplify’ % resource))
pprint.pprint(tags)

orthanc.RegisterOnChangeCallback(OnChange)

Sébastien-

Screenshot from 2022-12-08 15-04-00.png

Screenshot from 2022-12-08 15-05-04.png