instedd / cdx

Connected Diagnostics Platform
https://cdx.io
9 stars 7 forks source link

General nih tables exporting #1956

Closed leandroradusky closed 1 year ago

leandroradusky commented 1 year ago

Closes #1905.

The two general tables (samples & results) specified in the issue are generated as described in the text of the issue and added to the zip file downloaded when the user selects Download NIH files.

The only commentary for the code I think is that the following line

batch = Batch.find_by(batch_number: sample.batch_number)

is used to load the batch instead of using sample.batch to allow loading fields for deleted batched.