Closed wwhsiao closed 3 years ago
Can we circle back to this? We need a mechanism to ensure no sample collection dates are before 2019-01-01. Can we also enforce that no collection date should be in the future i.e. beyond the date the data is entered into the template? Is that possible? And can we apply this to both the CanCOGeN template and the PHA4GE template?
Thanks!
I think we could have the template specification min and max fields also take on min and max dates which can be applied to date fields.
As well, for any date or number field, we could have it that a mention of another field name in the min or max field spec would cause validation to look at that other field's value to validate that given field is greater or less than another field.
So I have implemented this with DataHarmonizer "min value" and "max value" google fields (xs:minInclusive and xs:maxInclusive" in data.js), but didn't go so far as to have field name recognition. Just pop a minimum or maximum date in that field, and with a vocabulary update, that validation will occur.
sample collection dates and other date fields may require a valid date range. Enabling a template to specify a valid date range and an application function to check if the dates entered meet the date range specification.