Create a Generic Search filter for Identifiers and Attributes for Resources (Patient, Groups and Related artifacts) #1497
Replies: 3 comments 1 reply
-
Key questions
|
Beta Was this translation helpful? Give feedback.
-
From the configurability pieces, we can define what the search bar will such through. These are rules to fetch the different attributes we want to search by. e.g For the task register, we would want to search by the Patient, Practitioner name & Task Description. Search bar configuration "searchBar": {
"visible": true,
"display": "Search by Task, Practitioner & Patient Name",
"computedRules": [
"taskName", "practitionerName", "patientName"
]
} Search bar computed rules {
"name": "patientName",
"condition": "true",
"actions": [
"data.put('patientName', fhirPath.extractValue(Patient.get(0), \"Patient.name.select(given + ' ' + family)\"))"
]
},
{
"name": "practitionerName",
"condition": "true",
"actions": [
"data.put('practitionerName', fhirPath.extractValue(Practitioner.get(0), \"Practitioner.name.select(given + ' ' + family)\"))"
]
},
{
"name": "taskName",
"condition": "true",
"actions": [
"data.put('taskName', fhirPath.extractValue(Task, 'Task.description'))"
]
} Here is the tasking configuration file https://github.com/opensrp/fhir-resources/blob/main/ecbis/app_configurations/ecbis_tasking/registers/task_register_config.json We can add the human-readable identifier search in the same way. e.g search a family using it's family Id Search bar configuration "searchBar": {
"visible": true,
"display": "Search name or ID",
"computedRules": [
"familyName","familyId"
]
}, Search bar computed rules {
"name": "familyId",
"condition": "true",
"actions": [
"data.put('familyId', fhirPath.extractValue(Group, 'Group.identifier[0].value'))"
]
} Here is a sample of the configuration https://github.com/opensrp/fhircore/blob/update_sample_configs/android/quest/src/main/assets/configs/app/registers/household_register_config.json |
Beta Was this translation helpful? Give feedback.
-
thanks @dubdabasoduba, it sounds like that handles this? We need to create documentation around the configurable registers that includes info like this, but that's a separate task |
Beta Was this translation helpful? Give feedback.
-
Create a Generic Search filter for Identifiers and Attributes for Resources (Patient, Groups and Related artefacts)
Patient
Group
Related Discussions
Beta Was this translation helpful? Give feedback.
All reactions