Skip to content

Commit e1c4a32

Browse files
authored
Bump HAPI FHIR Core to 6.5.17 (#6769)
* Bumping Core to 6.5.11 * Bumped version of core to 6.5.13, fixed label of message Signed-off-by: Michele Adduci <[email protected]> * Fixing parser for contained resources * Fixed all the structure tests * Fixed R4 Tests * Bumped core to 6.5.15 * Fixed DSTU3 validation issue with update * Fixed expected text from test * Bump to 6.5.17 * Corrected expected error message for Slice R4 Tests * Corrected expected error message for R4 JPA --------- Signed-off-by: Michele Adduci <[email protected]>
1 parent b158bbd commit e1c4a32

File tree

49 files changed

+835
-320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+835
-320
lines changed

hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,17 @@ public class InterceptorService extends BaseInterceptorService<Pointcut>
3939
* Constructor which uses a default name of "default"
4040
*/
4141
public InterceptorService() {
42-
this("default");
42+
super(Pointcut.class);
4343
}
4444

4545
/**
4646
* Constructor
4747
*
4848
* @param theName The name for this registry (useful for troubleshooting)
4949
*/
50+
@Deprecated(since = "8.0.0", forRemoval = true)
5051
public InterceptorService(String theName) {
51-
super(Pointcut.class, theName);
52+
super(Pointcut.class);
5253
}
5354

5455
@Override

hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public void wereBack() {
399399
myErrorHandler.containedResourceWithNoId(null);
400400
} else {
401401
if (!res.getId().isLocal()) {
402-
res.setId(new IdDt('#' + res.getId().getIdPart()));
402+
res.setId(new IdDt(res.getId().getIdPart()));
403403
}
404404
getPreResourceState().getContainedResources().put(res.getId().getValueAsString(), res);
405405
}
@@ -439,7 +439,7 @@ public void wereBack() {
439439
// need an ID to be referred to)
440440
myErrorHandler.containedResourceWithNoId(null);
441441
} else {
442-
res.getIdElement().setValue('#' + res.getIdElement().getIdPart());
442+
res.getIdElement().setValue(res.getIdElement().getIdPart());
443443
getPreResourceState()
444444
.getContainedResources()
445445
.put(res.getIdElement().getValue(), res);
@@ -1238,7 +1238,8 @@ void weaveContainedResources() {
12381238
String ref = nextRef.getReferenceElement().getValue();
12391239
if (isNotBlank(ref)) {
12401240
if (ref.startsWith("#") && ref.length() > 1) {
1241-
IBaseResource target = myContainedResources.get(ref);
1241+
String refId = ref.substring(1);
1242+
IBaseResource target = myContainedResources.get(refId);
12421243
if (target != null) {
12431244
ourLog.debug("Resource contains local ref {}", ref);
12441245
nextRef.setResource(target);
@@ -1285,13 +1286,11 @@ public void wereBack() {
12851286
super.wereBack();
12861287

12871288
IResource nextResource = (IResource) getCurrentElement();
1289+
// for DSTU2, we cannot use directly "nextResource.getId().getVersionIdPart();"
12881290
String version = ResourceMetadataKeyEnum.VERSION.get(nextResource);
12891291
String resourceName = myContext.getResourceType(nextResource);
12901292
String bundleIdPart = nextResource.getId().getIdPart();
12911293
if (isNotBlank(bundleIdPart)) {
1292-
// if (isNotBlank(entryBaseUrl)) {
1293-
// nextResource.setId(new IdDt(entryBaseUrl, resourceName, bundleIdPart, version));
1294-
// } else {
12951294
IdDt previousId = nextResource.getId();
12961295
nextResource.setId(new IdDt(null, resourceName, bundleIdPart, version));
12971296
// Copy extensions
@@ -1300,7 +1299,6 @@ public void wereBack() {
13001299
nextResource.getId().addUndeclaredExtension(ext);
13011300
}
13021301
}
1303-
// }
13041302
}
13051303
}
13061304
}

hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IGenericClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public interface IGenericClient extends IRestfulClient {
6262
*
6363
* @deprecated As of HAPI 3.0.0 this method has been deprecated, as the operation is now called "capabilities". Use {@link #capabilities()} instead
6464
*/
65+
@Deprecated(since = "3.0.0", forRemoval = true)
6566
IFetchConformanceUntyped fetchConformance();
6667

6768
/**

hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ParametersUtil.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@
5252
import static org.apache.commons.lang3.StringUtils.isBlank;
5353

5454
/**
55-
* Utilities for dealing with parameters resources in a version indepenedent way
55+
* Utilities for dealing with parameters resources in a version independent way
5656
*/
5757
public class ParametersUtil {
5858

59+
private ParametersUtil() {}
60+
5961
public static Optional<String> getNamedParameterValueAsString(
6062
FhirContext theCtx, IBaseParameters theParameters, String theParameterName) {
6163
Function<IPrimitiveType<?>, String> mapper = t -> defaultIfBlank(t.getValueAsString(), null);
@@ -323,7 +325,7 @@ public static IBaseParameters newInstance(FhirContext theContext) {
323325
@SuppressWarnings("unchecked")
324326
public static void addParameterToParametersBoolean(
325327
FhirContext theCtx, IBaseParameters theParameters, String theName, boolean theValue) {
326-
addParameterToParameters(theCtx, theParameters, theName, theCtx.getPrimitiveBoolean(theValue));
328+
addParameterToParameters(theCtx, theParameters, theName, theCtx.newPrimitiveBoolean(theValue));
327329
}
328330

329331
@SuppressWarnings("unchecked")
@@ -429,7 +431,7 @@ public static void addPartUrl(FhirContext theContext, IBase theParameter, String
429431
}
430432

431433
public static void addPartBoolean(FhirContext theContext, IBase theParameter, String theName, Boolean theValue) {
432-
addPart(theContext, theParameter, theName, theContext.getPrimitiveBoolean(theValue));
434+
addPart(theContext, theParameter, theName, theContext.newPrimitiveBoolean(theValue));
433435
}
434436

435437
public static void addPartDecimal(FhirContext theContext, IBase theParameter, String theName, Double theValue) {

hapi-fhir-base/src/main/resources/ca/uhn/fhir/context/support/HapiFhirStorageResponseCode.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,8 @@
5656
}, {
5757
"code": "SUCCESSFUL_CONDITIONAL_PATCH_NO_CHANGE",
5858
"display": "Conditional patch succeeded: No changes were detected so no action was taken."
59+
}, {
60+
"code": "AUTOMATICALLY_CREATED_PLACEHOLDER_RESOURCE",
61+
"display": "Automatically created placeholder resource."
5962
} ]
6063
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
type: change
3+
issue: 6769
4+
title: "The org.hl7.fhir.core has been updated to the 6.5.15 version. This new version includes
5+
a number of bug fixes and improvements, plus some changes in the API of the validators."

hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ public HapiTransactionService hapiTransactionService() {
464464

465465
@Bean
466466
public IInterceptorService jpaInterceptorService() {
467-
return new InterceptorService("JPA");
467+
return new InterceptorService();
468468
}
469469

470470
@Bean

hapi-fhir-jpaserver-hfql/src/test/java/ca/uhn/fhir/jpa/fql/executor/HfqlExecutorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ select foo()
198198
IHfqlExecutionResult result = myHfqlExecutor.executeInitialSearch(statement, null, mySrd);
199199
IHfqlExecutionResult.Row row = result.getNextRow();
200200
assertEquals(IHfqlExecutionResult.ROW_OFFSET_ERROR, row.getRowOffset());
201-
assertEquals("Failed to evaluate FHIRPath expression \"foo()\". Error: HAPI-2404: Error in ?? at 1, 1: The name foo is not a valid function name", row.getRowValues().get(0));
201+
assertEquals("Failed to evaluate FHIRPath expression \"foo()\". Error: HAPI-2404: Error @1, 1: The name foo is not a valid function name", row.getRowValues().get(0));
202202
assertFalse(result.hasNext());
203203
}
204204

hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/StorageSettings.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ public boolean isAutoSupportDefaultSearchParams() {
11441144
/**
11451145
* If this is disabled by setting this to {@literal false} (default is {@literal true}),
11461146
* the server will not automatically implement and support search parameters that
1147-
* are not explcitly created in the repository.
1147+
* are not explicitly created in the repository.
11481148
* <p>
11491149
* Disabling this can have a dramatic improvement on performance (especially write performance)
11501150
* in servers that only need to support a small number of search parameters, or no search parameters at all.
@@ -1158,15 +1158,15 @@ public void setAutoSupportDefaultSearchParams(boolean theAutoSupportDefaultSearc
11581158
}
11591159

11601160
/**
1161-
* @return Should the {@literal _lamguage} SearchParameter be supported on this server? Defaults to {@literal false}.
1161+
* @return Should the {@literal _language} SearchParameter be supported on this server? Defaults to {@literal false}.
11621162
* @since 7.0.0
11631163
*/
11641164
public boolean isLanguageSearchParameterEnabled() {
11651165
return myLanguageSearchParameterEnabled;
11661166
}
11671167

11681168
/**
1169-
* Should the {@literal _lamguage} SearchParameter be supported on this server? Defaults to {@literal false}.
1169+
* Should the {@literal _language} SearchParameter be supported on this server? Defaults to {@literal false}.
11701170
*
11711171
* @since 7.0.0
11721172
*/

hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR4.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,5 +208,10 @@ public boolean conformsToProfile(FHIRPathEngine engine, Object appContext, Base
208208
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
209209
return null;
210210
}
211+
212+
@Override
213+
public boolean paramIsType(String name, int index) {
214+
return false;
215+
}
211216
}
212217
}

0 commit comments

Comments
 (0)