@Test public void testQryEvaluation4() throws Exception { String query = "select a/uid/value as uid, \n" + "a/composer/name as author, \n" + "a/context/start_time/value as date_created, \n" + "b_a/data[at0001]/items[at0002]/value/value as cause, \n" + "b_a/data[at0001]/items[at0002]/value/defining_code/code_string as cause_code, \n" + "b_a/data[at0001]/items[at0002]/value/defining_code/terminology_id/value as cause_terminology, \n" + "b_a/data[at0001]/items[at0009]/items[at0011]/value/value as reaction, \n" + "b_a/data[at0001]/items[at0009]/items[at0011]/value/defining_code/codeString as reaction_code, \n" + "b_a/data[at0001]/items[at0009]/items[at0011]/value/defining_code/terminology_id/value as reaction_terminology \n" + "from EHR e [ehr_id/value = 'bb872277-40c4-44fb-8691-530be31e1ee9'] \n" + "contains COMPOSITION a[openEHR-EHR-COMPOSITION.adverse_reaction_list.v1]\n" + " contains EVALUATION b_a[openEHR-EHR-EVALUATION.adverse_reaction_risk.v1]\n" + " where a/name/value='Adverse reaction list'"; 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);  }