BuiltInCohortDefinitionLibrary1_10 extends BuiltInCohortDefinitionLibrary { @DocumentedDefinition("drugOrderSearch") public CohortDefinition getDrugOrderSearch() { CohortDefinition drugOrderCohortDefinition = new DrugOrderCohortDefinition(); drugOrderCohortDefinition.addParameter(new Parameter("which", "reporting.parameter.which", Match.class)); drugOrderCohortDefinition.addParameter(new Parameter("drugConcepts", "reporting.parameter.drugConcepts", Concept.class, List.class, null)); drugOrderCohortDefinition.addParameter(new Parameter("drugSets", "reporting.parameter.drugSets", Concept.class, List.class, null)); drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrBefore", "reporting.parameter.activatedOnOrBefore", Date.class)); drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrAfter", "reporting.parameter.activatedOnOrAfter", Date.class)); drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrBefore", "reporting.parameter.activeOnOrBefore", Date.class)); drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrAfter", "reporting.parameter.activeOnOrAfter", Date.class)); drugOrderCohortDefinition.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); drugOrderCohortDefinition.addParameter(new Parameter("careSetting", "reporting.parameter.careSetting", CareSetting.class)); drugOrderCohortDefinition.addParameter(new Parameter("drugs", "reporting.parameter.drugs", Drug.class, List.class, null)); return drugOrderCohortDefinition; }  @DocumentedDefinition("drugOrderSearch") CohortDefinition getDrugOrderSearch();  }
@Test public void testgetDrugOrderSearch() throws Exception { CohortDefinition drugOrderCohortDefinition = library.getDrugOrderSearch(); assertTrue(DrugOrderCohortDefinition.class.isAssignableFrom(drugOrderCohortDefinition.getClass())); assertThat(drugOrderCohortDefinition, hasParameter("which", Match.class)); assertThat(drugOrderCohortDefinition, hasParameter("drugConcepts", Concept.class, List.class)); assertThat(drugOrderCohortDefinition, hasParameter("drugSets", Concept.class, List.class)); assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrBefore", Date.class)); assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrAfter", Date.class)); assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrBefore", Date.class)); assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrAfter", Date.class)); assertThat(drugOrderCohortDefinition, hasParameter("activeOnDate", Date.class)); assertThat(drugOrderCohortDefinition, hasParameter("careSetting", CareSetting.class)); assertThat(drugOrderCohortDefinition, hasParameter("drugs", Drug.class, List.class)); }