From 9737273cb8548915b6fc163a24598bdc08383a77 Mon Sep 17 00:00:00 2001 From: Tuncay Namli Date: Thu, 24 Oct 2024 10:54:27 +0300 Subject: [PATCH] :bugs: fix: Now we again support :not modifier for URI type search params --- onfhir-core/src/main/scala/io/onfhir/db/UriQueryBuilder.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onfhir-core/src/main/scala/io/onfhir/db/UriQueryBuilder.scala b/onfhir-core/src/main/scala/io/onfhir/db/UriQueryBuilder.scala index 1519982..4cb866b 100644 --- a/onfhir-core/src/main/scala/io/onfhir/db/UriQueryBuilder.scala +++ b/onfhir-core/src/main/scala/io/onfhir/db/UriQueryBuilder.scala @@ -27,6 +27,8 @@ object UriQueryBuilder extends IFhirQueryBuilder { modifier match { //No modifier case "" => getQueryForUriEquality(values, path) + case FHIR_PREFIXES_MODIFIERS.NOT => + Filters.not(getQueryForUriEquality(values, path)) case FHIR_PREFIXES_MODIFIERS.ABOVE => //if(values.length > 1) // throw new InvalidParameterException(s"Only single url value should be provided when modifier ${FHIR_PREFIXES_MODIFIERS.ABOVE} is used for FHIR url type parameters!") @@ -36,7 +38,7 @@ object UriQueryBuilder extends IFhirQueryBuilder { // throw new InvalidParameterException(s"Only single url value should be provided when modifier ${FHIR_PREFIXES_MODIFIERS.BELOW} is used for FHIR url type parameters!") orQueries(values.map(v => getQueryForBelowModifier(v, path))) case oth => - throw new InvalidParameterException(s"Modifier ${oth} is not valid or supported by onFhir.io for FHIR url type parameters!") + throw new InvalidParameterException(s"Modifier $oth is not valid or supported by onFhir.io for FHIR url type parameters!") } }