How To Fix “Constraint failed EdgeFile.SourceTableImageID” Error Message

Published: 9/29/25 7:12 PM
Modified: 10/1/25 8:52 PM

Category: EyeMD EMR 2.0

Problem:

When trying to open images/documents in a patient chart, user receives one of these errors:

This error appears when trying to open an already-reviewed patient document:

 

The issue is in the database, the image/document files are flagged as -1 in the EMRImagesLinked table. The flags will need to be changed to 0

FIX:

1. BACK UP THE DATABASE!!

2. Open SQL Server Management Studio (SSMS) 

3. Run the following 2 queries:

 

select * from EMRImagesLinked where EdgeUploadPending = ‘-1’

update EMRImagesLinked set EdgeUploadPending = ‘0’ where EdgeUploadPending = ‘-1’

 

This will changed all EdgeUploadPending flags to 0

After running the queries, you should be able to open the document/image in the patient chart without having to restart the EMR