aodn / nrmn-application

A web application for collation, validation, and storage of all data obtained during surveys conducted by the NRMN
GNU General Public License v3.0
4 stars 3 forks source link

Species in MEOW validation rule #1217

Closed bpasquer closed 1 year ago

bpasquer commented 1 year ago

Description

MEOW is a classification of the world's coasts and shelves. The validation rule check that each fish and invert species(Method 0,1,2,7,8,9,10) in an ingested survey has already been observed in the site's ecoregion.

An example query would be (this is only for M2 species, need to add query for M1,M2 inverts , M0,M7,M8,M9,M10)


WITH stp1 AS(
SELECT DISTINCT(ecoregion)AS region, species_name FROM ep_m2_cryptic_fish GROUP BY species_name,ecoregion)
SELECT true FROM stp1 WHERE species_name='Acanthemblemaria aspera' AND region='Floridian'
nspool commented 1 year ago

Should this be a blocking validation?

bpasquer commented 1 year ago

This validation should be a warning only

atcooper1 commented 1 year ago

This seems to be working well, thanks all. My only comment is that ordering by species out of region per survey creates a very long and cumbersome list (see below). Perhaps a single list of species per job would be more helpful (and the ability to click the species and see the filtered records of that species in the job)? So similar to the "method invalid for species" validation feedback? @LizziOh might have additional thoughts on this though?

image

LizziOh commented 1 year ago

Yes I agree it would be better to lump the warning validations for each species rather than separate by site (especially since there is no reference to which site the warning group is from and also generally all the sites in a single job are within the same ecoregion). Something like Species "x" is not found in ecoregion "y" (sites: 1,2,3,4,).

vfisaac commented 1 year ago

Thanks for the feedback that the validation is working as expected. I have logged a backlog item to improve the formatting

LizziOh commented 1 year ago

Also, could we please have this feature active for the method 3 observations? It is not currently active.

atcooper1 commented 1 year ago

Just had a look at 12.0 782 and there are still some formatting issues with Species out of Ecoregion warnings. It looks like it is still returning error messages for each survey so the warning messages are duplicated many times for the same species producing hundreds of error messages. Could this warning possibly return a single list of species out of range per ecoregion as suggested?

image

utas-raymondng commented 1 year ago

Done and close