Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rel 8 0 mb #6680

Merged
merged 27 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f3dbb2a
setup license
tadgh Jan 23, 2025
7090c3f
allow deleting resources if references are all versioned only (#6645)
TipzCM Jan 24, 2025
fc8ce73
Rel 8 0 cves (#6655)
tadgh Jan 27, 2025
8d60820
6662 remote terminology boolean properties as string (#6663)
jmarchionatto Jan 29, 2025
d636df3
fix fhir patch replace in a list (#6657)
mrdnctrk Jan 31, 2025
024515e
Automated Migration Testing (HAPI-FHIR) - updated test migration scri…
volodymyr-korzh Feb 1, 2025
a4fa654
Fix NPE in Storage with Mass Ingestion and Compartment Interceptor (#…
jdar8 Feb 3, 2025
a708949
SearchParameter validation was not being skipped on updates, even if …
BulandMalik Feb 4, 2025
becbf1d
Merge branch 'rel_8_0' into rel_8_0_mb
tadgh Feb 4, 2025
c096c31
License
tadgh Feb 4, 2025
489bfc8
fix high cardinality field patching in replace-references (#6671)
mrdnctrk Feb 4, 2025
637a79f
made $hapi.fhir.replace-references not replace versioned references (…
mrdnctrk Feb 7, 2025
ebb016f
Provide access to the wrapped ConsentService delegates for testing (#…
michaelabuckley Feb 8, 2025
d9f86a9
Fix _security label filtering with :not operator in the in-memory mat…
nathandoef Feb 10, 2025
65e4b13
6673 fixing search builder with fulltext search (#6674)
TipzCM Feb 10, 2025
ce0c41c
Fixed an issue with the _lastUpdated search param not being recognise…
AbayomiE-T Feb 10, 2025
a579d8f
Fixing Failure when creating a cross-partition subscription if the de…
epeartree Feb 11, 2025
6b4acc3
Account for case differences in DBPM contributor (#6698)
jamesagnew Feb 11, 2025
d503a24
Add flag to disable schema check (#6699)
jamesagnew Feb 11, 2025
0a79f4e
6700 alternate api (#6702)
tadgh Feb 12, 2025
7bc81b1
Move to 8.0.0
tadgh Feb 12, 2025
e720011
licenses
tadgh Feb 12, 2025
a9be258
Merge rel 8 in
tadgh Feb 12, 2025
6f49934
Interim folder holder
tadgh Feb 12, 2025
7bf0379
Merge branch 'rel_8_0' into rel_8_0_mb
tadgh Feb 12, 2025
750c7ee
Merge branch 'master' into rel_8_0_mb
tadgh Feb 12, 2025
78537ba
Spotless
tadgh Feb 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ public String getPropertyName() {
// Some of the types in the spec are not yet implemented as well.
// @see https://github.com/hapifhir/hapi-fhir/issues/5700
String TYPE_STRING = "string";
String TYPE_BOOLEAN = "boolean";
String TYPE_CODING = "Coding";
String TYPE_GROUP = "group";

Expand All @@ -800,6 +801,29 @@ public String getType() {
}
}

class BooleanConceptProperty extends BaseConceptProperty {
private final boolean myValue;

/**
* Constructor
*
* @param theName The name
*/
public BooleanConceptProperty(String theName, boolean theValue) {
super(theName);
myValue = theValue;
}

public boolean getValue() {
return myValue;
}

@Override
public String getType() {
return TYPE_BOOLEAN;
}
}

class CodingConceptProperty extends BaseConceptProperty {
private final String myCode;
private final String myCodeSystem;
Expand Down Expand Up @@ -1073,7 +1097,7 @@ class ValueSetExpansionOutcome {
private final IBaseResource myValueSet;
private final String myError;

private boolean myErrorIsFromServer;
private final boolean myErrorIsFromServer;

public ValueSetExpansionOutcome(String theError, boolean theErrorIsFromServer) {
myValueSet = null;
Expand Down Expand Up @@ -1199,7 +1223,7 @@ public LookupCodeResult setFound(boolean theFound) {
}

public void throwNotFoundIfAppropriate() {
if (isFound() == false) {
if (!isFound()) {
throw new ResourceNotFoundException(Msg.code(1738) + "Unable to find code[" + getSearchedForCode()
+ "] in system[" + getSearchedForSystem() + "]");
}
Expand Down Expand Up @@ -1270,6 +1294,10 @@ private void populateProperty(
StringConceptProperty stringConceptProperty = (StringConceptProperty) theConceptProperty;
ParametersUtil.addPartString(theContext, theProperty, "value", stringConceptProperty.getValue());
break;
case TYPE_BOOLEAN:
BooleanConceptProperty booleanConceptProperty = (BooleanConceptProperty) theConceptProperty;
ParametersUtil.addPartBoolean(theContext, theProperty, "value", booleanConceptProperty.getValue());
break;
case TYPE_CODING:
CodingConceptProperty codingConceptProperty = (CodingConceptProperty) theConceptProperty;
ParametersUtil.addPartCoding(
Expand Down Expand Up @@ -1321,7 +1349,7 @@ class TranslateCodeRequest {
private final String myTargetValueSetUrl;
private final IIdType myResourceId;
private final boolean myReverse;
private List<IBaseCoding> myCodings;
private final List<IBaseCoding> myCodings;

public TranslateCodeRequest(List<IBaseCoding> theCodings, String theTargetSystemUrl) {
myCodings = theCodings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,36 @@ public String getFirstPartitionNameOrNull() {

/**
* Returns true if this request partition contains only one partition ID and it is the DEFAULT partition ID (null)
*
* @deprecated use {@link #isDefaultPartition(Integer)} or {@link IRequestPartitionHelperSvc.isDefaultPartition}
* instead
* .
*/
@Deprecated(since = "2025.02.R01")
public boolean isDefaultPartition() {
return isDefaultPartition(null);
}

/**
* Test whether this request partition is for a given default partition ID.
*
* This method can be directly invoked on a requestPartition object providing that <code>theDefaultPartitionId</code>
* is known or through {@link IRequestPartitionHelperSvc.isDefaultPartition} where the implementer of the interface
* will provide the default partition id (see {@link IRequestPartitionHelperSvc.getDefaultPartition}).
*
* @param theDefaultPartitionId is the ID that was given to the default partition. The default partition ID can be
* NULL as per default or specifically assigned another value.
* See PartitionSettings#setDefaultPartitionId.
* @return <code>true</code> if the request partition contains only one partition ID and the partition ID is
* <code>theDefaultPartitionId</code>.
*/
public boolean isDefaultPartition(@Nullable Integer theDefaultPartitionId) {
if (isAllPartitions()) {
return false;
}
return hasPartitionIds()
&& getPartitionIds().size() == 1
&& getPartitionIds().get(0) == null;
&& Objects.equals(getPartitionIds().get(0), theDefaultPartitionId);
}

public boolean hasPartitionId(Integer thePartitionId) {
Expand All @@ -243,8 +265,34 @@ public boolean hasPartitionNames() {
return myPartitionNames != null;
}

/**
* Verifies that one of the requested partition is the default partition which is assumed to have a default value of
* null.
*
* @return true if one of the requested partition is the default partition(null).
*
* @deprecated use {@link #hasDefaultPartitionId(Integer)} or {@link IRequestPartitionHelperSvc.hasDefaultPartitionId}
* instead
*/
@Deprecated(since = "2025.02.R01")
public boolean hasDefaultPartitionId() {
return getPartitionIds().contains(null);
return hasDefaultPartitionId(null);
}

/**
* Test whether this request partition has the default partition as one of its targeted partitions.
*
* This method can be directly invoked on a requestPartition object providing that <code>theDefaultPartitionId</code>
* is known or through {@link IRequestPartitionHelperSvc.hasDefaultPartitionId} where the implementer of the interface
* will provide the default partition id (see {@link IRequestPartitionHelperSvc.getDefaultPartition}).
*
* @param theDefaultPartitionId is the ID that was given to the default partition. The default partition ID can be
* NULL as per default or specifically assigned another value.
* See PartitionSettings#setDefaultPartitionId.
* @return <code>true</code> if the request partition has the default partition as one of the targeted partition.
*/
public boolean hasDefaultPartitionId(@Nullable Integer theDefaultPartitionId) {
return getPartitionIds().contains(theDefaultPartitionId);
}

public List<Integer> getPartitionIdsWithoutDefault() {
Expand Down Expand Up @@ -285,11 +333,13 @@ public static RequestPartitionId allPartitions() {
}

@Nonnull
// TODO GGG: This is a now-bad usage and we should remove it. we cannot assume null means default.
public static RequestPartitionId defaultPartition() {
return fromPartitionIds(Collections.singletonList(null));
}

@Nonnull
// TODO GGG: This is a now-bad usage and we should remove it. we cannot assume null means default.
public static RequestPartitionId defaultPartition(@Nullable LocalDate thePartitionDate) {
return fromPartitionIds(Collections.singletonList(null), thePartitionDate);
}
Expand Down Expand Up @@ -360,14 +410,6 @@ public static RequestPartitionId forPartitionIdsAndNames(
return new RequestPartitionId(thePartitionNames, thePartitionIds, thePartitionDate);
}

public static boolean isDefaultPartition(@Nullable RequestPartitionId thePartitionId) {
if (thePartitionId == null) {
return false;
}

return thePartitionId.isDefaultPartition();
}

/**
* Create a string representation suitable for use as a cache key. Null aware.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ public void incorrectJsonType(
ScalarType theFoundScalarType) {
if (myLogErrors) {
if (ourLog.isWarnEnabled()) {
String message = describeLocation(theLocation) +
createIncorrectJsonTypeMessage(
theElementName, theExpected, theExpectedScalarType, theFound, theFoundScalarType);
String message = describeLocation(theLocation)
+ createIncorrectJsonTypeMessage(
theElementName, theExpected, theExpectedScalarType, theFound, theFoundScalarType);
ourLog.warn(message);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public final class HapiSystemProperties {
static final long DEFAULT_VALIDATION_RESOURCE_CACHE_TIMEOUT_MILLIS = TimeUnit.MINUTES.toMillis(10);
static final String PREVENT_INVALIDATING_CONDITIONAL_MATCH_CRITERIA =
"hapi.storage.prevent_invalidating_conditional_match_criteria";
static final String DISABLE_DATABASE_PARTITION_MODE_SCHEMA_CHECK =
"hapi.storage.disable_database_partition_mode_schema_check";

private HapiSystemProperties() {}

Expand Down Expand Up @@ -164,4 +166,9 @@ public static boolean isPreventInvalidatingConditionalMatchCriteria() {
return Boolean.parseBoolean(System.getProperty(
HapiSystemProperties.PREVENT_INVALIDATING_CONDITIONAL_MATCH_CRITERIA, Boolean.FALSE.toString()));
}

public static boolean isDisableDatabasePartitionModeSchemaCheck() {
return Boolean.parseBoolean(System.getProperty(
HapiSystemProperties.DISABLE_DATABASE_PARTITION_MODE_SCHEMA_CHECK, Boolean.FALSE.toString()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ ca.uhn.fhir.jpa.dao.BaseTransactionProcessor.fhirPatchShouldNotUseBinaryResource
ca.uhn.fhir.jpa.patch.FhirPatch.invalidInsertIndex=Invalid insert index {0} for path {1} - Only have {2} existing entries
ca.uhn.fhir.jpa.patch.FhirPatch.invalidMoveSourceIndex=Invalid move source index {0} for path {1} - Only have {2} existing entries
ca.uhn.fhir.jpa.patch.FhirPatch.invalidMoveDestinationIndex=Invalid move destination index {0} for path {1} - Only have {2} existing entries
ca.uhn.fhir.jpa.patch.FhirPatch.noMatchingElementForPath=No element matches the specified path: {0}
ca.uhn.fhir.jpa.searchparam.extractor.BaseSearchParamExtractor.externalReferenceNotAllowed=Resource contains external reference to URL "{0}" but this server is not configured to allow external references
ca.uhn.fhir.jpa.searchparam.extractor.BaseSearchParamExtractor.failedToExtractPaths=Failed to extract values from resource using FHIRPath "{0}": {1}
ca.uhn.fhir.jpa.search.SearchCoordinatorSvcImpl.invalidInclude=Invalid {0} parameter value: "{1}". {2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
public class RequestPartitionIdTest {
private static final Logger ourLog = LoggerFactory.getLogger(RequestPartitionIdTest.class);

private static final Integer ourDefaultPartitionId = 0;

@Test
public void testHashCode() {
assertEquals(31860737, RequestPartitionId.allPartitions().hashCode());
Expand All @@ -41,6 +43,29 @@ public void testPartition() {
assertFalse(RequestPartitionId.forPartitionIdsAndNames(null, Lists.newArrayList(1, 2), null).isDefaultPartition());
}

@Test
public void testIsDefaultPartition_withDefaultPartitionAsParameter() {

assertThat(RequestPartitionId.defaultPartition().isDefaultPartition(null)).isTrue();
assertThat(RequestPartitionId.fromPartitionIds(ourDefaultPartitionId).isDefaultPartition(ourDefaultPartitionId)).isTrue();

assertThat(RequestPartitionId.defaultPartition().isDefaultPartition(ourDefaultPartitionId)).isFalse();
assertThat(RequestPartitionId.allPartitions().isDefaultPartition(ourDefaultPartitionId)).isFalse();
assertThat(RequestPartitionId.fromPartitionIds(ourDefaultPartitionId, 2).isDefaultPartition(ourDefaultPartitionId)).isFalse();
}

@Test
public void testHasDefaultPartition_withDefaultPartitionAsParameter() {

assertThat(RequestPartitionId.defaultPartition().hasDefaultPartitionId(null)).isTrue();
assertThat(RequestPartitionId.fromPartitionIds(ourDefaultPartitionId).hasDefaultPartitionId(ourDefaultPartitionId)).isTrue();
assertThat(RequestPartitionId.fromPartitionIds(ourDefaultPartitionId, null).hasDefaultPartitionId(null)).isTrue();
assertThat(RequestPartitionId.fromPartitionIds(ourDefaultPartitionId, null).hasDefaultPartitionId(ourDefaultPartitionId)).isTrue();

assertThat(RequestPartitionId.fromPartitionIds(ourDefaultPartitionId).hasDefaultPartitionId(null)).isFalse();
assertThat(RequestPartitionId.defaultPartition().hasDefaultPartitionId(ourDefaultPartitionId)).isFalse();
}

@Test
public void testMergeIds() {
RequestPartitionId input0 = RequestPartitionId.fromPartitionIds(1, 2, 3);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This was an interim release which was never made public, as it was decided that this release would have a major bump, to 8.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
release-date: "2025-02-17"
codename: "Transfiguration"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: fix
issue: 6599
jira: SMILE-9237
title: "Previously, attempting to restart the Storage module would result in a `NullPointerException` when partition
selection mode was set to `PATIENT_ID`, mass ingestion was enabled, and at least one Search Parameter was disabled. This
has now been fixed."
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
type: fix
issue: 6615
jira: SMILE-9569
title: "SearchParameter validation was not being skipped on updates, even if requested. This has been fixed"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
type: add
issue: 6644
jira: SMILE-9604
title: "By default, referential integrity is enforced on deletes.
This change introduces support for an exceptional case such
that deletion of a given resource will not be blocked if all
references to that resource are versioned. If there is at
least one unversioned reference to the resource, deletion will
still be blocked.
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
type: fix
issue: 6656
title: "Previously, FHIR patch 'replace' would fail when trying to replace a sub-element of a high cardinality element
using the the FHIR patch syntax. This has been fixed."

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: fix
issue: 6662
title: "Fixed remote terminology lookup results showing boolean properties as strings."
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
type: fix
issue: 6673
title: "When attempting to search for resources while both `AdvancedHSearchIndexing`
and `StoreResourcesInHibernateSearchIndex` are enabled, returned lists
could sometimes contain null entries.
This has been fixed.
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
type: fix
issue: 6686
title: "Previously, attempting to create a cross-partition subscription would fail if the default partition ID was
assigned a value different than the default value(null). This issue is fixed."

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: change
issue: 6689
title: "$hapi.fhir.replace-references operation has been changed to not replace versioned references"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: fix
issue: 6692
jira: SMILE-9736
title: "Previously, when the in-memory matcher was used to match resources with a `_security` label filter
and a `:not` operator (i.e. `_security:not=http://terminology.hl7.org/CodeSystem/v3-ActCode|NODSCLCD`),
resources with no security labels at all were not matched. This has been fixed."
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: fix
issue: 6697
title: "Previously, operation $apply-codesystem-delta-add issued with Hibernate Search enabled and default search params option turned off resulted in an invalid sort specification error. This has been fixed."
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: fix
issue: 6700
title: "Previously if a non-null default partition ID was selected when partitioning is enabled, the subscription matcher would fail to find cross-partition subscriptions, causing subscriptions to appear to not be working. This has been corrected."
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
release-date: "2025-02-17"
codename: "TBD"
codename: "Transfiguration"
4 changes: 2 additions & 2 deletions hapi-fhir-jpa-hibernate-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>

<artifactId>hapi-fhir-jpa-hibernate-services</artifactId>
Expand Down
Loading
Loading