Skip to content

Commit

Permalink
Add custom search param for Patient name and identifier (#3563)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rkareko authored Oct 18, 2024
1 parent f29d85c commit 2fe2a47
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}

Expand All @@ -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"
}
}

0 comments on commit 2fe2a47

Please sign in to comment.