Chemical-Curation / chemcurator_django

Backend services for chemical curation
https://api.chemreg.epa.gov
MIT License
1 stars 0 forks source link

Alteration of DELETE for Compounds (Defined and ill defined) #39

Closed cmgrulke closed 4 years ago

cmgrulke commented 4 years ago

As a admin I want ids registered to persist even if the data is deemed duplicative So that no one ever comes to me with a DTXCID that I cannot identify

Request Example DELETE https://api.chemreg.epa.gov/defined-compounds/DTXCID04154019???

Acceptance Criteria: When I delete a COMPOUND (either defined or ill-defined), I must provide a DTXCID that I have decided is duplicating the chemical concept as well as a qc_note documenting the cause for the deletion. The "deleted" compound does not get deleted.. These "deleted" compounds are not viewable by researchers, anonymous, or curators, only admins. If a get request is done at the "deleted" DTXCID, it is forwarded to the DTXCID that was provided as the duplicative chemical concept. Other than this "merging" there should be no Deletion of compounds...

Test:

mcovalt commented 4 years ago

Is it important to store which compound originally replaced which? Or can it be updated? Updating the relationships will greatly simplify querying the database.

For example, say

  1. B replaces C
  2. B replaces D
  3. A replaces B
        C
      ↙
    A ← B
      ↖
        D

Can we update the relationships to this when A replaces B?

cmgrulke commented 4 years ago

Please do the first option

debboutr commented 4 years ago

this ticket deals with both Defined and IllDefinedCompound views, should the admin user have the ability to cross the replaced cid with one from the opposite model? If originally an IllDefined, replaced by Defined or vice versa? Or might it be only one way where a Define can't be replaced w/ IllDefined, but an IllDefined CAN be replaced by a Defined?

mwfrost commented 4 years ago

Chris specified in a Slack conversation that anything with a CID could replace anything else with a CID. Ill-defined and Defined Compounds can replace one another.

debboutr commented 4 years ago

image

convo from slack that resolves comment above