molgenis / molgenis-emx2

MOLGENIS EMX2, the latest version of the MOLGENIS data platform.
GNU Lesser General Public License v3.0
14 stars 16 forks source link

feat(directory): add studies associated to collections #3837

Open svituz opened 4 months ago

svituz commented 4 months ago

What are the main changes you did:

I added, to the Biobank Directory module, the possibility of linking a clinical study to one or more collections. The clinical study is the context in which the collection of samples was generated. This PR is needed to link BBMRI ERIC collections with ECRIN MDR clinical studies

The PR implements the following changes:

how to test:

todo:

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

esthervanenckevort commented 2 months ago

The data model should also include a National Node column for studies. @dtroelofsprins can explain.

dtroelofsprins commented 2 months ago

Discussed this with Esther.

svituz commented 2 weeks ago

@dtroelofsprins I removed the study from the card details. You were right it was unnecessary. Regarding the breadcrumbs, I thought about adding the collection to the path. The problem, though, is that the relation Study-Collections is 1-N, so a study can be associated with multiple collections. When navigating from the collection page it is possible to know the collection but this is not possible when accessing the page via direct URL. So to keep the same behavior in the two cases I preferred not to include the breadcrumb in all situations. The same thing happens for the Networks.

dtroelofsprins commented 2 weeks ago

@dtroelofsprins I removed the study from the card details. You were right it was unnecessary. Regarding the breadcrumbs, I thought about adding the collection to the path. The problem, though, is that the relation Study-Collections is 1-N, so a study can be associated with multiple collections. When navigating from the collection page it is possible to know the collection but this is not possible when accessing the page via direct URL. So to keep the same behavior in the two cases I preferred not to include the breadcrumb in all situations. The same thing happens for the Networks.

Ah of course you're right about that, studies can have more collections, which make me wonder: currently a collection can only be in one study, is this indeed true? Or could it potentially be linked to multiple studies?

esthervanenckevort commented 2 weeks ago

Ah of course you're right about that, studies can have more collections, which make me wonder: currently a collection can only be in one study, is this indeed true? Or could it potentially be linked to multiple studies?

A collection can be linked to multiple studies

esthervanenckevort commented 2 weeks ago

Can you have a look at how you can harmonise the data model with MIABIS v3 Study (researchresource).

https://docs.google.com/spreadsheets/d/1RrNHSNWotFl0F4P3u2cb-o_z-20bJGUn/edit?gid=1358611155#gid=1358611155

svituz commented 2 weeks ago

@esthervanenckevort The harmonization with MIABIS 3 needs further discussions with the MIABIS team, so it was decided to use the current model to start linking the MDR with the Directory and leave the harmonization for future work.

dtroelofsprins commented 1 week ago

Ah of course you're right about that, studies can have more collections, which make me wonder: currently a collection can only be in one study, is this indeed true? Or could it potentially be linked to multiple studies?

A collection can be linked to multiple studies

If so, then the datatype should be ref_array instead of ref

svituz commented 1 week ago

I changed the datatype of studies to ref_array as suggested and changed the frontend to support multiple studies

dtroelofsprins commented 3 days ago

I changed the datatype of studies to ref_array as suggested and changed the frontend to support multiple studies

Thanks! One (last) small remark, as multiple studies now can be linked to the collections it would perhaps be better to name the column studies instead of study in the collections table?

sonarcloud[bot] commented 22 hours ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud