From 196b9c531a5a7b883e7a7787fb767d582551cf8d Mon Sep 17 00:00:00 2001 From: Rkareko Date: Fri, 18 Oct 2024 08:43:16 +0300 Subject: [PATCH] Add custom search param for Patient name and identifier --- .../engine/configuration/app/ConfigService.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/android/engine/src/main/java/org/smartregister/fhircore/engine/configuration/app/ConfigService.kt b/android/engine/src/main/java/org/smartregister/fhircore/engine/configuration/app/ConfigService.kt index b2a856415e..502cb2cde8 100644 --- a/android/engine/src/main/java/org/smartregister/fhircore/engine/configuration/app/ConfigService.kt +++ b/android/engine/src/main/java/org/smartregister/fhircore/engine/configuration/app/ConfigService.kt @@ -109,10 +109,22 @@ interface ConfigService { description = "Search the sort field" } + val patientSearchParameter = + SearchParameter().apply { + url = "http://smartregister.org/SearchParameter/patient-search" + addBase("Patient") + name = SEARCH_PARAM + code = SEARCH_PARAM + type = Enumerations.SearchParamType.STRING + expression = "Patient.name.text | Patient.identifier.value" + description = "Search patients by name and identifier fields" + } + return listOf( activeGroupSearchParameter, flagStatusSearchParameter, medicationSortSearchParameter, + patientSearchParameter, ) } @@ -121,6 +133,7 @@ interface ConfigService { const val APP_VERSION = "AppVersion" const val STATUS_SEARCH_PARAM = "status" const val SORT_SEARCH_PARAM = "sort" + const val SEARCH_PARAM = "search" const val MEDICATION_SORT_URL = "http://smartregister.org/SearchParameter/medication-sort" } }