ai-cfia / ai-cfia/ailab-datastore

Improve the search of Inspection

未關閉
#233 1 則留言 0 個 reaction 已指派 1 人 已被 @Francois-Werbrouck 認領 在 GitHub 檢視
enhancement user-impacting features
主要語言
Python
星號
3
分支
0
PR 合併指標
30 天內沒有已合併 PR

描述

## Context:
Based on https://github.com/ai-cfia/fertiscan-frontend/issues/407 the search of Inspection will now be improved and better.

We limit the results to the information extracted on the label, since also incorporating the pictures would increase the search efficiency. If a picture is needed, the BE has the necessary info to perform a second request to download the picture.

## Acceptance criteria
Currently we only have a search option between the verified inspections of a user and would like to expand to take theses parameters as inputs:

- fertilizerName: string;
- registrationNumber: string;
- lotNumber: string;
- inspectorName: string;
- lower_bound_date: Date;
- upper_bound_date: Date;
- organizationName: string;
- organizationAddress: string;
- organizationPhoneNumber: string;

We will return a list of results of a **resume** of all the inspections that have been verified

- inspection_id,
- inspection.upload_date
- inspection.updated_at
- inspection.picture_set_id (the folder_id),
- inspection.container_id
- label_info.id
- label_info.product_name (Fertilizer Name)
- label_info.main_organization_id
- label_info.main_organization_name
- label_info.main_organization_address
- label_info.main_organization_phone

We do not display the full label that has been extracted since it would cost too much to perform.
We do not limit the results based on the user_id, since we want a user to be able to search for any label. Therefor, we do not limit based on the access control polices for the results.

## TODO
- [x] Add High level search function for fertiscan with all parameters
- [x] Add Queries in relevant modules to perform a search
- [ ] Add tests for all modules and functions (Check the functionality of the functions/modules)
- [ ] Add search tests suite (Check and assure the results are as expected)

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。