-
Notifications
You must be signed in to change notification settings - Fork 0
Rebuild Patient Factsheets as a first-class mode from the imported design #879
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2a1508d
Rebuild Patient Factsheets as a first-class mode from the imported de…
claude 3ec0b5d
Merge branch 'main' into claude/patient-factsheets-impl-ra7yi9
BigSimmo 9e96d00
Initial plan (#880)
Copilot a0a444a
Merge branch 'main' into claude/patient-factsheets-impl-ra7yi9
BigSimmo a86d42f
Merge branch 'main' into claude/patient-factsheets-impl-ra7yi9
BigSimmo 3fc2c9a
fix(factsheets): address review findings — search crash, brand search…
claude e015450
fix(factsheets): verifiable sources and honest review copy
cursoragent be67337
style(factsheets): prettier-format detail and search pages
claude ccb7c30
Initial plan (#889)
Copilot df98fd4
Merge branch 'main' into claude/patient-factsheets-impl-ra7yi9
BigSimmo 196bf65
Merge branch 'main' into claude/patient-factsheets-impl-ra7yi9
BigSimmo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,11 @@ | ||
| import type { ReactNode } from "react"; | ||
|
|
||
| import { FactsheetShell } from "@/components/factsheets/factsheet-shell"; | ||
| import { GlobalSearchShell } from "@/components/clinical-dashboard/global-search-shell"; | ||
|
|
||
| export default function FactsheetsLayout({ children }: { children: ReactNode }) { | ||
| return <FactsheetShell>{children}</FactsheetShell>; | ||
| return ( | ||
| <GlobalSearchShell initialMode="factsheets" desktopSearchPlacement="hero"> | ||
| {children} | ||
| </GlobalSearchShell> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,25 @@ | ||
| import type { Metadata } from "next"; | ||
|
|
||
| import { filterFactsheets } from "@/components/factsheets/factsheets-data"; | ||
| import { FactsheetsSearchPage } from "@/components/factsheets/factsheets-search-page"; | ||
|
|
||
| export const metadata: Metadata = { title: "Search Patient Information | Clinical KB" }; | ||
|
|
||
| export default function FactsheetsSearchRoute() { | ||
| return <FactsheetsSearchPage />; | ||
| // App Router hands repeated query params (?q=a&q=b) through as string[]; collapse to | ||
| // the first value the way the DSM/Services search routes do, so a malformed link | ||
| // filters on one value instead of throwing on `.trim()`. | ||
| function firstValue(value?: string | string[]) { | ||
| return Array.isArray(value) ? value[0] : value; | ||
| } | ||
|
|
||
| export default async function FactsheetsSearchRoute({ | ||
| searchParams, | ||
| }: { | ||
| searchParams: Promise<{ q?: string | string[]; category?: string | string[] }>; | ||
| }) { | ||
| const params = await searchParams; | ||
| const query = (firstValue(params.q) ?? "").trim(); | ||
| const category = firstValue(params.category); | ||
| const results = filterFactsheets(query, category); | ||
| return <FactsheetsSearchPage query={query} category={category} results={results} />; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.