Skip to content
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/populate criteria #42

Merged
merged 4 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
description also
  • Loading branch information
enola-dkfz committed Nov 22, 2024
commit eda6ef500f306a1bb2f4537bcdcd790642f8e319
2 changes: 1 addition & 1 deletion src/catalogue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ fn recurse(json: &mut Value, counts: &mut CriteriaGroups) {
let catalogue_criterion = CatalogueCriterion {
key: key.clone(),
name: key.clone(),
description: "".into(),
description: key.clone(),
count: count.clone(),
};
criteria.push(json!(catalogue_criterion));
Expand Down
2 changes: 1 addition & 1 deletion src/resources/test/catalogue_bbmri.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"childCategories":[{"criteria":[{"count":43,"description":"male","key":"male","name":"male"},{"count":31,"description":"female","key":"female","name":"female"},{"description":"other","key":"other","name":"other"},{"description":"unknown","key":"sex_uncharted","name":"unknown"}],"fieldType":"single-select","infoButtonText":["The gender search criterion represents the administrative gender of the patient."],"key":"gender","name":"Gender","system":"","type":"EQUALS"},{"criteria":[{"count":26,"description":"","key":"C34.0","name":"C34.0"},{"count":28,"description":"","key":"C34.2","name":"C34.2"},{"count":25,"description":"","key":"C34.8","name":"C34.8"},{"count":27,"description":"","key":"C78.0","name":"C78.0"},{"count":25,"description":"","key":"D38.6","name":"D38.6"},{"count":25,"description":"","key":"R91","name":"R91"}],"fieldType":"autocomplete","infoButtonText":["If diagnosis is selected, the search returns all specimens from all patients who have at least one Condition resource OR Specimen resource with one of the selected diagnoses."],"key":"diagnosis","name":"Diagnosis ICD-10","system":"http://fhir.de/CodeSystem/dimdi/icd-10-gm","type":"EQUALS"},{"criteria":[],"fieldType":"number","infoButtonText":["The donor age at diagnosis criterion represents the age of the patient at the time of diagnosis, calculated as the difference between the date of disease onset and the patient's date of birth. That's why the age stratifier, which shows today's age, also shows some ages that are outside the selected range."],"key":"diagnosis_age_donor","name":"Diagnosis age donor (years)","system":"","type":"BETWEEN"},{"criteria":[],"fieldType":"date","infoButtonText":["Date of diagnosis represents the date when the donor was diagnosed."],"key":"date_of_diagnosis","name":"Date of diagnosis","system":"","type":"BETWEEN"}],"key":"donor","name":"Donor/Clinical Information"},{"childCategories":[{"criteria":[],"fieldType":"number","infoButtonText":["The donor age criterion represents the patient's age today"],"key":"donor_age","name":"Donor Age","system":"","type":"BETWEEN"},{"criteria":[{"count":62,"description":"Serum","key":"blood-serum","name":"Serum"},{"description":"Tissue snap frozen","key":"tissue-frozen","name":"Tissue snap frozen"},{"description":"Whole Blood","key":"whole-blood","name":"Whole Blood"},{"count":62,"description":"Plasma","key":"blood-plasma","name":"Plasma"},{"description":"Other derivative","key":"derivative-other","name":"Other derivative"},{"description":"Other tissue storage","key":"tissue-other","name":"Other tissue storage"},{"description":"Peripheral blood cells","key":"peripheral-blood-cells-vital","name":"Peripheral blood cells"},{"description":"Urine","key":"urine","name":"Urine"},{"description":"RNA","key":"rna","name":"RNA"},{"description":"Other liquid biosample","key":"liquid-other","name":"Other liquid biosample"},{"description":"Buffy coat","key":"buffy-coat","name":"Buffy coat"},{"description":"DNA","key":"dna","name":"DNA"},{"description":"Liquor/CSF","key":"csf-liquor","name":"Liquor/CSF"},{"description":"Faeces","key":"stool-faeces","name":"Faeces"},{"description":"Bone marrow","key":"bone-marrow","name":"Bone marrow"},{"description":"Tissue (FFPE)","key":"tissue-ffpe","name":"Tissue (FFPE)"},{"description":"Saliva","key":"saliva","name":"Saliva"},{"description":"Ascites","key":"ascites","name":"Ascites"},{"description":"Swab","key":"swab","name":"Swab"},{"description":"Dried whole blood","key":"dried-whole-blood","name":"Dried whole blood"}],"fieldType":"single-select","infoButtonText":["If sample types are selected, only samples of those types will be displayed"],"key":"sample_kind","name":"Sample type","system":"","type":"EQUALS"},{"criteria":[],"fieldType":"date","infoButtonText":["If a sampling date range is selected, only those samples collected within that date range will be displayed. Samples that don't have this information will not be displayed."],"key":"sampling_date","name":"Sampling date","system":"","type":"BETWEEN"},{"criteria":[{"description":"RT","key":"temperatureRoom","name":"RT"},{"description":"2°C to 10°C","key":"temperature2to10","name":"2°C to 10°C"},{"description":"4°C","key":"four_degrees","name":"4°C"},{"description":"Minus 18°C to minus 35°C","key":"temperature-18to-35","name":"Minus 18°C to minus 35°C"},{"description":"Minus 60°C to minus 85°C","key":"temperature-60to-85","name":"Minus 60°C to minus 85°C"},{"description":"Gaseous nitrogen","key":"temperatureGN","name":"Gaseous nitrogen"},{"description":"Liquid nitrogen","key":"temperatureLN","name":"Liquid nitrogen"},{"description":"Other storage temperature","key":"temperatureOther","name":"Other storage temperature"},{"description":"Uncharted storage temperature","key":"storage_temperature_uncharted","name":"Uncharted storage temperature"}],"fieldType":"single-select","infoButtonText":["If storage temperatures are selected, only those samples stored at one of those temperatures will be displayed. Samples that don't have this information will not be displayed."],"key":"storage_temperature","name":"Storage temperature","system":"","type":"EQUALS"}],"key":"sample","name":"Sample"}]
[{"childCategories":[{"criteria":[{"count":43,"description":"male","key":"male","name":"male"},{"count":31,"description":"female","key":"female","name":"female"},{"description":"other","key":"other","name":"other"},{"description":"unknown","key":"sex_uncharted","name":"unknown"}],"fieldType":"single-select","infoButtonText":["The gender search criterion represents the administrative gender of the patient."],"key":"gender","name":"Gender","system":"","type":"EQUALS"},{"criteria":[{"count":26,"description":"C34.0","key":"C34.0","name":"C34.0"},{"count":28,"description":"C34.2","key":"C34.2","name":"C34.2"},{"count":25,"description":"C34.8","key":"C34.8","name":"C34.8"},{"count":27,"description":"C78.0","key":"C78.0","name":"C78.0"},{"count":25,"description":"D38.6","key":"D38.6","name":"D38.6"},{"count":25,"description":"R91","key":"R91","name":"R91"}],"fieldType":"autocomplete","infoButtonText":["If diagnosis is selected, the search returns all specimens from all patients who have at least one Condition resource OR Specimen resource with one of the selected diagnoses."],"key":"diagnosis","name":"Diagnosis ICD-10","system":"http://fhir.de/CodeSystem/dimdi/icd-10-gm","type":"EQUALS"},{"criteria":[],"fieldType":"number","infoButtonText":["The donor age at diagnosis criterion represents the age of the patient at the time of diagnosis, calculated as the difference between the date of disease onset and the patient's date of birth. That's why the age stratifier, which shows today's age, also shows some ages that are outside the selected range."],"key":"diagnosis_age_donor","name":"Diagnosis age donor (years)","system":"","type":"BETWEEN"},{"criteria":[],"fieldType":"date","infoButtonText":["Date of diagnosis represents the date when the donor was diagnosed."],"key":"date_of_diagnosis","name":"Date of diagnosis","system":"","type":"BETWEEN"}],"key":"donor","name":"Donor/Clinical Information"},{"childCategories":[{"criteria":[],"fieldType":"number","infoButtonText":["The donor age criterion represents the patient's age today"],"key":"donor_age","name":"Donor Age","system":"","type":"BETWEEN"},{"criteria":[{"count":62,"description":"Serum","key":"blood-serum","name":"Serum"},{"description":"Tissue snap frozen","key":"tissue-frozen","name":"Tissue snap frozen"},{"description":"Whole Blood","key":"whole-blood","name":"Whole Blood"},{"count":62,"description":"Plasma","key":"blood-plasma","name":"Plasma"},{"description":"Other derivative","key":"derivative-other","name":"Other derivative"},{"description":"Other tissue storage","key":"tissue-other","name":"Other tissue storage"},{"description":"Peripheral blood cells","key":"peripheral-blood-cells-vital","name":"Peripheral blood cells"},{"description":"Urine","key":"urine","name":"Urine"},{"description":"RNA","key":"rna","name":"RNA"},{"description":"Other liquid biosample","key":"liquid-other","name":"Other liquid biosample"},{"description":"Buffy coat","key":"buffy-coat","name":"Buffy coat"},{"description":"DNA","key":"dna","name":"DNA"},{"description":"Liquor/CSF","key":"csf-liquor","name":"Liquor/CSF"},{"description":"Faeces","key":"stool-faeces","name":"Faeces"},{"description":"Bone marrow","key":"bone-marrow","name":"Bone marrow"},{"description":"Tissue (FFPE)","key":"tissue-ffpe","name":"Tissue (FFPE)"},{"description":"Saliva","key":"saliva","name":"Saliva"},{"description":"Ascites","key":"ascites","name":"Ascites"},{"description":"Swab","key":"swab","name":"Swab"},{"description":"Dried whole blood","key":"dried-whole-blood","name":"Dried whole blood"}],"fieldType":"single-select","infoButtonText":["If sample types are selected, only samples of those types will be displayed"],"key":"sample_kind","name":"Sample type","system":"","type":"EQUALS"},{"criteria":[],"fieldType":"date","infoButtonText":["If a sampling date range is selected, only those samples collected within that date range will be displayed. Samples that don't have this information will not be displayed."],"key":"sampling_date","name":"Sampling date","system":"","type":"BETWEEN"},{"criteria":[{"description":"RT","key":"temperatureRoom","name":"RT"},{"description":"2°C to 10°C","key":"temperature2to10","name":"2°C to 10°C"},{"description":"4°C","key":"four_degrees","name":"4°C"},{"description":"Minus 18°C to minus 35°C","key":"temperature-18to-35","name":"Minus 18°C to minus 35°C"},{"description":"Minus 60°C to minus 85°C","key":"temperature-60to-85","name":"Minus 60°C to minus 85°C"},{"description":"Gaseous nitrogen","key":"temperatureGN","name":"Gaseous nitrogen"},{"description":"Liquid nitrogen","key":"temperatureLN","name":"Liquid nitrogen"},{"description":"Other storage temperature","key":"temperatureOther","name":"Other storage temperature"},{"description":"Uncharted storage temperature","key":"storage_temperature_uncharted","name":"Uncharted storage temperature"}],"fieldType":"single-select","infoButtonText":["If storage temperatures are selected, only those samples stored at one of those temperatures will be displayed. Samples that don't have this information will not be displayed."],"key":"storage_temperature","name":"Storage temperature","system":"","type":"EQUALS"}],"key":"sample","name":"Sample"}]
Loading