Skip to content
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

Merged
merged 14 commits into from
Jan 15, 2025

Conversation

jonesgaohsu
Copy link
Collaborator

@jonesgaohsu jonesgaohsu commented Dec 20, 2024

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:

  • Ensure each base protocol family in ehr.protocol has a non-NULL enddate 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.
    • most recent = latest approval_date
    • ever approved = PROTOCOL_state is one of approved, terminated, or expired
    • The end date indicates that no protocol in the base protocol family is currently approved. It doesn't necessarily indicate when that first occurred.
  • Update ehr.protocol when eIACUC2 has a more recent approved protocol for a base protocol family.
  • Create a new base protocol record in 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

  • Add BaseProtocol, RevisionNumber, and NewestRecord fields to existing table onpre_ehr.eIACUC_PRIME_VIEW_PROTOCOLS.
  • Create a stored procedure that adds end date information to selected records in ehr.protocol.

Copy link

ERROR: A pull request from 23.11_fb_eIACUCtoPrimeEndDate is expected to target release23.11-SNAPSHOT, not develop

WARNING: This PR appears to have the default title generated by GitHub. Please use something more descriptive.

@jonesgaohsu jonesgaohsu changed the title 23.11 fb e iacu cto prime end date 23.11 fb eiacuc to prime end date Dec 20, 2024
brentlogan and others added 6 commits December 20, 2024 09:33
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
COrrected Misspelled field name at line 44
@jonesgaohsu jonesgaohsu changed the base branch from develop to release23.11-SNAPSHOT December 26, 2024 14:07
Copy link
Collaborator

@brentlogan brentlogan left a 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
@brentlogan brentlogan self-requested a review January 3, 2025 00:33
@jonesgaohsu
Copy link
Collaborator Author

requested changes have been made, would like to deploy next week once review is completed

Copy link
Collaborator

@brentlogan brentlogan left a 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.

@jonesgaohsu
Copy link
Collaborator Author

All changes have been made and awaiting final approval

Copy link
Collaborator

@brentlogan brentlogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jonesgaohsu jonesgaohsu merged commit 09c2278 into release23.11-SNAPSHOT Jan 15, 2025
3 checks passed
@jonesgaohsu jonesgaohsu deleted the 23.11_fb_eIACUCtoPrimeEndDate branch January 15, 2025 19:42
@jonesgaohsu
Copy link
Collaborator Author

Tested on UX Text and good results, Moving for deploy to Production tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants