Skip to content

Commit

Permalink
Merge pull request #117 from samply/project_based_search
Browse files Browse the repository at this point in the history
feat: added dktk project based search
  • Loading branch information
patrickskowronekdkfz authored Aug 13, 2024
2 parents cda1498 + 9c3f010 commit 76c4015
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
51 changes: 51 additions & 0 deletions packages/demo/public/catalogues/catalogue-dktk.json
Original file line number Diff line number Diff line change
Expand Up @@ -20354,5 +20354,56 @@
]
}
]
},
{
"key": "project",
"name": "Forschungsprojekte",
"infoButtonText": ["Projekt-Übersicht"],
"childCategories": [
{
"key": "pseudo_projects",
"name": "Projektname",
"fieldType": "single-select",
"type": "EQUALS",
"system": "",
"criteria": [
{
"key": "DKTK000002089",
"name": "EXLIQUID",
"description": ""
},
{
"key": "DKTK000001985",
"name": "RiskY-AML",
"description": ""
},
{
"key": "DKTK000001986",
"name": "MASTER-Programm",
"description": ""
},
{
"key": "DKTK000001950",
"name": "IRCC",
"description": ""
},
{
"key": "DKTK000001951",
"name": "ARMANI",
"description": ""
},
{
"key": "DKTK999999999",
"name": "Testprojekt",
"description": ""
},
{
"key": "DKTK000000791",
"name": "ReKo",
"description": ""
}
]
}
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const getSingleton = (criterion: AstBottomLayerValue): string => {
if (myCQL) {
switch (myCriterion.type) {
case "gender":
case "pseudo_projects":
case "BBMRI_gender":
case "histology":
case "conditionValue":
Expand Down
5 changes: 5 additions & 0 deletions packages/lib/src/cql-translator-service/cqlquery-mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export const alias = new Map<string, string>([

export const cqltemplate = new Map<string, string>([
["gender", "Patient.gender = '{{C}}'"],
[
"pseudo_projects",
" exists ( Patient.extension E where E.url = 'http://dktk.dkfz.de/fhir/Projects/{{C}}')",
],
["conditionValue", "exists [Condition: Code '{{C}}' from {{A1}}]"],
[
"conditionBodySite",
Expand Down Expand Up @@ -275,6 +279,7 @@ export const cqltemplate = new Map<string, string>([
export const criterionMap = new Map<string, { type: string; alias?: string[] }>(
[
["gender", { type: "gender" }],
["pseudo_projects", { type: "pseudo_projects" }],
["histology", { type: "histology", alias: ["loinc"] }],
["diagnosis", { type: "conditionValue", alias: ["icd10"] }],
["bodySite", { type: "conditionBodySite", alias: ["bodySite"] }],
Expand Down

0 comments on commit 76c4015

Please sign in to comment.