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: added dktk project based search #117

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Loading