diff --git a/resources/body_bbmri.json b/resources/body_bbmri.json index 6ba91df..955c121 100644 --- a/resources/body_bbmri.json +++ b/resources/body_bbmri.json @@ -23,7 +23,7 @@ "group": [ { "code": { - "text": "patients" + "text": "patient" }, "population": [ { @@ -44,7 +44,7 @@ "stratifier": [ { "code": { - "text": "Gender" + "text": "gender" }, "criteria": { "expression": "Gender", diff --git a/resources/body_dktk.json b/resources/body_dktk.json index 6d636cd..e88b756 100644 --- a/resources/body_dktk.json +++ b/resources/body_dktk.json @@ -44,7 +44,7 @@ "stratifier": [ { "code": { - "text": "Gender" + "text": "gender" }, "criteria": { "expression": "Gender", diff --git a/resources/body_gbn.json b/resources/body_gbn.json index 6ba91df..d6edb11 100644 --- a/resources/body_gbn.json +++ b/resources/body_gbn.json @@ -44,7 +44,7 @@ "stratifier": [ { "code": { - "text": "Gender" + "text": "gender" }, "criteria": { "expression": "Gender", diff --git a/resources/query_bbmri.cql b/resources/query_bbmri.cql index b18b894..534205c 100644 --- a/resources/query_bbmri.cql +++ b/resources/query_bbmri.cql @@ -20,7 +20,7 @@ BBMRI_STRAT_CUSTODIAN_STRATIFIER BBMRI_STRAT_DIAGNOSIS_STRATIFIER -PRISM_BBMRI_STRAT_AGE_STRATIFIER +PRISM_STRAT_AGE_STRATIFIER_BBMRI BBMRI_STRAT_DEF_IN_INITIAL_POPULATION true \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index b75f7e2..2c196ac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -146,7 +146,15 @@ async fn handle_get_criteria( ) -> Result { let mut criteria_groups: CriteriaGroups = CriteriaGroups::new(); // this is going to be aggregated criteria for all the sites - for site in query.clone().sites { + let mut sites = query.sites; + + // allowing empty list of sites in the request because Spot is going to query with the empty list and expect response for the sites in Prism's config + + if sites.is_empty() { + sites = CONFIG.sites.clone(); + } + + for site in sites { debug!("Request for site {}", &site); let criteria_groups_from_cache = match shared_state.criteria_cache.lock().await.cache.get(&site) {