I added a study instance UID field to the dicomimages table and added the definition of StudyInstanceUID to the *Image* section of the dicom.sql file as follows:
*Image*
{
...
{ 0x0020, 0x000d, "StudyInstanceUID", 64, SQL_C_CHAR, DT_UI }
}
Easy enough!
As a result, subsequent transfers to the server resulted in the studyinstanceUID being recorded in the dicomimages table. However, when I performed a DICOM query from another system it responded with an image count that was greater than what actually existed!?
I reversed the changes to the dicom.sql file and restarted the server and all was well again.
I am not sure if I configured the system improperly, or if I'm trying to do something that is a waste of time (wouldn't be the first time and it won't be the last...) due to system constraints, so I am looking for some direction.
I made the change in order to more efficiently determine the image count of a study via querying the dicomimages table. I understand that I can perform a DB query with a table join, so obtaining the image count through "normal" methods is achievable. However, I was just trying to lessen the impact of possible frequent queries to verify image counts via a DB query when I caused this error.
Any feedback would be greatly appreciated.
Thanks.