Add ONPRC parentage validation queries #630
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@labkey-jeckels @labkey-martyp and @jryurkanin: in EHR you recently added some parentage validation queries: LabKey/ehrModules#534. That's all great, and it's probably not worth changing those at this point. Proper functioning of the EHR depends on having really accurate data, so these queries do matter a lot, and it's a great idea to continually add new ones as you encounter data issues. I made a comment to this effect on that PR, but there's two things here you might want to check out:
Note, in the ONPRC EHR parentage data is stored in a dataset called parentage, while in the default EHR demographics is used. Therefore the queries I'm adding here differ for this reason, but the points I'm making below apply to EHR too.
The first suggestion is that when running the query, it's helpful if you can give the user a way to easily rectify whatever problem exists. In the two queries here, you'll see that I set the updateURL to point to the underlying dataset. This way the user can load this SQL query, but LK will give them an edit button update the appropriate record, making things easier for the user.
Because ONPRC overrides the main EHR page I'm not really going to push this point all that strongly, but I dont see the point of adding the new basic HTML page (dataValidationReport.html), and especially not making it a top-level feature. There isnt anything wrong with having a report to load per se. The reason I bring this up is b/c there is already a way more functional system within EHR through the notification system (see subclasses of AbstractEHRNotification). Most concrete notifications are implemented in ONPRC_EHR, with ColonyAlertsNotification being one example. The very important difference with these is that: a) the notification runs automatically on a schedule, b) users can subscribe to it, and c) it reports problems when and if they exist automatically. In general, if all the validations pass, no email is sent. It's a very popular and efficient way to manage data validation. It is simply a lot more useful and reliable to make it automatic, as opposed to relying on a busy person to load and review some kind of HTML report regularly. These notifications can be executed through the browser on-demand as well (see example URL here:
onprcEHRModules/onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java
Line 320 in 3f288b6
Anyway, that's all I'll say on this point.