How can one check if Slicer's DICOM database already exists?

I’m not sure where you are calling this code in TCIABrowser. If it is part of setup you will want to define the DICOM module as a dependency for TCIABrowser if it is becoming a new dependency. That will make sure it loads first and then your module.

The DICOM module may also do additional setup after the startupCompleted signal so you may have to delay your usage of it as well as part of code executed after the startupCompleted signal. See the following thread below: