Bump core to 5.6.36 (#3433)

* Bump version

* Add changelog, make use of theNoInactive flag

* add test

* remove magic strings
This commit is contained in:
Tadgh 2022-03-01 05:23:48 -08:00 committed by GitHub
parent 86f7373f16
commit 68c1015552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
type: fix
issue: 3418
jira: SMILE-3850
title: "Updated the FHIR core libs to 5.6.36 to support fix for funcReplace in FHIRPathEngine."

View File

@ -7,8 +7,10 @@ import ca.uhn.fhir.interceptor.api.HookParams;
import ca.uhn.fhir.interceptor.api.IAnonymousInterceptor;
import ca.uhn.fhir.interceptor.api.Pointcut;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome;
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel;
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString;
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamToken;
import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
@ -201,6 +203,39 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test
assertEquals(0, search.size());
}
@Test
public void testReplaceInFhirPathInSearchParameterWorksAsExpected() {
String rawValue = "778-62-8144";
String strippedValue = "778628144";
SearchParameter numberParameter = new SearchParameter();
numberParameter.setId("stripped-ssn");
numberParameter.setName("SSN with no dashes");
numberParameter.setCode("stripped-ssn");
numberParameter.setDescription("SSN with no dashes");
numberParameter.setUrl("http://example.com/stripped-ssn");
numberParameter.setStatus(Enumerations.PublicationStatus.ACTIVE);
numberParameter.addBase("Patient");
numberParameter.setType(Enumerations.SearchParamType.STRING);
numberParameter.setExpression("Patient.identifier.where(system='http://hl7.org/fhir/sid/us-ssn' and value.matches('.*')).select(value.replace('-',''))");
mySearchParameterDao.update(numberParameter);
mySearchParamRegistry.refreshCacheIfNecessary();
Patient patient = new Patient();
patient.setActive(true);
patient.addIdentifier().setSystem("http://hl7.org/fhir/sid/us-ssn").setValue(rawValue);
myPatientDao.create(patient);
IBundleProvider search;
search = myPatientDao.search(SearchParameterMap.newSynchronous("stripped-ssn", new StringParam(strippedValue)));
assertEquals(1, search.size());
search = myPatientDao.search(SearchParameterMap.newSynchronous("stripped-ssn", new StringParam(rawValue)));
assertEquals(0, search.size());
}
@Test
public void testCreatePhoneticSearchParameterWithOptionalCharacterLength() {
String testString = "Richard Smith";

View File

@ -281,8 +281,9 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
@Override
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ConceptSetComponent theInc, boolean theHierarchical) throws TerminologyServiceException {
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ConceptSetComponent theInc, boolean theHierarchical, boolean theNoInactive) throws TerminologyServiceException {
ValueSet input = new ValueSet();
input.getCompose().setInactive(!theNoInactive); //TODO GGG/DO is this valid?
input.getCompose().addInclude(theInc);
IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, input);
return new ValueSetExpander.ValueSetExpansionOutcome((ValueSet) output.getValueSet(), output.getError(), null);
@ -443,6 +444,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
throw new UnsupportedOperationException(Msg.code(230));
}
@Override
public String getLinkForUrl(String corePath, String url) {
throw new UnsupportedOperationException(Msg.code(231));

View File

@ -305,7 +305,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
}
@Override
public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent inc, boolean heirarchical) throws TerminologyServiceException {
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet.ConceptSetComponent inc, boolean hierarchical, boolean noInactive) throws TerminologyServiceException {
throw new UnsupportedOperationException(Msg.code(664));
}

View File

@ -739,6 +739,7 @@
<organization>Google</organization>
</developer>
<developer>
<id>theGOTOguy</id>
<name>Ben Li-Sauerwine</name>
</developer>
@ -756,7 +757,7 @@
<properties>
<fhir_core_version>5.6.35</fhir_core_version>
<fhir_core_version>5.6.36</fhir_core_version>
<ucum_version>1.0.3</ucum_version>
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>