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

Incorrect Filtering of AQL Query Results in Cohort-Explorer #561

Open
jsbankole opened this issue Jun 18, 2024 · 0 comments
Open

Incorrect Filtering of AQL Query Results in Cohort-Explorer #561

jsbankole opened this issue Jun 18, 2024 · 0 comments

Comments

@jsbankole
Copy link

When executing a specific AQL query in the Cohort-Explorer, the results include more details than specified. Running the same query directly in OpenEHR Studio or a REST API client (e.g., Insomnia) returns the correct results. This indicates a potential issue with how Conhort-Explorer processes or filters AQL query results.

AQL Query in OpenEHR Studio:

image

AQL Query in Query Builder:
image

Observed Behavior:

While OpenEHR Studio returned only the specified columns, Cohort-Explorer returns additional data beyond the specified columns. See a segment below:

pseudonym diagnose/sekundärcode:0/diagnosesicherheit|code diagnose/primärcode:0/kodierte_diagnose|value diagnose/sekundärcode:0/kodierte_diagnose|code diagnose/sekundärcode:0/kodierte_diagnose|value diagnose/context/case_identification/case_identifier diagnose/context/report_id/_name

Configuration information
I have attached the pom.xml file for your reference to provide context on the dependencies and environment used in the project.

Steps to reproduce

  1. Execute the following AQL query in the Cohort-Explorer:
    SELECT c/content[openEHR-EHR-EVALUATION.problem_diagnosis.v1,'Primärcode']/data[at0001]/items[at0002,'Kodierte Diagnose']/value/value AS Kodierte_Diagnose, c/content[openEHR-EHR-EVALUATION.problem_diagnosis.v1,'Primärcode']/data[at0001]/items[at0002]/value/defining_code/code_string AS Kodierte_Diagnose_code_string FROM EHR e CONTAINS COMPOSITION c

  2. Observe the results returned by Cohort-Explorer.

  3. Execute the same query in OpenEHR Studio or a REST API client (e.g., Insomnia).
    `{
    "aql": "SELECT c/content[openEHR-EHR-EVALUATION.problem_diagnosis.v1,'Primärcode']/data[at0001]/items[at0002,'Kodierte Diagnose']/value/value AS Kodierte_Diagnose, c/content[openEHR-EHR-EVALUATION.problem_diagnosis.v1,'Primärcode']/data[at0001]/items[at0002]/value/defining_code/code_string AS Kodierte_Diagnose_code_string FROM EHR e CONTAINS COMPOSITION c WHERE c/name/value = 'Diagnose'"
    }
    pom.txt

`
Please let me know if you need any additional information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant