use of org.opencds.cqf.ruler.cql.JpaLibraryContentProvider in project cqf-ruler by DBCG.
the class DataOperationsProvider method createLibraryManager.
private LibraryManager createLibraryManager(Library library, RequestDetails theRequestDetails) {
JpaLibraryContentProvider jpaLibraryContentProvider = jpaLibraryContentProviderFactory.create(theRequestDetails);
Bundle libraryBundle = new Bundle();
List<Library> listLib = fetchDependencyLibraries(library, theRequestDetails);
listLib.add(library);
listLib.forEach(lib -> {
Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent();
component.setResource(lib);
libraryBundle.addEntry(component);
});
LibraryContentProvider bundleLibraryProvider = new BundleFhirLibraryContentProvider(this.getFhirContext(), libraryBundle, adapterFactory, libraryVersionSelector);
List<LibraryContentProvider> sourceProviders = new ArrayList<>(Arrays.asList(bundleLibraryProvider, jpaLibraryContentProvider));
return libraryManagerFactory.create(sourceProviders);
}
use of org.opencds.cqf.ruler.cql.JpaLibraryContentProvider in project cqf-ruler by DBCG.
the class DataOperationsProvider method createLibraryManager.
private LibraryManager createLibraryManager(Library library, RequestDetails theRequestDetails) {
JpaLibraryContentProvider jpaLibraryContentProvider = jpaLibraryContentProviderFactory.create(theRequestDetails);
Bundle libraryBundle = new Bundle();
List<Library> listLib = fetchDependencyLibraries(library, theRequestDetails);
listLib.add(library);
listLib.forEach(lib -> {
Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent();
component.setResource(lib);
libraryBundle.addEntry(component);
});
LibraryContentProvider bundleLibraryProvider = new BundleFhirLibraryContentProvider(this.getFhirContext(), libraryBundle, adapterFactory, libraryVersionSelector);
List<LibraryContentProvider> sourceProviders = Lists.newArrayList(bundleLibraryProvider, jpaLibraryContentProvider);
return libraryManagerFactory.create(sourceProviders);
}
Aggregations