Skip to content

Commit

Permalink
Revert touched files not relevant for the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
LZRS committed Aug 22, 2024
1 parent b9708a6 commit af4d912
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 41 deletions.
18 changes: 5 additions & 13 deletions engine/src/main/java/com/google/android/fhir/search/SearchDsl.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2024 Google LLC
* Copyright 2022-2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -71,9 +71,7 @@ class Search(
) {
val filters = mutableListOf<StringParamFilterCriterion>()
init.forEach { StringParamFilterCriterion(stringParameter).apply(it).also(filters::add) }
stringFilterCriteria.add(
StringParamFilterCriteria(stringParameter, filters, operation),
)
stringFilterCriteria.add(StringParamFilterCriteria(stringParameter, filters, operation))
}

override fun filter(
Expand All @@ -95,9 +93,7 @@ class Search(
) {
val filters = mutableListOf<DateParamFilterCriterion>()
init.forEach { DateParamFilterCriterion(dateParameter).apply(it).also(filters::add) }
dateTimeFilterCriteria.add(
DateClientParamFilterCriteria(dateParameter, filters, operation),
)
dateTimeFilterCriteria.add(DateClientParamFilterCriteria(dateParameter, filters, operation))
}

override fun filter(
Expand All @@ -107,9 +103,7 @@ class Search(
) {
val filters = mutableListOf<QuantityParamFilterCriterion>()
init.forEach { QuantityParamFilterCriterion(quantityParameter).apply(it).also(filters::add) }
quantityFilterCriteria.add(
QuantityParamFilterCriteria(quantityParameter, filters, operation),
)
quantityFilterCriteria.add(QuantityParamFilterCriteria(quantityParameter, filters, operation))
}

override fun filter(
Expand All @@ -129,9 +123,7 @@ class Search(
) {
val filters = mutableListOf<NumberParamFilterCriterion>()
init.forEach { NumberParamFilterCriterion(numberParameter).apply(it).also(filters::add) }
numberFilterCriteria.add(
NumberParamFilterCriteria(numberParameter, filters, operation),
)
numberFilterCriteria.add(NumberParamFilterCriteria(numberParameter, filters, operation))
}

override fun filter(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2024 Google LLC
* Copyright 2021-2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -77,11 +77,7 @@ internal data class DateClientParamFilterCriteria(
override fun query(type: ResourceType): SearchQuery {
val filterCriteria =
listOf(
DateFilterCriteria(
parameter,
filters.filter { it.value!!.date != null },
operation,
),
DateFilterCriteria(parameter, filters.filter { it.value!!.date != null }, operation),
DateTimeFilterCriteria(
parameter,
filters.filter { it.value!!.dateTime != null },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2024 Google LLC
* Copyright 2021-2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2024 Google LLC
* Copyright 2021-2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2024 Google LLC
* Copyright 2021-2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2024 Google LLC
* Copyright 2021-2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2024 Google LLC
* Copyright 2022-2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2024 Google LLC
* Copyright 2021-2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,18 +36,10 @@ import com.google.android.fhir.search.Search
import org.hl7.fhir.r4.model.Coding
import org.hl7.fhir.r4.model.DateTimeType

fun Search.applyFilterParam(
name: String,
param: IQueryParameterType,
type: Operation,
) =
fun Search.applyFilterParam(name: String, param: IQueryParameterType, type: Operation) =
when (param) {
is NumberParam -> {
this.filter(
NumberClientParam(name),
{ value = param.value },
operation = type,
)
this.filter(NumberClientParam(name), { value = param.value }, operation = type)
}
is DateParam -> {
this.filter(
Expand All @@ -68,11 +60,7 @@ fun Search.applyFilterParam(
)
}
is StringParam -> {
this.filter(
StringClientParam(name),
{ value = param.value },
operation = type,
)
this.filter(StringClientParam(name), { value = param.value }, operation = type)
}
is TokenParam -> {
this.filter(
Expand Down

0 comments on commit af4d912

Please sign in to comment.