Closed cmgrulke closed 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
C
↙
A ← B
↖
D
Can we update the relationships to this when A replaces B?
C
↙
A ← B
↖
D
Please do the first option
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?
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.
convo from slack that resolves comment above
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: