synchronize entries in PACS and external database
because the standard DICOM query such as FINDSCU only supports for a
few tags. We store the whole header of all images in another database
for querying purpose.
The first thing is to synchronize the entries in PACS and the entries
in Database. Right now, we use a perl script to generate two arrays,
InstanceUID_for_PACS and InstanceUID_for_Database, and then compare the
difference between these two. For those entries in PACS but not in the
database, extract the header and store it into the database. Remove
those entries only in the database.
This program works fine when the PACS are relatively small. However, i
just found this program does NOT run at all when there are more than
50,000 images in the PACS. Maybe this is caused by perl, which doesn't
know how to compare too array/hash when they are too big..
Don't know if there is a better solution for this kind of
Ideally, it would be great if PACS can tell when new images are coming
and when existing images are deleted, and then call my perl program,
which only needs to run for a small number of entries at one time.