BuiltInCohortDefinitionLibrary2_2 extends BuiltInCohortDefinitionLibrary { @DocumentedDefinition("conditonSearchAdvanced") public CohortDefinition getConditonSearchAdvanced() { ConditionCohortDefinition cd = new ConditionCohortDefinition(); cd.addParameter(new Parameter("conditionCoded", "reporting.parameter.conditionCoded", Concept.class)); cd.addParameter(new Parameter("conditionNonCoded", "reporting.parameter.conditionNonCoded", String.class)); cd.addParameter(new Parameter("onsetDateOnOrBefore", "reporting.parameter.onsetDateOnOrBefore", Date.class)); cd.addParameter(new Parameter("onsetDateOnOrAfter", "reporting.parameter.onsetDateOnOrAfter", Date.class)); cd.addParameter(new Parameter("endDateOnOrBefore", "reporting.parameter.endDateOnOrBefore", Date.class)); cd.addParameter(new Parameter("endDateOnOrAfter", "reporting.parameter.endDateOnOrAfter", Date.class)); cd.addParameter(new Parameter("createdOnOrBefore", "reporting.parameter.createdOnOrBefore", Date.class)); cd.addParameter(new Parameter("createdOnOrAfter", "reporting.parameter.createdOnOrAfter", Date.class)); cd.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); return cd; }  @DocumentedDefinition("conditonSearchAdvanced") CohortDefinition getConditonSearchAdvanced();  }
@Test public void testGetConditonSearchAdavanced() throws Exception { CohortDefinition cd = library.getConditonSearchAdvanced(); assertTrue(ConditionCohortDefinition.class.isAssignableFrom(cd.getClass())); assertThat(cd, hasParameter("onsetDateOnOrBefore", Date.class)); assertThat(cd, hasParameter("onsetDateOnOrAfter", Date.class)); assertThat(cd, hasParameter("endDateOnOrBefore", Date.class)); assertThat(cd, hasParameter("endDateOnOrAfter", Date.class)); assertThat(cd, hasParameter("createdOnOrBefore", Date.class)); assertThat(cd, hasParameter("createdOnOrAfter", Date.class)); assertThat(cd, hasParameter("activeOnDate", Date.class)); assertThat(cd, hasParameter("conditionNonCoded", String.class)); assertThat(cd, hasParameter("conditionCoded", Concept.class)); }