-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
23.11 fb eiacuc to prime end date #1213
23.11 fb eiacuc to prime end date #1213
Conversation
ERROR: A pull request from WARNING: This PR appears to have the default title generated by GitHub. Please use something more descriptive. |
This code done in a pairing session with Gary and Brent.
…nto 23.11_fb_eIACUCtoPrimeEndDate # Conflicts: # onprc_ehr/resources/schemas/dbscripts/sqlserver/onprc_ehr-24.004-24.005.sql
…proved Protocols are enddated
COrrected Misspelled field name at line 44
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- eIACUCtoPrimteProtocols.xml has a typo in its title.
- onprc_ehr-24.004-24.005.sql should not include the withdrawn protocol state in CTE ApprovedProtocols. We are interested in only those protocols that have ever been in the approved state. This code still works, though, as none of the withdrawn protocols has a non-NULL approval_date.
Removeed withdrawn from the query where clause
requested changes have been made, would like to deploy next week once review is completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In onprc_ehr-24.004-24.005.sql
, please remove the test remarks in line 44, and clean up the formatting/indentation to be consistent across all three CTEs.
…CTEs for Stnadarization
All changes have been made and awaiting final approval |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Tested on UX Text and good results, Moving for deploy to Production tonight. |
Rationale
We want to use eIACUC2 data (the source of truth for protocols) to keep
ehr.protocol
automatically updated. We see at least three steps in this process:ehr.protocol
has a non-NULLenddate
where the most recent ever-approved protocol per base protocol family is not currently approved.ehr.protocol
has only one record per base protocol family, using the base protocol's protocol_ID and the most recently approved protocol's other data.approval_date
PROTOCOL_state
is one of approved, terminated, or expiredehr.protocol
when eIACUC2 has a more recent approved protocol for a base protocol family.ehr.protocol
when eIACUC2 data has a new protocol that is not a renewal.This pull request addresses only the first step.
Related Pull Requests
Changes
BaseProtocol
,RevisionNumber
, andNewestRecord
fields to existing tableonpre_ehr.eIACUC_PRIME_VIEW_PROTOCOLS
.ehr.protocol
.