medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
469 stars 217 forks source link

Refactor `shared-libs/validations` to call cht-datasource instead of directly querying freetext index #9653

Open jkuester opened 1 week ago

jkuester commented 1 week ago

Describe the issue

Currently, the share-libs/validations code is directly querying the medic-client/reports_by_freetext view index. This index is going away eventually.

Describe the improvement you'd like

We should update this logic to just use the new cht-datasource api being added in https://github.com/medic/cht-core/issues/9586. Then, the future "under-the-hood" changes to the freetext indexes will be abstracted away from the shared-libs/validations code.