Skip to content

Commit 9cae01b

Browse files
authored
Merge branch 'main' into 2024_11_04_Data_Release_Hide_Delete_Manage_Modify
2 parents cc977a5 + 14543a9 commit 9cae01b

File tree

82 files changed

+19373
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+19373
-9
lines changed

SQL/0000-00-01-Modules.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ INSERT INTO modules (Name, Active) VALUES ('acknowledgements', 'Y');
1010
INSERT INTO modules (Name, Active) VALUES ('api', 'Y');
1111
INSERT INTO modules (Name, Active) VALUES ('battery_manager', 'Y');
1212
INSERT INTO modules (Name, Active) VALUES ('behavioural_qc', 'Y');
13+
INSERT INTO modules (Name, Active) VALUES ('biobank', 'Y');
1314
INSERT INTO modules (Name, Active) VALUES ('brainbrowser', 'Y');
1415
INSERT INTO modules (Name, Active) VALUES ('bvl_feedback', 'Y');
1516
INSERT INTO modules (Name, Active) VALUES ('candidate_list', 'Y');

SQL/0000-00-02-Permission.sql

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,18 @@ INSERT INTO `permissions` (code, description, moduleID, categoryID) VALUES
167167
('imaging_uploader_nosessionid', 'Imaging Scans with no session ID', (SELECT ID FROM modules WHERE Name='imaging_uploader'),2),
168168
('dicom_archive_nosessionid', 'DICOMs with no session ID', (SELECT ID FROM modules WHERE Name='dicom_archive'),2),
169169
('dicom_archive_view_ownsites', 'DICOMs - Own Sites', (SELECT ID FROM modules WHERE Name='dicom_archive'),2),
170-
('view_instrument_data', 'Data', (SELECT ID FROM modules WHERE Name = 'instruments'),2)
171-
;
170+
('view_instrument_data', 'Data', (SELECT ID FROM modules WHERE Name = 'instruments'),2),
171+
('biobank_specimen_view','View Specimen Data',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
172+
('biobank_specimen_create','Create Specimens',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
173+
('biobank_specimen_update','Process Specimens',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
174+
('biobank_specimen_alter','Edit Specimen Data',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
175+
('biobank_container_view','View Container Data',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
176+
('biobank_container_create','Create Containers',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
177+
('biobank_container_update','Edit Container Data',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
178+
('biobank_pool_view','View Pool Data',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
179+
('biobank_pool_create','Create Pools',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
180+
('biobank_fullsiteaccess','Full Site Access',(SELECT ID FROM modules WHERE Name='biobank'), '2'),
181+
('biobank_fullprojectaccess','Full Project Access',(SELECT ID FROM modules WHERE Name='biobank'), '2');
172182

173183
INSERT INTO `user_perm_rel` (userID, permID)
174184
SELECT u.ID, p.permID
@@ -267,7 +277,17 @@ INSERT INTO `perm_perm_action_rel` (permID, actionID) VALUES
267277
((SELECT permID FROM permissions WHERE code = 'imaging_uploader_nosessionid'),1),
268278
((SELECT permID FROM permissions WHERE code = 'dicom_archive_nosessionid'),1),
269279
((SELECT permID FROM permissions WHERE code = 'dicom_archive_view_ownsites'),1),
270-
((SELECT permID FROM permissions WHERE code = 'view_instrument_data'),1);
280+
((SELECT permID FROM permissions WHERE code = 'biobank_specimen_view'),1),
281+
((SELECT permID FROM permissions WHERE code = 'biobank_specimen_create'),2),
282+
((SELECT permID FROM permissions WHERE code = 'biobank_specimen_update'),3),
283+
((SELECT permID FROM permissions WHERE code = 'biobank_specimen_alter'),3),
284+
((SELECT permID FROM permissions WHERE code = 'biobank_container_view'),1),
285+
((SELECT permID FROM permissions WHERE code = 'biobank_container_create'),2),
286+
((SELECT permID FROM permissions WHERE code = 'biobank_container_update'),3),
287+
((SELECT permID FROM permissions WHERE code = 'biobank_pool_view'),1),
288+
((SELECT permID FROM permissions WHERE code = 'biobank_pool_create'),2),
289+
((SELECT permID FROM permissions WHERE code = 'biobank_fullsiteaccess'),1),
290+
((SELECT permID FROM permissions WHERE code = 'biobank_fullprojectaccess'),1);
271291

272292

273293
-- permissions for each notification module

SQL/0000-00-03-ConfigTables.sql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ INSERT INTO menu_categories (name, orderby) VALUES
310310
('Electrophysiology', 3),
311311
('Genomics', 4),
312312
('Imaging', 5),
313-
('Reports', 6),
314-
('Tools', 7),
315-
('Admin', 8);
313+
('Biobank', 6),
314+
('Reports', 7),
315+
('Tools', 8),
316+
('Admin', 9);
316317

SQL/0000-00-06-BiobankTables.sql

Lines changed: 397 additions & 0 deletions
Large diffs are not rendered by default.

SQL/9999-99-99-drop_tables.sql

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@ DROP TABLE IF EXISTS dataquery_run_queries;
66
DROP TABLE IF EXISTS dataquery_query_names;
77
DROP TABLE IF EXISTS dataquery_queries;
88

9+
-- 0000-00-6-BiobankTables.sql
10+
DROP TABLE IF EXISTS `biobank_container_shipment_rel`;
11+
DROP TABLE IF EXISTS `shipment`;
12+
DROP TABLE IF EXISTS `shipment_log`;
13+
DROP TABLE IF EXISTS `shipment_status`;
14+
DROP TABLE IF EXISTS `shipment_type`;
15+
DROP TABLE IF EXISTS `biobank_specimen_pool_rel`;
16+
DROP TABLE IF EXISTS `biobank_pool`;
17+
DROP TABLE IF EXISTS `biobank_specimen_project_rel`;
18+
DROP TABLE IF EXISTS `biobank_specimen_parent`;
19+
DROP TABLE IF EXISTS `biobank_specimen_analysis`;
20+
DROP TABLE IF EXISTS `biobank_specimen_preparation`;
21+
DROP TABLE IF EXISTS `biobank_specimen_collection`;
22+
DROP TABLE IF EXISTS `biobank_specimen_freezethaw`;
23+
DROP TABLE IF EXISTS `biobank_specimen`;
24+
DROP TABLE IF EXISTS `biobank_specimen_protocol_attribute_rel`;
25+
DROP TABLE IF EXISTS `biobank_specimen_protocol`;
26+
DROP TABLE IF EXISTS `biobank_specimen_attribute`;
27+
DROP TABLE IF EXISTS `biobank_specimen_attribute_datatype`;
28+
DROP TABLE IF EXISTS `biobank_specimen_process`;
29+
DROP TABLE IF EXISTS `biobank_specimen_type_parent`;
30+
DROP TABLE IF EXISTS `biobank_specimen_type_container_type_rel`;
31+
DROP TABLE IF EXISTS `biobank_specimen_type_unit_rel`;
32+
DROP TABLE IF EXISTS `biobank_specimen_type`;
33+
DROP TABLE IF EXISTS `biobank_container_parent`;
34+
DROP TABLE IF EXISTS `biobank_container`;
35+
DROP TABLE IF EXISTS `biobank_container_type`;
36+
DROP TABLE IF EXISTS `biobank_container_status`;
37+
DROP TABLE IF EXISTS `biobank_container_capacity`;
38+
DROP TABLE IF EXISTS `biobank_container_dimension`;
39+
DROP TABLE IF EXISTS `biobank_unit`;
40+
941
-- 0000-00-05-ElectrophysiologyTables.sql
1042
DROP TABLE IF EXISTS `physiological_event_parameter_category_level`;
1143
DROP TABLE IF EXISTS `physiological_event_parameter`;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
INSERT INTO modules (Name, Active) VALUES ('biobank', 'Y');
2+
3+
INSERT INTO `permissions` VALUES
4+
('biobank_specimen_view','View Specimen Data',(SELECT ID FROM modules WHERE Name='biobank'), 'View', '2'),
5+
('biobank_specimen_create','Create Specimens',(SELECT ID FROM modules WHERE Name='biobank'), 'Create', '2'),
6+
('biobank_specimen_update','Process Specimens',(SELECT ID FROM modules WHERE Name='biobank'), 'Edit', '2'),
7+
('biobank_specimen_alter','Edit Specimen Data',(SELECT ID FROM modules WHERE Name='biobank'), 'Edit', '2'),
8+
('biobank_container_view','View Container Data',(SELECT ID FROM modules WHERE Name='biobank'), 'View', '2'),
9+
('biobank_container_create','Create Containers',(SELECT ID FROM modules WHERE Name='biobank'), 'Create', '2'),
10+
('biobank_container_update','Edit Container Data',(SELECT ID FROM modules WHERE Name='biobank'), 'Edit', '2'),
11+
('biobank_pool_view','View Pool Data',(SELECT ID FROM modules WHERE Name='biobank'), 'View', '2'),
12+
('biobank_pool_create','Create Pools',(SELECT ID FROM modules WHERE Name='biobank'), 'Create', '2'),
13+
('biobank_fullsiteaccess','Full Site Access',(SELECT ID FROM modules WHERE Name='biobank'), 'View', '2'),
14+
('biobank_fullprojectaccess','Full Project Access',(SELECT ID FROM modules WHERE Name='biobank'), 'View', '2');

modules/biobank/README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Biobank Module
2+
3+
## Purpose
4+
The Biobank Module enables the management of biological specimens by providing functionalities for specimen tracking, container management, pooling, and shipment handling. It ensures standardized operations and maintains data integrity within the LORIS ecosystem.
5+
6+
## Intended Users
7+
The primary users of the Biobank Module are:
8+
- Biobank Managers: Oversee the overall biobank operations, including specimen tracking and inventory management.
9+
- Laboratory Technicians: Handle the processing, storage, and preparation of biological specimens.
10+
- Researchers: Access and utilize specimens for various studies and experiments.
11+
- Site Coordinators: Ensure that specimens are correctly collected, processed, and integrated into the LORIS system across multiple sites.
12+
13+
## Scope
14+
The Biobank Module facilitates the comprehensive management of biological specimens within the LORIS platform. Its functionalities include:
15+
16+
- **Specimen Tracking:** Monitor the lifecycle of each specimen from collection to storage and shipment.
17+
- **Container Management:** Manage storage containers, including their types, capacities, and hierarchical relationships.
18+
- **Pooling:** Combine multiple specimens into pools for efficient processing and analysis.
19+
- **Shipment Handling:** Track the shipment of specimens, including logging shipment events and statuses.
20+
21+
**NOT in scope:**
22+
23+
- Automated quality control of specimens.
24+
- Integration with external laboratory information management systems (LIMS) beyond LORIS.
25+
26+
## Permissions
27+
Access to the Biobank Module is controlled through specific permissions to ensure data security and appropriate access levels.
28+
29+
| Permission Code | Description | Access Level |
30+
|-----------------------------------|------------------------------|---------------|
31+
| `biobank_specimen_view` | View Specimen Data | View |
32+
| `biobank_specimen_create` | Create Specimens | Create |
33+
| `biobank_specimen_edit` | Edit/Upload Specimen Data | Edit/Upload |
34+
| `biobank_container_view` | View Container Data | View |
35+
| `biobank_container_create` | Create Containers | Create |
36+
| `biobank_container_edit` | Edit Container Data | Edit |
37+
| `biobank_pool_view` | View Pool Data | View |
38+
| `biobank_pool_create` | Create Pools | Create |
39+
| `biobank_fullsiteaccess` | Full Site Access | View |
40+
| `biobank_fullprojectaccess` | Full Project Access | View |
41+
42+
*Note: Ensure `Category` and `Access Level` align with your organization's permission schema.*
43+
44+
## Configuration
45+
The module's functionality is supported by multiple configuration tables, each serving a specific purpose in managing specimens, containers, pools, and shipments.
46+
47+
| Table | Configuration | Description |
48+
|---------------------------------------|-----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
49+
| `biobank_specimen_type` | Specimen Types | **Defines various specimen types (e.g., Blood, RNA) and their relationships with parent specimen types via `biobank_specimen_type_parent`.** |
50+
| `biobank_container_capacity` | Container Capacity | **Defines the capacity of containers, specifying how many specimens each container can hold.** |
51+
| `biobank_container_dimension` | Container Dimensions | **Stores dimensional data of containers, including size and volume specifications.** |
52+
| `biobank_container_status` | Container Status | **Tracks the status of containers (e.g., Active, Inactive) to monitor their availability and usage.** |
53+
| `biobank_container_type` | Container Types | **Specifies types of containers used for storing specimens, linked to specimen types through `biobank_specimen_type_container_type_rel`.** |
54+
| `biobank_specimen_attribute` | Specimen Attributes | **Stores attributes related to specimens, such as concentration and quality metrics.** |
55+
| `biobank_specimen_attribute_datatype` | Specimen Attribute Datatypes | **Defines data types for specimen attributes to ensure consistent data entry and validation.** |
56+
| `biobank_specimen_protocol` | Specimen Protocols | **Associates specimens with specific collection and preparation protocols, ensuring standardized handling procedures.** |
57+
| `biobank_specimen_protocol_attribute_rel` | Specimen Protocol Attribute Relations | **Links specimen protocols to their attributes, maintaining data consistency and integrity.** |
58+
| `biobank_specimen_type_container_type_rel` | Specimen Type Container Type Relations | **Links specimen types to container types, ensuring appropriate container usage for each specimen type.** |
59+
| `biobank_specimen_type_parent` | Specimen Type Parent Relations | **Manages parent-child relationships between specimen types, allowing for hierarchical classification and organization.** |
60+
| `biobank_specimen_type_unit_rel` | Specimen Type Unit Relations | **Links specimen types to measurement units, ensuring consistent data entry for specimen measurements.** |
61+
| `biobank_unit` | Measurement Units | **Defines measurement units (e.g., µL, mL) used across the Biobank Module for consistent data entry and reporting.** |
62+
| `shipment_status` | Shipment Statuses | **Tracks the status of shipments (e.g., Pending, Shipped, Delivered) to monitor their progress and completion.** |
63+
| `shipment_type` | Shipment Types | **Defines different types of shipments (e.g., Internal, External) to categorize and manage shipping processes effectively.** |
64+
65+
66+
### Detailed Configuration Settings
67+
- **Specimen Types (`biobank_specimen_type`):** Defines various specimen types (e.g., Blood, RNA) and their relationships with parent specimen types via `biobank_specimen_type_parent`.
68+
69+
- **Specimen Attributes (`biobank_specimen_attribute` & `biobank_specimen_attribute_datatype`):** Stores attributes related to specimens, such as concentration, quantification dates, and quality metrics. Data types are defined in `biobank_specimen_attribute_datatype`.
70+
71+
- **Container Types (`biobank_container_type`):** Specifies types of containers used for storing specimens, linked to specimen types through `biobank_specimen_type_container_type_rel`.
72+
73+
- **Measurement Units (`biobank_unit` & `biobank_specimen_type_unit_rel`):** Defines measurement units (e.g., µL, mL) and associates them with specimen types to ensure consistent data entry.
74+
75+
- **Protocols (`biobank_specimen_protocol`):** Links specimens and pools to specific collection and preparation protocols, ensuring standardized handling procedures.
76+
77+
- **Pools (`biobank_pool`):** Manages pools created from multiple specimens, allowing for efficient processing and aliquoting.
78+
79+
- **Shipments (`shipment`, `shipment_log`, `shipment_status`, `shipment_type`):** Tracks the shipment of containers, including event logging for comprehensive tracking and accountability.
80+
81+
- **Container Hierarchy (`biobank_container_parent`):** Manages parent-child relationships between containers to reflect storage hierarchies.
82+
83+
- **Data Integrity (`biobank_specimen_protocol_attribute_rel`):** Ensures that specimen protocols are correctly linked to their attributes, maintaining data consistency.
84+
85+
## Interactions with LORIS
86+
The Biobank Module integrates seamlessly with various components of the LORIS platform to enhance functionality and data management:
87+
88+
- **Links:** Includes links to Session, Sites and Candidate modules.

0 commit comments

Comments
 (0)