QuickstartCqlVisitor extends cqlBaseVisitor { public Map<String, ValueSet> getValuesets() { return Collections.unmodifiableMap(valuesets); } QuickstartCqlVisitor(); String getLibrary(); String getVersion(); Collection<String> getVariables(); Map<String, ValueSet> getValuesets(); Collection<Retrieve> getRetrieves(); @Override Object visitLibraryDefinition(@NotNull cqlParser.LibraryDefinitionContext ctx); @Override Object visitLetStatement(@NotNull cqlParser.LetStatementContext ctx); @Override ValueSet visitValueset(@NotNull cqlParser.ValuesetContext ctx); @Override Object visitValuesetDefinition(@NotNull cqlParser.ValuesetDefinitionContext ctx); @Override Object visitMethodExpressionTerm(@NotNull cqlParser.MethodExpressionTermContext ctx); @Override Object visitRetrieve(@NotNull cqlParser.RetrieveContext ctx); @Override String visitStringLiteral(@NotNull cqlParser.StringLiteralContext ctx); static void main(String[] args);  }
@Test public void testValuesets() { QuickstartCqlVisitor v = visitLogic( "valueset \"Acute Pharyngitis\" = ValueSet('2.16.840.1.113883.3.464.1003.102.12.1011')\n" + "valueset \"Acute Tonsillitis\" = ValueSet('2.16.840.1.113883.3.464.1003.102.12.1012')"); Map<String, ValueSet> vsMap = v.getValuesets(); assertEquals(vsMap.size(), 2); ValueSet vs = vsMap.get("Acute Pharyngitis"); assertEquals(vs.getId(), "2.16.840.1.113883.3.464.1003.102.12.1011"); vs = vsMap.get("Acute Tonsillitis"); assertEquals(vs.getId(), "2.16.840.1.113883.3.464.1003.102.12.1012"); }