diff --git a/.env b/.env index da48755037b..528b49e2b8d 100644 --- a/.env +++ b/.env @@ -1,7 +1,7 @@ # Whitelabelling envs REACT_APP_TITLE=CARE -REACT_APP_META_DESCRIPTION=CoronaSafe Network is an open-source public utility designed by a multi-disciplinary team of innovators and volunteers. CoronaSafe Care is a Digital Public Good recognised by United Nations. +REACT_APP_META_DESCRIPTION=Revolutionizing EMR with AI: Open Healthcare Network develops free, open-source tools to enhance efficiency in global healthcare delivery. Our EMR system is recognized as a Digital Public Good by the United Nations. REACT_APP_COVER_IMAGE=https://cdn.coronasafe.network/care_logo.svg REACT_APP_COVER_IMAGE_ALT=https://cdn.coronasafe.network/care_logo.svg REACT_PUBLIC_URL=https://care.coronasafe.in diff --git a/.eslintrc.json b/.eslintrc.json index a2f7b667856..0fc2f64ddaf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,7 +12,6 @@ "extends": [ "eslint:recommended", "plugin:react-hooks/recommended", - "plugin:prettier/recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "plugin:i18next/recommended", diff --git a/cypress/e2e/patient_spec/patient_discharge.cy.ts b/cypress/e2e/patient_spec/patient_discharge.cy.ts index 34ad423d1e8..242c936730d 100644 --- a/cypress/e2e/patient_spec/patient_discharge.cy.ts +++ b/cypress/e2e/patient_spec/patient_discharge.cy.ts @@ -36,6 +36,7 @@ describe("Patient Discharge based on multiple reason", () => { patientDischarge.clickDischarge(); patientDischarge.selectDischargeReason(patientDischargeReason4); cy.submitButton("Confirm Discharge"); + cy.submitButton("Acknowledge & Submit"); cy.verifyNotification("Patient Discharged Successfully"); cy.closeNotification(); // Verify the consultation dashboard reflection @@ -53,6 +54,7 @@ describe("Patient Discharge based on multiple reason", () => { patientDischarge.typeDischargeNote(patientDeathCause); patientDischarge.typeDoctorName(doctorName); cy.submitButton("Confirm Discharge"); + cy.submitButton("Acknowledge & Submit"); cy.verifyNotification("Patient Discharged Successfully"); cy.closeNotification(); // Verify the consultation dashboard reflection @@ -77,6 +79,7 @@ describe("Patient Discharge based on multiple reason", () => { patientDischarge.typeReferringFacility(referringFreetextFacility); cy.wait(2000); cy.submitButton("Confirm Discharge"); + cy.submitButton("Acknowledge & Submit"); cy.wait(2000); cy.verifyNotification("Patient Discharged Successfully"); cy.closeNotification(); @@ -108,6 +111,7 @@ describe("Patient Discharge based on multiple reason", () => { cy.closeNotification(); // submit the discharge pop-up cy.submitButton("Confirm Discharge"); + cy.submitButton("Acknowledge & Submit"); cy.wait(2000); cy.verifyNotification("Patient Discharged Successfully"); cy.closeNotification(); diff --git a/cypress/e2e/patient_spec/patient_registration.cy.ts b/cypress/e2e/patient_spec/patient_registration.cy.ts index 17c9b0b3679..f94dbbe46cd 100644 --- a/cypress/e2e/patient_spec/patient_registration.cy.ts +++ b/cypress/e2e/patient_spec/patient_registration.cy.ts @@ -254,7 +254,7 @@ describe("Patient Creation with consultation", () => { }); it("Patient Registration using the transfer with no consultation", () => { - // transfer the patient and no consulation + // transfer the patient with no consulation and verify the transfer to a new facility patientPage.createPatient(); patientPage.selectFacility(patientTransferFacility); patientPage.patientformvisibility(); @@ -264,9 +264,10 @@ describe("Patient Creation with consultation", () => { patientTransfer.clickTransferPatientNameList(patientTransferName); patientTransfer.clickTransferPatientYOB(yearOfBirth); patientTransfer.clickTransferSubmitButton(); - patientTransfer.verifyFacilitySuccessfullMessage(); + cy.verifyNotification( + "Patient Dummy Patient 10 (Male) transferred successfully", + ); patientTransfer.clickConsultationCancelButton(); - cy.wait(3000); // allow the transfer button of a patient patientTransfer.clickAllowPatientTransferButton(); // Verify the patient error message for the same facility @@ -280,7 +281,9 @@ describe("Patient Creation with consultation", () => { patientTransfer.clickTransferPatientNameList(patientTransferName); patientTransfer.clickTransferPatientYOB(yearOfBirth); patientTransfer.clickTransferSubmitButton(); - patientTransfer.verifyFacilityErrorMessage(); + cy.verifyNotification( + "Patient - Patient transfer cannot be completed because the patient has an active consultation in the same facility", + ); }); it("Patient Registration using External Result Import", () => { diff --git a/cypress/pageobject/Patient/PatientPrescription.ts b/cypress/pageobject/Patient/PatientPrescription.ts index 8e006465e08..108fedbd676 100644 --- a/cypress/pageobject/Patient/PatientPrescription.ts +++ b/cypress/pageobject/Patient/PatientPrescription.ts @@ -28,7 +28,7 @@ export class PatientPrescription { } clickAdministerButton() { - cy.get("#administer-medicine").should("be.visible"); + cy.get("#administer-medicine").scrollIntoView().should("be.visible"); cy.verifyAndClickElement("#administer-medicine", "Administer"); } diff --git a/cypress/pageobject/Patient/PatientTransfer.ts b/cypress/pageobject/Patient/PatientTransfer.ts index 4c884ee2427..0bdd55e9880 100644 --- a/cypress/pageobject/Patient/PatientTransfer.ts +++ b/cypress/pageobject/Patient/PatientTransfer.ts @@ -19,44 +19,18 @@ class PatientTransfer { clickTransferSubmitButton() { cy.get("#submit-transferpatient").click(); + cy.wait(2000); } clickConsultationCancelButton() { cy.get("#cancel").scrollIntoView(); cy.get("#cancel").click(); + cy.wait(2000); } clickAllowPatientTransferButton() { cy.get("#patient-allow-transfer").click(); } - - verifyFacilitySuccessfullMessage() { - cy.get(".pnotify") - .should("exist") - .within(() => { - cy.get(".pnotify-text") - .invoke("text") - .then((text) => { - expect(text.trim()).to.match( - /^Patient Dummy Patient 10 \(Male\) transferred successfully$/i, - ); - }); - }); - } - - verifyFacilityErrorMessage() { - cy.get(".pnotify") - .should("exist") - .within(() => { - cy.get(".pnotify-text") - .invoke("text") - .then((text) => { - expect(text).to.match( - /Patient - Patient transfer cannot be completed because the patient has an active consultation in the same facility/, - ); - }); - }); - } } export default PatientTransfer; diff --git a/cypress/support/index.ts b/cypress/support/index.ts index 9ddfd0c819a..c9af6a02c96 100644 --- a/cypress/support/index.ts +++ b/cypress/support/index.ts @@ -1,3 +1,4 @@ +/// import "./commands"; declare global { diff --git a/package-lock.json b/package-lock.json index b0027f9c7be..2458c891d41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "echarts-for-react": "^3.0.2", "eslint-mdx": "^3.1.5", "events": "^3.3.0", - "glob": "^10.3.15", + "glob": "^10.4.2", "hi-profiles": "^1.0.6", "i18next": "^23.11.4", "i18next-browser-languagedetector": "^7.2.1", @@ -43,7 +43,7 @@ "react-copy-to-clipboard": "^5.1.0", "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", - "react-dnd-scrolling": "^1.3.7", + "react-dnd-scrolling": "^1.3.8", "react-dom": "18.3.1", "react-google-recaptcha": "^3.1.0", "react-i18next": "^13.0.1", @@ -72,6 +72,7 @@ "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.13", + "@types/cypress": "^1.1.3", "@types/echarts": "^4.9.22", "@types/google.maps": "^3.55.8", "@types/lodash-es": "^4.17.12", @@ -87,7 +88,7 @@ "@typescript-eslint/parser": "^5.61.0", "@vitejs/plugin-react-swc": "^3.6.0", "autoprefixer": "^10.4.19", - "cypress": "^13.9.0", + "cypress": "^13.13.1", "cypress-localstorage-commands": "^2.2.5", "cypress-split": "^1.23.2", "eslint": "^8.44.0", @@ -6222,6 +6223,16 @@ "@types/node": "*" } }, + "node_modules/@types/cypress": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/cypress/-/cypress-1.1.3.tgz", + "integrity": "sha512-OXe0Gw8LeCflkG1oPgFpyrYWJmEKqYncBsD/J0r17r0ETx/TnIGDNLwXt/pFYSYuYTpzcq1q3g62M9DrfsBL4g==", + "deprecated": "This is a stub types definition for cypress (https://cypress.io). cypress provides its own type definitions, so you don't need @types/cypress installed!", + "dev": true, + "dependencies": { + "cypress": "*" + } + }, "node_modules/@types/debug": { "version": "4.1.12", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", @@ -9129,9 +9140,9 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/cypress": { - "version": "13.9.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.9.0.tgz", - "integrity": "sha512-atNjmYfHsvTuCaxTxLZr9xGoHz53LLui3266WWxXJHY7+N6OdwJdg/feEa3T+buez9dmUXHT1izCOklqG82uCQ==", + "version": "13.13.1", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.13.1.tgz", + "integrity": "sha512-8F9UjL5MDUdgC/S5hr8CGLHbS5gGht5UOV184qc2pFny43fnkoaKxlzH/U6//zmGu/xRTaKimNfjknLT8+UDFg==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -9174,7 +9185,7 @@ "request-progress": "^3.0.0", "semver": "^7.5.3", "supports-color": "^8.1.1", - "tmp": "~0.2.1", + "tmp": "~0.2.3", "untildify": "^4.0.0", "yauzl": "^2.10.0" }, @@ -13772,15 +13783,16 @@ "dev": true }, "node_modules/glob": { - "version": "10.3.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.15.tgz", - "integrity": "sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==", + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", + "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.6", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.11.0" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" @@ -15439,9 +15451,9 @@ } }, "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -18160,9 +18172,9 @@ } }, "node_modules/minipass": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.0.tgz", - "integrity": "sha512-oGZRv2OT1lO2UF1zUcwdTb3wqUwI0kBGTgt/T7OdSj6M6N5m3o5uPf0AIW6lVxGGoiWUR7e2AwTE+xiwK8WQig==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "engines": { "node": ">=16 || 14 >=14.17" } @@ -18959,6 +18971,11 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" + }, "node_modules/pako": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", @@ -19056,15 +19073,15 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.0.tgz", - "integrity": "sha512-LNHTaVkzaYaLGlO+0u3rQTz7QrHTFOuKyba9JMTQutkmtNew8dw8wOD7mTU/5fCPZzCWpfW0XnQKzY61P0aTaw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -20019,9 +20036,9 @@ } }, "node_modules/react-dnd-scrolling": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/react-dnd-scrolling/-/react-dnd-scrolling-1.3.7.tgz", - "integrity": "sha512-iLMziS6A4fxiCBpheb+B5T3I8SnZtAeAJszADLavkCvCX+gWt0ElL7Z895c1xLZOlFTWvHPfeCMYtP5ELqV8zQ==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/react-dnd-scrolling/-/react-dnd-scrolling-1.3.8.tgz", + "integrity": "sha512-XcvmrTsQrPNry7jkY8RkNAZ2HZIiLiUzOSUltkW6eOhNjkKfivnPEhkj9hZf1JP4C32zxDsjN26xoBy7puZXoA==", "dependencies": { "hoist-non-react-statics": "3.x", "lodash.throttle": "^4.1.1", diff --git a/package.json b/package.json index e23c97fd517..aa8d3f5df01 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "echarts-for-react": "^3.0.2", "eslint-mdx": "^3.1.5", "events": "^3.3.0", - "glob": "^10.3.15", + "glob": "^10.4.2", "hi-profiles": "^1.0.6", "i18next": "^23.11.4", "i18next-browser-languagedetector": "^7.2.1", @@ -83,7 +83,7 @@ "react-copy-to-clipboard": "^5.1.0", "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", - "react-dnd-scrolling": "^1.3.7", + "react-dnd-scrolling": "^1.3.8", "react-dom": "18.3.1", "react-google-recaptcha": "^3.1.0", "react-i18next": "^13.0.1", @@ -112,6 +112,7 @@ "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.13", + "@types/cypress": "^1.1.3", "@types/echarts": "^4.9.22", "@types/google.maps": "^3.55.8", "@types/lodash-es": "^4.17.12", @@ -127,7 +128,7 @@ "@typescript-eslint/parser": "^5.61.0", "@vitejs/plugin-react-swc": "^3.6.0", "autoprefixer": "^10.4.19", - "cypress": "^13.9.0", + "cypress": "^13.13.1", "cypress-localstorage-commands": "^2.2.5", "cypress-split": "^1.23.2", "eslint": "^8.44.0", diff --git a/src/CAREUI/display/Count.tsx b/src/CAREUI/display/Count.tsx index 3b889b10e9b..997b58794eb 100644 --- a/src/CAREUI/display/Count.tsx +++ b/src/CAREUI/display/Count.tsx @@ -19,11 +19,11 @@ export default function CountBlock(props: Props) {
+
{props.event.by && ( - + {props.event.by.username.startsWith("asset") ? t("virtual_nursing_assistant") : `${formatName(props.event.by)} ${ @@ -101,7 +101,7 @@ export const TimelineNode = (props: TimelineNodeProps) => { {props.actions} )}
({consent.patient_abha})
({consent.requester.username})
View
created {dayjs(artefact.created_date).fromNow()}
expires in {dayjs(artefact.expiry).fromNow()}
expires in {dayjs(consent.expiry).fromNow()}
created {dayjs(consent.created_date).fromNow()}
modified {dayjs(consent.modified_date).fromNow()}
{consent.status === "REQUESTED" ? "Waiting for the Patient to approve the consent request" : "Patient has rejected the consent request"}
No Records found
Raise a consent request to fetch patient records over ABDM
- Gender: - - {abha?.gender} - -
- DOB: - - {abha?.date_of_birth} - -
- Email: - - {abha?.email} - -
{t("update_record_for_asset")} {props.asset?.name}
{isLast ? "Created" : "Edited"} On
{formatDateTime(edit.edited_on)}
{isLast ? "Created" : "Edited"} By
{edit.edited_by.username}
{t("edited_on")}
{formatDateTime(editRecord.edited_on)}
{t("edited_by")}
{editRecord.edited_by.username}
{t("serviced_on")}
{formatDate(editRecord.serviced_on)}
{t("notes")}
{editRecord.note || "-"}
No Assets Found
{type == "year" @@ -350,7 +350,7 @@ const DateInputV2: React.FC = ({ year.getFullYear()) || !isDateWithinConstraints(getLastDay()) } - className="inline-flex aspect-square cursor-pointer items-center justify-center rounded p-2 transition duration-100 ease-in-out hover:bg-gray-300" + className="inline-flex aspect-square cursor-pointer items-center justify-center rounded p-2 transition duration-100 ease-in-out hover:bg-secondary-300" onClick={increment} > = ({ id={`day-${i}`} className="aspect-square w-[14.26%]" > - + {day} @@ -397,11 +397,11 @@ const DateInputV2: React.FC = ({ "bg-primary-500 font-bold text-white"; } else { conditionalClasses = - "hover:bg-gray-300 cursor-pointer"; + "hover:bg-secondary-300 cursor-pointer"; } } else { conditionalClasses = - "!cursor-not-allowed !text-gray-400"; + "!cursor-not-allowed !text-secondary-400"; } return ( = ({ "w-1/4 cursor-pointer rounded-lg px-2 py-4 text-center text-sm font-semibold", value && isSelectedMonth(i) ? "bg-primary-500 text-white" - : "text-gray-700 hover:bg-gray-300", + : "text-secondary-700 hover:bg-secondary-300", )} onClick={setMonthValue(i)} > @@ -462,7 +462,7 @@ const DateInputV2: React.FC = ({ "w-1/4 cursor-pointer rounded-lg px-2 py-4 text-center text-sm font-semibold", value && isSelectedYear(y) ? "bg-primary-500 text-white" - : "text-gray-700 hover:bg-gray-300", + : "text-secondary-700 hover:bg-secondary-300", )} onClick={setYearValue(y)} > diff --git a/src/Components/Common/Dialog.tsx b/src/Components/Common/Dialog.tsx index ed52920fb13..68f6d0900b9 100644 --- a/src/Components/Common/Dialog.tsx +++ b/src/Components/Common/Dialog.tsx @@ -59,11 +59,11 @@ const DialogModal = (props: DialogProps) => { > {title} - + {description} diff --git a/src/Components/Common/ExcelFIleDragAndDrop.tsx b/src/Components/Common/ExcelFIleDragAndDrop.tsx index 750d4785279..5a6719f03df 100644 --- a/src/Components/Common/ExcelFIleDragAndDrop.tsx +++ b/src/Components/Common/ExcelFIleDragAndDrop.tsx @@ -144,7 +144,7 @@ export default function ExcelFileDragAndDrop({ onDrop={onDrop} onClick={() => !selectedFile && fileInputRef.current?.click()} className={`mb-8 mt-5 flex flex-1 flex-col items-center justify-center rounded-lg border-[3px] border-dashed px-3 py-6 ${ - dragProps.dragOver ? "border-primary-500" : "border-gray-500" + dragProps.dragOver ? "border-primary-500" : "border-secondary-500" } ${dragProps.fileDropError !== "" ? "border-red-500" : ""}`} > {dragProps.fileDropError !== "" && dragProps.fileDropError} @@ -181,7 +185,7 @@ export default function ExcelFileDragAndDrop({ /> {selectedFile && ( - + {selectedFile.name} - {(selectedFile.size / 1024).toFixed(2)} KB setPreview(true)} > ) : ( <> - + {selectedFile.name} @@ -87,11 +87,11 @@ const ExcelViewer = ({ - + {fileData && fileData[0] ? ( - - + + {showCheckbox && ( @@ -133,7 +133,7 @@ const ExcelViewer = ({ {showCheckbox && ( @@ -218,12 +218,12 @@ const ExcelViewer = ({ ) : ( - No data found + No data found )} {fileData && fileData.length > 5 && ( - + Showing {currentPage * rowsPerPage - rowsPerPage + 1} to{" "} {currentPage * rowsPerPage > fileData.length ? fileData.length @@ -242,7 +242,7 @@ const ExcelViewer = ({ /> )} { setRowsPerPage(+e.target.value); diff --git a/src/Components/Common/FacilitySelect.tsx b/src/Components/Common/FacilitySelect.tsx index 2b820b40d6a..526bf6d68ac 100644 --- a/src/Components/Common/FacilitySelect.tsx +++ b/src/Components/Common/FacilitySelect.tsx @@ -17,7 +17,7 @@ interface FacilitySelectProps { district?: string; state?: string; showAll?: boolean; - showNOptions?: number; + showNOptions?: number | undefined; freeText?: boolean; selected?: FacilityModel | FacilityModel[] | null; setSelected: (selected: FacilityModel | FacilityModel[] | null) => void; @@ -34,7 +34,7 @@ export const FacilitySelect = (props: FacilitySelectProps) => { searchAll, disabled = false, showAll = true, - showNOptions = 10, + showNOptions, className = "", facilityType, district, @@ -65,6 +65,7 @@ export const FacilitySelect = (props: FacilitySelectProps) => { data?.results?.push({ name: text, }); + return data?.results; }, [searchAll, showAll, facilityType, district, exclude_user, freeText], diff --git a/src/Components/Common/FilePreviewDialog.tsx b/src/Components/Common/FilePreviewDialog.tsx index 3f55621e8c7..fc4345cc321 100644 --- a/src/Components/Common/FilePreviewDialog.tsx +++ b/src/Components/Common/FilePreviewDialog.tsx @@ -105,7 +105,7 @@ const FilePreviewDialog = (props: FilePreviewProps) => { {fileUrl ? ( <> - + {file_state.name}.{file_state.extension} @@ -125,7 +125,7 @@ const FilePreviewDialog = (props: FilePreviewProps) => { - + {file_state.isImage ? ( { Can't preview this file. Try downloading it. diff --git a/src/Components/Common/GLocationPicker.tsx b/src/Components/Common/GLocationPicker.tsx index f71583c2322..bfe95735127 100644 --- a/src/Components/Common/GLocationPicker.tsx +++ b/src/Components/Common/GLocationPicker.tsx @@ -222,7 +222,7 @@ const Map: React.FC = ({ > @@ -240,7 +240,7 @@ const Map: React.FC = ({ > )} diff --git a/src/Components/Common/HeadedTabs.tsx b/src/Components/Common/HeadedTabs.tsx index 38765431d94..33e8c96a239 100644 --- a/src/Components/Common/HeadedTabs.tsx +++ b/src/Components/Common/HeadedTabs.tsx @@ -20,7 +20,7 @@ export default function HeadedTabs(props: headedTabsProps) { { handleChange( @@ -34,7 +34,7 @@ export default function HeadedTabs(props: headedTabsProps) { - + { handleChange(tab.value); diff --git a/src/Components/Common/LanguageSelectorLogin.tsx b/src/Components/Common/LanguageSelectorLogin.tsx index 1f4e8593d2a..1fc4cf4ac77 100644 --- a/src/Components/Common/LanguageSelectorLogin.tsx +++ b/src/Components/Common/LanguageSelectorLogin.tsx @@ -18,7 +18,7 @@ export const LanguageSelectorLogin = () => { }; return ( - + {t("available_in")} diff --git a/src/Components/Common/PageTitle.tsx b/src/Components/Common/PageTitle.tsx index 990dc7b72cc..3af4c873872 100644 --- a/src/Components/Common/PageTitle.tsx +++ b/src/Components/Common/PageTitle.tsx @@ -70,7 +70,7 @@ export default function PageTitle({ > {" "} )} diff --git a/src/Components/Common/Sidebar/Sidebar.tsx b/src/Components/Common/Sidebar/Sidebar.tsx index abd158b2da7..9c26de9a051 100644 --- a/src/Components/Common/Sidebar/Sidebar.tsx +++ b/src/Components/Common/Sidebar/Sidebar.tsx @@ -223,7 +223,7 @@ interface ToggleShrinkProps { const ToggleShrink = ({ shrinked, toggle }: ToggleShrinkProps) => ( { @@ -46,9 +46,9 @@ const SidebarUserCard = ({ shrinked }: { shrinked: boolean }) => { > - {t("sign_out")} + {t("sign_out")} diff --git a/src/Components/Common/SlideOver.res b/src/Components/Common/SlideOver.res index dbcacbe1bad..75f1c963c6e 100644 --- a/src/Components/Common/SlideOver.res +++ b/src/Components/Common/SlideOver.res @@ -13,7 +13,7 @@ let make = (~show, ~setShow, ~children) => leaveFrom="opacity-100" leaveTo="opacity-0"> setShow(false)} /> diff --git a/src/Components/Common/Steps.tsx b/src/Components/Common/Steps.tsx index e0b1e03af3f..31c5145835f 100644 --- a/src/Components/Common/Steps.tsx +++ b/src/Components/Common/Steps.tsx @@ -13,7 +13,7 @@ export default function Steps(props: { steps: Step[] }) { {props.steps.map((step, stepIdx) => ( @@ -34,7 +34,7 @@ export default function Steps(props: { steps: Step[] }) { aria-hidden="true" /> - + {step.name} @@ -66,12 +66,12 @@ export default function Steps(props: { steps: Step[] }) { }`} > - - + + {step.id} - + {step.name} @@ -85,7 +85,7 @@ export default function Steps(props: { steps: Step[] }) { aria-hidden="true" > + - + {date} - + {incidents.length === 0 ? ( <> No status for the day @@ -119,7 +119,7 @@ function UptimeInfo({ ); })} - + Total downtime @@ -372,7 +372,7 @@ export default function Uptime( {props.header} - + {getUptimePercent(numDays)}% uptime @@ -425,7 +425,7 @@ export default function Uptime( })} diff --git a/src/Components/Common/UserAutocompleteFormField.tsx b/src/Components/Common/UserAutocompleteFormField.tsx index 9e94c5e4e68..c7694b74e4e 100644 --- a/src/Components/Common/UserAutocompleteFormField.tsx +++ b/src/Components/Common/UserAutocompleteFormField.tsx @@ -48,7 +48,7 @@ export default function UserAutocompleteFormField(props: Props) { - + {props.title}: {props.children} diff --git a/src/Components/Common/components/ButtonV2.tsx b/src/Components/Common/components/ButtonV2.tsx index 3bc5a41e799..014a182ba94 100644 --- a/src/Components/Common/components/ButtonV2.tsx +++ b/src/Components/Common/components/ButtonV2.tsx @@ -100,14 +100,16 @@ const ButtonV2 = ({ tooltipClassName, ...props }: ButtonProps) => { + shadow ??= !ghost; + const className = classNames( props.className, - "inline-flex h-min cursor-pointer items-center justify-center gap-2 whitespace-pre font-medium outline-offset-1 transition-all duration-200 ease-in-out disabled:cursor-not-allowed disabled:bg-gray-200 disabled:text-gray-500", + "inline-flex h-min cursor-pointer items-center justify-center gap-2 whitespace-pre font-medium outline-offset-1 transition-all duration-200 ease-in-out disabled:cursor-not-allowed disabled:bg-secondary-200 disabled:text-secondary-500", `button-size-${size}`, `button-shape-${circle ? "circle" : "square"}`, ghost ? `button-${variant}-ghost` : `button-${variant}-default`, border && `button-${variant}-border`, - shadow && "shadow enabled:hover:shadow-lg", + shadow && "shadow enabled:hover:shadow-md", tooltip && "tooltip", ); diff --git a/src/Components/Common/components/ContactLink.tsx b/src/Components/Common/components/ContactLink.tsx index 762558f5bb2..ff13433cc3b 100644 --- a/src/Components/Common/components/ContactLink.tsx +++ b/src/Components/Common/components/ContactLink.tsx @@ -13,7 +13,7 @@ export default function ContactLink(props: ContactLinkProps) { > {props.tel ? props.tel : props.mailto} diff --git a/src/Components/Common/components/Menu.tsx b/src/Components/Common/components/Menu.tsx index 1caac9edc12..a6f66ff9d2f 100644 --- a/src/Components/Common/components/Menu.tsx +++ b/src/Components/Common/components/Menu.tsx @@ -34,7 +34,7 @@ export default function DropdownMenu({ - + @@ -57,7 +57,7 @@ let profileCard = () => - + diff --git a/src/Components/Common/components/Switch.tsx b/src/Components/Common/components/Switch.tsx index 2253e95d155..7be7490f7b1 100644 --- a/src/Components/Common/components/Switch.tsx +++ b/src/Components/Common/components/Switch.tsx @@ -29,7 +29,7 @@ export default function SwitchV2(props: SwitchProps) { const additionalClassNames = selected ? (props.optionClassName && props.optionClassName(option)) || "bg-primary-500 hover:bg-primary-600 text-white border-primary-500 focus:ring-primary-500 focus:border-primary-500" - : "bg-gray-50 hover:bg-gray-200 border-gray-400 focus:ring-primary-500 focus:border-primary-500"; + : "bg-secondary-50 hover:bg-secondary-200 border-secondary-400 focus:ring-primary-500 focus:border-primary-500"; return ( + <>{item}> ); diff --git a/src/Components/Common/prescription-builder/InvestigationBuilder.tsx b/src/Components/Common/prescription-builder/InvestigationBuilder.tsx index 6de2a83f1cb..ef99a7f1acc 100644 --- a/src/Components/Common/prescription-builder/InvestigationBuilder.tsx +++ b/src/Components/Common/prescription-builder/InvestigationBuilder.tsx @@ -4,6 +4,7 @@ import { PrescriptionMultiDropdown } from "./PrescriptionMultiselect"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import request from "../../../Utils/request/request"; import routes from "../../../Redux/api"; +import { humanizeStrings } from "../../../Utils/utils"; export type InvestigationType = { type?: string[]; @@ -86,9 +87,9 @@ export default function InvestigationBuilder( return ( data?.results.map( (investigation) => - `${investigation.name} -- ${investigation.groups - .map((group) => ` ( ${group.name} ) `) - .join(", ")}`, + `${investigation.name} -- ${humanizeStrings( + investigation.groups.map((group) => ` ( ${group.name} ) `), + )}`, ) ?? [] ); }; @@ -125,16 +126,16 @@ export default function InvestigationBuilder( - + Investigation No. {i + 1} setInvestigations( investigations.filter((investigation, index) => i != index), @@ -210,7 +211,7 @@ export default function InvestigationBuilder( Time{" *"} { setItem( @@ -257,7 +258,7 @@ export default function InvestigationBuilder( onClick={() => { setInvestigations([...investigations, { repetitive: false }]); }} - className="mt-4 block w-full bg-gray-200 px-4 py-2 text-left text-sm font-bold leading-5 text-gray-700 shadow-sm hover:bg-gray-300 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900 focus:outline-none" + className="mt-4 block w-full bg-secondary-200 px-4 py-2 text-left text-sm font-bold leading-5 text-secondary-700 shadow-sm hover:bg-secondary-300 hover:text-secondary-900 focus:bg-secondary-100 focus:text-secondary-900 focus:outline-none" > + Add Investigation diff --git a/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx b/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx index dbfa0749ef1..6d122d00a5a 100644 --- a/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx +++ b/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx @@ -62,7 +62,7 @@ export function PrescriptionDropdown(props: { id="frequency-interval" type="button" key={i} - className="block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900 focus:outline-none" + className="block w-full px-4 py-2 text-left text-sm leading-5 text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:bg-secondary-100 focus:text-secondary-900 focus:outline-none" onClick={() => { setValue(option); setOpen(false); diff --git a/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx b/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx index 79ae3356ee4..4f744bcbae7 100644 --- a/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx +++ b/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx @@ -84,10 +84,10 @@ export function PrescriptionMultiDropdown(props: { id="investigation-group" key={i} className={classNames( - "block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:outline-none", + "block w-full px-4 py-2 text-left text-sm leading-5 text-secondary-700 hover:text-secondary-900 focus:text-secondary-900 focus:outline-none", selectedValues.includes(option) ? "bg-primary-100 hover:bg-primary-200" - : "hover:bg-gray-100 focus:bg-gray-100", + : "hover:bg-secondary-100 focus:bg-secondary-100", )} onClick={() => { setSelectedValues( diff --git a/src/Components/Common/prescription-builder/ProcedureBuilder.tsx b/src/Components/Common/prescription-builder/ProcedureBuilder.tsx index 5eca95354bf..fe7ec3cda3c 100644 --- a/src/Components/Common/prescription-builder/ProcedureBuilder.tsx +++ b/src/Components/Common/prescription-builder/ProcedureBuilder.tsx @@ -41,18 +41,18 @@ export default function ProcedureBuilder(props: Props) { - + Procedure No. {i + 1} setProcedures( procedures.filter((procedure, index) => i != index), @@ -69,7 +69,7 @@ export default function ProcedureBuilder(props: Props) { ) { setActiveIdx(i)} onBlur={() => setActiveIdx(null)} @@ -160,7 +160,7 @@ export default function ProcedureBuilder(props: Props) { Notes setActiveIdx(i)} @@ -186,7 +186,7 @@ export default function ProcedureBuilder(props: Props) { onClick={() => { setProcedures([...procedures, { repetitive: false }]); }} - className="mt-4 block w-full bg-gray-200 px-4 py-2 text-left text-sm font-bold leading-5 text-gray-700 shadow-sm hover:bg-gray-300 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900 focus:outline-none" + className="mt-4 block w-full bg-secondary-200 px-4 py-2 text-left text-sm font-bold leading-5 text-secondary-700 shadow-sm hover:bg-secondary-300 hover:text-secondary-900 focus:bg-secondary-100 focus:text-secondary-900 focus:outline-none" > + Add Procedures diff --git a/src/Components/CriticalCareRecording/CriticalCare__Index.res b/src/Components/CriticalCareRecording/CriticalCare__Index.res index 56bc5623264..0290728fd82 100644 --- a/src/Components/CriticalCareRecording/CriticalCare__Index.res +++ b/src/Components/CriticalCareRecording/CriticalCare__Index.res @@ -11,17 +11,20 @@ let renderLine = (title, value) => { let renderIndicators = (title, value, isMin, isMax, minText, maxText) => { let indicator = if isMax { - {str(maxText)} + + {str(maxText)} } else if isMin { - {str(minText)} + + {str(minText)} } else { - {str("Normal")} + + {str("Normal")} } @@ -109,25 +112,25 @@ let make = ( + className="bg-white px-2 md:px-6 py-5 border-b border-secondary-200 sm:px-6 max-w-5xl mx-auto border mt-4 shadow rounded-lg"> {str("Consultation Update")} - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/Components/CriticalCareRecording/DailyRound__Medicines.res b/src/Components/CriticalCareRecording/DailyRound__Medicines.res index 4ecca39a4f5..ce143c24d29 100644 --- a/src/Components/CriticalCareRecording/DailyRound__Medicines.res +++ b/src/Components/CriticalCareRecording/DailyRound__Medicines.res @@ -8,20 +8,20 @@ let make = (~prescriptions) => { : + className="align-middle inline-block min-w-full shadow overflow-hidden sm:rounded-lg border-b border-secondary-200"> + className="px-6 py-3 border-b border-secondary-200 bg-secondary-50 text-left text-xs leading-4 font-medium text-secondary-500 uppercase tracking-wider"> {str("Medicine")} + className="px-6 py-3 border-b border-secondary-200 bg-secondary-50 text-left text-xs leading-4 font-medium text-secondary-500 uppercase tracking-wider"> {str("Dosage")} + className="px-6 py-3 border-b border-secondary-200 bg-secondary-50 text-left text-xs leading-4 font-medium text-secondary-500 uppercase tracking-wider"> {str("Days")} @@ -29,13 +29,15 @@ let make = (~prescriptions) => { {Js.Array.mapi((p, index) => { + className="px-6 py-4 whitespace-nowrap text-sm leading-5 font-medium text-secondary-900"> {str(Prescription__Prescription.medicine(p))} - + {str(Prescription__Prescription.dosage(p))} - + {str(string_of_int(Prescription__Prescription.days(p)))} diff --git a/src/Components/CriticalCareRecording/HemodynamicParameters/CriticalCare__HemodynamicParametersEditor.res b/src/Components/CriticalCareRecording/HemodynamicParameters/CriticalCare__HemodynamicParametersEditor.res index 829df2aa078..47cc040440e 100644 --- a/src/Components/CriticalCareRecording/HemodynamicParameters/CriticalCare__HemodynamicParametersEditor.res +++ b/src/Components/CriticalCareRecording/HemodynamicParameters/CriticalCare__HemodynamicParametersEditor.res @@ -53,7 +53,7 @@ let reducer = (state, action) => { switch action { | SetPain(pain) => { ...state, - pain: pain, + pain, dirty: true, } | SetSystolic(systolic) => { @@ -85,10 +85,10 @@ let reducer = (state, action) => { resp: Some(resp), dirty: true, } - | SetRhythm(rhythm) => {...state, rhythm: rhythm, dirty: true} + | SetRhythm(rhythm) => {...state, rhythm, dirty: true} | SetRhythmDetails(rhythmDetails) => { ...state, - rhythmDetails: rhythmDetails, + rhythmDetails, dirty: true, } | SetSaving => {...state, saving: true} @@ -143,7 +143,11 @@ let makePayload = state => { Js.Dict.set(payload, "bp", Js.Json.object_(makeBpPayload(systolic, diastolic))) | (_, _) => () } - Js.Dict.set(payload, "pain_scale_enhanced", Js.Json.objectArray(Js.Array.map(makePainField, state.pain))) + Js.Dict.set( + payload, + "pain_scale_enhanced", + Js.Json.objectArray(Js.Array.map(makePainField, state.pain)), + ) DictUtils.setOptionalNumber("pulse", state.pulse, payload) DictUtils.setOptionalNumber("ventilator_spo2", state.spo2, payload) DictUtils.setOptionalFloat( @@ -256,11 +260,11 @@ let make = (~hemodynamicParameter, ~updateCB, ~id, ~consultationId) => { hasError={ValidationUtils.isInputInRangeInt(0, 100, state.spo2)} /> - + ToggleTemperatureUnit->send}> {state.tempInCelcius ? "C"->str : "F"->str} } @@ -291,19 +295,19 @@ let make = (~hemodynamicParameter, ~updateCB, ~id, ~consultationId) => { {str("Pain")} - {str("Mark region and intensity of pain")} + {str("Mark region and intensity of pain")} { - send(SetPain(data)); + send(SetPain(data)) }} id={id} consultationId={consultationId} /> - + { send(SetRhythmDetails(ReactEvent.Form.target(e)["value"]))} diff --git a/src/Components/CriticalCareRecording/HemodynamicParameters/DailyRound__HemodynamicParameters.res b/src/Components/CriticalCareRecording/HemodynamicParameters/DailyRound__HemodynamicParameters.res index 0c285cd9714..94f68240720 100644 --- a/src/Components/CriticalCareRecording/HemodynamicParameters/DailyRound__HemodynamicParameters.res +++ b/src/Components/CriticalCareRecording/HemodynamicParameters/DailyRound__HemodynamicParameters.res @@ -17,7 +17,7 @@ let make = ( {switch HemodynamicParameters.bp(hemodynamicParameter) { | Some(data) => - + {title("Blood Pressure: ")} {renderIntWithIndicators("Systolic", data.systolic, 100, 140, "Low", "High")} {renderIntWithIndicators("Diastolic", data.diastolic, 50, 90, "Low", "High")} @@ -53,12 +53,12 @@ let make = ( )} {str("Pain Scale")} ()} - id={""} - consultationId={""} - /> + previewMode={true} + painParameter={HemodynamicParameters.pain(hemodynamicParameter)} + updateCB={_ => ()} + id={""} + consultationId={""} + /> {renderLine( "Rhythm", HemodynamicParameters.rhythmToString(HemodynamicParameters.rhythm(hemodynamicParameter)), diff --git a/src/Components/CriticalCareRecording/IOBalance/DailyRound__IOBalance.res b/src/Components/CriticalCareRecording/IOBalance/DailyRound__IOBalance.res index 97d1001fc61..17f6f3c34dd 100644 --- a/src/Components/CriticalCareRecording/IOBalance/DailyRound__IOBalance.res +++ b/src/Components/CriticalCareRecording/IOBalance/DailyRound__IOBalance.res @@ -7,81 +7,73 @@ let make = (~ioBalance, ~title, ~renderOptionalDescription) => { {title("Infusions")} + className="text-left px-4 py-2 border bg-secondary-100 m-1 rounded-lg shadow md:w-1/2 w-full"> {str("Name")} {str("Quantity")} - {Js.Array.map( - item => - - {str(IOBalance.name(item))} - - {React.float(IOBalance.quantity(item))} - - , - IOBalance.infusions(ioBalance), - )->React.array} + {Js.Array.map(item => + + {str(IOBalance.name(item))} + + {React.float(IOBalance.quantity(item))} + + + , IOBalance.infusions(ioBalance))->React.array} {title("IV Fluid")} + className="text-left px-4 py-2 border bg-secondary-100 m-1 rounded-lg shadow md:w-1/2 w-full"> {str("Name")} {str("Quantity")} - {Js.Array.map( - item => - - {str(IOBalance.name(item))} - - {React.float(IOBalance.quantity(item))} - - , - IOBalance.ivFluid(ioBalance), - )->React.array} + {Js.Array.map(item => + + {str(IOBalance.name(item))} + + {React.float(IOBalance.quantity(item))} + + + , IOBalance.ivFluid(ioBalance))->React.array} {title("Feed")} + className="text-left px-4 py-2 border bg-secondary-100 m-1 rounded-lg shadow md:w-1/2 w-full"> {str("Name")} {str("Quantity")} - {Js.Array.map( - item => - - {str(IOBalance.name(item))} - - {React.float(IOBalance.quantity(item))} - - , - IOBalance.feed(ioBalance), - )->React.array} + {Js.Array.map(item => + + {str(IOBalance.name(item))} + + {React.float(IOBalance.quantity(item))} + + + , IOBalance.feed(ioBalance))->React.array} {title("Output")} + className="text-left px-4 py-2 border bg-secondary-100 m-1 rounded-lg shadow md:w-1/2 w-full"> {str("Name")} {str("Quantity")} - {Js.Array.map( - item => - - {str(IOBalance.name(item))} - - {React.float(IOBalance.quantity(item))} - - , - IOBalance.output(ioBalance), - )->React.array} + {Js.Array.map(item => + + {str(IOBalance.name(item))} + + {React.float(IOBalance.quantity(item))} + + + , IOBalance.output(ioBalance))->React.array} {renderOptionalDescription( diff --git a/src/Components/CriticalCareRecording/IOBalance/IOBalance__Summary.res b/src/Components/CriticalCareRecording/IOBalance/IOBalance__Summary.res index 9c59996964b..b858c19f61a 100644 --- a/src/Components/CriticalCareRecording/IOBalance/IOBalance__Summary.res +++ b/src/Components/CriticalCareRecording/IOBalance/IOBalance__Summary.res @@ -3,7 +3,7 @@ let str = React.string @react.component let make = (~leftMain, ~rightMain, ~rightSub, ~noBorder=false) => { - {str(leftMain)} + {str(leftMain)} {str(rightSub)} {str(rightMain)} diff --git a/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitPicker.res b/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitPicker.res index 780e5abd751..448b74cf726 100644 --- a/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitPicker.res +++ b/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitPicker.res @@ -27,7 +27,7 @@ let renderSelectables = (selections, updateCB) => type_="button" key={index |> string_of_int} onClick={_ => updateCB(selection)} - className="w-full block px-4 py-2 text-sm leading-5 text-left text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"> + className="w-full block px-4 py-2 text-sm leading-5 text-left text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:outline-none focus:bg-secondary-100 focus:text-secondary-900"> {selection |> str} ) @@ -76,9 +76,12 @@ let make = (~id, ~value, ~updateCB, ~placeholder, ~selectables) => { id value autoComplete="off" - onClick={e => {ReactEvent.Mouse.stopPropagation(e);setShowDropdown(_ => !showDropdown)}} + onClick={e => { + ReactEvent.Mouse.stopPropagation(e) + setShowDropdown(_ => !showDropdown) + }} onChange={e => updateCB(ReactEvent.Form.target(e)["value"])} - className="appearance-none h-10 mt-1 block w-full border border-gray-400 rounded py-2 px-4 text-sm bg-gray-100 hover:bg-gray-200 focus:outline-none focus:bg-white focus:ring-primary-500" + className="appearance-none h-10 mt-1 block w-full border border-secondary-400 rounded py-2 px-4 text-sm bg-secondary-100 hover:bg-secondary-200 focus:outline-none focus:bg-white focus:ring-primary-500" placeholder required=true /> diff --git a/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitSection.res b/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitSection.res index be062f539a4..73d07909555 100644 --- a/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitSection.res +++ b/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitSection.res @@ -34,7 +34,7 @@ let showUnit = (name, item, params, index, send) => { string_of_int} - className="appearance-none h-10 mt-1 block w-full border border-gray-400 rounded py-2 px-4 text-sm bg-gray-100 hover:bg-gray-200 focus:outline-none focus:bg-white focus:ring-primary-500" + className="appearance-none h-10 mt-1 block w-full border border-secondary-400 rounded py-2 px-4 text-sm bg-secondary-100 hover:bg-secondary-200 focus:outline-none focus:bg-white focus:ring-primary-500" placeholder="Value" onChange={e => UpdateValue(ReactEvent.Form.target(e)["value"]->Js.Float.fromString, index)->send} @@ -46,7 +46,7 @@ let showUnit = (name, item, params, index, send) => { index->DeleteUnit->send} - className="appearance-none h-10 mt-1 block border border-gray-400 rounded py-2 px-4 text-sm bg-gray-100 hover:bg-gray-200 focus:outline-none focus:bg-white focus:border-gray-600 text-gray-600 font-bold"> + className="appearance-none h-10 mt-1 block border border-secondary-400 rounded py-2 px-4 text-sm bg-secondary-100 hover:bg-secondary-200 focus:outline-none focus:bg-white focus:border-secondary-600 text-secondary-600 font-bold"> {"x"->str} @@ -60,17 +60,17 @@ let make = (~name, ~items, ~collection, ~updateCB) => { collection, ) - + {name->str} - + {"Field"->str} - + {"Value (ml)"->str} @@ -79,11 +79,11 @@ let make = (~name, ~items, ~collection, ~updateCB) => { (item, index) => showUnit(name, item, selectables, index, send), items, )->React.array} - + AddUnit->send} - className="w-full font-bold block px-4 py-2 text-sm leading-5 text-left text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"> + className="w-full font-bold block px-4 py-2 text-sm leading-5 text-left text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:outline-none focus:bg-secondary-100 focus:text-secondary-900"> {"+ Add a field"->str} diff --git a/src/Components/CriticalCareRecording/NeurologicalMonitoring/CriticalCare__Description.res b/src/Components/CriticalCareRecording/NeurologicalMonitoring/CriticalCare__Description.res index a2e12214329..0123f5088d6 100644 --- a/src/Components/CriticalCareRecording/NeurologicalMonitoring/CriticalCare__Description.res +++ b/src/Components/CriticalCareRecording/NeurologicalMonitoring/CriticalCare__Description.res @@ -11,7 +11,7 @@ let make = (~name, ~text, ~onChange, ~label=name) => { {str(label)} { ~name="consciousness_level", )} {ReactUtils.nullIf(renderPupil(state, send), state.inPronePosition)} - + {str("Glasgow Coma Scale")} @@ -541,7 +541,7 @@ let make = (~updateCB, ~neurologicalMonitoring, ~id, ~consultationId) => { - + {str("Limb Response")} @@ -568,7 +568,7 @@ let make = (~updateCB, ~neurologicalMonitoring, ~id, ~consultationId) => { )} - + { + className="flex flex-row font-semibold leading-relaxed items-center justify-between px-4 py-2 border rounded border-secondary-500"> {str("The patient is on prone position")} - onChange(!checked)} > + onChange(!checked)}> { /> - + } diff --git a/src/Components/CriticalCareRecording/NeurologicalMonitoring/DailyRound__NeurologicalMonitoring.res b/src/Components/CriticalCareRecording/NeurologicalMonitoring/DailyRound__NeurologicalMonitoring.res index 7dd295ecb51..74b6147de59 100644 --- a/src/Components/CriticalCareRecording/NeurologicalMonitoring/DailyRound__NeurologicalMonitoring.res +++ b/src/Components/CriticalCareRecording/NeurologicalMonitoring/DailyRound__NeurologicalMonitoring.res @@ -17,7 +17,7 @@ let make = ( ), )} - + {title("Left Pupil")} {renderOptionalInt("Size", NeurologicalMonitoring.leftPupilSize(neurologicalMonitoring))} {renderOptionalDescription( @@ -35,7 +35,7 @@ let make = ( NeurologicalMonitoring.leftPupilLightReactionDetails(neurologicalMonitoring), )} - + {title("Right Pupil")} {renderOptionalInt("Size", NeurologicalMonitoring.rightPupilSize(neurologicalMonitoring))} {renderOptionalDescription( @@ -73,7 +73,8 @@ let make = ( {title("Limb Response")} - + {renderLine( "Upper Left", NeurologicalMonitoring.limpResponseToString( @@ -81,7 +82,8 @@ let make = ( ), )} - + {renderLine( "Upper Right", NeurologicalMonitoring.limpResponseToString( @@ -91,7 +93,8 @@ let make = ( - + {renderLine( "Lower Left", NeurologicalMonitoring.limpResponseToString( @@ -99,7 +102,8 @@ let make = ( ), )} - + {renderLine( "Lower Right", NeurologicalMonitoring.limpResponseToString( diff --git a/src/Components/CriticalCareRecording/NursingCare/CriticalCare__NursingCareEditor.res b/src/Components/CriticalCareRecording/NursingCare/CriticalCare__NursingCareEditor.res index f6dc3f5ab73..d24d60a4614 100644 --- a/src/Components/CriticalCareRecording/NursingCare/CriticalCare__NursingCareEditor.res +++ b/src/Components/CriticalCareRecording/NursingCare/CriticalCare__NursingCareEditor.res @@ -124,7 +124,7 @@ let make = (~nursingCare, ~updateCB, ~id, ~consultationId) => { | Some(s) => diff --git a/src/Components/CriticalCareRecording/Others/DailyRound__General.res b/src/Components/CriticalCareRecording/Others/DailyRound__General.res index 22c5051083e..138eb7d2241 100644 --- a/src/Components/CriticalCareRecording/Others/DailyRound__General.res +++ b/src/Components/CriticalCareRecording/Others/DailyRound__General.res @@ -41,7 +41,7 @@ let make = (~others, ~renderOptionalDescription, ~title) => { {switch additionalSymptoms { | Some(symptomsArray) => Js.Array.map(id => { - + {str(symptoms[id - 1])} }, symptomsArray)->React.array diff --git a/src/Components/CriticalCareRecording/Pain/CriticalCare__PainEditor.res b/src/Components/CriticalCareRecording/Pain/CriticalCare__PainEditor.res index da041231265..1401d465558 100644 --- a/src/Components/CriticalCareRecording/Pain/CriticalCare__PainEditor.res +++ b/src/Components/CriticalCareRecording/Pain/CriticalCare__PainEditor.res @@ -105,7 +105,7 @@ let reducer = (state, action) => { | ClearSaving => {...state, saving: false} | Update(parts) => { ...state, - parts: parts, + parts, } | SetPreviewMode => {...state, previewMode: true} | ClearPreviewMode => {...state, previewMode: false} @@ -151,7 +151,7 @@ let initialState = (psp, previewMode) => { selectedRegion: Pain.Other, saving: false, dirty: false, - previewMode: previewMode, + previewMode, } } @@ -160,7 +160,7 @@ let selectedClass = (part: option) => { | Some(p) => let score = p.scale if score <= 0 { - "text-gray-400 hover:bg-red-400 tooltip" + "text-secondary-400 hover:bg-red-400 tooltip" } else if score <= 3 { "text-red-200 hover:bg-red-400 tooltip" } else if score <= 6 { @@ -172,7 +172,7 @@ let selectedClass = (part: option) => { } else { "text-red-700 hover:bg-red-800 tooltip" } - | None => "text-gray-400 hover:text-red-200 tooltip" + | None => "text-secondary-400 hover:text-red-200 tooltip" } } // UI for each Label @@ -181,7 +181,7 @@ let selectedLabelClass = (part: option) => { | Some(p) => let score = p.scale if score <= 0 { - "bg-gray-300 text-black hover:bg-gray-400" + "bg-secondary-300 text-black hover:bg-secondary-400" } else if score <= 3 { "bg-red-200 text-red-700 hover:bg-red-400" } else if score <= 6 { @@ -193,7 +193,7 @@ let selectedLabelClass = (part: option
{description}
{dragProps.fileDropError !== "" && dragProps.fileDropError} @@ -181,7 +185,7 @@ export default function ExcelFileDragAndDrop({ /> {selectedFile && (
{selectedFile.name} - {(selectedFile.size / 1024).toFixed(2)} KB
{selectedFile.name}
Showing {currentPage * rowsPerPage - rowsPerPage + 1} to{" "} {currentPage * rowsPerPage > fileData.length ? fileData.length @@ -242,7 +242,7 @@ const ExcelViewer = ({ /> )} { setRowsPerPage(+e.target.value); diff --git a/src/Components/Common/FacilitySelect.tsx b/src/Components/Common/FacilitySelect.tsx index 2b820b40d6a..526bf6d68ac 100644 --- a/src/Components/Common/FacilitySelect.tsx +++ b/src/Components/Common/FacilitySelect.tsx @@ -17,7 +17,7 @@ interface FacilitySelectProps { district?: string; state?: string; showAll?: boolean; - showNOptions?: number; + showNOptions?: number | undefined; freeText?: boolean; selected?: FacilityModel | FacilityModel[] | null; setSelected: (selected: FacilityModel | FacilityModel[] | null) => void; @@ -34,7 +34,7 @@ export const FacilitySelect = (props: FacilitySelectProps) => { searchAll, disabled = false, showAll = true, - showNOptions = 10, + showNOptions, className = "", facilityType, district, @@ -65,6 +65,7 @@ export const FacilitySelect = (props: FacilitySelectProps) => { data?.results?.push({ name: text, }); + return data?.results; }, [searchAll, showAll, facilityType, district, exclude_user, freeText], diff --git a/src/Components/Common/FilePreviewDialog.tsx b/src/Components/Common/FilePreviewDialog.tsx index 3f55621e8c7..fc4345cc321 100644 --- a/src/Components/Common/FilePreviewDialog.tsx +++ b/src/Components/Common/FilePreviewDialog.tsx @@ -105,7 +105,7 @@ const FilePreviewDialog = (props: FilePreviewProps) => { {fileUrl ? ( <> - + {file_state.name}.{file_state.extension} @@ -125,7 +125,7 @@ const FilePreviewDialog = (props: FilePreviewProps) => { - + {file_state.isImage ? ( { Can't preview this file. Try downloading it. diff --git a/src/Components/Common/GLocationPicker.tsx b/src/Components/Common/GLocationPicker.tsx index f71583c2322..bfe95735127 100644 --- a/src/Components/Common/GLocationPicker.tsx +++ b/src/Components/Common/GLocationPicker.tsx @@ -222,7 +222,7 @@ const Map: React.FC = ({ > @@ -240,7 +240,7 @@ const Map: React.FC = ({ > )} diff --git a/src/Components/Common/HeadedTabs.tsx b/src/Components/Common/HeadedTabs.tsx index 38765431d94..33e8c96a239 100644 --- a/src/Components/Common/HeadedTabs.tsx +++ b/src/Components/Common/HeadedTabs.tsx @@ -20,7 +20,7 @@ export default function HeadedTabs(props: headedTabsProps) { { handleChange( @@ -34,7 +34,7 @@ export default function HeadedTabs(props: headedTabsProps) { - + { handleChange(tab.value); diff --git a/src/Components/Common/LanguageSelectorLogin.tsx b/src/Components/Common/LanguageSelectorLogin.tsx index 1f4e8593d2a..1fc4cf4ac77 100644 --- a/src/Components/Common/LanguageSelectorLogin.tsx +++ b/src/Components/Common/LanguageSelectorLogin.tsx @@ -18,7 +18,7 @@ export const LanguageSelectorLogin = () => { }; return ( - + {t("available_in")} diff --git a/src/Components/Common/PageTitle.tsx b/src/Components/Common/PageTitle.tsx index 990dc7b72cc..3af4c873872 100644 --- a/src/Components/Common/PageTitle.tsx +++ b/src/Components/Common/PageTitle.tsx @@ -70,7 +70,7 @@ export default function PageTitle({ > {" "} )} diff --git a/src/Components/Common/Sidebar/Sidebar.tsx b/src/Components/Common/Sidebar/Sidebar.tsx index abd158b2da7..9c26de9a051 100644 --- a/src/Components/Common/Sidebar/Sidebar.tsx +++ b/src/Components/Common/Sidebar/Sidebar.tsx @@ -223,7 +223,7 @@ interface ToggleShrinkProps { const ToggleShrink = ({ shrinked, toggle }: ToggleShrinkProps) => ( { @@ -46,9 +46,9 @@ const SidebarUserCard = ({ shrinked }: { shrinked: boolean }) => { > - {t("sign_out")} + {t("sign_out")} diff --git a/src/Components/Common/SlideOver.res b/src/Components/Common/SlideOver.res index dbcacbe1bad..75f1c963c6e 100644 --- a/src/Components/Common/SlideOver.res +++ b/src/Components/Common/SlideOver.res @@ -13,7 +13,7 @@ let make = (~show, ~setShow, ~children) => leaveFrom="opacity-100" leaveTo="opacity-0"> setShow(false)} /> diff --git a/src/Components/Common/Steps.tsx b/src/Components/Common/Steps.tsx index e0b1e03af3f..31c5145835f 100644 --- a/src/Components/Common/Steps.tsx +++ b/src/Components/Common/Steps.tsx @@ -13,7 +13,7 @@ export default function Steps(props: { steps: Step[] }) { {props.steps.map((step, stepIdx) => ( @@ -34,7 +34,7 @@ export default function Steps(props: { steps: Step[] }) { aria-hidden="true" /> - + {step.name} @@ -66,12 +66,12 @@ export default function Steps(props: { steps: Step[] }) { }`} > - - + + {step.id} - + {step.name} @@ -85,7 +85,7 @@ export default function Steps(props: { steps: Step[] }) { aria-hidden="true" > + - + {date} - + {incidents.length === 0 ? ( <> No status for the day @@ -119,7 +119,7 @@ function UptimeInfo({ ); })} - + Total downtime @@ -372,7 +372,7 @@ export default function Uptime( {props.header} - + {getUptimePercent(numDays)}% uptime @@ -425,7 +425,7 @@ export default function Uptime( })} diff --git a/src/Components/Common/UserAutocompleteFormField.tsx b/src/Components/Common/UserAutocompleteFormField.tsx index 9e94c5e4e68..c7694b74e4e 100644 --- a/src/Components/Common/UserAutocompleteFormField.tsx +++ b/src/Components/Common/UserAutocompleteFormField.tsx @@ -48,7 +48,7 @@ export default function UserAutocompleteFormField(props: Props) { - + {props.title}: {props.children} diff --git a/src/Components/Common/components/ButtonV2.tsx b/src/Components/Common/components/ButtonV2.tsx index 3bc5a41e799..014a182ba94 100644 --- a/src/Components/Common/components/ButtonV2.tsx +++ b/src/Components/Common/components/ButtonV2.tsx @@ -100,14 +100,16 @@ const ButtonV2 = ({ tooltipClassName, ...props }: ButtonProps) => { + shadow ??= !ghost; + const className = classNames( props.className, - "inline-flex h-min cursor-pointer items-center justify-center gap-2 whitespace-pre font-medium outline-offset-1 transition-all duration-200 ease-in-out disabled:cursor-not-allowed disabled:bg-gray-200 disabled:text-gray-500", + "inline-flex h-min cursor-pointer items-center justify-center gap-2 whitespace-pre font-medium outline-offset-1 transition-all duration-200 ease-in-out disabled:cursor-not-allowed disabled:bg-secondary-200 disabled:text-secondary-500", `button-size-${size}`, `button-shape-${circle ? "circle" : "square"}`, ghost ? `button-${variant}-ghost` : `button-${variant}-default`, border && `button-${variant}-border`, - shadow && "shadow enabled:hover:shadow-lg", + shadow && "shadow enabled:hover:shadow-md", tooltip && "tooltip", ); diff --git a/src/Components/Common/components/ContactLink.tsx b/src/Components/Common/components/ContactLink.tsx index 762558f5bb2..ff13433cc3b 100644 --- a/src/Components/Common/components/ContactLink.tsx +++ b/src/Components/Common/components/ContactLink.tsx @@ -13,7 +13,7 @@ export default function ContactLink(props: ContactLinkProps) { > {props.tel ? props.tel : props.mailto} diff --git a/src/Components/Common/components/Menu.tsx b/src/Components/Common/components/Menu.tsx index 1caac9edc12..a6f66ff9d2f 100644 --- a/src/Components/Common/components/Menu.tsx +++ b/src/Components/Common/components/Menu.tsx @@ -34,7 +34,7 @@ export default function DropdownMenu({ - + @@ -57,7 +57,7 @@ let profileCard = () => - + diff --git a/src/Components/Common/components/Switch.tsx b/src/Components/Common/components/Switch.tsx index 2253e95d155..7be7490f7b1 100644 --- a/src/Components/Common/components/Switch.tsx +++ b/src/Components/Common/components/Switch.tsx @@ -29,7 +29,7 @@ export default function SwitchV2(props: SwitchProps) { const additionalClassNames = selected ? (props.optionClassName && props.optionClassName(option)) || "bg-primary-500 hover:bg-primary-600 text-white border-primary-500 focus:ring-primary-500 focus:border-primary-500" - : "bg-gray-50 hover:bg-gray-200 border-gray-400 focus:ring-primary-500 focus:border-primary-500"; + : "bg-secondary-50 hover:bg-secondary-200 border-secondary-400 focus:ring-primary-500 focus:border-primary-500"; return ( + <>{item}> ); diff --git a/src/Components/Common/prescription-builder/InvestigationBuilder.tsx b/src/Components/Common/prescription-builder/InvestigationBuilder.tsx index 6de2a83f1cb..ef99a7f1acc 100644 --- a/src/Components/Common/prescription-builder/InvestigationBuilder.tsx +++ b/src/Components/Common/prescription-builder/InvestigationBuilder.tsx @@ -4,6 +4,7 @@ import { PrescriptionMultiDropdown } from "./PrescriptionMultiselect"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import request from "../../../Utils/request/request"; import routes from "../../../Redux/api"; +import { humanizeStrings } from "../../../Utils/utils"; export type InvestigationType = { type?: string[]; @@ -86,9 +87,9 @@ export default function InvestigationBuilder( return ( data?.results.map( (investigation) => - `${investigation.name} -- ${investigation.groups - .map((group) => ` ( ${group.name} ) `) - .join(", ")}`, + `${investigation.name} -- ${humanizeStrings( + investigation.groups.map((group) => ` ( ${group.name} ) `), + )}`, ) ?? [] ); }; @@ -125,16 +126,16 @@ export default function InvestigationBuilder( - + Investigation No. {i + 1} setInvestigations( investigations.filter((investigation, index) => i != index), @@ -210,7 +211,7 @@ export default function InvestigationBuilder( Time{" *"} { setItem( @@ -257,7 +258,7 @@ export default function InvestigationBuilder( onClick={() => { setInvestigations([...investigations, { repetitive: false }]); }} - className="mt-4 block w-full bg-gray-200 px-4 py-2 text-left text-sm font-bold leading-5 text-gray-700 shadow-sm hover:bg-gray-300 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900 focus:outline-none" + className="mt-4 block w-full bg-secondary-200 px-4 py-2 text-left text-sm font-bold leading-5 text-secondary-700 shadow-sm hover:bg-secondary-300 hover:text-secondary-900 focus:bg-secondary-100 focus:text-secondary-900 focus:outline-none" > + Add Investigation diff --git a/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx b/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx index dbfa0749ef1..6d122d00a5a 100644 --- a/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx +++ b/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx @@ -62,7 +62,7 @@ export function PrescriptionDropdown(props: { id="frequency-interval" type="button" key={i} - className="block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900 focus:outline-none" + className="block w-full px-4 py-2 text-left text-sm leading-5 text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:bg-secondary-100 focus:text-secondary-900 focus:outline-none" onClick={() => { setValue(option); setOpen(false); diff --git a/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx b/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx index 79ae3356ee4..4f744bcbae7 100644 --- a/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx +++ b/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx @@ -84,10 +84,10 @@ export function PrescriptionMultiDropdown(props: { id="investigation-group" key={i} className={classNames( - "block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:outline-none", + "block w-full px-4 py-2 text-left text-sm leading-5 text-secondary-700 hover:text-secondary-900 focus:text-secondary-900 focus:outline-none", selectedValues.includes(option) ? "bg-primary-100 hover:bg-primary-200" - : "hover:bg-gray-100 focus:bg-gray-100", + : "hover:bg-secondary-100 focus:bg-secondary-100", )} onClick={() => { setSelectedValues( diff --git a/src/Components/Common/prescription-builder/ProcedureBuilder.tsx b/src/Components/Common/prescription-builder/ProcedureBuilder.tsx index 5eca95354bf..fe7ec3cda3c 100644 --- a/src/Components/Common/prescription-builder/ProcedureBuilder.tsx +++ b/src/Components/Common/prescription-builder/ProcedureBuilder.tsx @@ -41,18 +41,18 @@ export default function ProcedureBuilder(props: Props) { - + Procedure No. {i + 1} setProcedures( procedures.filter((procedure, index) => i != index), @@ -69,7 +69,7 @@ export default function ProcedureBuilder(props: Props) { ) { setActiveIdx(i)} onBlur={() => setActiveIdx(null)} @@ -160,7 +160,7 @@ export default function ProcedureBuilder(props: Props) { Notes setActiveIdx(i)} @@ -186,7 +186,7 @@ export default function ProcedureBuilder(props: Props) { onClick={() => { setProcedures([...procedures, { repetitive: false }]); }} - className="mt-4 block w-full bg-gray-200 px-4 py-2 text-left text-sm font-bold leading-5 text-gray-700 shadow-sm hover:bg-gray-300 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900 focus:outline-none" + className="mt-4 block w-full bg-secondary-200 px-4 py-2 text-left text-sm font-bold leading-5 text-secondary-700 shadow-sm hover:bg-secondary-300 hover:text-secondary-900 focus:bg-secondary-100 focus:text-secondary-900 focus:outline-none" > + Add Procedures diff --git a/src/Components/CriticalCareRecording/CriticalCare__Index.res b/src/Components/CriticalCareRecording/CriticalCare__Index.res index 56bc5623264..0290728fd82 100644 --- a/src/Components/CriticalCareRecording/CriticalCare__Index.res +++ b/src/Components/CriticalCareRecording/CriticalCare__Index.res @@ -11,17 +11,20 @@ let renderLine = (title, value) => { let renderIndicators = (title, value, isMin, isMax, minText, maxText) => { let indicator = if isMax { - {str(maxText)} + + {str(maxText)} } else if isMin { - {str(minText)} + + {str(minText)} } else { - {str("Normal")} + + {str("Normal")} } @@ -109,25 +112,25 @@ let make = ( + className="bg-white px-2 md:px-6 py-5 border-b border-secondary-200 sm:px-6 max-w-5xl mx-auto border mt-4 shadow rounded-lg"> {str("Consultation Update")} - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/Components/CriticalCareRecording/DailyRound__Medicines.res b/src/Components/CriticalCareRecording/DailyRound__Medicines.res index 4ecca39a4f5..ce143c24d29 100644 --- a/src/Components/CriticalCareRecording/DailyRound__Medicines.res +++ b/src/Components/CriticalCareRecording/DailyRound__Medicines.res @@ -8,20 +8,20 @@ let make = (~prescriptions) => { : + className="align-middle inline-block min-w-full shadow overflow-hidden sm:rounded-lg border-b border-secondary-200"> + className="px-6 py-3 border-b border-secondary-200 bg-secondary-50 text-left text-xs leading-4 font-medium text-secondary-500 uppercase tracking-wider"> {str("Medicine")} + className="px-6 py-3 border-b border-secondary-200 bg-secondary-50 text-left text-xs leading-4 font-medium text-secondary-500 uppercase tracking-wider"> {str("Dosage")} + className="px-6 py-3 border-b border-secondary-200 bg-secondary-50 text-left text-xs leading-4 font-medium text-secondary-500 uppercase tracking-wider"> {str("Days")} @@ -29,13 +29,15 @@ let make = (~prescriptions) => { {Js.Array.mapi((p, index) => { + className="px-6 py-4 whitespace-nowrap text-sm leading-5 font-medium text-secondary-900"> {str(Prescription__Prescription.medicine(p))} - + {str(Prescription__Prescription.dosage(p))} - + {str(string_of_int(Prescription__Prescription.days(p)))} diff --git a/src/Components/CriticalCareRecording/HemodynamicParameters/CriticalCare__HemodynamicParametersEditor.res b/src/Components/CriticalCareRecording/HemodynamicParameters/CriticalCare__HemodynamicParametersEditor.res index 829df2aa078..47cc040440e 100644 --- a/src/Components/CriticalCareRecording/HemodynamicParameters/CriticalCare__HemodynamicParametersEditor.res +++ b/src/Components/CriticalCareRecording/HemodynamicParameters/CriticalCare__HemodynamicParametersEditor.res @@ -53,7 +53,7 @@ let reducer = (state, action) => { switch action { | SetPain(pain) => { ...state, - pain: pain, + pain, dirty: true, } | SetSystolic(systolic) => { @@ -85,10 +85,10 @@ let reducer = (state, action) => { resp: Some(resp), dirty: true, } - | SetRhythm(rhythm) => {...state, rhythm: rhythm, dirty: true} + | SetRhythm(rhythm) => {...state, rhythm, dirty: true} | SetRhythmDetails(rhythmDetails) => { ...state, - rhythmDetails: rhythmDetails, + rhythmDetails, dirty: true, } | SetSaving => {...state, saving: true} @@ -143,7 +143,11 @@ let makePayload = state => { Js.Dict.set(payload, "bp", Js.Json.object_(makeBpPayload(systolic, diastolic))) | (_, _) => () } - Js.Dict.set(payload, "pain_scale_enhanced", Js.Json.objectArray(Js.Array.map(makePainField, state.pain))) + Js.Dict.set( + payload, + "pain_scale_enhanced", + Js.Json.objectArray(Js.Array.map(makePainField, state.pain)), + ) DictUtils.setOptionalNumber("pulse", state.pulse, payload) DictUtils.setOptionalNumber("ventilator_spo2", state.spo2, payload) DictUtils.setOptionalFloat( @@ -256,11 +260,11 @@ let make = (~hemodynamicParameter, ~updateCB, ~id, ~consultationId) => { hasError={ValidationUtils.isInputInRangeInt(0, 100, state.spo2)} /> - + ToggleTemperatureUnit->send}> {state.tempInCelcius ? "C"->str : "F"->str} } @@ -291,19 +295,19 @@ let make = (~hemodynamicParameter, ~updateCB, ~id, ~consultationId) => { {str("Pain")} - {str("Mark region and intensity of pain")} + {str("Mark region and intensity of pain")} { - send(SetPain(data)); + send(SetPain(data)) }} id={id} consultationId={consultationId} /> - + { send(SetRhythmDetails(ReactEvent.Form.target(e)["value"]))} diff --git a/src/Components/CriticalCareRecording/HemodynamicParameters/DailyRound__HemodynamicParameters.res b/src/Components/CriticalCareRecording/HemodynamicParameters/DailyRound__HemodynamicParameters.res index 0c285cd9714..94f68240720 100644 --- a/src/Components/CriticalCareRecording/HemodynamicParameters/DailyRound__HemodynamicParameters.res +++ b/src/Components/CriticalCareRecording/HemodynamicParameters/DailyRound__HemodynamicParameters.res @@ -17,7 +17,7 @@ let make = ( {switch HemodynamicParameters.bp(hemodynamicParameter) { | Some(data) => - + {title("Blood Pressure: ")} {renderIntWithIndicators("Systolic", data.systolic, 100, 140, "Low", "High")} {renderIntWithIndicators("Diastolic", data.diastolic, 50, 90, "Low", "High")} @@ -53,12 +53,12 @@ let make = ( )} {str("Pain Scale")} ()} - id={""} - consultationId={""} - /> + previewMode={true} + painParameter={HemodynamicParameters.pain(hemodynamicParameter)} + updateCB={_ => ()} + id={""} + consultationId={""} + /> {renderLine( "Rhythm", HemodynamicParameters.rhythmToString(HemodynamicParameters.rhythm(hemodynamicParameter)), diff --git a/src/Components/CriticalCareRecording/IOBalance/DailyRound__IOBalance.res b/src/Components/CriticalCareRecording/IOBalance/DailyRound__IOBalance.res index 97d1001fc61..17f6f3c34dd 100644 --- a/src/Components/CriticalCareRecording/IOBalance/DailyRound__IOBalance.res +++ b/src/Components/CriticalCareRecording/IOBalance/DailyRound__IOBalance.res @@ -7,81 +7,73 @@ let make = (~ioBalance, ~title, ~renderOptionalDescription) => { {title("Infusions")} + className="text-left px-4 py-2 border bg-secondary-100 m-1 rounded-lg shadow md:w-1/2 w-full"> {str("Name")} {str("Quantity")} - {Js.Array.map( - item => - - {str(IOBalance.name(item))} - - {React.float(IOBalance.quantity(item))} - - , - IOBalance.infusions(ioBalance), - )->React.array} + {Js.Array.map(item => + + {str(IOBalance.name(item))} + + {React.float(IOBalance.quantity(item))} + + + , IOBalance.infusions(ioBalance))->React.array} {title("IV Fluid")} + className="text-left px-4 py-2 border bg-secondary-100 m-1 rounded-lg shadow md:w-1/2 w-full"> {str("Name")} {str("Quantity")} - {Js.Array.map( - item => - - {str(IOBalance.name(item))} - - {React.float(IOBalance.quantity(item))} - - , - IOBalance.ivFluid(ioBalance), - )->React.array} + {Js.Array.map(item => + + {str(IOBalance.name(item))} + + {React.float(IOBalance.quantity(item))} + + + , IOBalance.ivFluid(ioBalance))->React.array} {title("Feed")} + className="text-left px-4 py-2 border bg-secondary-100 m-1 rounded-lg shadow md:w-1/2 w-full"> {str("Name")} {str("Quantity")} - {Js.Array.map( - item => - - {str(IOBalance.name(item))} - - {React.float(IOBalance.quantity(item))} - - , - IOBalance.feed(ioBalance), - )->React.array} + {Js.Array.map(item => + + {str(IOBalance.name(item))} + + {React.float(IOBalance.quantity(item))} + + + , IOBalance.feed(ioBalance))->React.array} {title("Output")} + className="text-left px-4 py-2 border bg-secondary-100 m-1 rounded-lg shadow md:w-1/2 w-full"> {str("Name")} {str("Quantity")} - {Js.Array.map( - item => - - {str(IOBalance.name(item))} - - {React.float(IOBalance.quantity(item))} - - , - IOBalance.output(ioBalance), - )->React.array} + {Js.Array.map(item => + + {str(IOBalance.name(item))} + + {React.float(IOBalance.quantity(item))} + + + , IOBalance.output(ioBalance))->React.array} {renderOptionalDescription( diff --git a/src/Components/CriticalCareRecording/IOBalance/IOBalance__Summary.res b/src/Components/CriticalCareRecording/IOBalance/IOBalance__Summary.res index 9c59996964b..b858c19f61a 100644 --- a/src/Components/CriticalCareRecording/IOBalance/IOBalance__Summary.res +++ b/src/Components/CriticalCareRecording/IOBalance/IOBalance__Summary.res @@ -3,7 +3,7 @@ let str = React.string @react.component let make = (~leftMain, ~rightMain, ~rightSub, ~noBorder=false) => { - {str(leftMain)} + {str(leftMain)} {str(rightSub)} {str(rightMain)} diff --git a/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitPicker.res b/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitPicker.res index 780e5abd751..448b74cf726 100644 --- a/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitPicker.res +++ b/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitPicker.res @@ -27,7 +27,7 @@ let renderSelectables = (selections, updateCB) => type_="button" key={index |> string_of_int} onClick={_ => updateCB(selection)} - className="w-full block px-4 py-2 text-sm leading-5 text-left text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"> + className="w-full block px-4 py-2 text-sm leading-5 text-left text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:outline-none focus:bg-secondary-100 focus:text-secondary-900"> {selection |> str} ) @@ -76,9 +76,12 @@ let make = (~id, ~value, ~updateCB, ~placeholder, ~selectables) => { id value autoComplete="off" - onClick={e => {ReactEvent.Mouse.stopPropagation(e);setShowDropdown(_ => !showDropdown)}} + onClick={e => { + ReactEvent.Mouse.stopPropagation(e) + setShowDropdown(_ => !showDropdown) + }} onChange={e => updateCB(ReactEvent.Form.target(e)["value"])} - className="appearance-none h-10 mt-1 block w-full border border-gray-400 rounded py-2 px-4 text-sm bg-gray-100 hover:bg-gray-200 focus:outline-none focus:bg-white focus:ring-primary-500" + className="appearance-none h-10 mt-1 block w-full border border-secondary-400 rounded py-2 px-4 text-sm bg-secondary-100 hover:bg-secondary-200 focus:outline-none focus:bg-white focus:ring-primary-500" placeholder required=true /> diff --git a/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitSection.res b/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitSection.res index be062f539a4..73d07909555 100644 --- a/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitSection.res +++ b/src/Components/CriticalCareRecording/IOBalance/IOBalance__UnitSection.res @@ -34,7 +34,7 @@ let showUnit = (name, item, params, index, send) => { string_of_int} - className="appearance-none h-10 mt-1 block w-full border border-gray-400 rounded py-2 px-4 text-sm bg-gray-100 hover:bg-gray-200 focus:outline-none focus:bg-white focus:ring-primary-500" + className="appearance-none h-10 mt-1 block w-full border border-secondary-400 rounded py-2 px-4 text-sm bg-secondary-100 hover:bg-secondary-200 focus:outline-none focus:bg-white focus:ring-primary-500" placeholder="Value" onChange={e => UpdateValue(ReactEvent.Form.target(e)["value"]->Js.Float.fromString, index)->send} @@ -46,7 +46,7 @@ let showUnit = (name, item, params, index, send) => { index->DeleteUnit->send} - className="appearance-none h-10 mt-1 block border border-gray-400 rounded py-2 px-4 text-sm bg-gray-100 hover:bg-gray-200 focus:outline-none focus:bg-white focus:border-gray-600 text-gray-600 font-bold"> + className="appearance-none h-10 mt-1 block border border-secondary-400 rounded py-2 px-4 text-sm bg-secondary-100 hover:bg-secondary-200 focus:outline-none focus:bg-white focus:border-secondary-600 text-secondary-600 font-bold"> {"x"->str} @@ -60,17 +60,17 @@ let make = (~name, ~items, ~collection, ~updateCB) => { collection, ) - + {name->str} - + {"Field"->str} - + {"Value (ml)"->str} @@ -79,11 +79,11 @@ let make = (~name, ~items, ~collection, ~updateCB) => { (item, index) => showUnit(name, item, selectables, index, send), items, )->React.array} - + AddUnit->send} - className="w-full font-bold block px-4 py-2 text-sm leading-5 text-left text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"> + className="w-full font-bold block px-4 py-2 text-sm leading-5 text-left text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:outline-none focus:bg-secondary-100 focus:text-secondary-900"> {"+ Add a field"->str} diff --git a/src/Components/CriticalCareRecording/NeurologicalMonitoring/CriticalCare__Description.res b/src/Components/CriticalCareRecording/NeurologicalMonitoring/CriticalCare__Description.res index a2e12214329..0123f5088d6 100644 --- a/src/Components/CriticalCareRecording/NeurologicalMonitoring/CriticalCare__Description.res +++ b/src/Components/CriticalCareRecording/NeurologicalMonitoring/CriticalCare__Description.res @@ -11,7 +11,7 @@ let make = (~name, ~text, ~onChange, ~label=name) => { {str(label)} { ~name="consciousness_level", )} {ReactUtils.nullIf(renderPupil(state, send), state.inPronePosition)} - + {str("Glasgow Coma Scale")} @@ -541,7 +541,7 @@ let make = (~updateCB, ~neurologicalMonitoring, ~id, ~consultationId) => { - + {str("Limb Response")} @@ -568,7 +568,7 @@ let make = (~updateCB, ~neurologicalMonitoring, ~id, ~consultationId) => { )} - + { + className="flex flex-row font-semibold leading-relaxed items-center justify-between px-4 py-2 border rounded border-secondary-500"> {str("The patient is on prone position")} - onChange(!checked)} > + onChange(!checked)}> { /> - + } diff --git a/src/Components/CriticalCareRecording/NeurologicalMonitoring/DailyRound__NeurologicalMonitoring.res b/src/Components/CriticalCareRecording/NeurologicalMonitoring/DailyRound__NeurologicalMonitoring.res index 7dd295ecb51..74b6147de59 100644 --- a/src/Components/CriticalCareRecording/NeurologicalMonitoring/DailyRound__NeurologicalMonitoring.res +++ b/src/Components/CriticalCareRecording/NeurologicalMonitoring/DailyRound__NeurologicalMonitoring.res @@ -17,7 +17,7 @@ let make = ( ), )} - + {title("Left Pupil")} {renderOptionalInt("Size", NeurologicalMonitoring.leftPupilSize(neurologicalMonitoring))} {renderOptionalDescription( @@ -35,7 +35,7 @@ let make = ( NeurologicalMonitoring.leftPupilLightReactionDetails(neurologicalMonitoring), )} - + {title("Right Pupil")} {renderOptionalInt("Size", NeurologicalMonitoring.rightPupilSize(neurologicalMonitoring))} {renderOptionalDescription( @@ -73,7 +73,8 @@ let make = ( {title("Limb Response")} - + {renderLine( "Upper Left", NeurologicalMonitoring.limpResponseToString( @@ -81,7 +82,8 @@ let make = ( ), )} - + {renderLine( "Upper Right", NeurologicalMonitoring.limpResponseToString( @@ -91,7 +93,8 @@ let make = ( - + {renderLine( "Lower Left", NeurologicalMonitoring.limpResponseToString( @@ -99,7 +102,8 @@ let make = ( ), )} - + {renderLine( "Lower Right", NeurologicalMonitoring.limpResponseToString( diff --git a/src/Components/CriticalCareRecording/NursingCare/CriticalCare__NursingCareEditor.res b/src/Components/CriticalCareRecording/NursingCare/CriticalCare__NursingCareEditor.res index f6dc3f5ab73..d24d60a4614 100644 --- a/src/Components/CriticalCareRecording/NursingCare/CriticalCare__NursingCareEditor.res +++ b/src/Components/CriticalCareRecording/NursingCare/CriticalCare__NursingCareEditor.res @@ -124,7 +124,7 @@ let make = (~nursingCare, ~updateCB, ~id, ~consultationId) => { | Some(s) => diff --git a/src/Components/CriticalCareRecording/Others/DailyRound__General.res b/src/Components/CriticalCareRecording/Others/DailyRound__General.res index 22c5051083e..138eb7d2241 100644 --- a/src/Components/CriticalCareRecording/Others/DailyRound__General.res +++ b/src/Components/CriticalCareRecording/Others/DailyRound__General.res @@ -41,7 +41,7 @@ let make = (~others, ~renderOptionalDescription, ~title) => { {switch additionalSymptoms { | Some(symptomsArray) => Js.Array.map(id => { - + {str(symptoms[id - 1])} }, symptomsArray)->React.array diff --git a/src/Components/CriticalCareRecording/Pain/CriticalCare__PainEditor.res b/src/Components/CriticalCareRecording/Pain/CriticalCare__PainEditor.res index da041231265..1401d465558 100644 --- a/src/Components/CriticalCareRecording/Pain/CriticalCare__PainEditor.res +++ b/src/Components/CriticalCareRecording/Pain/CriticalCare__PainEditor.res @@ -105,7 +105,7 @@ let reducer = (state, action) => { | ClearSaving => {...state, saving: false} | Update(parts) => { ...state, - parts: parts, + parts, } | SetPreviewMode => {...state, previewMode: true} | ClearPreviewMode => {...state, previewMode: false} @@ -151,7 +151,7 @@ let initialState = (psp, previewMode) => { selectedRegion: Pain.Other, saving: false, dirty: false, - previewMode: previewMode, + previewMode, } } @@ -160,7 +160,7 @@ let selectedClass = (part: option) => { | Some(p) => let score = p.scale if score <= 0 { - "text-gray-400 hover:bg-red-400 tooltip" + "text-secondary-400 hover:bg-red-400 tooltip" } else if score <= 3 { "text-red-200 hover:bg-red-400 tooltip" } else if score <= 6 { @@ -172,7 +172,7 @@ let selectedClass = (part: option) => { } else { "text-red-700 hover:bg-red-800 tooltip" } - | None => "text-gray-400 hover:text-red-200 tooltip" + | None => "text-secondary-400 hover:text-red-200 tooltip" } } // UI for each Label @@ -181,7 +181,7 @@ let selectedLabelClass = (part: option) => { | Some(p) => let score = p.scale if score <= 0 { - "bg-gray-300 text-black hover:bg-gray-400" + "bg-secondary-300 text-black hover:bg-secondary-400" } else if score <= 3 { "bg-red-200 text-red-700 hover:bg-red-400" } else if score <= 6 { @@ -193,7 +193,7 @@ let selectedLabelClass = (part: option
{file_state.name}.{file_state.extension}
{t("sign_out")}
{str("Mark region and intensity of pain")}