use of org.opencds.cqf.ruler.cdshooks.exceptions.NotImplementedException in project cqf-ruler by DBCG.
the class EvaluationContext method getDataProvider.
private DataProvider getDataProvider() {
if (remoteProvider == null) {
ModelResolver resolver = modelResolver;
TerminologyProvider terminologyProvider;
switch(fhirVersion) {
case DSTU2:
terminologyProvider = new Dstu3FhirTerminologyProvider(this.getSystemFhirClient());
break;
case DSTU3:
terminologyProvider = new Dstu3FhirTerminologyProvider(this.getSystemFhirClient());
break;
case R4:
terminologyProvider = new R4FhirTerminologyProvider(this.getSystemFhirClient());
break;
default:
throw new NotImplementedException("This CDS Hooks implementation is not configured for FHIR version: " + fhirVersion.getFhirVersionString());
}
RestFhirRetrieveProvider provider = new RestFhirRetrieveProvider(new SearchParameterResolver(this.fhirContext), this.getHookFhirClient());
provider.setTerminologyProvider(terminologyProvider);
provider.setExpandValueSets(this.providerConfiguration.getExpandValueSets());
provider.setMaxCodesPerQuery(this.providerConfiguration.getMaxCodesPerQuery());
provider.setSearchStyle(this.providerConfiguration.getSearchStyle());
this.remoteProvider = new CompositeDataProvider(resolver, provider);
}
return remoteProvider;
}
Aggregations