@Test public void testQryEvaluationOR() throws Exception { String query = "select a/uid/value as uid, a/composer/name as\n" + "author, a/context/start_time/value as date_created,\n" + "b_a/data[at0001]/items[at0003]/value/value as priority_place_of_care,\n" + "b_a/data[at0001]/items[at0015]/value/value as priority_place_of_death,\n" + "b_a/data[at0001]/items[at0029]/value/value as priority_comment,\n" + "b_b/data[at0001]/items[at0003]/value/value as treatment_decision,\n" + "b_b/data[at0001]/items[at0002]/value/value as treatment_date_of_decision,\n" + "b_b/data[at0001]/items[at0021]/value/value as treatment_comment,\n" + "b_c/data[at0001]/items[at0003]/value/value as cpr_decision,\n" + "b_c/data[at0001]/items[at0002]/value/value as cpr_date_of_decision,\n" + "b_c/data[at0001]/items[at0021]/value/value as cpr_comment from EHR e\n" + "[ehr_id/value = 'cd8abecd-9925-4313-86af-93aab4930eae'] contains\n" + "COMPOSITION a[openEHR-EHR-COMPOSITION.care_plan.v1] contains\n" + "(EVALUATION b_a[openEHR-EHR-EVALUATION.care_preference_uk.v1] or\n" + "EVALUATION b_b[openEHR-EHR-EVALUATION.advance_decision_refuse_treatment_uk.v1]\n" + "or EVALUATION b_c[openEHR-EHR-EVALUATION.cpr_decision_uk.v1])\n" + "where a/name/value='End of Life Patient Preferences'"; records = queryEngine.perform(query); assertNotNull(records); assertFalse(records.isEmpty()); System.out.print(records); }
public List<Record> perform(String query, boolean explain) throws SQLException { QueryProcessor queryProcessor = new QueryProcessor(context, knowledgeCache, introspectCache); QueryParser queryParser = new QueryParser(context, query); queryParser.pass1(); queryParser.pass2(); List<Record> records = (List<Record>)queryProcessor.execute(queryParser, serverNodeId, explain); return records; }
QueryEngine extends TemplateMetaData { public List<Record> perform(String query, boolean explain) throws SQLException { QueryProcessor queryProcessor = new QueryProcessor(context, knowledgeCache, introspectCache); QueryParser queryParser = new QueryParser(context, query); queryParser.pass1(); queryParser.pass2(); List<Record> records = (List<Record>)queryProcessor.execute(queryParser, serverNodeId, explain); return records; } }
QueryEngine extends TemplateMetaData { public List<Record> perform(String query, boolean explain) throws SQLException { QueryProcessor queryProcessor = new QueryProcessor(context, knowledgeCache, introspectCache); QueryParser queryParser = new QueryParser(context, query); queryParser.pass1(); queryParser.pass2(); List<Record> records = (List<Record>)queryProcessor.execute(queryParser, serverNodeId, explain); return records; } QueryEngine(DSLContext context, String serverNodeId);  QueryEngine(DSLContext context, String serverNodeId, I_KnowledgeCache knowledgeCache);  QueryEngine(DSLContext context, String serverNodeId, I_KnowledgeCache knowledgeCache, I_IntrospectCache introspectCache); }
QueryEngine extends TemplateMetaData { public List<Record> perform(String query, boolean explain) throws SQLException { QueryProcessor queryProcessor = new QueryProcessor(context, knowledgeCache, introspectCache); QueryParser queryParser = new QueryParser(context, query); queryParser.pass1(); queryParser.pass2(); List<Record> records = (List<Record>)queryProcessor.execute(queryParser, serverNodeId, explain); return records; } QueryEngine(DSLContext context, String serverNodeId);  QueryEngine(DSLContext context, String serverNodeId, I_KnowledgeCache knowledgeCache);  QueryEngine(DSLContext context, String serverNodeId, I_KnowledgeCache knowledgeCache, I_IntrospectCache introspectCache); List<Record> perform(String query, boolean explain); List<Record> perform(String query); }
QueryEngine extends TemplateMetaData { public List<Record> perform(String query, boolean explain) throws SQLException { QueryProcessor queryProcessor = new QueryProcessor(context, knowledgeCache, introspectCache); QueryParser queryParser = new QueryParser(context, query); queryParser.pass1(); queryParser.pass2(); List<Record> records = (List<Record>)queryProcessor.execute(queryParser, serverNodeId, explain); return records; } QueryEngine(DSLContext context, String serverNodeId);  QueryEngine(DSLContext context, String serverNodeId, I_KnowledgeCache knowledgeCache);  QueryEngine(DSLContext context, String serverNodeId, I_KnowledgeCache knowledgeCache, I_IntrospectCache introspectCache); List<Record> perform(String query, boolean explain); List<Record> perform(String query);  }