Skip to content

Commit

Permalink
Now Uri queries with above and below modifiers can provide multiple urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuncay Namli committed Oct 11, 2024
1 parent d148cc3 commit 3aea889
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions onfhir-core/src/main/scala/io/onfhir/db/UriQueryBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ object UriQueryBuilder extends IFhirQueryBuilder {
//No modifier
case "" => 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!")
getQueryForAboveModifier(values.head, path)
//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!")
orQueries(values.map(v => getQueryForAboveModifier(v, path)))
case FHIR_PREFIXES_MODIFIERS.BELOW =>
if (values.length > 1)
throw new InvalidParameterException(s"Only single url value should be provided when modifier ${FHIR_PREFIXES_MODIFIERS.BELOW} is used for FHIR url type parameters!")
getQueryForBelowModifier(values.head, path)
//if (values.length > 1)
// 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!")
}
Expand Down

0 comments on commit 3aea889

Please sign in to comment.