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

Unqualified Locatable in containment cannot be used in containment expression #91

Closed
7 tasks
chevalleyc opened this issue Sep 29, 2020 · 0 comments · Fixed by #106
Closed
7 tasks

Unqualified Locatable in containment cannot be used in containment expression #91

chevalleyc opened this issue Sep 29, 2020 · 0 comments · Fixed by #106
Assignees
Labels
bug Something isn't working

Comments

@chevalleyc
Copy link
Contributor

Steps to reproduce

For an AQL expression such as:

select
q/items[at0024]/value/defining_code/code_string as ErregerBEZK,
x/items[at0015]/value as Datetime
from EHR e
contains COMPOSITION c
contains OBSERVATION v[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]
contains ( 
CLUSTER h[openEHR-EHR-CLUSTER.laboratory_test_panel.v0] and
CLUSTER x[openEHR-EHR-CLUSTER.specimen.v1] and
CLUSTER q[openEHR-EHR-CLUSTER.laboratory_test_analyte.v1])
where
c/name/value='Mikrobiologischer Befund' 

It seems there is no way to build a containment expression which specifies explicitly COMPOSITION c to used here in the WHERE clause (but it could also be f.e. c/uid/value in SELECT).

We can write the containment expression as:

        ContainmentExpression containmentExpression =
                befundObservationContainment.contains(
                        kulturClusterContainment.and(
                                probeClusterContainment.and(proVirusClusterContainment))
                );

But it results as the following AQL as expected:

Select ...
 from EHR e
  contains OBSERVATION o1[openEHR-EHR-OBSERVATION.laboratory_test_result.v1] 
    contains (CLUSTER c2[openEHR-EHR-CLUSTER.laboratory_test_panel.v0]
                   and (CLUSTER c3[openEHR-EHR-CLUSTER.specimen.v1]
                        and CLUSTER c0[openEHR-EHR-CLUSTER.laboratory_test_analyte.v1])) ...

Expected result

There should be a generic way to specify an unqualified containment on a Locatable (or a workaround if applicable)

Success criteria

  • The defect has been fixed
  • The defect is checked by an unit or an integration test (Robot)
  • Merge Request approved
  • Unit tests passed
  • Build without errors
  • Release notes prepared
  • Runtime warnings
@chevalleyc chevalleyc added the bug Something isn't working label Sep 29, 2020
stefanspiska added a commit that referenced this issue Oct 13, 2020
stefanspiska added a commit that referenced this issue Oct 13, 2020
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

Successfully merging a pull request may close this issue.

2 participants