@Test public void searchFilterName() throws URISyntaxException { final SearchFilterCollector searchFilterCollector = new SearchFilterCollector( Collections.singletonMap( "title", Collections.singletonList( "Birth" ) ) ); final SearchFilter searchFilter = new SearchFilter( searchFilterCollector, false ); provider.initSearchFilter( FhirVersion.R4, new RuleInfo<>( new ProgramStageMetadataRule(), Collections.emptyList() ), searchFilter ); final List<String> variables = new ArrayList<>(); UriBuilder uriBuilder = new DefaultUriBuilderFactory().builder(); uriBuilder = searchFilterCollector.add( uriBuilder, variables ); Assert.assertEquals( new URI( "?filter=%5Bname:$ilike:Birth%5D" ), uriBuilder.build( variables ) ); }
@Override protected void initSearchFilter( @Nonnull FhirVersion fhirVersion, @Nonnull RuleInfo<ProgramStageMetadataRule> ruleInfo, @Nonnull SearchFilter searchFilter ) { searchFilter.add( Questionnaire.SP_TITLE, SearchParamType.STRING, "name" ); }
R4ProgramStageMetadataToFhirDataProvider extends AbstractProgramStageMetadataToFhirDataProvider { @Override protected void initSearchFilter( @Nonnull FhirVersion fhirVersion, @Nonnull RuleInfo<ProgramStageMetadataRule> ruleInfo, @Nonnull SearchFilter searchFilter ) { searchFilter.add( Questionnaire.SP_TITLE, SearchParamType.STRING, "name" ); } }
R4ProgramStageMetadataToFhirDataProvider extends AbstractProgramStageMetadataToFhirDataProvider { @Override protected void initSearchFilter( @Nonnull FhirVersion fhirVersion, @Nonnull RuleInfo<ProgramStageMetadataRule> ruleInfo, @Nonnull SearchFilter searchFilter ) { searchFilter.add( Questionnaire.SP_TITLE, SearchParamType.STRING, "name" ); } R4ProgramStageMetadataToFhirDataProvider( @Nonnull ScriptExecutor scriptExecutor, @Nonnull ProgramStageMetadataService programStageMetadataService ); }
R4ProgramStageMetadataToFhirDataProvider extends AbstractProgramStageMetadataToFhirDataProvider { @Override protected void initSearchFilter( @Nonnull FhirVersion fhirVersion, @Nonnull RuleInfo<ProgramStageMetadataRule> ruleInfo, @Nonnull SearchFilter searchFilter ) { searchFilter.add( Questionnaire.SP_TITLE, SearchParamType.STRING, "name" ); } R4ProgramStageMetadataToFhirDataProvider( @Nonnull ScriptExecutor scriptExecutor, @Nonnull ProgramStageMetadataService programStageMetadataService ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); }
R4ProgramStageMetadataToFhirDataProvider extends AbstractProgramStageMetadataToFhirDataProvider { @Override protected void initSearchFilter( @Nonnull FhirVersion fhirVersion, @Nonnull RuleInfo<ProgramStageMetadataRule> ruleInfo, @Nonnull SearchFilter searchFilter ) { searchFilter.add( Questionnaire.SP_TITLE, SearchParamType.STRING, "name" ); } R4ProgramStageMetadataToFhirDataProvider( @Nonnull ScriptExecutor scriptExecutor, @Nonnull ProgramStageMetadataService programStageMetadataService ); @Nonnull @Override Set<FhirVersion> getFhirVersions();  }