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

Dynamically render search results for CodeSystem by OID #52

Merged
merged 9 commits into from
Sep 25, 2024

Conversation

katyasoup
Copy link
Collaborator

@katyasoup katyasoup commented Sep 23, 2024

resolves #44

What this PR does:

Adds functionality to enable retrieving CodeSystem data from the database and displaying it in the UI

Search input

  • Send a POST request to submit form data from the SearchBar component
  • Add a new route and handler for above request
  • Adjust the HTML layout to include the data from the dropdown menu in the form

Display search results

  • When results are returned successfully, update the url to show the search type and search term (e.g. /search?type=code_system&input=1.0.3
  • Display a basic error message if no rows are returned from the db lookup
  • Dynamically show/hide/disable the pagination buttons and download button based on results returned
  • Display the first five result rows in a table:
Screenshot 2024-09-24 at 12 06 17

What this PR does NOT do:

  • Functionality is currently limited to CodeSystem lookup by OID or partial OID
    • Changing the dropdown menu input will not affect which db tables are queried
    • Name/text based search is not included; results are only retrieved with a CodeSystem OID
    • A partial OID can be entered and will be matched from the string start (e.g. 1.0.3 will return 1.0.3166.1 but won't return 2.1.0.3)
  • Full pagination is not yet implemented; the first five results returned will display in the table but page buttons do not currently work
  • Related data (e.g. CodeSystem Concepts and ValueSets related to a given CodeSystem) are not yet returned/displayed in the UI

@katyasoup katyasoup marked this pull request as ready for review September 24, 2024 16:45
@katyasoup katyasoup self-assigned this Sep 24, 2024
@katyasoup katyasoup changed the title [WIP] Dynamically render search results for CodeSystem by OID Dynamically render search results for CodeSystem by OID Sep 24, 2024
internal/app/handlers.go Outdated Show resolved Hide resolved
internal/app/handlers.go Outdated Show resolved Hide resolved
Copy link
Member

@nickclyde nickclyde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work, Katie!!

Copy link
Collaborator

@jakewheeler jakewheeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🎉

@katyasoup katyasoup merged commit 724fe91 into main Sep 25, 2024
@katyasoup katyasoup deleted the kcd/frontend-search branch September 25, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get a basic search working in the UI
3 participants