Test fixes
This commit is contained in:
parent
4115a4bb6d
commit
a5a0fca065
|
@ -1770,11 +1770,18 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc,
|
||||||
public void storeNewCodeSystemVersionIfNeeded(CodeSystem theCodeSystem, ResourceTable theResourceEntity) {
|
public void storeNewCodeSystemVersionIfNeeded(CodeSystem theCodeSystem, ResourceTable theResourceEntity) {
|
||||||
if (theCodeSystem != null && isNotBlank(theCodeSystem.getUrl())) {
|
if (theCodeSystem != null && isNotBlank(theCodeSystem.getUrl())) {
|
||||||
String codeSystemUrl = theCodeSystem.getUrl();
|
String codeSystemUrl = theCodeSystem.getUrl();
|
||||||
if (theCodeSystem.getContent() == CodeSystem.CodeSystemContentMode.COMPLETE || theCodeSystem.getContent() == null
|
if (theCodeSystem.getContent() == CodeSystem.CodeSystemContentMode.COMPLETE || theCodeSystem.getContent() == null || theCodeSystem.getContent() == CodeSystem.CodeSystemContentMode.NOTPRESENT) {
|
||||||
// || theCodeSystem.getContent() == CodeSystem.CodeSystemContentMode.NOTPRESENT
|
|
||||||
) {
|
|
||||||
ourLog.info("CodeSystem {} has a status of {}, going to store concepts in terminology tables", theResourceEntity.getIdDt().getValue(), theCodeSystem.getContentElement().getValueAsString());
|
ourLog.info("CodeSystem {} has a status of {}, going to store concepts in terminology tables", theResourceEntity.getIdDt().getValue(), theCodeSystem.getContentElement().getValueAsString());
|
||||||
|
|
||||||
|
// If this is a not-present codesystem, we don't want to store a new version if one
|
||||||
|
// already exists, since that will wipe out the existing concepts
|
||||||
|
if (theCodeSystem.getContent() == CodeSystem.CodeSystemContentMode.NOTPRESENT) {
|
||||||
|
TermCodeSystem codeSystem = myCodeSystemDao.findByCodeSystemUri(theCodeSystem.getUrl());
|
||||||
|
if (codeSystem != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Long codeSystemResourcePid = getCodeSystemResourcePid(theCodeSystem.getIdElement());
|
Long codeSystemResourcePid = getCodeSystemResourcePid(theCodeSystem.getIdElement());
|
||||||
TermCodeSystemVersion persCs = new TermCodeSystemVersion();
|
TermCodeSystemVersion persCs = new TermCodeSystemVersion();
|
||||||
|
|
||||||
|
@ -1784,6 +1791,7 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc,
|
||||||
ourLog.info("Code system has {} concepts", persCs.getConcepts().size());
|
ourLog.info("Code system has {} concepts", persCs.getConcepts().size());
|
||||||
storeNewCodeSystemVersion(codeSystemResourcePid, codeSystemUrl, theCodeSystem.getName(), theCodeSystem.getVersion(), persCs);
|
storeNewCodeSystemVersion(codeSystemResourcePid, codeSystemUrl, theCodeSystem.getName(), theCodeSystem.getVersion(), persCs);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,8 +91,11 @@ public class FhirResourceDaoR4CacheWarmingTest extends BaseJpaR4Test {
|
||||||
p2.addName().setFamily("Smith");
|
p2.addName().setFamily("Smith");
|
||||||
myPatientDao.update(p2);
|
myPatientDao.update(p2);
|
||||||
|
|
||||||
Thread.sleep(2000);
|
myCacheWarmingSvc.performWarmingPass();
|
||||||
|
|
||||||
|
Thread.sleep(1000);
|
||||||
|
|
||||||
|
ourLog.info("About to perform search");
|
||||||
SearchParameterMap params = new SearchParameterMap();
|
SearchParameterMap params = new SearchParameterMap();
|
||||||
params.add("name", new StringParam("smith"));
|
params.add("name", new StringParam("smith"));
|
||||||
IBundleProvider result = myPatientDao.search(params);
|
IBundleProvider result = myPatientDao.search(params);
|
||||||
|
|
Loading…
Reference in New Issue