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

🐛 Donor TSV Data includes empty records for specimens #1090

Open
joneubank opened this issue Nov 3, 2023 · 0 comments
Open

🐛 Donor TSV Data includes empty records for specimens #1090

joneubank opened this issue Nov 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@joneubank
Copy link
Member

Describe the bug

There is a case where donor tsv downloads have empty records in the speciment tsv. The empty record includes the donor ID and program short name fields, but no other data, making the record look like junk data.

The cause of this situation is that the program has registered more specimens than they have provided data for. As an example, if a program has registered 3 specimens (through the sample_registration screen), but has only provided the specimen data for 2 of those 3. This will result in a specimens.tsv file with 3 records, one of which is completely empty (only donor and program ids, not even the specimen ID of the missing record.

Steps To Reproduce

  1. Register a new sample for a new donor with a new specimen ID.
  2. Use the download tsv by donor endpoint requesting files for the donor you registered the specimen for
  3. The specimens.tsv will contain the empty specimen record.

Expected behaviour

The downloaded specimens.tsv file should only contain records for which the specimen data has been submitted.

Extra Details

The same code that is pulling specimen data from the database for download is also serving the Submitted Data screens, resulting in empty specimen records showing there. There is not a separate issue for this (at this time), but if the fix is applied to the code that is extracting entities from the DB then both locations should be fixed at the same time.

@joneubank joneubank added the bug Something isn't working label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant