I propose adding an additional schema entry to the affiliation table:
id: 0
name: "Global"

The "0" index in the affiliation table would remain fixed to represent global or system-wide.

This will be particularly useful as more and more configuration parameters are stored in the database. The need to distinguish parameters for a specific affiliation versus system-wide parameters has grown as VCL implementations expand to support several institutions. Configuration tables would reference the affiliation table, allowing system-wide and affiliation-specific settings to be treated identically from a programming standpoint.

Queries could be written to attempt to retrieve a configuration value for a particular non-zero affiliation ID and default to the global value if it's not set for the affiliation.

One thing to be careful of if implemented... any code using/checking the affiliation ID value must not use a true/false evaluation to determine if it's valid because 0 will be a valid index but evaluate as false.



Reply via email to