Clinical Reasoning code fixes (#4726)

* Try removing the IFhirResourceDaoValueSet Bean.

* Add more TODOs.

* Push changes before testing with master.

* Prevent the following error from happening with mongo, dqm, and no validation support module configured:

org.springframework.context.annotation.AnnotationConfigApplicationContext@4a5b9e6b has not been refreshed yet

* Cleanup unnecessary changes.

* Add changelog.
This commit is contained in:
Luke deGruchy 2023-04-11 10:25:44 -04:00 committed by GitHub
parent 89cb179116
commit 3a2b722093
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 10 deletions

View File

@ -0,0 +1,5 @@
---
type: fix
issue: 4725
title: "Make small changes to stabilize the clinical reasoning code base."

View File

@ -220,13 +220,6 @@ public abstract class BaseClinicalReasoningConfig {
return new HapiFhirRetrieveProvider(theDaoRegistry, theSearchParameterResolver);
}
@SuppressWarnings("unchecked")
@Bean
IFhirResourceDaoValueSet<IBaseResource> valueSetDao(DaoRegistry theDaoRegistry) {
return (IFhirResourceDaoValueSet<IBaseResource>) theDaoRegistry
.getResourceDao("ValueSet");
}
@Bean
public ITerminologyProviderFactory terminologyProviderFactory(
IValidationSupport theValidationSupport,

View File

@ -25,6 +25,8 @@ import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;
/**
@ -41,11 +43,10 @@ public class CrProviderLoader {
myFhirContext = theFhirContext;
myResourceProviderFactory = theResourceProviderFactory;
myCqlProviderFactory = theCqlProviderFactory;
loadProvider();
}
private void loadProvider() {
@EventListener(ContextRefreshedEvent.class)
public void loadProvider() {
switch (myFhirContext.getVersion().getVersion()) {
case DSTU3:
case R4: