-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(directory): add studies associated to collections #3837
Conversation
5abb2e3
to
69e48be
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please implement a feature flag to make it possible to enable / disable this feature
The data model should also include a National Node column for studies. @dtroelofsprins can explain. |
Discussed this with Esther.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure new files are written in typescript and for .vue files use the setup tag.
function getStudyColumns() { | ||
const properties = studyColumns | ||
.filter((column) => column.column) | ||
.flatMap((studyColumn) => studyColumn.column); | ||
|
||
const rangeProperties = studyColumns.filter( | ||
(column) => column.type === "range" | ||
); | ||
|
||
for (const property of rangeProperties) { | ||
properties.push(property.min, property.max, property.unit_column); | ||
} | ||
|
||
return properties; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split this out to a a util file and write a unittest for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is meant for internal use of studyStore so I think it fits here, I removed it from the export indeed. The collectionStore also has a similar function.
Regarding the unit test, I couldn't find any unit test in the app. Can you point me to their location?
apps/directory/src/components/report-components/StudyReportInfoCard.vue
Outdated
Show resolved
Hide resolved
69e48be
to
0bf1a78
Compare
0d15013
to
2977179
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me! Just tidy up the code a bit (see comments) and I think it's done.
apps/directory/vite.config.js
Outdated
@@ -5,7 +5,7 @@ import { createHtmlPlugin } from "vite-plugin-html"; | |||
import monacoEditorPlugin from "vite-plugin-monaco-editor"; | |||
|
|||
const HOST = | |||
process.env.MOLGENIS_APPS_HOST || "https://bbmri-emx2-test.molgeniscloud.org"; | |||
process.env.MOLGENIS_APPS_HOST || "http://localhost:8080/" // "https://bbmri-emx2-test.molgeniscloud.org"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget to undo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
|
||
async function getStudyReport(id: string) { | ||
console.log(getStudyColumns()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget to remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
.orderBy("Studies", "id", "asc") | ||
.where("id") | ||
.like(id); | ||
console.log(studyReportQuery); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
data/biobank-directory/molgenis.csv
Outdated
Studies,,title,Title,text,,true,,The title of the study,,,,,,,,, | ||
Studies,,description,Description,text,,false,,A text describing the study,,,,,,,,, | ||
Studies,,type,Type,string,,false,,"The type of study (Observational, Interventional). This is a string imported from ECRIN",,,,,,,,, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could type not be a categorical value? This would make manual data entry easier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making all the adjustment after our first review, in general data model etc looks fine now, except from some small remarks => see comments in the files.
Also the app looks fine:
- Link to study card in collection detail view works OK.
- Separate study card looks fine => All information that can be entered in the studies table is displayed if available and if not then it's also not displayed.
One small remark: why is study id displayed in the details on the collection card itself?
. Because the information is also available via the right pane? Like f.e. biobanks and for networks these IDs are also not in the collection details.
Second thing is more a feature request and I have no idea if it's difficult to implement, but I think it might be nice if you could navigate from the study card back to the collection card. So that the breadcrumb gets similar to the one of the collection card:
But then "Back to the catalogue"/"Collection1 of biobank1"/Dummy study? Instead of "Back to the catalogue"/Dummy study?
data/biobank-directory/molgenis.csv
Outdated
Persons,,national_node,National Node,ref,,true,,The person originates from this national node.,,NationalNodes,,${description},,,,, | ||
Studies,,,,,,,,Table with information about the studies in which context the collection was generated,,,,,,,,, | ||
Studies,,id,ID,string,1,true,,"Unique ID of the study, prefixed with bbmri-eric:ID:<ecrin_mdr_id>",,,,,,,,, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't make the ID prefixed with bbmri-eric:ID, but preferably something like bbmri-eric:studyID.
Also remove <ecrin_mdr_id> or include that as a suggestion. As the use-case is now ECRIN, but in the future studies from other sources might be included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed all ECRIN reference in the model
data/biobank-directory/molgenis.csv
Outdated
@@ -115,6 +115,7 @@ Collections,,access_joint_project,Access via Join Projects to,ontology_array,,fa | |||
Collections,,access_description,Access Description,text,,false,,Short description of the access rules.,,,,,,,,, | |||
Collections,,access_uri,Access URI,hyperlink,,false,,URI describing the access policy.,,,,,,,,, | |||
Collections,,sop,PD/SOPs,ontology_array,,false,,Availability of Process Descriptions (PDs) and/or Standard Operating Procedures (SOPs).,DirectoryOntologies,SOPs,,${label},,,,, | |||
Collections,,study,Study,ref,,false,,A link to a Study during which the collection was generated,,Studies,,,,,,, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding refLabel = ${title} will show the title instead of the id in the collections table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
2977179
to
b16cc2e
Compare
@dtroelofsprins I removed the study from the card details. You were right it was unnecessary. |
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? |
data/biobank-directory/molgenis.csv
Outdated
@@ -115,6 +115,7 @@ Collections,,access_joint_project,Access via Join Projects to,ontology_array,,fa | |||
Collections,,access_description,Access Description,text,,false,,Short description of the access rules.,,,,,,,,, | |||
Collections,,access_uri,Access URI,hyperlink,,false,,URI describing the access policy.,,,,,,,,, | |||
Collections,,sop,PD/SOPs,ontology_array,,false,,Availability of Process Descriptions (PDs) and/or Standard Operating Procedures (SOPs).,DirectoryOntologies,SOPs,,${label},,,,, | |||
Collections,,study,Study,ref,,false,,A link to a Study during which the collection was generated,,Studies,,${title},,,,, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, forgot to mention it earlier, but now the study is shown under the Policies header. I think it's better to move this to the "Belongs to' one. So after also_known.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved
A collection can be linked to multiple studies |
Can you have a look at how you can harmonise the data model with MIABIS v3 Study (researchresource). |
dcdf79f
to
2b32b30
Compare
7547367
to
6d2e31e
Compare
@dtroelofsprins can you check this again? |
6d2e31e
to
20dd31e
Compare
I'm a bit confused now, not sure whether you've seen the comment I made last week?
Looking at the molgenis.csv the column in collections.csv is still named Study, instead of Studies, but I do see that new commits were pushed recently. |
…ciate it to Collection
…es in the Directory
…ge the id the dummy study according to the review
…uired and adds it to Study table
…ard. Left only in the right pane
…rence to ECRIN in the comments and id
…d changed the frontend accordingly
20dd31e
to
ab775d9
Compare
Quality Gate passedIssues Measures |
I must have missed the comment. I changed the name of the column to studies now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the latest change.
As far as I can see all things look and work fine now 🙂
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:
Study
entity with some attributes for the studiesCollection
entity the attributestudy
that references a studynational_node
of theAlsoKnowIn
entity, to be optional. Indeed, in case thealso_known
entity is used to store information for a study, the national node is null, since the concept is not related to a studyhow to test:
todo: