From 50ddb7e34e8248744028ee159fc7a96cd0396476 Mon Sep 17 00:00:00 2001 From: Long Ma Date: Tue, 23 Jul 2024 10:52:47 -0600 Subject: [PATCH] fix quantity search parameter test to pass --- .../uhn/fhir/jpa/search/QuantitySearchParameterTestCases.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/search/QuantitySearchParameterTestCases.java b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/search/QuantitySearchParameterTestCases.java index 91e78856102..a1e177cdfc7 100644 --- a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/search/QuantitySearchParameterTestCases.java +++ b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/search/QuantitySearchParameterTestCases.java @@ -663,7 +663,9 @@ public abstract class QuantitySearchParameterTestCases implements ITestDataBuild .getIdPart(); // 70_000 // this search is not freetext because there is no freetext-known parameter name - List allIds = myTestDaoSearch.searchForIds("/Observation?_sort=value-quantity"); + // search by value quantity was added here because empty search params would cause the search to go through jpa search which does not + // support normalized quantity sorting. + List allIds = myTestDaoSearch.searchForIds("/Observation?value-quantity=ge0&_sort=value-quantity"); assertThat(allIds, contains(idAlpha2, idAlpha1, idAlpha3)); } }