ctsit / adrc_biorepository_tube_id_writer

Other
0 stars 2 forks source link

Portions of populated rows are being overwritten by `selectFromDropdown` #2

Closed ChemiKyle closed 1 year ago

ChemiKyle commented 1 year ago

We do not check if specimen_type is blank when populating a row of data for a tube (note line 32):

https://github.com/ctsit/adrc_biorepository_tube_id_writer/blob/1dbe3b19d00a028641e86c70fa575b421ae4b94c/js/fill_fields.js#L21-L36

While we could add logic to check that a dropdown is blank before selection I think the more robust route is to simply ignore an entire row if the tube_idN field is not empty; if partial data is present that means that there has been manual intervention, perhaps the smartest thing to do in this case is to simply stop running the module?

ChemiKyle commented 1 year ago

Interestingly, the root of this issue is also caused by the provided sample_type data not aligning with the order expected by the module:

image

The module naively expects samples to always follow the order:

  1. Plasma
  2. Serum
  3. Buffy Coat
  4. Paxgene

In the 2nd record, "Buffy Coat" appears for the first two entries suggesting manual intervention of sample order. I believe this bug will not appear unless someone alters the "Participant Info" form after saving the "Sample Receipt and Storage" form.

pbchase commented 1 year ago

addressed by PR #3