Closed ttaliacc closed 11 months ago
One image -> multiple barcodes -> multiple occurrences. So, each occurrence should have its own unique barcode. For normalization purposes, I removed the dependency of the barcode on the omoccurrences table and made it linked to the images table instead.
There might be something else other than barcode is changed, which cause the error of the occurrence display, quick entry and old entry form page.
Since every barcode is unique to its respective occurrence (barcode and occurrence are one-to-one relationship), it makes it easier for the frontend to have a link between the both tables for easy access. Thus, a new occid
field is added to the images_barcode table which is a FK to the omoccurrences table.
Currently, we conclude the relationship between the tables are:
However, this logic brings up a problem: When should we check the existence of barcode? In the batch page or in the quickentry form page? Or both??
Now, the barcode is included in the url of each occurrence. Every time before we open an occurrence, we will check the existence of barcode and occid of the corresponding images.
Figure out how should it work and make plans