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

Couldn't get the value of DV_BOOLEAN while doing AQL. #946

Open
6 tasks
ATHULKNAIR opened this issue Jul 25, 2022 · 2 comments
Open
6 tasks

Couldn't get the value of DV_BOOLEAN while doing AQL. #946

ATHULKNAIR opened this issue Jul 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@ATHULKNAIR
Copy link

Configuration information

  • EHRbase version: 0.21.1
  • openEHR_SDK version: 1.19.0
  • Archie version: 2.0.1
  • PostgreSQL version: PostgreSQL 14.2 (Ubuntu 14.2-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
  • Java Runtime version: Oracle Corporation 11.0.15+10
  • Operating System version: Linux amd64 5.10.0-0.bpo.9-amd64

Steps to reproduce

OPT file : aarthy.screening.v0.txt
Composition to POST : aarthy.screening.v0-composition.txt

AQL to get the boolean value :
{
"q": " SELECT c/context/start_time/value as time , c/content[openEHR-EHR-OBSERVATION.problem_screening.v0,
'Medical History']/data[at0001]/events[at0002]/data[at0003]/items[at0022, 'One Eyed']/items[at0005]/value/value as data from
EHR e CONTAINS COMPOSITION c WHERE c/archetype_details/template_id/value='aarthy.screening.v0'"
}

Actual result

The result that we get when the above aql is performed :
image

The aql is returning value if we do a upper level query :

{
"q": " SELECT c/context/start_time/value as time, c/content[openEHR-EHR-OBSERVATION.problem_screening.v0, 'Medical History']/data[at0001]/events[at0002]/data[at0003]/items[at0022, 'One Eyed']/items[at0005]/value as data from EHR e CONTAINS COMPOSITION c WHERE c/archetype_details/template_id/value='aarthy.screening.v0'"
}

The result for upper query :
image

Expected result (Acceptance Criteria)

"rows": [
	[
		"2022-07-11T09:51:58.481Z",
		 false
	],
     ]

Definition of Done

  • The defect is checked by an unit or an integration test (Robot)
  • Merge Request approved
  • Unit tests passed
  • Build without errors
  • Release notes prepared
  • No additional runtime warnings
@ATHULKNAIR ATHULKNAIR added the bug Something isn't working label Jul 25, 2022
@xurxogr
Copy link
Contributor

xurxogr commented Jul 25, 2022

I could also reproduce it.
It doesn't happen if that template is the only one in EHRBase as there will be no UNION. As soon as there are more templates it fails:
SQL has cast(ehr.aql_node_name_predicate([...] as boolean) for that template but ehr.aql_node_name_predicate( for the others

@vladislavploaia
Copy link
Contributor

Hello @ATHULKNAIR,
Issue is reproducible as well in EHRBase version 0.22.0.
Jira bug was reported for tracking purposes: https://jira.vitagroup.ag/browse/CDR-491

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants