8000 [Protocols] A protocol can only belong to one specimen type · Issue #287 · aces/biobank · GitHub
[go: up one dir, main page]

Skip to content

[Protocols] A protocol can only belong to one specimen type #287

Open

Description

@HenriRabalais

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0