Skip to content

Commit

Permalink
feat: align beacon filters with Beacon Network options
Browse files Browse the repository at this point in the history
  • Loading branch information
brunopacheco1 committed Nov 14, 2024
1 parent 8ba43dc commit 9bf0ef5
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 65 deletions.
199 changes: 141 additions & 58 deletions src/main/resources/META-INF/resources/beacon-filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@
{
"source": "beacon",
"type": "DROPDOWN",
"key": "ncit",
"label": "National Cancer Institute Thesaurus",
"key": "diseases",
"label": "Diseases",
"values": [
{
"value": "NCIT:C25179",
"label": "Hospitalization"
"value": "NCIT:C4349",
"label": "Colon adenocarcinoma"
},
{
"value": "NCIT:C171454",
"label": "Intensive Care Unit Stay"
"value": "NCIT:C7966",
"label": "Mucinous Adenocarcinoma of the Colon and Rectum"
},
{
"value": "NCIT:C9383",
"label": "Rectal Adenocarcinoma"
},
{
"value": "MONDO:0100096",
"label": "COVID-19"
},
{
"value": "NCIT:C14139",
Expand All @@ -37,6 +45,10 @@
"value": "NCIT:C15289",
"label": "Organ Transplantation"
},
{
"value": "NCIT:C3117",
"label": "Hypertension"
},
{
"value": "NCIT:C3080",
"label": "Congestive Heart Failure"
Expand All @@ -61,91 +73,162 @@
},
{
"source": "beacon",
"type": "FREE_TEXT",
"key": "BMI",
"label": "BMI in Kilograms per Square Meter",
"operators": [
"=",
"!=",
">",
"<",
"%"
"type": "DROPDOWN",
"key": "histopathology",
"label": "Histopathology",
"values": [
{
"value": "ICD10:C18.2",
"label": "Ascending colon"
},
{
"value": "ICD10:C18.6",
"label": "Descending colon"
},
{
"value": "ICD10:C18.4",
"label": "Transverse colon"
},
{
"value": "ICD10:C18.3",
"label": "Hepatic flexure"
},
{
"value": "ICD10:C18.5",
"label": "Splenic flexure"
},
{
"value": "ICD10:C18.7",
"label": "Sigmoid colon"
},
{
"value": "ICD10:C18.0",
"label": "Caecum"
},
{
"value": "NCIT:C27966",
"label": "Stage I"
},
{
"value": "NCIT:C28054",
"label": "Stage II"
},
{
"value": "NCIT:C27970",
"label": "Stage III"
},
{
"value": "NCIT:C27971",
"label": "Stage IV"
}
]
},
{
"source": "beacon",
"type": "FREE_TEXT",
"key": "Height-standing",
"label": "Height-standing in Centimeters",
"operators": [
"=",
"!=",
">",
"<",
"%"
"type": "DROPDOWN",
"key": "treatment",
"label": "Treatment",
"values": [
{
"value": "NCIT:C15313",
"label": "Radiation Therapy"
},
{
"value": "NCIT:C15632",
"label": "Chemotherapy"
},
{
"value": "NCIT:C505",
"label": "Fluorouracil"
},
{
"value": "NCIT:C1181",
"label": "Oxaliplatin"
},
{
"value": "NCIT:C1699",
"label": "Zoledronic Acid"
},
{
"value": "NCIT:C62040",
"label": "Irinotecan"
}
]
},
{
"source": "beacon",
"type": "ENTRIES",
"key": "gene+aminoacid",
"label": "Mutations in:",
"entries": [
"type": "DROPDOWN",
"key": "intervention",
"label": "Intervention",
"values": [
{
"key": "geneId",
"label": "gene"
"value": "NCIT:C25179",
"label": "Hospitalization"
},
{
"key": "aminoacidChange",
"label": "aminoacid"
"value": "NCIT:C171454",
"label": "Intensive Care Unit Stay"
},
{
"value": "SNOMED:52765003",
"label": "Intubation (procedure)"
},
{
"value": "SNOMED:371907003",
"label": "Oxygen administration by nasal cannula"
}
]
},
{
"source": "beacon",
"type": "ENTRIES",
"key": "gene",
"label": "Mutations in:",
"entries": [
"type": "DROPDOWN",
"key": "sex",
"label": "Sex",
"values": [
{
"key": "geneId",
"label": "gene"
"value": "NCIT:C16576",
"label": "Female"
},
{
"value": "NCIT:C20197",
"label": "Male"
}
]
},
{
"source": "beacon",
"type": "FREE_TEXT",
"key": "diseases.ageOfOnset.iso8601duration",
"label": "Age",
"operators": [
"=",
"!=",
">",
"<",
"%"
]
},
{
"source": "beacon",
"type": "ENTRIES",
"key": "bases",
"label": "Mutations in:",
"key": "genetic_mutation",
"label": "Genetic Mutation",
"entries": [
{
"key": "alternateBases",
"label": "alternateBases"
},
{
"key": "referenceBases",
"label": "referenceBases"
},
{
"key": "start",
"label": "start"
},
{
"key": "end",
"label": "end"
"key": "geneId",
"label": "gene"
},
{
"key": "variantType",
"label": "type"
"key": "aminoacidChange",
"label": "aminoacid"
}
]
},
{
"source": "beacon",
"type": "ENTRIES",
"key": "bases+assembly",
"label": "Mutations in:",
"key": "genetic_variation",
"label": "Genetic Variation",
"entries": [
{
"key": "alternateBases",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ void shouldRetrieveAllFilters_WhenAuthenticated() {
.get("/api/v1/filters")
.then()
.statusCode(200)
.body("", hasSize(12))
.body("find { it.source == 'ckan' }.values", hasSize(greaterThan(0)))
.body("find { it.source == 'beacon' }.values", hasSize(greaterThan(0)))
.body("find { it.label == 'National Cancer Institute Thesaurus' }.values", hasSize(
greaterThan(
0)));
.body("find { it.source == 'beacon' }.values", hasSize(greaterThan(0)));
}

@Test
Expand All @@ -76,8 +72,9 @@ void shouldRetrievesBeaconFilteringTerms_WhenAuthenticated() {

assertThat(actual)
.containsExactlyInAnyOrder(
"ncit", "BMI", "Height-standing", "bases", "bases+assembly", "gene",
"gene+aminoacid"
"treatment", "genetic_variation", "sex", "histopathology", "diseases",
"intervention",
"diseases.ageOfOnset.iso8601duration", "genetic_mutation"
);
} catch (Exception e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit 9bf0ef5

Please sign in to comment.