class FhirToDhisTransformerServiceImpl implements FhirToDhisTransformerService {

    @Nullable
    protected RuleInfo<? extends AbstractRule> getDeleteRuleInfo( @Nonnull FhirClientResource fhirClientResource, @Nonnull DhisFhirResourceId dhisFhirResourceId )
    {
        final RuleInfo<? extends AbstractRule> ruleInfo;

        if ( dhisFhirResourceId.isQualified() )
        {
            ruleInfo = ruleRepository.findOneImpByDhisFhirInputData( Objects.requireNonNull( fhirClientResource.getFhirResourceType() ),
                dhisFhirResourceId.getType(), dhisFhirResourceId.getRuleId() ).orElse( null );
        }
        else
        {
            ruleInfo = ruleRepository.findOneExpByDhisFhirInputData( fhirClientResource.getFhirResourceType() )
                .filter( ri -> ri.getRule().isSimpleFhirId() ).orElse( null );
        }

        return ruleInfo;
    }

    public  FhirToDhisTransformerServiceImpl( @Nonnull LockManager lockManager,
        @Nonnull FhirResourceRepository fhirResourceRepository, @Nonnull RuleRepository ruleRepository,
        @Nonnull ObjectProvider<List<FhirToDhisTransformer<?, ?>>> transformersProvider,
        @Nonnull ObjectProvider<List<FhirToDhisTransformerUtils>> transformUtilsProvider,
        @Nonnull ScriptExecutor scriptExecutor );

}