Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions aggregated-frontend/src/main/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@uiw/react-md-editor": "4.0.5",
"@mui/lab": "7.0.0-beta.11",
"@mui/x-date-pickers": "7.28.3",
"@mui/x-data-grid": "8.5.1",
"cornerstone-core": "2.6.1",
"cornerstone-wado-image-loader": "4.13.2",
"dicom-parser": "1.8.21",
Expand Down
59 changes: 57 additions & 2 deletions aggregated-frontend/src/main/frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@
"@babel/plugin-transform-modules-commonjs" "^7.27.1"
"@babel/plugin-transform-typescript" "^7.28.5"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.2", "@babel/runtime@^7.18.3", "@babel/runtime@^7.25.7", "@babel/runtime@^7.27.0", "@babel/runtime@^7.27.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.7":
"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.2", "@babel/runtime@^7.18.3", "@babel/runtime@^7.25.7", "@babel/runtime@^7.27.0", "@babel/runtime@^7.27.1", "@babel/runtime@^7.27.4", "@babel/runtime@^7.28.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.7":
version "7.27.1"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.27.1.tgz#9fce313d12c9a77507f264de74626e87fd0dc541"
integrity sha512-1x3D2xEk2fRo3PAhwQwu5UubzgiVWSXTBfWpVd2Mx2AzRqJuDJCsgaDVZ7HB5iGzDW1Hl1sWN2mFyKjmR9uAog==
Expand Down Expand Up @@ -1541,6 +1541,13 @@
dependencies:
"@babel/runtime" "^7.27.1"

"@mui/types@^7.4.10":
version "7.4.10"
resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.4.10.tgz#c80ed5850a1da7802a01c1d0153d8603ce41be10"
integrity sha512-0+4mSjknSu218GW3isRqoxKRTOrTLd/vHi/7UC4+wZcUrOAqD9kRk7UQRL1mcrzqRoe7s3UT6rsRpbLkW5mHpQ==
dependencies:
"@babel/runtime" "^7.28.4"

"@mui/utils@^5.16.6 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta", "@mui/utils@^7.0.2", "@mui/utils@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-7.1.0.tgz#464c0c1bc8f57c07d934ac674f3dcc81ac24f68b"
Expand All @@ -1553,6 +1560,31 @@
prop-types "^15.8.1"
react-is "^19.1.0"

"@mui/utils@^7.1.1":
version "7.3.7"
resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-7.3.7.tgz#71443559a7fbd993b5b90fcb843fa26a60046f99"
integrity sha512-+YjnjMRnyeTkWnspzoxRdiSOgkrcpTikhNPoxOZW0APXx+urHtUoXJ9lbtCZRCA5a4dg5gSbd19alL1DvRs5fg==
dependencies:
"@babel/runtime" "^7.28.4"
"@mui/types" "^7.4.10"
"@types/prop-types" "^15.7.15"
clsx "^2.1.1"
prop-types "^15.8.1"
react-is "^19.2.3"

"@mui/x-data-grid@8.5.1":
version "8.5.1"
resolved "https://registry.yarnpkg.com/@mui/x-data-grid/-/x-data-grid-8.5.1.tgz#452b22c8cd1649337dd633a4cf61cb8595559d38"
integrity sha512-Ukodx8cOc/GR4+2zr4DRNBJJOlyeJNaxK4hggWv7VchDL7Jf70dLZO7oLXPhEFG05Yna81RatL/UFsRYIdWI1Q==
dependencies:
"@babel/runtime" "^7.27.4"
"@mui/utils" "^7.1.1"
"@mui/x-internals" "8.5.1"
clsx "^2.1.1"
prop-types "^15.8.1"
reselect "^5.1.1"
use-sync-external-store "^1.5.0"

"@mui/x-date-pickers@7.28.3":
version "7.28.3"
resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-7.28.3.tgz#eaf28b86b50b6fb61d0c671ba4e3d89a1b199a57"
Expand All @@ -1574,6 +1606,14 @@
"@babel/runtime" "^7.25.7"
"@mui/utils" "^5.16.6 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta"

"@mui/x-internals@8.5.1":
version "8.5.1"
resolved "https://registry.yarnpkg.com/@mui/x-internals/-/x-internals-8.5.1.tgz#71b72e0816d986b1b344a1d48e5518b0472cf905"
integrity sha512-7rAWK7SB6FxEIXKgsHsJjIzeeKOLxFJ16gePgZVWlvyew+xDb4P0fgjwW3ThcJjgvkUm0UhGGfLh/JP8l514IA==
dependencies:
"@babel/runtime" "^7.27.4"
"@mui/utils" "^7.1.1"

"@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1":
version "5.1.1-v1"
resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129"
Expand Down Expand Up @@ -1866,6 +1906,11 @@
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.14.tgz#1433419d73b2a7ebfc6918dcefd2ec0d5cd698f2"
integrity sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==

"@types/prop-types@^15.7.15":
version "15.7.15"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.15.tgz#e6e5a86d602beaca71ce5163fadf5f95d70931c7"
integrity sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==

"@types/react-dom@19.1.0":
version "19.1.0"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.0.tgz#29f4b0400edbef5166359cec39dca9ffd4f7ad51"
Expand Down Expand Up @@ -5761,7 +5806,7 @@ react-google-autocomplete@2.7.5:
lodash.debounce "^4.0.8"
prop-types "^15.5.0"

react-is@^16.13.1, react-is@^16.7.0, react-is@^18.3.1, react-is@^19.0.0, react-is@^19.1.0:
react-is@^16.13.1, react-is@^16.7.0, react-is@^18.3.1, react-is@^19.0.0, react-is@^19.1.0, react-is@^19.2.3:
version "19.1.0"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-19.1.0.tgz#805bce321546b7e14c084989c77022351bbdd11b"
integrity sha512-Oe56aUPnkHyyDxxkvqtd7KkdQP5uIUfHxd5XTb3wE9d/kRnZLmKbDB0GWk919tdQ+mxxPtG6EAs6RMT6i1qtHg==
Expand Down Expand Up @@ -6133,6 +6178,11 @@ require-from-string@^2.0.2:
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==

reselect@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/reselect/-/reselect-5.1.1.tgz#c766b1eb5d558291e5e550298adb0becc24bb72e"
integrity sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==

resolve-cwd@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d"
Expand Down Expand Up @@ -6804,6 +6854,11 @@ uri-js@^4.2.2:
dependencies:
punycode "^2.1.0"

use-sync-external-store@^1.5.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz#b174bfa65cb2b526732d9f2ac0a408027876f32d"
integrity sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==

util-deprecate@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
Expand Down
58 changes: 58 additions & 0 deletions modules/clinician-dashboard/pom.xml
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 modules/clinician-dashboard/src/main/features/feature.json
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 modules/clinician-dashboard/src/main/frontend/assets.config
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' }
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;
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;
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;
Loading