From 1bef5afa02847bde5aaf46e56b40c6f17ebd4cee Mon Sep 17 00:00:00 2001 From: jabahum Date: Mon, 22 Jan 2024 10:09:41 +0300 Subject: [PATCH 1/7] clean up --- .../laboratory-order.component.tsx | 8 ++-- .../print-results-summary.component.tsx | 48 +------------------ .../print-results-table.component.tsx | 10 +--- .../results-summary.component.tsx | 14 ------ .../test-print-results-table.component.tsx | 3 -- .../test-results-table.component.tsx | 1 - 6 files changed, 7 insertions(+), 77 deletions(-) diff --git a/src/patient-chart/laboratory-order.component.tsx b/src/patient-chart/laboratory-order.component.tsx index e6a6bb37..4d45046b 100644 --- a/src/patient-chart/laboratory-order.component.tsx +++ b/src/patient-chart/laboratory-order.component.tsx @@ -238,8 +238,9 @@ const LaboratoryOrder: React.FC = ({ orders: { content: ( <> - {entry.orders.map((order) => { - if (order?.type === "testorder") { + {entry.orders + .filter((order) => order?.type === "testorder") + .map((order) => { return ( = ({ {order?.concept?.display} ); - } - })} + })} ), }, diff --git a/src/patient-chart/results-summary/print-results-summary.component.tsx b/src/patient-chart/results-summary/print-results-summary.component.tsx index 31a33284..afebc65d 100644 --- a/src/patient-chart/results-summary/print-results-summary.component.tsx +++ b/src/patient-chart/results-summary/print-results-summary.component.tsx @@ -1,39 +1,11 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import styles from "./print-results-summary.scss"; -import TestsPrintResults from "./test-print-results-table.component"; import { EncounterResponse } from "../laboratory-item/view-laboratory-item.resource"; -import { - formatDate, - interpolateUrl, - parseDate, - useConfig, -} from "@openmrs/esm-framework"; -import { - DataTable, - DataTableSkeleton, - Table, - TableBody, - TableCell, - TableContainer, - TableHead, - TableHeader, - TableRow, - Tile, - TableExpandHeader, - TableExpandRow, - TableExpandedRow, -} from "@carbon/react"; +import { formatDate, parseDate } from "@openmrs/esm-framework"; import logoImg from "../../../assets/logo/moh_logo_without_word.png"; -import { - Identifier, - IdentifierType, - PatientResource, - useGetPatientByUuid, -} from "../../utils/functions"; +import { Identifier, PatientResource } from "../../utils/functions"; import { useTranslation } from "react-i18next"; -import TestResultsChildren from "./test-children-results.component"; import PrintResultsTable from "./print-results-table.component"; -import { GetPatientByUuid } from "./results-summary.resource"; interface PrintResultsSummaryProps { encounterResponse: EncounterResponse; @@ -179,22 +151,6 @@ const PrintResultsSummary: React.FC = ({ }} > - {/*
-
-
- - Test Results - -
-
-
*/}
{Object.keys(results).length > 0 && ( diff --git a/src/patient-chart/results-summary/print-results-table.component.tsx b/src/patient-chart/results-summary/print-results-table.component.tsx index f8e61281..4148d220 100644 --- a/src/patient-chart/results-summary/print-results-table.component.tsx +++ b/src/patient-chart/results-summary/print-results-table.component.tsx @@ -2,15 +2,7 @@ import React from "react"; import styles from "./print-results-summary.scss"; import { GroupMember } from "../laboratory-order.resource"; import { useGetConceptById } from "./results-summary.resource"; -import { - Button, - Form, - ModalBody, - ModalFooter, - ModalHeader, - InlineLoading, - Checkbox, -} from "@carbon/react"; +import { InlineLoading } from "@carbon/react"; interface PrintResultsTableProps { groupedResults: any[]; diff --git a/src/patient-chart/results-summary/results-summary.component.tsx b/src/patient-chart/results-summary/results-summary.component.tsx index fe3de4a5..a04cfd57 100644 --- a/src/patient-chart/results-summary/results-summary.component.tsx +++ b/src/patient-chart/results-summary/results-summary.component.tsx @@ -22,20 +22,6 @@ interface ResultsSummaryProps { const ResultsSummary: React.FC = ({ encounter }) => { const { t } = useTranslation(); - // get encouter details - // const { encounter, isLoading, isError } = useGetEncounterById(encounterUuid); - - // print button - - // email button - - // if (encounter) { - // return ; - // } - // if (isError) { - // return ; - // } - const obsData = encounter.obs.filter((ob) => ob?.order?.type === "testorder"); if (encounter) { diff --git a/src/patient-chart/results-summary/test-print-results-table.component.tsx b/src/patient-chart/results-summary/test-print-results-table.component.tsx index 92d745c9..2b0bfb2d 100644 --- a/src/patient-chart/results-summary/test-print-results-table.component.tsx +++ b/src/patient-chart/results-summary/test-print-results-table.component.tsx @@ -16,9 +16,6 @@ import { TableExpandedRow, } from "@carbon/react"; import styles from "./results-summary.scss"; -import RescendTestResultActionMenu from "./test-results-rescend-action-menu.component"; -import { Order } from "../laboratory-order.resource"; -import DeleteTestResultActionMenu from "./test-results-delete-action-menu.component"; import { Ob } from "../laboratory-item/view-laboratory-item.resource"; import TestResultsChildren from "./test-children-results.component"; diff --git a/src/patient-chart/results-summary/test-results-table.component.tsx b/src/patient-chart/results-summary/test-results-table.component.tsx index 65384f8c..41b92a1c 100644 --- a/src/patient-chart/results-summary/test-results-table.component.tsx +++ b/src/patient-chart/results-summary/test-results-table.component.tsx @@ -2,7 +2,6 @@ import React, { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { DataTable, - DataTableSkeleton, Table, TableBody, TableCell, From 154235e2ae1bf82903929b86e10f4adf41f41b8a Mon Sep 17 00:00:00 2001 From: jabahum Date: Mon, 22 Jan 2024 13:48:13 +0300 Subject: [PATCH 2/7] =?UTF-8?q?For=20tests=20that=20don=E2=80=99t=20have?= =?UTF-8?q?=20ranges,=20when=20printing=20and=20approving,=20they=20don?= =?UTF-8?q?=E2=80=99t=20show=20the=20test=20results?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../print-results-table.component.tsx | 113 +++------ .../dialog/review-item.component.tsx | 228 ++++++++---------- 2 files changed, 140 insertions(+), 201 deletions(-) diff --git a/src/patient-chart/results-summary/print-results-table.component.tsx b/src/patient-chart/results-summary/print-results-table.component.tsx index 4148d220..103ece86 100644 --- a/src/patient-chart/results-summary/print-results-table.component.tsx +++ b/src/patient-chart/results-summary/print-results-table.component.tsx @@ -22,33 +22,28 @@ const PrintResultsTable: React.FC = ({ const RowTest: React.FC = ({ groupMembers }) => { // get Units const ValueUnits: React.FC = ({ conceptUuid }) => { - const { - concept: concept, - isLoading, - isError, - } = useGetConceptById(conceptUuid); - if (isLoading) { - return ; - } - if (isError) { - return Error; - } - return {concept?.units}; + const { concept, isLoading, isError } = useGetConceptById(conceptUuid); + + if (isLoading) return ; + if (isError) return Error; + + return ( + {concept?.units ?? "N/A"} + ); }; // get Reference Range const ReferenceRange: React.FC = ({ conceptUuid }) => { - const { - concept: concept, - isLoading, - isError, - } = useGetConceptById(conceptUuid); - if (isLoading) { - return ; - } - if (isError) { - return Error; - } + const { concept, isLoading, isError } = useGetConceptById(conceptUuid); + + if (isLoading) return ; + if (isError) return Error; + + const lowNormal = + concept?.lowNormal !== undefined ? concept.lowNormal : "--"; + const hiNormal = + concept?.hiNormal !== undefined ? concept.hiNormal : "--"; + return ( <> {concept?.hiNormal === undefined || @@ -56,67 +51,31 @@ const PrintResultsTable: React.FC = ({ "N/A" ) : (
- {concept?.lowNormal ? concept?.lowNormal : "--"} :{" "} - {concept?.hiNormal ? concept?.hiNormal : "--"} + {lowNormal} : {hiNormal}
)} ); }; + return ( <> - {groupMembers?.map((element, index) => { - return ( - - {typeof element.value === "number" ? ( - <> - {element?.concept.display} - - {element?.value} - - - { - - } - - - - { - - } - - - ) : typeof element.value === "object" ? ( - <> - {element?.concept.display} - - {element?.value.display} - - { - - } - - - - { - - } - - - ) : ( - {element?.display} - )} - - ); - })} + {groupMembers?.map((element, index) => ( + + {element?.concept.display} + + {typeof element.value === "object" + ? element.value.display + : element.value} + + + + + + + + + ))} ); }; diff --git a/src/review-list/dialog/review-item.component.tsx b/src/review-list/dialog/review-item.component.tsx index f0f71dd7..2bef0e0e 100644 --- a/src/review-list/dialog/review-item.component.tsx +++ b/src/review-list/dialog/review-item.component.tsx @@ -47,6 +47,7 @@ const ReviewItem: React.FC = ({ testsOrder?.forEach((element) => { groupedResults[element.order.display] = element; }); + return groupedResults; }, [testsOrder]); @@ -62,8 +63,6 @@ const ReviewItem: React.FC = ({ })); }; - console.info(checkedItems); - // handle approve const approveOrder = async (e) => { e.preventDefault(); @@ -104,106 +103,59 @@ const ReviewItem: React.FC = ({ // get Units const ValueUnits: React.FC = ({ conceptUuid }) => { - const { - concept: concept, - isLoading, - isError, - } = useGetConceptById(conceptUuid); - if (isLoading) { - return ; - } - if (isError) { - return Error; - } - return {concept?.units}; + const { concept, isLoading, isError } = useGetConceptById(conceptUuid); + + if (isLoading) return ; + if (isError) return Error; + + return ( + {concept?.units ?? "N/A"} + ); }; // get Reference Range const ReferenceRange: React.FC = ({ conceptUuid }) => { - const { - concept: concept, - isLoading, - isError, - } = useGetConceptById(conceptUuid); - if (isLoading) { - return ; - } - if (isError) { - return Error; - } + const { concept, isLoading, isError } = useGetConceptById(conceptUuid); + + if (isLoading) return ; + if (isError) return Error; + + const lowNormal = concept?.lowNormal || "--"; + const hiNormal = concept?.hiNormal || "--"; + return ( <> {concept?.hiNormal === undefined || concept?.lowNormal === undefined ? ( "N/A" ) : (
- {concept?.lowNormal ? concept?.lowNormal : "--"} :{" "} - {concept?.hiNormal ? concept?.hiNormal : "--"} + {lowNormal} : {hiNormal}
)} ); }; - const RowTest: React.FC = ({ groupMembers }) => { - return ( - <> - {groupMembers?.map((element, index) => { - return ( - - {typeof element.value === "number" ? ( - <> - {element?.concept.display} - - {element?.value} - - - { - - } - - - - { - - } - - - ) : typeof element.value === "object" ? ( - <> - {element?.concept.display} - - {element?.value.display} - - - { - - } - - - - { - - } - - - ) : ( - {element?.display} - )} - - ); - })} - - ); - }; + const RowGroupMembers: React.FC = ({ groupMembers }) => ( + <> + {groupMembers?.map((element, index) => ( + + {element?.concept.display} + + {typeof element.value === "object" + ? element.value.display + : element.value} + + + + + + + + + ))} + + ); return (
@@ -224,46 +176,74 @@ const ReviewItem: React.FC = ({
- {Object.keys(filteredGroupedResults).map((test, index) => ( - - - handleCheckboxChange( - test, - filteredGroupedResults[test].groupMembers, - filteredGroupedResults[test].uuid - ) - } - labelText={test} - id={`test-${test}`} - checked={checkedItems[test] || false} - /> + {Object.keys(filteredGroupedResults).length > 0 + ? Object.keys(filteredGroupedResults).map((test, index) => { + const { uuid, groupMembers } = + filteredGroupedResults[test]; + const isGrouped = uuid && groupMembers?.length > 0; + + return ( + + + handleCheckboxChange(test, groupMembers, uuid) + } + labelText={test} + id={`test-${test}`} + checked={checkedItems[test] || false} + /> -
- - - - - - +
TestsResultReference RangeUnits
+ + + + + + + + + + {isGrouped && ( + + )} + {!isGrouped && ( + + + + + + + )} + +
TestsResultReference RangeUnits
+ + { + filteredGroupedResults[test]?.order + ?.display + } + + + + { + filteredGroupedResults[test]?.value + ?.display + } + + + {"N/A"} + + {"N/A"} +
- - - - - - - ))} + ); + }) + : "No tests were added"}
From 540ea7e1a69a2cf0e22fbde5445a549d68b55e9c Mon Sep 17 00:00:00 2001 From: jabahum Date: Mon, 22 Jan 2024 14:21:45 +0300 Subject: [PATCH 3/7] fix print out non-display --- .../print-results-table.component.tsx | 53 ++++++++++++++----- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/src/patient-chart/results-summary/print-results-table.component.tsx b/src/patient-chart/results-summary/print-results-table.component.tsx index 103ece86..c900b34b 100644 --- a/src/patient-chart/results-summary/print-results-table.component.tsx +++ b/src/patient-chart/results-summary/print-results-table.component.tsx @@ -28,7 +28,7 @@ const PrintResultsTable: React.FC = ({ if (isError) return Error; return ( - {concept?.units ?? "N/A"} + {concept?.units ?? "N"} ); }; @@ -93,18 +93,42 @@ const PrintResultsTable: React.FC = ({ - {Object.keys(groupedResults).map((test) => ( - - - {test} - -
- -
- - ))} + {Object.keys(groupedResults).map((test) => { + const { uuid, groupMembers } = groupedResults[test]; + const isGrouped = uuid && groupMembers?.length > 0; + return ( + + + {test} + + + {isGrouped && } + {!isGrouped && ( + + + + + + + )}{" "} +
+ {groupedResults[test]?.order?.display} + + {groupedResults[test]?.value?.display} + + {"N/A"} + + {"N/A"} +
+ + ); + })}
@@ -112,3 +136,6 @@ const PrintResultsTable: React.FC = ({ }; export default PrintResultsTable; + +{ +} From 20789be670141921c7279da6801c96d6600a4c41 Mon Sep 17 00:00:00 2001 From: jabahum Date: Mon, 22 Jan 2024 16:15:49 +0300 Subject: [PATCH 4/7] update lock --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cbe44fb2..4467ffde 100644 --- a/package.json +++ b/package.json @@ -121,4 +121,4 @@ "@carbon/react": "1.14.0" }, "packageManager": "yarn@3.6.3" -} \ No newline at end of file +} From e6df912577a82fe0f0d186df6186844e7a31d42d Mon Sep 17 00:00:00 2001 From: jabahum Date: Mon, 22 Jan 2024 16:19:41 +0300 Subject: [PATCH 5/7] update lock --- package.json | 181 +++++++++++++++++++++++++-------------------------- 1 file changed, 90 insertions(+), 91 deletions(-) diff --git a/package.json b/package.json index 4467ffde..0121fe47 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,4 @@ { - "name": "@openmrs/esm-laboratory-app", "version": "1.0.0", "license": "MPL-2.0", @@ -8,117 +7,117 @@ "main": "src/index.ts", "source": true, "scripts": { - "start": "openmrs develop", - "serve": "webpack serve --mode=development", - "build": "webpack --mode production", - "analyze": "webpack --mode=production --env analyze=true", - "lint": "TIMING=1 eslint src --ext js,jsx,ts,tsx", - "prettier": "prettier --write \"src/**/*.{ts,tsx}\"", - "typescript": "tsc", - "test": "jest --config jest.config.js --passWithNoTests", - "verify": "turbo lint typescript test", - "extract-translations": "i18next 'src/**/*.component.tsx' --config ./i18next-parser.config.js", - "coverage": "yarn test -- --coverage", - "prepare": "husky install" + "start": "openmrs develop", + "serve": "webpack serve --mode=development", + "build": "webpack --mode production", + "analyze": "webpack --mode=production --env analyze=true", + "lint": "TIMING=1 eslint src --ext js,jsx,ts,tsx", + "prettier": "prettier --write \"src/**/*.{ts,tsx}\"", + "typescript": "tsc", + "test": "jest --config jest.config.js --passWithNoTests", + "verify": "turbo lint typescript test", + "extract-translations": "i18next 'src/**/*.component.tsx' --config ./i18next-parser.config.js", + "coverage": "yarn test -- --coverage", + "prepare": "husky install" }, "husky": { - "hooks": { - "pre-commit": "pretty-quick --staged && yarn verify" - } + "hooks": { + "pre-commit": "pretty-quick --staged && yarn verify" + } }, "browserslist": [ - "extends browserslist-config-openmrs" + "extends browserslist-config-openmrs" ], "keywords": [ - "openmrs", - "microfrontends", - "laboratory" + "openmrs", + "microfrontends", + "laboratory" ], "repository": { - "type": "git", - "url": "git+https://github.com/openmrs/openmrs-esm-laboratory.git" + "type": "git", + "url": "git+https://github.com/openmrs/openmrs-esm-laboratory.git" }, "homepage": "https://github.com/openmrs/openmrs-esm-laboratory#readme", "publishConfig": { - "access": "public" + "access": "public" }, "bugs": { - "url": "https://github.com/openmrs/openmrs-esm-laboratory/issues" + "url": "https://github.com/openmrs/openmrs-esm-laboratory/issues" }, "dependencies": { - "@carbon/react": "^1.14.0", - "@hookform/resolvers": "^3.3.4", - "lodash-es": "^4.17.21", - "react-hook-form": "^7.49.3", - "react-to-print": "^2.14.15", - "zod": "^3.22.4" + "@carbon/react": "^1.14.0", + "@hookform/resolvers": "^3.3.4", + "lodash-es": "^4.17.21", + "react-hook-form": "^7.49.3", + "react-to-print": "^2.14.15", + "zod": "^3.22.4" }, "peerDependencies": { - "@openmrs/esm-framework": "*", - "dayjs": "1.x", - "react": "18.x", - "react-i18next": "11.x", - "react-router-dom": "6.x", - "rxjs": "6.x" + "@openmrs/esm-framework": "*", + "dayjs": "1.x", + "react": "18.x", + "react-i18next": "11.x", + "react-router-dom": "6.x", + "rxjs": "6.x" }, "devDependencies": { - "@ohri/openmrs-esm-ohri-commons-lib": "next", - "@openmrs/esm-extensions": "next", - "@openmrs/esm-framework": "next", - "@openmrs/esm-patient-common-lib": "next", - "@openmrs/esm-react-utils": "next", - "@openmrs/esm-styleguide": "next", - "@swc/cli": "^0.1.62", - "@swc/core": "^1.3.62", - "@swc/jest": "^0.2.26", - "@testing-library/dom": "^8.20.0", - "@testing-library/jest-dom": "^5.16.5", - "@testing-library/react": "^13.4.0", - "@testing-library/user-event": "^14.4.3", - "@types/jest": "^28.1.8", - "@types/react": "^18.2.8", - "@types/react-dom": "^18.2.4", - "@types/react-router": "^5.1.20", - "@types/react-router-dom": "^5.3.3", - "@types/webpack-env": "^1.18.1", - "@typescript-eslint/parser": "^5.59.9", - "carbon-components-react": "^8.34.0", - "concurrently": "^7.6.0", - "css-loader": "^6.8.1", - "dayjs": "^1.11.9", - "eslint": "^8.42.0", - "eslint-config-prettier": "^8.8.0", - "eslint-config-ts-react-important-stuff": "^3.0.0", - "eslint-plugin-prettier": "^4.2.1", - "file-saver": "^2.0.5", - "husky": "^8.0.0", - "identity-obj-proxy": "^3.0.0", - "jest": "^28.1.3", - "jest-cli": "^28.1.3", - "jest-environment-jsdom": "^28.1.3", - "lerna": "^5.6.1", - "openmrs": "next", - "plotly.js": "^2.24.3", - "prettier": "^2.8.8", - "pretty-quick": "^3.1.3", - "raw-loader": "^4.0.2", - "react": "^18.2.0", - "react-csv": "^2.2.2", - "react-dom": "^18.2.0", - "react-i18next": "^11.18.6", - "react-pivottable": "^0.11.0", - "react-plotly.js": "^2.0.0", - "react-router-dom": "^6.11.2", - "react-table": "^7.8.0", - "rxjs": "^6.6.7", - "swc-loader": "^0.2.3", - "turbo": "^1.10.12", - "typescript": "^4.9.5", - "webpack": "^5.88.1", - "webpack-cli": "^5.1.3" + "@ohri/openmrs-esm-ohri-commons-lib": "next", + "@openmrs/esm-extensions": "next", + "@openmrs/esm-framework": "next", + "@openmrs/esm-patient-common-lib": "next", + "@openmrs/esm-react-utils": "next", + "@openmrs/esm-styleguide": "next", + "@swc/cli": "^0.1.62", + "@swc/core": "^1.3.62", + "@swc/jest": "^0.2.26", + "@testing-library/dom": "^8.20.0", + "@testing-library/jest-dom": "^5.16.5", + "@testing-library/react": "^13.4.0", + "@testing-library/user-event": "^14.4.3", + "@types/jest": "^28.1.8", + "@types/react": "^18.2.8", + "@types/react-dom": "^18.2.4", + "@types/react-router": "^5.1.20", + "@types/react-router-dom": "^5.3.3", + "@types/webpack-env": "^1.18.1", + "@typescript-eslint/parser": "^5.59.9", + "carbon-components-react": "^8.34.0", + "concurrently": "^7.6.0", + "css-loader": "^6.8.1", + "dayjs": "^1.11.9", + "eslint": "^8.42.0", + "eslint-config-prettier": "^8.8.0", + "eslint-config-ts-react-important-stuff": "^3.0.0", + "eslint-plugin-prettier": "^4.2.1", + "file-saver": "^2.0.5", + "husky": "^8.0.0", + "identity-obj-proxy": "^3.0.0", + "jest": "^28.1.3", + "jest-cli": "^28.1.3", + "jest-environment-jsdom": "^28.1.3", + "lerna": "^5.6.1", + "openmrs": "next", + "plotly.js": "^2.24.3", + "prettier": "^2.8.8", + "pretty-quick": "^3.1.3", + "raw-loader": "^4.0.2", + "react": "^18.2.0", + "react-csv": "^2.2.2", + "react-dom": "^18.2.0", + "react-i18next": "^11.18.6", + "react-pivottable": "^0.11.0", + "react-plotly.js": "^2.0.0", + "react-router-dom": "^6.11.2", + "react-table": "^7.8.0", + "rxjs": "^6.6.7", + "swc-loader": "^0.2.3", + "turbo": "^1.10.12", + "typescript": "^4.9.5", + "webpack": "^5.88.1", + "webpack-cli": "^5.1.3" }, "resolutions": { - "@carbon/react": "1.14.0" + "@carbon/react": "1.14.0" }, "packageManager": "yarn@3.6.3" } From 2aa98c9dca87c4a41fb7ffee3d60ca1d2305d1df Mon Sep 17 00:00:00 2001 From: jabahum Date: Tue, 23 Jan 2024 18:56:18 +0300 Subject: [PATCH 6/7] updated and moved to file --- package.json | 2 +- .../dialog/review-item.component.tsx | 8 +- src/review-list/dialog/review-item.scss | 13 ++ src/review-list/review-list.component.tsx | 3 - src/review-list/review-list.scss | 123 +----------------- 5 files changed, 20 insertions(+), 129 deletions(-) diff --git a/package.json b/package.json index 0121fe47..4ea4ac17 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "main": "src/index.ts", "source": true, "scripts": { - "start": "openmrs develop", + "start": "openmrs develop --backend http://194.163.171.253:8282", "serve": "webpack serve --mode=development", "build": "webpack --mode production", "analyze": "webpack --mode=production --env analyze=true", diff --git a/src/review-list/dialog/review-item.component.tsx b/src/review-list/dialog/review-item.component.tsx index 2bef0e0e..635122a4 100644 --- a/src/review-list/dialog/review-item.component.tsx +++ b/src/review-list/dialog/review-item.component.tsx @@ -109,7 +109,7 @@ const ReviewItem: React.FC = ({ if (isError) return Error; return ( - {concept?.units ?? "N/A"} + {concept?.units ?? "N/A"} ); }; @@ -186,11 +186,7 @@ const ReviewItem: React.FC = ({ handleCheckboxChange(test, groupMembers, uuid) } diff --git a/src/review-list/dialog/review-item.scss b/src/review-list/dialog/review-item.scss index e69de29b..9e7d55d5 100644 --- a/src/review-list/dialog/review-item.scss +++ b/src/review-list/dialog/review-item.scss @@ -0,0 +1,13 @@ +@use '@carbon/styles/scss/spacing'; +@use '@carbon/styles/scss/type'; +@import "~@openmrs/esm-styleguide/src/vars"; + +.checkbox { + margin: "10px"; + font-size: "15px"; + font-weight: "bold"; +} + +.valueWidget { + margin-left: "10px" +} \ No newline at end of file diff --git a/src/review-list/review-list.component.tsx b/src/review-list/review-list.component.tsx index f91da5a2..4935f3cf 100644 --- a/src/review-list/review-list.component.tsx +++ b/src/review-list/review-list.component.tsx @@ -170,9 +170,6 @@ const ReviewList: React.FC = ({ fulfillerStatus }) => { diff --git a/src/review-list/review-list.scss b/src/review-list/review-list.scss index 26b8c009..f3caf836 100644 --- a/src/review-list/review-list.scss +++ b/src/review-list/review-list.scss @@ -2,71 +2,14 @@ @use '@carbon/styles/scss/type'; @import "~@openmrs/esm-styleguide/src/vars"; -title { - width: 6.938rem; - height: 1.75rem; - margin: 0.438rem 22.875rem 0.813rem 0; - font-family: IBMPlexSans; - font-size: 1.25rem; - font-weight: normal; - font-stretch: normal; - font-style: normal; - line-height: 1.4; - letter-spacing: normal; -} - .link { text-decoration: none; } - -.orderTabs { - grid-column: 'span 2'; - padding: 0 spacing.$spacing-05; -} - -.newListButton { - width: fit-content; - justify-self: end; - align-self: center; -} - -.hiddenTabsContent, -.tabs .hiddenTabsContent { - display: none; +.tableToolbar { + position: static; } -.patientListTableContainer { - grid-row: 3 / 4; - grid-column: 1 / 2; - height: 100%; - margin: 0.5rem spacing.$spacing-05; - background-color: $ui-01; - border: 0.5px solid #e0e0e0; - - :global(.cds--data-table-container) { - padding-top: 0 !important; - } - - tbody>tr>:nth-child(2) { - white-space: nowrap; - } - - :global(.cds--data-table td) { - height: unset !important; - } - - :global(.cds--data-table--zebra) tbody tr[data-parent-row]:nth-child(4n + 1) td { - background-color: $ui-02; - border-bottom: 1px solid $ui-03; - border-top: 1px solid $ui-03; - } - - :global(.cds--data-table--zebra) tbody tr[data-parent-row]:nth-child(4n + 3) td { - background-color: $ui-01; - border-bottom: 1px solid $ui-03; - } -} .tableContainer { background-color: $ui-01; @@ -96,50 +39,13 @@ title { border-bottom: none; } } + .headerBtnContainer { background-color: $ui-background; padding: spacing.$spacing-05; text-align: right; } -.searchContainer { - display: flex; - align-items: center; - flex-direction: row-reverse; - padding-top: 0.5rem; - - :global(.cds--search-magnifier-icon) { - z-index: 0 !important; - } - - input { - background-color: #fff; - } -} - -.addOrderBtn { - width: 10rem !important; - padding: 0.5rem !important; - margin-left: 1rem; - margin-right: 1rem; -} - -.patientSearch { - width: 25rem; - border-bottom-color: $ui-03; -} - -.locationFilter { - width: 25rem; -} - -.search { - width: 100%; - max-width: 16rem; - background-color: $ui-02; - border-bottom-color: $ui-03; -} - .container { background-color: $ui-01; } @@ -160,30 +66,9 @@ title { flex-direction: column; align-items: center; } + .content { @include type.type-style('heading-compact-02'); color: $text-02; margin-bottom: 0.5rem; -} - -.section { - table { - font-family: Arial, sans-serif; - border-collapse: collapse; - width: 100%; - } - - td, th { - border: 1px solid #000; - text-align: left; - font-size: 8px; - padding: 8px; - width: 80px; - } - - th { - background-color: #f2f2f2; - } - - } \ No newline at end of file From 0e460b214847a377c6b0b71b6b6fd98f07b8c19c Mon Sep 17 00:00:00 2001 From: jabahum Date: Tue, 23 Jan 2024 21:48:52 +0300 Subject: [PATCH 7/7] remove ip --- package.json | 2 +- .../results-summary/print-results-table.component.tsx | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index 4ea4ac17..0121fe47 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "main": "src/index.ts", "source": true, "scripts": { - "start": "openmrs develop --backend http://194.163.171.253:8282", + "start": "openmrs develop", "serve": "webpack serve --mode=development", "build": "webpack --mode production", "analyze": "webpack --mode=production --env analyze=true", diff --git a/src/patient-chart/results-summary/print-results-table.component.tsx b/src/patient-chart/results-summary/print-results-table.component.tsx index c900b34b..ad1b9882 100644 --- a/src/patient-chart/results-summary/print-results-table.component.tsx +++ b/src/patient-chart/results-summary/print-results-table.component.tsx @@ -136,6 +136,3 @@ const PrintResultsTable: React.FC = ({ }; export default PrintResultsTable; - -{ -}