Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the search of Inspection #233

Open
2 of 4 tasks
Francois-Werbrouck opened this issue Jan 27, 2025 · 1 comment · Fixed by #258
Open
2 of 4 tasks

Improve the search of Inspection #233

Francois-Werbrouck opened this issue Jan 27, 2025 · 1 comment · Fixed by #258
Assignees
Labels
enhancement New feature or request user-impacting features for features that are visible to the user

Comments

@Francois-Werbrouck
Copy link
Contributor

Francois-Werbrouck commented Jan 27, 2025

Context:

Based on ai-cfia/fertiscan-frontend#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

  • Add High level search function for fertiscan with all parameters
  • 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)
@Francois-Werbrouck
Copy link
Contributor Author

After discussion, we are changing dateOfInspection: Date; into lower_bound_date:Date and upper_bound_date:Date to allow Inspection to be search from a timeframe instead of a single date.

Francois-Werbrouck added a commit that referenced this issue Feb 24, 2025
@gh-app-for-workflows gh-app-for-workflows bot moved this to In progress in FertiScan Feb 24, 2025
@gh-app-for-workflows gh-app-for-workflows bot moved this from In progress to In review in FertiScan Feb 26, 2025
Francois-Werbrouck added a commit that referenced this issue Feb 26, 2025
Francois-Werbrouck added a commit that referenced this issue Feb 26, 2025
Francois-Werbrouck added a commit that referenced this issue Feb 27, 2025
Francois-Werbrouck added a commit that referenced this issue Feb 27, 2025
Francois-Werbrouck added a commit that referenced this issue Feb 27, 2025
Francois-Werbrouck added a commit that referenced this issue Feb 27, 2025
Francois-Werbrouck added a commit that referenced this issue Feb 27, 2025
* Issue #233: Build doc

* Issue #233: `search_inspection` added

* Issue #233: Search modules tests passing

* Issue #233: datastore search_inspection test

* Issue #233: fix markdown lint

* Issue #233: Formatting

* Issue #233: Fix markdown lint

* Issue #233: fix high level doc
@gh-app-for-workflows gh-app-for-workflows bot moved this from In review to Done in FertiScan Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request user-impacting features for features that are visible to the user
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant