-
Notifications
You must be signed in to change notification settings - Fork 10
CARDS-2558: Clinician dashboard #2001
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
Open
sdumitriu
wants to merge
11
commits into
dev
Choose a base branch
from
CARDS-2558-clinician-dashboard
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
15ab412
CARDS-2569: Allow configuring the menu items to be displayed for a Form
marta- ad78683
CARDS-2461: Clinician-oriented subject and form views
sdumitriu fcbd8ed
CARDS-2461: Clinician-oriented subject and form views
sdumitriu 0c0abc4
CARDS-2558 / CARDS-2559: Visit page view for clinicians
marta- e115634
CARDS-2558: New "clinician-dashboard" module
sdumitriu bacecfc
CARDS-2609: Configurable actions on user dashboard and related views
acrowthe 987e41b
CARDS-2609: Configurable actions on user dashboard and related views
acrowthe 684252c
CARDS-2609: Configurable actions on user dashboard and related views
acrowthe 907d787
[misc] Update yarn.lock
acrowthe d4842f3
CARDS-2609: Configurable actions on user dashboard and related views
acrowthe bdb7c76
CARDS-2558/2609: Separate clinician dashboard and configurable user a…
acrowthe 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>io.uhndata.cards</groupId> | ||
| <artifactId>cards-modules</artifactId> | ||
| <version>0.9.36-SNAPSHOT</version> | ||
| </parent> | ||
|
|
||
| <artifactId>cards-clinician-dashboard</artifactId> | ||
| <packaging>bundle</packaging> | ||
| <name>CARDS - Clinician Dashboard</name> | ||
| <description>An alternative view of patients, visits and forms, more suited for clinicians</description> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.sling</groupId> | ||
| <artifactId>slingfeature-maven-plugin</artifactId> | ||
| </plugin> | ||
|
|
||
| <plugin> | ||
| <groupId>org.apache.felix</groupId> | ||
| <artifactId>maven-bundle-plugin</artifactId> | ||
| <extensions>true</extensions> | ||
| <configuration> | ||
| <instructions> | ||
| <Sling-Initial-Content> | ||
| SLING-INF/content/libs/cards/resources/assetDependencies.json;path:=/libs/cards/resources/assetDependencies;overwriteProperties:=true, | ||
| SLING-INF/content/Extensions/AdminDashboard/;path:=/Extensions/AdminDashboard/;overwriteProperties:=true;uninstall:=true, | ||
| SLING-INF/content/Extensions/PrintHeader/;path:=/Extensions/PrintHeader/;overwriteProperties:=true;uninstall:=true, | ||
| SLING-INF/content/Extensions/Views/;path:=/Extensions/Views/;overwriteProperties:=true;uninstall:=true, | ||
| </Sling-Initial-Content> | ||
| </instructions> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> |
25 changes: 25 additions & 0 deletions
25
modules/clinician-dashboard/src/main/features/feature.json
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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| { | ||
| "bundles":[ | ||
| { | ||
| "id":"${project.groupId}:${project.artifactId}:${project.version}", | ||
| "start-order":"26" | ||
| } | ||
| ] | ||
| } |
15 changes: 15 additions & 0 deletions
15
modules/clinician-dashboard/src/main/frontend/assets.config
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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // These lines are aggregated as module.exports entries in webpack.config.js file by the webpack_script.py in aggregated-frontend module | ||
|
|
||
| ['clinician-dashboard.Visit']: { 'dependOn': ['cards-login.ReLoginDialog'], 'import': './src/clinician-dashboard/Visit.jsx' } | ||
| ['clinician-dashboard.Patient']: { 'dependOn': ['cards-login.ReLoginDialog'], 'import': './src/clinician-dashboard/Patient.jsx' } | ||
| ['clinician-dashboard.Form']: { 'dependOn': ['cards-login.ReLoginDialog', 'cards-dataentry.Forms', 'cards-dataentry.FormView', 'cards-pedigree.Pedigree'], 'import': './src/clinician-dashboard/Form.jsx' } | ||
| ['clinician-dashboard.ClinicForms']: { 'dependOn': ['cards-dataentry.LiveTable'], 'import': './src/clinician-dashboard/ClinicForms.jsx' } | ||
| ['clinician-dashboard.ClinicVisits']: { 'dependOn': ['cards-dataentry.LiveTable'], 'import': './src/clinician-dashboard/ClinicVisits.jsx' } | ||
| ['clinician-dashboard.ClinicDashboard']: { 'dependOn': ['cards-dataentry.Questionnaires', 'clinician-dashboard.ClinicForms', 'clinician-dashboard.ClinicVisits'], 'import': './src/clinician-dashboard/ClinicDashboard.jsx' } | ||
| ['clinician-dashboard.PrintHeader']: './src/clinician-dashboard/PrintHeader.jsx' | ||
| ['clinician-dashboard.DashboardSettingsConfiguration']: { 'dependOn': ['cards-login.ReLoginDialog'], 'import': './src/clinician-dashboard/DashboardSettingsConfiguration.jsx' } | ||
| ['clinician-dashboard.DashboardSettingsConfigurationIcon']: '@mui/icons-material/Dashboard' | ||
| ['clinician-dashboard.FormView']: { 'dependOn': ['cards-dataentry.LiveTable'], 'import': './src/clinician-dashboard/FormView.jsx' } | ||
| ['clinician-dashboard.SubjectView']: { 'dependOn': ['cards-dataentry.LiveTable'], 'import': './src/clinician-dashboard/SubjectView.jsx' } | ||
| ['clinician-dashboard.Forms']: { 'dependOn': ['cards-login.ReLoginDialog'], 'import': './src/clinician-dashboard/Forms.jsx' } | ||
| ['clinician-dashboard.Subjects']: { 'dependOn': ['cards-login.ReLoginDialog'], 'import': './src/clinician-dashboard/Subjects.jsx' } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
39 changes: 39 additions & 0 deletions
39
modules/clinician-dashboard/src/main/frontend/src/clinician-dashboard/Form.jsx
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 |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
| // | ||
| import { useLocation } from "react-router"; | ||
|
|
||
| import DefaultForm from "../questionnaire/FormView.jsx"; | ||
|
|
||
| function Form(props) { | ||
| let location = useLocation(); | ||
|
|
||
| const actionSwitches = { | ||
| // If the form is neither SUBMITTED nor LOCKED, then clinicians can edit it | ||
| edit: data => (!["SUBMITTED", "LOCKED"].some(f => data.statusFlags.includes(f))), | ||
| save: () => true, | ||
| print: () => true, | ||
| lock: () => true, | ||
| } | ||
|
|
||
| return ( | ||
| <DefaultForm key={location.key} actionSwitches={actionSwitches} /> | ||
| ); | ||
| } | ||
|
|
||
| export default Form; | ||
54 changes: 54 additions & 0 deletions
54
modules/clinician-dashboard/src/main/frontend/src/clinician-dashboard/FormView.jsx
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 |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| // | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
| // | ||
| import DefaultFormView from "../dataHomepage/FormView.jsx"; | ||
| import { getEntityIdentifier } from "../themePage/EntityIdentifier.jsx"; | ||
|
|
||
| function FormView(props) { | ||
|
|
||
| const actionSwitches = { | ||
| edit: () => false, | ||
| delete: () => false, | ||
| create: () => false, | ||
| expand: () => true, | ||
| } | ||
|
|
||
| const columns = [ | ||
| { | ||
| key: "@name", | ||
| label: "Identifier", | ||
| format: getEntityIdentifier, | ||
| link: "dashboard+path", | ||
| }, | ||
| { | ||
| key: "jcr:created", | ||
| label: "Created on", | ||
| format: "date:yyyy-MM-dd HH:mm", | ||
| }, | ||
| ] | ||
|
|
||
| return ( | ||
| <DefaultFormView | ||
| actionSwitches={actionSwitches} | ||
| columns={columns} | ||
| {...props} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export default FormView; |
66 changes: 66 additions & 0 deletions
66
modules/clinician-dashboard/src/main/frontend/src/clinician-dashboard/Forms.jsx
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 |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| // | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
| // | ||
| import DefaultForms from "../dataHomepage/Forms.jsx"; | ||
| import { getHierarchy } from "../questionnaire/SubjectIdentifier.jsx"; | ||
| import { getEntityIdentifier } from "../themePage/EntityIdentifier.jsx"; | ||
|
|
||
| function Forms(props) { | ||
| const { extensionURL } = props; | ||
|
|
||
| const actionSwitches = { | ||
| edit: () => false, | ||
| delete: () => false, | ||
| create: () => false, | ||
| expand: () => true, | ||
| } | ||
|
|
||
| const columns = [ | ||
| { | ||
| key: "@name", | ||
| label: "Identifier", | ||
| format: getEntityIdentifier, | ||
| link: "dashboard+path", | ||
| }, | ||
| { | ||
| key: "", | ||
| label: "Subject", | ||
| format: (row) => (row.subject ? getHierarchy(row.subject, undefined, undefined, extensionURL) : ''), | ||
| }, | ||
| { | ||
| key: "questionnaire/title", | ||
| label: "Questionnaire", | ||
| format: "string", | ||
| }, | ||
| { | ||
| key: "jcr:created", | ||
| label: "Created on", | ||
| format: "date:yyyy-MM-dd HH:mm", | ||
| }, | ||
| ] | ||
|
|
||
| return ( | ||
| <DefaultForms | ||
| actionSwitches={actionSwitches} | ||
| columns={columns} | ||
| {...props} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export default Forms; |
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.