8000 Support "related sources" relationship · Issue #1196 · griffithlab/civic-v2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Support "related sources" relationship #1196

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

Open
acoffman opened this issue Feb 26, 2025 · 0 comments
Open

Support "related sources" relationship #1196

acoffman opened this issue Feb 26, 2025 · 0 comments

Comments

@acoffman
Copy link
Member

Sometimes, multiple publications can rely on the same underlying data, clinical trial, or patients. In these cases we do not want to capture duplicate evidence in CIViC just because there are multiple publications.

To help prevent that, we intend to add a new relationship to the data model. Our Source records will now be able to "have many" related_sources. This will involve introducing a bridge table through a new migration on the backend.

That bridge table will need to capture the following:

  • the source id
  • the id of the related source
  • a note field where a user can provide an explanation
  • an enum of reasons for the user to select from. Tentatively, they include:
    • related_abstract
    • overlapping_data
    • overlapping_clinical_trial
    • overlapping_patients
    • other

Once this is created and hooked up at the rails/activerecord layer, we will need to add the associated GraphQL types and expose this via the API.

With that in place, there will be be two main frontend tasks to accomplish:

  1. Provide users with a visual warning on the Submit Evidence form if there is already existing evidence from a related source. We already have functionality that does this when a user tries to submit evidence from a Source and Molecular Profile combination that already have an associated EID. We could either piggyback on that feature, or rework it to query for (and display) both types of warnings. You can see an example of it in action below:

Image

  1. Provide users with a way to add source relations via the frontend. This will likely be a new button on the source page that pops up a form. The plan is that any logged in user can add these relations, they do not need to be an editor or admin. This will require adding a new form to the frontend and a new graphql mutation to the backend. Creating the mutation will involve creating a new Activity, Action, and Event which are the abstractions we use for provenance tracking. (This may be easier to walk through in person or on a call when you get to this stage).
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

No branches or pull requests

1 participant
0