You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Protocols] A protocol can only belong to one specimen type #287
biobank_specimen_protocol stores a single SpecimenTypeID, so each protocol belongs to exactly one specimen type. When one SOP produces several specimen types, the protocol has to be copied once per type, and the unique key on (Label, SpecimenProcessID) forces each copy to have a different label.
This came up with Buffy Coat and RBC, which are prepared from the same purple top tube as Plasma under CBIG-02-011 (Plasma Isolation from Whole Blood). aces/CBIGR#1098 had to add them as CBIG-02-011 (Plasma Isolation from Whole Blood) - Buffy Coat and - RBC. The copies don't share attributes, so a field added to one has to be added to each copy by hand.
Suggested Fix
Add a biobank_specimen_protocol_specimen_type_rel table (SpecimenProtocolID, SpecimenTypeID), like the existing unit and container type relations, fill it from the current SpecimenTypeID column, and drop the column.
Return a list of type IDs per protocol from getProtocols() in php/specimendao.class.inc, and check against that list in jsx/processForm.js, jsx/specimen.js and jsx/batchProcessForm.js.
In CBIGR, add a patch that links Buffy Coat and RBC to the Plasma collection protocol, moves their specimens onto it, and deletes the two suffixed protocols.
The schema change and the code change have to go out together, since the current code reads SpecimenTypeID from the protocol table.
Activity