Skip to content

Commit

Permalink
fix(directory): Add services to staging area template (#4555)
Browse files Browse the repository at this point in the history
* Fix description of QualityInfoServices table

* Add Services table to data model

And refback from Biobanks

* Remove duplicate attribute

* Add demo data for Services

* Fix reference to Person id

* Remove capabilities from Biobanks (replaced by services)

* Update number of demo data files

* Remove capabilities from demo data as well

* Add ID validation
  • Loading branch information
hslh authored Dec 13, 2024
1 parent a459c4c commit 2abc93d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void test14DCATLoader() {
void test15DirectoryStagingLoader() {
Schema directoryStaging = database.createSchema(DIRECTORY_STAGING);
DataModels.Regular.BIOBANK_DIRECTORY_STAGING.getImportTask(directoryStaging, false).run();
assertEquals(7, directoryStaging.getTableNames().size());
assertEquals(8, directoryStaging.getTableNames().size());
}

@Test
Expand Down
5 changes: 2 additions & 3 deletions data/biobank-directory/molgenis.csv
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ Persons,,biobanks,Biobanks,refback,,false,true,Biobanks the person is connected
Persons,,collections,Collections,refback,,false,true,Collections the person is connected to.,,Collections,contact,${name},,,,,
Persons,,networks,Networks,refback,,false,true,Networks the person is connected to.,,Networks,contact,${name},,,,,
Persons,,national_node,National Node,ref,,true,,The person originates from this national node.,,NationalNodes,,${description},,,,,
QualityInfoServices,,,,,,,,Collection Quality Information,,,,,,,,,
QualityInfoServices,,,,,,,,Service Quality Information,,,,,,,,,
QualityInfoServices,,id,ID,auto_id,1,true,true,,,,,,,,,QIS-${mg_autoid},
QualityInfoServices,,service,Collection,ref,,true,,,,Services,,${name},,,,,
QualityInfoServices,,service,Service,ref,,true,,,,Services,,${name},,,,,
QualityInfoServices,,qualityStandard,Quality Standard,ontology,,true,,,DirectoryOntologies,QualityStandards,,${label},,,,,
QualityInfoServices,,assessmentLevel,Assessment Level,ontology,,true,,,DirectoryOntologies,AssessmentLevels,,${label},,,,,
QualityInfoServices,,certificationNumber,Certification Number,string,,false,,,,,,,,,,,
Expand All @@ -185,7 +185,6 @@ Services,,tRL,Technology Readiness Level,ontology,,false,,Technology Readiness L
Services,,accessDescription,Access Description,string,,true,,Description of the access policy of the service.,,,,,,,,,
Services,,accessDescriptionUrl,Access Description URL,hyperlink,,false,,URL of the service access policy if available..,,,,,,,,,
Services,,unitOfAccess,Unit of Access,string,,false,,Information about a standard unit used in calculations of costs of service provision.,,,,,,,,,
Services,,accessDescription,Access Description,string,,true,,Description of the access policy of the service,,,,,,,,,
Services,,unitCost,Unit Cost,string,,false,,Cost per unit.,,,,,,,,,
Services,,qualityStandards,Quality Standards,refback,,false,true,The standards and/or technical specifications that the service is certified or accredited for.,,QualityInfoServices,service,${qualityStandard.label},,,,,
Services,,contactInformation,Contact Information,ref,,false,,Contact information for the contact person or responsible person of the service,,Persons,,,,,,,
Expand Down
6 changes: 3 additions & 3 deletions data/biobank-directory/stagingArea/demo/Biobanks.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
id,name,acronym,description,url,location,country,latitude,longitude,head,contact,juridical_person,network,also_known,capabilities,collaboration_commercial,collaboration_non_for_profit,withdrawn
bbmri-eric:ID:DE_biobank1,Biobank1,bb1,The description of biobank1,,Berlin,DE,,,bbmri-eric:contactID:DE_head_bb1,bbmri-eric:contactID:DE_contact_bb1,A university,bbmri-eric:networkID:DE_network1,bbmri-eric:akiID:DE_00001,"covid19,nucleic-acid-extraction",true,false,false
bbmri-eric:ID:NL_biobank2,Biobank2,bb2,The description of biobank2,,Amsterdam,NL,,,bbmri-eric:contactID:NL_person1,bbmri-eric:contactID:NL_person1,An institute,bbmri-eric:networkID:EU_network,bbmri-eric:akiID:NL_00001,"cell-culture,pathology-archive-access,Testing_Facility_Animal",false,true,false
id,name,acronym,description,url,location,country,latitude,longitude,head,contact,juridical_person,network,also_known,collaboration_commercial,collaboration_non_for_profit,withdrawn
bbmri-eric:ID:DE_biobank1,Biobank1,bb1,The description of biobank1,,Berlin,DE,,,bbmri-eric:contactID:DE_head_bb1,bbmri-eric:contactID:DE_contact_bb1,A university,bbmri-eric:networkID:DE_network1,bbmri-eric:akiID:DE_00001,true,false,false
bbmri-eric:ID:NL_biobank2,Biobank2,bb2,The description of biobank2,,Amsterdam,NL,,,bbmri-eric:contactID:NL_person1,bbmri-eric:contactID:NL_person1,An institute,bbmri-eric:networkID:EU_network,bbmri-eric:akiID:NL_00001,false,true,false
3 changes: 3 additions & 0 deletions data/biobank-directory/stagingArea/demo/Services.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,serviceTypes,acronym,description,descriptionUrl,device,deviceSystem,tRL,accessDescriptionUrl,unitOfAccess,accessDescription,unitCost,contactInformation,biobank
bbmri-eric:serviceID:DE_1234,Biobank Service,"microbiome-analysis, sample-storage",,Service provided by this biobank,,,,TRL-4,,,https://myservice-access.de,,bbmri-eric:contactID:DE_contact_bb1,bbmri-eric:ID:DE_biobank1
bbmri-eric:serviceID:NL_541,Dutch Biobank Service,"PET-Scans, TrainingResourceLabProtocols",,Services provided by Biobank2,,,,TRL-2,,,https://biobank2-service-access.nl,,,bbmri-eric:ID:NL_biobank2
20 changes: 18 additions & 2 deletions data/biobank-directory/stagingArea/molgenis.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Biobanks,,juridical_person,Juridical Person,string,,true,,Juristic person of a b
Biobanks,,network,Networks,ref_array,,false,,"Reference to a biobank network ID, to which the biobank belongs; this attribute can also be used for biobank network, where it refers to the superior biobank network.",,Networks,,${name},,,,,
Biobanks,,also_known,Also Known In,ref_array,,false,,The biobank also exists in …,,AlsoKnownIn,,${name_system},,,,,
Biobanks,,collections,Collections,refback,,false,,Collections belonging to the biobank.,,Collections,biobank,,,,,,
Biobanks,,capabilities,Capabilities Provided,ontology_array,,false,,Capabilities that the biobank organisation can offer to a researcher.,DirectoryOntologies,Capabilities,,${label},,,,,
Biobanks,,services,Services,refback,,false,,Capabilities and services that the biobank organisation can offer to a researcher.,,Services,biobank,${name},,,,,
Biobanks,,collaboration_commercial,Commercial Collaboration,bool,,false,,The biobank can be used for collaboration with commercial partners.,,,,,,,,,
Biobanks,,collaboration_non_for_profit,Non-for-profit Collaboration,bool,,false,,The biobank can be used for collaboration with non-for-profit partners.,,,,,,,,,
Biobanks,,withdrawn,Withdrawn,bool,,true,,This biobank is withdrawn from the Directory.,,,,,false,,,,
Expand Down Expand Up @@ -129,4 +129,20 @@ Studies,,age_high,Age High,int,,false,,Age of oldest sample donor at time of sam
Studies,,age_unit,Age Unit,ontology,,false,,"Unit defining Age Low and Age High. Can be one of the following values: YEAR, MONTH, WEEK, DAY - MIABIS-2.0-08.",DirectoryOntologies,AgeUnits,,${label},,,,,
Studies,,number_of_subjects,Number of subjects,int,,false,,"The number of subjects that participated to the study",,,,,,,,,
Studies,,also_known,Also Known In,ref_array,,false,,The study also exists in …,,AlsoKnownIn,,${name_system},,,,,
Studies,,collections,Collections,refback,,false,true,,,Collections,studies,,,,,,
Studies,,collections,Collections,refback,,false,true,,,Collections,studies,,,,,,
Services,,,,,,,,Biobank Capabilities and Services,,,,,,,,,
Services,,id,ID,string,1,true,,"Unique ID of the service, prefixed with bbmri-eric:serviceID:",,,,,,if(!/^bbmri-eric:serviceID:[\\w]+_[\\w-:]+$/.test(id))'ID should start with bbmri-eric:serviceID:{NationalNodeCode}_',,,
Services,,name,Service Name,string,2,true,,Name of the service (preferably in English).,,,,,,,,,
Services,,serviceTypes,Service Types,ref_array,,true,,Related service types,DirectoryOntologies,ServiceTypes,,${label},,,,,
Services,,acronym,Acronym,string,,false,,Short name in use for the service. If applicable.,,,,,,,,,
Services,,description,Description,string,,true,,Full description of the service (in English),,,,,,,,,
Services,,descriptionUrl,Description URL,hyperlink,,false,,URL address of the service description if available.,,,,,,,,,
Services,,device,Device,string,,false,,Name of the device(s) if the service is provided with the use of them.,,,,,,,,,
Services,,deviceSystem,Device System,string,,false,,Name of a software system or platform if important for the device characteristics.,,,,,,,,,
Services,,tRL,Technology Readiness Level,ontology,,false,,Technology Readiness Level - a concept for self-assessment of the service maturity,DirectoryOntologies,TRLs,,${label},,,,,
Services,,accessDescription,Access Description,string,,true,,Description of the access policy of the service.,,,,,,,,,
Services,,accessDescriptionUrl,Access Description URL,hyperlink,,false,,URL of the service access policy if available..,,,,,,,,,
Services,,unitOfAccess,Unit of Access,string,,false,,Information about a standard unit used in calculations of costs of service provision.,,,,,,,,,
Services,,unitCost,Unit Cost,string,,false,,Cost per unit.,,,,,,,,,
Services,,contactInformation,Contact Information,ref,,false,,Contact information for the contact person or responsible person of the service,,Persons,,,,,,,
Services,,biobank,Biobank,ref,,true,,"Reference to a biobank ID, to which the service belongs.",,Biobanks,,${name},,,,,

0 comments on commit 2abc93d

Please sign in to comment.