@Test public void testCR112() throws Exception { String query = "select" + " a/uid/value as uid," + " a/composer/name as author," + " a/context/start_time/value as date_created," + " a/context/other_context[at0001]/items[at0002]/value/value as PROMS_type," + " a/context/other_context[at0001]/items[at0005]/value/value as Procedure_link," + " b_b/data[at0001]/events[at0002]/data[at0003]/items[at0008]/value/symbol/defining_code/code_string as a_1_Health_in_general," + " b_b/data[at0001]/events[at0002]/data[at0003]/items[at0014]/value/symbol/defining_code/code_string as a_2_Health_compared_to_1_year_ago," + " b_b/data[at0001]/events[at0002]/data[at0003]/items[at0029]/items[at0020]/value/symbol/defining_code/code_string as a_3_Vigorous_activies," + " b_b/data[at0001]/events[at0002]/data[at0003]/items[at0029]/items[at0024]/value/symbol/defining_code/code_string as a_4_Moderate_activies," + " b_b/data[at0001]/events[at0002]/data[at0003]/items[at0029]/items[at0028]/value/symbol/defining_code/code_string as a_5_Lifting_or_carrying_groceries," + " b_d/data[at0001]/events[at0002]/data[at0003]/items[openEHR-EHR-CLUSTER.pain_vas.v0]/items[at0001]/value/magnitude as Pain_scale," + " a/content[openEHR-EHR-OBSERVATION.story.v1]/data[at0001]/events[at0002]/data[at0003]/items[openEHR-EHR-CLUSTER.pain_vas.v0]/items[at0001]/value/magnitude as pain_2" + " from EHR e" + " contains COMPOSITION a[openEHR-EHR-COMPOSITION.report.v1] " + " contains ( OBSERVATION b_b[openEHR-EHR-OBSERVATION.sf36.v0] or OBSERVATION b_d[openEHR-EHR-OBSERVATION.story.v1])" + " where a/name/value='PROMs'"; 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);  }