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

Results list route #78

Merged
merged 24 commits into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9167af2
added results_list route
jhughes982 Oct 4, 2022
97e51cc
added FHIR search query to fetch observations
jhughes982 Oct 4, 2022
9117e07
Merge branch 'main' into results-list-route
jhughes982 Oct 5, 2022
e5bb7f8
Merge branch 'main' into results-list-route
jhughes982 Oct 5, 2022
d5ede00
Merge branch 'main' into results-list-route
jhughes982 Oct 7, 2022
a43aa3e
initial implementation for displaying results
jhughes982 Oct 11, 2022
2104902
Merge branch 'main' into results-list-route
jhughes982 Oct 11, 2022
84d4a66
cleaner extraction of results
jhughes982 Oct 11, 2022
95baa01
some refactoring
jhughes982 Oct 12, 2022
0dff694
adding types
jhughes982 Oct 12, 2022
dd8c332
Merge branch 'main' into results-list-route
jhughes982 Oct 12, 2022
717b40a
results now displayed in an html table
jhughes982 Oct 12, 2022
3da513f
Merge branch 'main' into results-list-route
jhughes982 Oct 12, 2022
7ee9ad2
added thead and tbody to table
jhughes982 Oct 12, 2022
82d2f6b
reverted back to initial form values being populated automatically
jhughes982 Oct 12, 2022
c832d19
moved results business logic to parent Results component
jhughes982 Oct 12, 2022
da6cf08
added more robust typings
jhughes982 Oct 13, 2022
f9af419
refactored fhir authoriser connection
jhughes982 Oct 13, 2022
8655e8d
added a wrapper component around resultsList so that context can be p…
jhughes982 Oct 13, 2022
b5973d2
removed unnecessary lines
jhughes982 Oct 13, 2022
a24bc9e
changed order of import
jhughes982 Oct 13, 2022
c8362ac
removed console.logs
jhughes982 Oct 13, 2022
88d6713
Added html if no results were found. Improved guard clauses during da…
jhughes982 Oct 13, 2022
22adbb4
implemented feedback
jhughes982 Oct 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 7 additions & 19 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,13 @@ import { FhirProvider } from "./components/fhir/FhirContext";
function App() {
return (
<Layout>
<Routes>
<Route path="/" element={<FhirAuthoriser />} />
<Route
path="/new_report"
element={
<FhirProvider>
<NewReport />
</FhirProvider>
}
/>
<Route
path="/results_list"
element={
<FhirProvider>
<Results />
</FhirProvider>
}
/>
</Routes>
<FhirProvider>
<Routes>
<Route path="/" element={<FhirAuthoriser />} />
<Route path="/new_report" element={<NewReport />} />
<Route path="/results_list" element={<Results />} />
</Routes>
</FhirProvider>
</Layout>
);
}
Expand Down
14 changes: 11 additions & 3 deletions src/components/fhir/FhirContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@ export const FhirProvider: FC<Props> = (props) => {
useEffect(() => {
if (!client) {
SMART.ready()
.then((client) => setClient(client))
.catch((error) => setError(error))
.finally(() => console.debug("FHIR client ready"));
.then((client) => {
setClient(client);
})
.catch((error) => {
setError(error);
console.error(error);
})
.finally(() => {
console.debug("FHIR client ready");
setError(null);
});
}
}, []);

Expand Down