Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The problem is - in the previous incarnation of OpenSpecimen i.e. caTissue, the collection and received events were copied from primary specimens to all of its descendants. As a result, our view query, which doesn't have any limiting condition on lineage, ends up having as many collection and received events as the depth of the specimen in the specimen tree.

To solve above problem, soft delete all the collection and received events for non-primary specimens.

...

Code Block
languagesql
commit;

Rerun the query in step 1 to ensure there are no more collection and received events for non-primary specimens.