Start Release branch for 5.1.0

This commit is contained in:
jamesagnew
2020-05-29 10:26:09 -04:00
parent 0430a539ff
commit 8aa322caf1
12 changed files with 286 additions and 117 deletions

View File

@@ -0,0 +1,23 @@
package ca.uhn.fhir.jpa.starter;
import ca.uhn.fhir.empi.api.IEmpiSettings;
import ca.uhn.fhir.empi.rules.config.EmpiSettings;
import com.google.common.base.Charsets;
import org.apache.commons.io.IOUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import java.io.IOException;
@Configuration
public class EmpiConfig {
@Bean
IEmpiSettings empiSettings() throws IOException {
DefaultResourceLoader resourceLoader = new DefaultResourceLoader();
Resource resource = resourceLoader.getResource("empi-rules.json");
String json = IOUtils.toString(resource.getInputStream(), Charsets.UTF_8);
return new EmpiSettings().setEnabled(HapiProperties.getEmpiEnabled()).setScriptText(json);
}
}