I’m trying to search an ehr with two COMPOSITIONS. I’m doing this query:
“q”: “SELECT e/ehr_id/value FROM EHR e CONTAINS (COMPOSITION c1 [openEHR-EHR-COMPOSITION.observation_basica.v0]) AND (COMPOSITION c2 [openEHR-EHR-COMPOSITION.evaluation_basica.v0])”
It returns 0 rows, but it should returns 1.
I have tried with “(” and without it, but not works correctly.
Have you tried
“q”: “SELECT e/ehr_id/value FROM EHR e CONTAINS (COMPOSITION c1 [openEHR-EHR-COMPOSITION.observation_basica.v0] AND COMPOSITION c2 [openEHR-EHR-COMPOSITION.evaluation_basica.v0])”
Thanks for the response. In this way I had already tried it. The query continues to return 0 rows.
I can replicate this on EhrBase i.e no rows found where there should be 1.
select e/ehr_id/value as ehrId,
c/archetype_details/archetype_id/value as archetype1,
c/uid/value as uid,
c/context/start_time/value as compositionStartTime,
c/name/value as compositionName,
c2/name/value as compositionName2,
c2/uid/value as uid2,
c2/archetype_details/archetype_id/value as archetype2,
c2/context/start_time/value as compositionStartTime2
from EHR e
contains (COMPOSITION c [openEHR-EHR-COMPOSITION.report-result.v1] AND COMPOSITION c2[openEHR-EHR-COMPOSITION.transfer_summary.v1])
Can I suggest you report this as a bug at GitHub - ehrbase/ehrbase: An open source openEHR server ?