From fe44dd1463b369dba6247e7c06d9cb135f7ea66e Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Tue, 9 Jul 2024 22:49:16 +0530 Subject: [PATCH 01/22] automatically enter landscape mode upon fullscreen and fallback to using video element fullscreen if unsupported (#8118) --- src/CAREUI/display/NetworkSignal.tsx | 4 +- src/Common/hooks/useFullscreen.ts | 23 +++++--- src/Components/CameraFeed/AssetBedSelect.tsx | 6 +- src/Components/CameraFeed/CameraFeed.tsx | 59 +++++++++++-------- .../CameraFeed/FeedNetworkSignal.tsx | 2 +- src/Components/CameraFeed/FeedWatermark.tsx | 2 +- 6 files changed, 58 insertions(+), 38 deletions(-) diff --git a/src/CAREUI/display/NetworkSignal.tsx b/src/CAREUI/display/NetworkSignal.tsx index 1d5f2d49623..91ce6b58b4c 100644 --- a/src/CAREUI/display/NetworkSignal.tsx +++ b/src/CAREUI/display/NetworkSignal.tsx @@ -26,7 +26,7 @@ export default function NetworkSignal({ strength, children }: Props) { strength === 3 && "text-primary-500", )} > -
+
{strength === undefined ? ( )}
diff --git a/src/Common/hooks/useFullscreen.ts b/src/Common/hooks/useFullscreen.ts index 106e657cf16..a826ff5f0ad 100644 --- a/src/Common/hooks/useFullscreen.ts +++ b/src/Common/hooks/useFullscreen.ts @@ -5,10 +5,7 @@ interface HTMLElementWithFullscreen extends HTMLElement { webkitExitFullscreen?: () => void; } -export default function useFullscreen(): [ - boolean, - (value: boolean, element?: HTMLElement) => void, -] { +export default function useFullscreen() { const [isFullscreen, _setIsFullscreen] = useState( !!document.fullscreenElement, ); @@ -39,12 +36,22 @@ export default function useFullscreen(): [ else document.exitFullscreen(); } - const setFullscreen = (value: boolean, element?: HTMLElement) => { + const setFullscreen = ( + value: boolean, + element?: HTMLElement, + enterLandscape?: boolean, + ) => { const fullscreenElement = element ?? document.documentElement; - if (value) openFullscreen(fullscreenElement); - else exitFullscreen(fullscreenElement); + if (value) { + openFullscreen(fullscreenElement); + if (enterLandscape) { + (screen.orientation as any)?.lock?.("landscape"); + } + } else { + exitFullscreen(fullscreenElement); + } }; - return [isFullscreen, setFullscreen]; + return [isFullscreen, setFullscreen] as const; } diff --git a/src/Components/CameraFeed/AssetBedSelect.tsx b/src/Components/CameraFeed/AssetBedSelect.tsx index f970a920abc..3d7b7ab0951 100644 --- a/src/Components/CameraFeed/AssetBedSelect.tsx +++ b/src/Components/CameraFeed/AssetBedSelect.tsx @@ -67,10 +67,10 @@ export const CameraPresetDropdown = (
diff --git a/src/Components/CameraFeed/CameraFeed.tsx b/src/Components/CameraFeed/CameraFeed.tsx index 1c6781ee51b..64b37587cb9 100644 --- a/src/Components/CameraFeed/CameraFeed.tsx +++ b/src/Components/CameraFeed/CameraFeed.tsx @@ -9,10 +9,9 @@ import FeedAlert, { FeedAlertState } from "./FeedAlert"; import FeedNetworkSignal from "./FeedNetworkSignal"; import NoFeedAvailable from "./NoFeedAvailable"; import FeedControls from "./FeedControls"; -import Fullscreen from "../../CAREUI/misc/Fullscreen"; import FeedWatermark from "./FeedWatermark"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { Error } from "../../Utils/Notifications"; +import useFullscreen from "../../Common/hooks/useFullscreen"; interface Props { children?: React.ReactNode; @@ -33,12 +32,13 @@ interface Props { export default function CameraFeed(props: Props) { const playerRef = useRef(null); + const playerWrapperRef = useRef(null); const streamUrl = getStreamUrl(props.asset); const player = usePlayer(streamUrl, playerRef); const operate = useOperateCamera(props.asset.id, props.silent); - const [isFullscreen, setFullscreen] = useState(false); + const [isFullscreen, setFullscreen] = useFullscreen(); const [state, setState] = useState(); useEffect(() => setState(player.status), [player.status, setState]); @@ -91,32 +91,20 @@ export default function CameraFeed(props: Props) { props.onReset?.(); initializeStream(); }; + return ( - { - setFullscreen(false); - - if (reason === "DEVICE_UNSUPPORTED") { - // iOS webkit allows only video/iframe elements to call full-screen - // APIs. But we need to show controls too, not just the video element. - Error({ - msg: "This device does not support viewing this content in full-screen.", - }); - } - }} - > +
-
+
{props.children} -
- +
+ { + if (!value) { + setFullscreen(false); + return; + } + + if (isIOS) { + const element = document.querySelector("video"); + if (!element) { + return; + } + setFullscreen(true, element, true); + return; + } + + if (!playerRef.current) { + return; + } + + setFullscreen( + true, + playerWrapperRef.current || + (playerRef.current as HTMLElement), + true, + ); + }} onReset={resetStream} onMove={async (data) => { props.onMove?.(); @@ -223,6 +236,6 @@ export default function CameraFeed(props: Props) { )}
- +
); } diff --git a/src/Components/CameraFeed/FeedNetworkSignal.tsx b/src/Components/CameraFeed/FeedNetworkSignal.tsx index 502c61843e8..68df86bb4d5 100644 --- a/src/Components/CameraFeed/FeedNetworkSignal.tsx +++ b/src/Components/CameraFeed/FeedNetworkSignal.tsx @@ -34,7 +34,7 @@ export default function FeedNetworkSignal(props: Props) { return ( - + {videoDelay ? ( `${(videoDelay * 1e3) | 1} ms` ) : ( diff --git a/src/Components/CameraFeed/FeedWatermark.tsx b/src/Components/CameraFeed/FeedWatermark.tsx index 90ca2d15863..90b9f7cc408 100644 --- a/src/Components/CameraFeed/FeedWatermark.tsx +++ b/src/Components/CameraFeed/FeedWatermark.tsx @@ -47,7 +47,7 @@ const Watermark = (props: { children: string; className: string }) => { return ( {props.children} From 7f9a4747f4eb8449019e1572ae7e7ef954354ff4 Mon Sep 17 00:00:00 2001 From: Shivank Kacker Date: Tue, 9 Jul 2024 22:52:08 +0530 Subject: [PATCH 02/22] Updated ABHA popup UI (#7975) * Updated ABHA popup UI * made responsive * popup * fixed qr * updates --- src/Components/ABDM/ABHAProfileModal.tsx | 83 +++++++++--------------- 1 file changed, 29 insertions(+), 54 deletions(-) diff --git a/src/Components/ABDM/ABHAProfileModal.tsx b/src/Components/ABDM/ABHAProfileModal.tsx index be991bb8f55..7815165db7d 100644 --- a/src/Components/ABDM/ABHAProfileModal.tsx +++ b/src/Components/ABDM/ABHAProfileModal.tsx @@ -67,64 +67,17 @@ const ABHAProfileModal = ({ patientId, show, onClose, abha }: IProps) => { } show={show} onClose={onClose} + className="max-w-[500px]" + fixedWidth={false} >
- <> -
-
- {abha?.name ? ( - {abha?.name} - ) : ( - <> - {abha?.first_name} - {abha?.middle_name} - {abha?.last_name} - - )} -
- {abha?.abha_number} - {abha?.health_id && ( -
- {abha.health_id.split("@")[0]} - {/* @ - {abha.health_id.split("@")[1] || "care"} */} -
- )} -
- {abha?.gender && ( -

- Gender: - - {abha?.gender} - -

- )} - {abha?.date_of_birth && ( -

- DOB: - - {abha?.date_of_birth} - -

- )} - {abha?.email && ( -

- Email: - - {abha?.email} - -

- )} -
-
- - <> +
{ "dist name": abha?.district, })} /> - +
+
+ {[ + { + label: "Name", + value: + abha?.name || + `${abha?.first_name} ${abha?.middle_name} ${abha?.last_name}`, + }, + { label: "DOB", value: abha?.date_of_birth }, + { label: "Gender", value: abha?.gender }, + { label: "ABHA Number", value: abha?.abha_number }, + { label: "ABHA ID", value: abha?.health_id?.split("@")[0] }, + { label: "Email", value: abha?.email }, + ].map((item, index) => + item.value ? ( +
+
{item.label}
+
{item.value}
+
+ ) : null, + )} +
-
+
{abha?.created_date && (
Created On: From 36e156f8dc5964bbcd3664826e98349ee78e8f2d Mon Sep 17 00:00:00 2001 From: /usr/bin/cat <109351887+cu8code@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:52:47 +0530 Subject: [PATCH 03/22] Adds additional units and route to prescriptions (#8075) * Add mcg as new dosage unit; Add Sublingual; * Update src/Components/Medicine/models.ts Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> * Add missing unit `unit(s)` --------- Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Co-authored-by: rithviknishad --- src/Components/Medicine/CreatePrescriptionForm.tsx | 2 ++ src/Components/Medicine/models.ts | 2 ++ src/Locale/en/Medicine.json | 1 + 3 files changed, 5 insertions(+) diff --git a/src/Components/Medicine/CreatePrescriptionForm.tsx b/src/Components/Medicine/CreatePrescriptionForm.tsx index 173f5163427..a75cd868318 100644 --- a/src/Components/Medicine/CreatePrescriptionForm.tsx +++ b/src/Components/Medicine/CreatePrescriptionForm.tsx @@ -190,7 +190,9 @@ export const PRESCRIPTION_ROUTES = [ "INTRATHECAL", "TRANSDERMAL", "RECTAL", + "SUBLINGUAL", ] as const; + export const PRESCRIPTION_FREQUENCIES = { STAT: { slots: 1, diff --git a/src/Components/Medicine/models.ts b/src/Components/Medicine/models.ts index 53fd39d90f8..bb596e88b3e 100644 --- a/src/Components/Medicine/models.ts +++ b/src/Components/Medicine/models.ts @@ -8,6 +8,8 @@ export const DOSAGE_UNITS = [ "drop(s)", "ampule(s)", "tsp", + "mcg", + "unit(s)", ] as const; export type DosageValue = `${number} ${(typeof DOSAGE_UNITS)[number]}`; diff --git a/src/Locale/en/Medicine.json b/src/Locale/en/Medicine.json index 4a5a5785047..c21f5fa236f 100644 --- a/src/Locale/en/Medicine.json +++ b/src/Locale/en/Medicine.json @@ -51,6 +51,7 @@ "PRESCRIPTION_ROUTE_INTRATHECAL": "intrathecal injection", "PRESCRIPTION_ROUTE_TRANSDERMAL": "Transdermal", "PRESCRIPTION_ROUTE_RECTAL": "Rectal", + "PRESCRIPTION_ROUTE_SUBLINGUAL": "Sublingual", "PRESCRIPTION_FREQUENCY_STAT": "Imediately", "PRESCRIPTION_FREQUENCY_OD": "Once daily", "PRESCRIPTION_FREQUENCY_HS": "Night only", From a76b9586e782de8d603bfdb90e158cb34e7e4c38 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Tue, 9 Jul 2024 22:55:02 +0530 Subject: [PATCH 04/22] Progress Notes: Adds support for filing Resp. support and Neurological Monitoring data (#8109) * Progress Notes: Adds support for filing Resp. support and Neurological Monitoring data * remove console log --- .../Recording/CriticalCare__Recording.res | 42 +++++++++++-------- src/Components/Patient/DailyRounds.tsx | 12 +----- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res b/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res index d919215071e..5ff736f5664 100644 --- a/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res +++ b/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res @@ -36,10 +36,11 @@ let basicEditor = (~facilityId, ~patientId, ~consultationId, ~id) => { href={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds/${id}/update`}>
-
{str("Basic Editor")}
-
+
+ +
} let editorNameToString = editor => { @@ -94,7 +95,7 @@ let reducer = (state, action) => { | ShowEditor(editor) => {...state, visibleEditor: Some(editor)} | CloseEditor => {...state, visibleEditor: None} | UpdateDailyRound(dailyRound, editor) => { - dailyRound: dailyRound, + dailyRound, visibleEditor: None, updatedEditors: Js.Array.concat([editor], state.updatedEditors), } @@ -103,7 +104,7 @@ let reducer = (state, action) => { let initialState = dailyRound => { visibleEditor: None, - dailyRound: dailyRound, + dailyRound, updatedEditors: [], } @@ -115,6 +116,21 @@ let updateDailyRound = (send, editor, dailyRound) => { let make = (~id, ~facilityId, ~patientId, ~consultationId, ~dailyRound) => { let (state, send) = React.useReducer(reducer, initialState(dailyRound)) + let sections = + dailyRound.roundsType == VentilatorRound + ? [ + HemodynamicParametersEditor, + NeurologicalMonitoringEditor, + VentilatorParametersEditor, + ArterialBloodGasAnalysisEditor, + BloodSugarEditor, + IOBalanceEditor, + DialysisEditor, + PressureSoreEditor, + NursingCareEditor, + ] + : [NeurologicalMonitoringEditor, VentilatorParametersEditor] +
{ReactUtils.nullUnless(
@@ -222,25 +238,15 @@ let make = (~id, ~facilityId, ~patientId, ~consultationId, ~dailyRound) => { className="bg-white px-2 md:px-6 py-5 border-b border-gray-200 sm:px-6 max-w-5xl mx-auto border mt-4 shadow rounded-lg">

{str("Record Updates")}

- {basicEditor(~facilityId, ~patientId, ~consultationId, ~id)} {Js.Array.map(editor => { + {basicEditor(~facilityId, ~patientId, ~consultationId, ~id)} + {Js.Array.map(editor => { editorToggle(editor, state, send) - }, [ - HemodynamicParametersEditor, - NeurologicalMonitoringEditor, - VentilatorParametersEditor, - ArterialBloodGasAnalysisEditor, - BloodSugarEditor, - IOBalanceEditor, - DialysisEditor, - PressureSoreEditor, - NursingCareEditor, - ])->React.array} + }, sections)->React.array}
diff --git a/src/Components/Patient/DailyRounds.tsx b/src/Components/Patient/DailyRounds.tsx index 2bb544327be..97ee038362b 100644 --- a/src/Components/Patient/DailyRounds.tsx +++ b/src/Components/Patient/DailyRounds.tsx @@ -343,11 +343,7 @@ export const DailyRounds = (props: any) => { Notification.Success({ msg: `${t(obj.rounds_type as string)} log updated successfully`, }); - if ( - ["NORMAL", "TELEMEDICINE", "DOCTORS_LOG"].includes( - state.form.rounds_type, - ) - ) { + if (["NORMAL", "TELEMEDICINE"].includes(state.form.rounds_type)) { navigate( `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`, ); @@ -369,11 +365,7 @@ export const DailyRounds = (props: any) => { msg: `${t(state.form.rounds_type)} log created successfully`, }); - if ( - ["NORMAL", "TELEMEDICINE", "DOCTORS_LOG"].includes( - state.form.rounds_type, - ) - ) { + if (["NORMAL", "TELEMEDICINE"].includes(state.form.rounds_type)) { navigate( `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`, ); From 0f5b54cab4fc29ac23568e005682afbba59375e4 Mon Sep 17 00:00:00 2001 From: Dev-Harwani <131504127+Dev-Harwani@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:55:31 +0530 Subject: [PATCH 05/22] Fix multi-select dropdown for facilities in user creation module (#8086) * Fix multi-select dropdown for facilities in user creation module * if NOptions is undefined then all the facilities will be shown.If not then that particular number will be shown. * Apply suggestions from code review --------- Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Co-authored-by: Rithvik Nishad --- src/Components/Common/FacilitySelect.tsx | 5 +++-- src/Components/Form/AutoCompleteAsync.tsx | 14 +++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) 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/Form/AutoCompleteAsync.tsx b/src/Components/Form/AutoCompleteAsync.tsx index b66cf16b800..b9caa512137 100644 --- a/src/Components/Form/AutoCompleteAsync.tsx +++ b/src/Components/Form/AutoCompleteAsync.tsx @@ -18,7 +18,7 @@ interface Props { onChange: (selected: any) => void; optionLabel?: (option: any) => string; optionLabelChip?: (option: any) => string; - showNOptions?: number; + showNOptions?: number | undefined; multiple?: boolean; compareBy?: string; debounceTime?: number; @@ -40,7 +40,7 @@ const AutoCompleteAsync = (props: Props) => { onChange, optionLabel = (option: any) => option.label, optionLabelChip = (option: any) => option.label, - showNOptions = 10, + showNOptions, multiple = false, compareBy, debounceTime = 300, @@ -62,8 +62,13 @@ const AutoCompleteAsync = (props: Props) => { () => debounce(async (query: string) => { setLoading(true); - const data = await fetchData(query); - setData(data?.slice(0, showNOptions) || []); + const data = (await fetchData(query)) || []; + + if (showNOptions !== undefined) { + setData(data.slice(0, showNOptions)); + } else { + setData(data); + } setLoading(false); }, debounceTime), [fetchData, showNOptions, debounceTime], @@ -102,7 +107,6 @@ const AutoCompleteAsync = (props: Props) => { onChange={({ target }) => setQuery(target.value)} onFocus={props.onFocus} onBlur={() => { - setQuery(""); props.onBlur?.(); }} autoComplete="off" From ff70e5f9e4d605410fd9676c2c80c74a1f77a2e5 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Thu, 11 Jul 2024 12:20:38 +0530 Subject: [PATCH 06/22] Shows encounter duration in discharge confirmation dialog (#8124) * Shows encounter duration in discharge confirmation dialog * correction for IP days * update text of "IP Days" to "IP Day No" --- src/Components/Facility/DischargeModal.tsx | 24 ++++++++++++++++++++-- src/Components/Patient/ManagePatients.tsx | 2 +- src/Components/Patient/PatientInfoCard.tsx | 4 ++-- src/Locale/en/Consultation.json | 3 ++- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/Components/Facility/DischargeModal.tsx b/src/Components/Facility/DischargeModal.tsx index 0be7b4eabd8..1476e38ed03 100644 --- a/src/Components/Facility/DischargeModal.tsx +++ b/src/Components/Facility/DischargeModal.tsx @@ -25,6 +25,7 @@ import { FacilitySelect } from "../Common/FacilitySelect"; import { FacilityModel } from "./models"; import dayjs from "../../Utils/dayjs"; import { FieldError } from "../Form/FieldValidators"; +import { useTranslation } from "react-i18next"; interface PreDischargeFormInterface { new_discharge_reason: number | null; @@ -57,6 +58,7 @@ const DischargeModal = ({ discharge_date = dayjs().format("YYYY-MM-DDTHH:mm"), death_datetime = dayjs().format("YYYY-MM-DDTHH:mm"), }: IProps) => { + const { t } = useTranslation(); const { enable_hcx } = useConfig(); const dispatch: any = useDispatch(); const [preDischargeForm, setPreDischargeForm] = @@ -205,6 +207,19 @@ const DischargeModal = ({ })); }; + const encounterDuration = dayjs + .duration( + dayjs( + preDischargeForm[ + discharge_reason === + DISCHARGE_REASONS.find((i) => i.text == "Expired")?.id + ? "death_datetime" + : "discharge_date" + ], + ).diff(consultationData.encounter_date), + ) + .humanize(); + return ( - {discharge_reason === DISCHARGE_REASONS.find((i) => i.text == "Recovered")?.id && ( <> @@ -374,7 +388,13 @@ const DischargeModal = ({
)} -
+
+ + {t("encounter_duration_confirmation")}{" "} + {encounterDuration}. + +
+
{isSendingDischargeApi ? ( diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index c02efc5c737..9ddcb4b379c 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -610,7 +610,7 @@ export const PatientManager = () => { size="small" variant="primary" startIcon="l-clock-three" - text={`IP Days: ${dayjs().diff(patient.last_consultation.encounter_date, "day")}`} + text={`IP Day No: ${dayjs().diff(patient.last_consultation.encounter_date, "day") + 1}`} /> )} {patient.gender === 2 && diff --git a/src/Components/Patient/PatientInfoCard.tsx b/src/Components/Patient/PatientInfoCard.tsx index a43d49a26ac..d3ad76bf661 100644 --- a/src/Components/Patient/PatientInfoCard.tsx +++ b/src/Components/Patient/PatientInfoCard.tsx @@ -559,12 +559,12 @@ export default function PatientInfoCard(props: { {dayjs(consultation.discharge_date || undefined).diff( consultation.encounter_date, "day", - )} + ) + 1}
- IP Days + IP Day No
)} diff --git a/src/Locale/en/Consultation.json b/src/Locale/en/Consultation.json index 4df1a4de9a3..fa0a54290b0 100644 --- a/src/Locale/en/Consultation.json +++ b/src/Locale/en/Consultation.json @@ -36,5 +36,6 @@ "prev_sessions": "Prev Sessions", "next_sessions": "Next Sessions", "no_changes": "No changes", - "encounter_suggestion_edit_disallowed": "Not allowed to switch to this option in edit consultation" + "encounter_suggestion_edit_disallowed": "Not allowed to switch to this option in edit consultation", + "encounter_duration_confirmation": "The duration of this encounter would be" } \ No newline at end of file From 9ad27807f5c948938c781a6548b9d902898f4824 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Thu, 11 Jul 2024 12:41:58 +0530 Subject: [PATCH 07/22] Phone number field: Adds helper icon to improve how supported phone number types are shown (#8126) * Adds utility fn. to humanize strings * Adds helper to clarify supported phone number types in phone number field * update `humanizeStrings` implementation * correct icon for user register page * fix responsiveness * handle empty array gracefully --- .../Form/FormFields/PhoneNumberFormField.tsx | 41 ++++++++----------- src/Components/Users/UserAdd.tsx | 3 +- src/Locale/en/Common.json | 5 +++ src/Utils/utils.ts | 19 +++++++++ 4 files changed, 44 insertions(+), 24 deletions(-) diff --git a/src/Components/Form/FormFields/PhoneNumberFormField.tsx b/src/Components/Form/FormFields/PhoneNumberFormField.tsx index b2034507475..c580a15e409 100644 --- a/src/Components/Form/FormFields/PhoneNumberFormField.tsx +++ b/src/Components/Form/FormFields/PhoneNumberFormField.tsx @@ -7,6 +7,7 @@ import { formatPhoneNumber as formatPhoneNumberUtil, getCountryCode, CountryData, + humanizeStrings, } from "../../../Utils/utils"; import phoneCodesJson from "../../../Common/static/countryPhoneAndFlags.json"; import { @@ -14,8 +15,9 @@ import { PhoneNumberValidator, PhoneNumberType, } from "../FieldValidators"; -import CareIcon, { IconName } from "../../../CAREUI/icons/CareIcon"; +import CareIcon from "../../../CAREUI/icons/CareIcon"; import { Popover } from "@headlessui/react"; +import { useTranslation } from "react-i18next"; const phoneCodes: Record = phoneCodesJson; @@ -154,29 +156,22 @@ export default function PhoneNumberFormField(props: Props) { ); } -const phoneNumberTypeIcons: Record = { - international_mobile: "l-globe", - indian_mobile: "l-mobile-android", - mobile: "l-mobile-android", - landline: "l-phone", - support: "l-headset", -}; +const PhoneNumberTypesHelp = (props: { types: PhoneNumberType[] }) => { + const { t } = useTranslation(); -const PhoneNumberTypesHelp = ({ types }: { types: PhoneNumberType[] }) => ( -
- {types.map((type) => ( - - - - {type.replace("_", " ")} - - - ))} -
-); + return ( +
+ +
+ Supports only{" "} + + {humanizeStrings(props.types.map((item) => t(item)))} + {" "} + numbers. +
+
+ ); +}; const conditionPhoneCode = (code: string) => { code = code.split(" ")[0]; diff --git a/src/Components/Users/UserAdd.tsx b/src/Components/Users/UserAdd.tsx index f7e6b978fb9..bb8b1ea158d 100644 --- a/src/Components/Users/UserAdd.tsx +++ b/src/Components/Users/UserAdd.tsx @@ -608,7 +608,8 @@ export const UserAdd = (props: UserProps) => { className="inline-block rounded border border-gray-600 bg-gray-50 px-4 py-2 text-gray-600 transition hover:bg-gray-100" target="_blank" > -  Need Help? +  Need + Help? } backUrl="/users" diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json index 019a51232ba..f6ee4f1032d 100644 --- a/src/Locale/en/Common.json +++ b/src/Locale/en/Common.json @@ -48,6 +48,11 @@ "filter": "Filter", "ordering": "Ordering", "phone_number": "Phone Number", + "international_mobile": "International Mobile", + "indian_mobile": "Indian Mobile", + "mobile": "Mobile", + "landline": "Indian landline", + "support": "Support", "emergency_contact_number": "Emergency Contact Number", "last_modified": "Last Modified", "patient_address": "Patient Address", diff --git a/src/Utils/utils.ts b/src/Utils/utils.ts index d599a494b1c..60c49da0dc9 100644 --- a/src/Utils/utils.ts +++ b/src/Utils/utils.ts @@ -454,3 +454,22 @@ export const isPostPartum = (data_of_delivery?: string) => { export const isAntenatal = (menstruation_start_date?: string) => { return dayjs().diff(menstruation_start_date, "month") <= 9; }; + +/** + * A utility method to format an array of string to human readable format. + * + * @param values Array of strings to be made human readable. + * @returns Human readable version of the list of strings + */ +export const humanizeStrings = (strings: readonly string[], empty = "") => { + if (strings.length === 0) { + return empty; + } + + if (strings.length === 1) { + return strings[0]; + } + + const [last, ...items] = [...strings].reverse(); + return `${items.reverse().join(", ")} and ${last}`; +}; From 6739c26240e8955effbbacd793aed290ba0baebb Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Thu, 11 Jul 2024 12:42:26 +0530 Subject: [PATCH 08/22] Add caution for encounter date field if date is beyond 30 days. (#8125) * Add caution for encounter date field if beyond 30 days. * add translations --- src/Components/Facility/ConsultationForm.tsx | 28 +++++++++++++------- src/Locale/en/Common.json | 3 ++- src/Locale/en/Consultation.json | 7 +++++ 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/Components/Facility/ConsultationForm.tsx index a728ffc805a..436f8f19e04 100644 --- a/src/Components/Facility/ConsultationForm.tsx +++ b/src/Components/Facility/ConsultationForm.tsx @@ -1230,16 +1230,9 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => { required={["A", "DC", "OP"].includes( state.form.suggestion, )} - label={ - { - A: "Date & Time of Admission to the Facility", - DC: "Date & Time of Domiciliary Care commencement", - OP: "Date & Time of Out-patient visit", - DD: "Date & Time of Consultation", - HI: "Date & Time of Consultation", - R: "Date & Time of Consultation", - }[state.form.suggestion] - } + label={t( + `encounter_date_field_label__${state.form.suggestion}`, + )} type="datetime-local" value={dayjs(state.form.encounter_date).format( "YYYY-MM-DDTHH:mm", @@ -1251,6 +1244,21 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => { : undefined } /> + {dayjs().diff(state.form.encounter_date, "day") > 30 && ( +
+ + + {t("caution")}:{" "} + {t("back_dated_encounter_date_caution")}{" "} + + {dayjs(state.form.encounter_date).fromNow()}. + + +
+ )}
{state.form.route_to_facility === 30 && ( diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json index f6ee4f1032d..a85572b8d04 100644 --- a/src/Locale/en/Common.json +++ b/src/Locale/en/Common.json @@ -171,5 +171,6 @@ "treating_doctor": "Treating Doctor", "ration_card__NO_CARD": "Non-card holder", "ration_card__BPL": "BPL", - "ration_card__APL": "APL" + "ration_card__APL": "APL", + "caution": "Caution" } \ No newline at end of file diff --git a/src/Locale/en/Consultation.json b/src/Locale/en/Consultation.json index fa0a54290b0..d811680d0fd 100644 --- a/src/Locale/en/Consultation.json +++ b/src/Locale/en/Consultation.json @@ -37,5 +37,12 @@ "next_sessions": "Next Sessions", "no_changes": "No changes", "encounter_suggestion_edit_disallowed": "Not allowed to switch to this option in edit consultation", + "encounter_date_field_label__A": "Date & Time of Admission to the Facility", + "encounter_date_field_label__DC": "Date & Time of Domiciliary Care commencement", + "encounter_date_field_label__OP": "Date & Time of Out-patient visit", + "encounter_date_field_label__DD": "Date & Time of Consultation", + "encounter_date_field_label__HI": "Date & Time of Consultation", + "encounter_date_field_label__R": "Date & Time of Consultation", + "back_dated_encounter_date_caution": "You are creating an encounter for", "encounter_duration_confirmation": "The duration of this encounter would be" } \ No newline at end of file From 4ec3cf4aba27d2583f97d14ea7673018c20975a0 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Fri, 12 Jul 2024 19:12:55 +0530 Subject: [PATCH 09/22] Fixes oxygen flow rate not getting submitted in Critical Care (#8145) --- .../CriticalCare__VentilatorParametersEditor.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/CriticalCareRecording/VentilatorParametersEditor/CriticalCare__VentilatorParametersEditor.res b/src/Components/CriticalCareRecording/VentilatorParametersEditor/CriticalCare__VentilatorParametersEditor.res index 0933f46bf1a..cd3010b1c1d 100644 --- a/src/Components/CriticalCareRecording/VentilatorParametersEditor/CriticalCare__VentilatorParametersEditor.res +++ b/src/Components/CriticalCareRecording/VentilatorParametersEditor/CriticalCare__VentilatorParametersEditor.res @@ -115,7 +115,7 @@ let makePayload = (state: VentilatorParameters.state) => { DictUtils.setOptionalNumber("ventilator_tidal_volume", state.ventilator_tidal_volume, payload) DictUtils.setOptionalNumber( "ventilator_oxygen_modality_oxygen_rate", - state.ventilator_interface === UNKNOWN && + state.ventilator_interface === OXYGEN_SUPPORT && state.ventilator_oxygen_modality !== HIGH_FLOW_NASAL_CANNULA ? state.ventilator_oxygen_modality_oxygen_rate : None, From ae23c516ada97d24ec63a8ffea7481cbc99a5ae5 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Sat, 13 Jul 2024 12:46:01 +0530 Subject: [PATCH 10/22] Fixes discharge form resetting (#8146) --- src/Components/Facility/DischargeModal.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Components/Facility/DischargeModal.tsx b/src/Components/Facility/DischargeModal.tsx index 1476e38ed03..0ed17210bf8 100644 --- a/src/Components/Facility/DischargeModal.tsx +++ b/src/Components/Facility/DischargeModal.tsx @@ -82,18 +82,15 @@ const DischargeModal = ({ useEffect(() => { setPreDischargeForm((prev) => ({ ...prev, - new_discharge_reason, discharge_notes: referred_to ? "Patient Shifted to another facility." : "", - discharge_date, - death_datetime, referred_to_external: !referred_to?.id ? referred_to?.name : null, referred_to: referred_to?.id ? referred_to.id : null, })); setFacility(referred_to); - }, [referred_to, new_discharge_reason, discharge_date, death_datetime]); + }, [referred_to]); const discharge_reason = new_discharge_reason ?? preDischargeForm.new_discharge_reason; From 465f8e0001503690b3fb7580e38bc5ab906d48ab Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Tue, 16 Jul 2024 18:15:16 +0530 Subject: [PATCH 11/22] Replace usages of gray color shade with secondary (alias of gray) for consistency and maintainability (#8138) * Replace usages of `gray` shade with `secondary` shade * remove irrelavant comment from tailwind config --- src/CAREUI/display/Count.tsx | 4 +- src/CAREUI/display/FilterBadge.tsx | 4 +- src/CAREUI/display/SubHeading.tsx | 4 +- src/CAREUI/display/Timeline.tsx | 20 +-- src/CAREUI/interactive/LegendInput.tsx | 2 +- src/CAREUI/interactive/ScrollOverlay.tsx | 2 +- src/CAREUI/interactive/Switch.tsx | 2 +- src/Common/hooks/useFilters.tsx | 2 +- src/Components/ABDM/ABDMFacilityRecords.tsx | 18 +-- src/Components/ABDM/ABDMRecordsTab.tsx | 46 +++--- src/Components/ABDM/ABHAProfileModal.tsx | 4 +- .../ABDM/ConfigureHealthFacility.tsx | 4 +- src/Components/ABDM/FetchRecordsModal.tsx | 2 +- src/Components/ABDM/HealthInformation.tsx | 12 +- src/Components/ABDM/LinkABHANumberModal.tsx | 20 +-- src/Components/ABDM/LinkCareContextModal.tsx | 4 +- src/Components/Assets/AssetImportModal.tsx | 4 +- src/Components/Assets/AssetManage.tsx | 76 ++++----- .../Assets/AssetServiceEditModal.tsx | 35 +++-- src/Components/Assets/AssetWarrantyCard.tsx | 8 +- src/Components/Assets/AssetsList.tsx | 2 +- src/Components/Auth/Login.tsx | 8 +- src/Components/Auth/ResetPassword.tsx | 2 +- src/Components/CameraFeed/CameraFeed.tsx | 2 +- .../LiveMonitoringFilters.tsx | 6 +- src/Components/CameraFeed/NoFeedAvailable.tsx | 2 +- .../Common/BloodPressureFormField.tsx | 2 +- src/Components/Common/Breadcrumbs.tsx | 15 +- src/Components/Common/DateInputV2.tsx | 22 +-- src/Components/Common/Dialog.tsx | 4 +- .../Common/ExcelFIleDragAndDrop.tsx | 16 +- src/Components/Common/ExcelViewer.tsx | 16 +- src/Components/Common/FilePreviewDialog.tsx | 6 +- src/Components/Common/GLocationPicker.tsx | 4 +- src/Components/Common/HeadedTabs.tsx | 6 +- .../Common/LanguageSelectorLogin.tsx | 2 +- src/Components/Common/PageTitle.tsx | 2 +- src/Components/Common/Sidebar/Sidebar.tsx | 2 +- .../Common/Sidebar/SidebarUserCard.tsx | 6 +- src/Components/Common/SlideOver.res | 2 +- src/Components/Common/Steps.tsx | 12 +- src/Components/Common/Uptime.tsx | 22 +-- .../Common/UserAutocompleteFormField.tsx | 2 +- src/Components/Common/UserDetails.tsx | 2 +- src/Components/Common/components/ButtonV2.tsx | 2 +- .../Common/components/ContactLink.tsx | 2 +- src/Components/Common/components/Menu.tsx | 2 +- .../Common/components/SkeletonLoading.res | 4 +- src/Components/Common/components/Switch.tsx | 2 +- src/Components/Common/components/Table.tsx | 2 +- .../InvestigationBuilder.tsx | 12 +- .../PrescriptionDropdown.tsx | 2 +- .../PrescriptionMultiselect.tsx | 4 +- .../prescription-builder/ProcedureBuilder.tsx | 16 +- .../CriticalCare__Index.res | 35 +++-- .../DailyRound__Medicines.res | 16 +- ...ticalCare__HemodynamicParametersEditor.res | 24 +-- .../DailyRound__HemodynamicParameters.res | 14 +- .../IOBalance/DailyRound__IOBalance.res | 80 +++++----- .../IOBalance/IOBalance__Summary.res | 2 +- .../IOBalance/IOBalance__UnitPicker.res | 9 +- .../IOBalance/IOBalance__UnitSection.res | 14 +- .../CriticalCare__Description.res | 2 +- ...icalCare__NeurologicalMonitoringEditor.res | 6 +- .../CriticalCare__Switch.res | 8 +- .../DailyRound__NeurologicalMonitoring.res | 16 +- .../CriticalCare__NursingCareEditor.res | 2 +- .../Others/DailyRound__General.res | 2 +- .../Pain/CriticalCare__PainEditor.res | 17 +- .../Pain/CriticalCare__PainInputModal.res | 8 +- .../Pain/DailyRound__Pain.res | 6 +- .../CriticalCare__PressureSoreEditor.res | 146 +++++++++++------- .../CriticalCare__PressureSoreInputModal.res | 18 ++- .../PressureSore/DailyRound__PressureSore.res | 6 +- .../Recording/CriticalCare__Recording.res | 10 +- .../components/CriticalCare__Dropdown.res | 7 +- .../components/CriticalCare__Home.res | 15 +- .../components/CriticalCare__NumberInput.res | 30 ++-- .../components/PressureSore.js | 2 +- .../ConditionVerificationStatusMenu.tsx | 9 +- .../ConsultationDiagnosisBuilder.tsx | 10 +- .../ConsultationDiagnosisEntry.tsx | 4 +- .../PrincipalDiagnosisSelect.tsx | 6 +- .../Diagnosis/DiagnosesListAccordion.tsx | 9 +- src/Components/ExternalResult/ResultItem.tsx | 78 +++++----- src/Components/ExternalResult/ResultList.tsx | 34 ++-- .../ExternalResult/ResultUpdate.tsx | 8 +- src/Components/Facility/AssetCreate.tsx | 14 +- src/Components/Facility/BedCapacity.tsx | 2 +- src/Components/Facility/BedManagement.tsx | 2 +- src/Components/Facility/BedTypeCard.tsx | 10 +- .../Facility/CentralNursingStation.tsx | 6 +- src/Components/Facility/ConsultationCard.tsx | 12 +- .../ConsultationFeedTab.tsx | 4 +- .../ConsultationUpdatesTab.tsx | 34 ++-- .../ConsultationDetails/Events/EventsList.tsx | 6 +- .../Events/GenericEvent.tsx | 10 +- .../Facility/ConsultationDetails/index.tsx | 15 +- .../ConsultationDoctorNotes/index.tsx | 8 +- src/Components/Facility/ConsultationForm.tsx | 10 +- .../Consultations/BedActivityTimeline.tsx | 16 +- .../Facility/Consultations/Beds.tsx | 4 +- .../DailyRounds/DefaultLogUpdateCard.tsx | 2 +- .../Consultations/DailyRounds/LoadingCard.tsx | 8 +- .../DailyRounds/LogUpdateCardAttribute.tsx | 10 +- .../VirtualNursingAssistantLogUpdateCard.tsx | 2 +- .../Consultations/DailyRoundsFilter.tsx | 6 +- .../Consultations/DailyRoundsList.tsx | 4 +- .../Facility/Consultations/Feed.tsx | 8 +- .../Facility/Consultations/LiveFeed.tsx | 14 +- .../Facility/Consultations/Mews.tsx | 10 +- .../Consultations/NeurologicalTables.tsx | 66 ++++---- .../Facility/Consultations/NursingPlot.tsx | 4 +- .../Facility/Consultations/NutritionPlots.tsx | 20 +-- .../Facility/Consultations/PainDiagrams.tsx | 4 +- .../Consultations/PressureSoreDiagrams.tsx | 4 +- .../Consultations/PrimaryParametersPlot.tsx | 4 +- .../components/BinaryChronologicalChart.tsx | 4 +- .../Facility/CoverImageEditModal.tsx | 10 +- src/Components/Facility/DischargeModal.tsx | 2 +- .../Facility/DischargeSummaryModal.tsx | 2 +- .../Facility/DischargedPatientsList.tsx | 15 +- src/Components/Facility/DoctorNote.tsx | 2 +- .../Facility/DoctorVideoSlideover.tsx | 22 +-- .../Facility/DuplicatePatientDialog.tsx | 4 +- .../Facility/FacilityBedCapacity.tsx | 2 +- src/Components/Facility/FacilityCard.tsx | 12 +- src/Components/Facility/FacilityCreate.tsx | 6 +- src/Components/Facility/FacilityHome.tsx | 16 +- .../Facility/FacilityHomeTriage.tsx | 2 +- src/Components/Facility/FacilityStaffList.tsx | 2 +- src/Components/Facility/FacilityUsers.tsx | 10 +- src/Components/Facility/HospitalList.tsx | 4 +- src/Components/Facility/InventoryList.tsx | 21 +-- src/Components/Facility/InventoryLog.tsx | 27 ++-- .../InvestigationSuggestions.tsx | 4 +- .../Investigations/InvestigationTable.tsx | 26 ++-- .../Investigations/Reports/ReportTable.tsx | 28 ++-- .../Facility/Investigations/Table.tsx | 24 +-- .../Investigations/ViewInvestigations.tsx | 6 +- .../Facility/LocationManagement.tsx | 14 +- src/Components/Facility/MinQuantityList.tsx | 28 ++-- .../Facility/MinQuantityRequiredModal.tsx | 4 +- src/Components/Facility/PatientNoteCard.tsx | 28 ++-- .../Facility/PatientNotesSlideover.tsx | 6 +- src/Components/Facility/StaffCapacity.tsx | 2 +- src/Components/Facility/TreatmentSummary.tsx | 100 ++++++------ src/Components/Form/AutoCompleteAsync.tsx | 6 +- .../Form/FormFields/Autocomplete.tsx | 10 +- .../FormFields/AutocompleteMultiselect.tsx | 6 +- src/Components/Form/FormFields/FormField.tsx | 2 +- src/Components/Form/FormFields/Month.tsx | 2 +- .../FormFields/NumericWithUnitsFormField.tsx | 2 +- .../Form/FormFields/OtpFormField.tsx | 2 +- .../Form/FormFields/PhoneNumberFormField.tsx | 12 +- .../Form/FormFields/RadioFormField.tsx | 4 +- src/Components/Form/MultiSelectMenuV2.tsx | 16 +- src/Components/Form/SearchInput.tsx | 10 +- src/Components/Form/SelectMenuV2.tsx | 12 +- src/Components/HCX/ClaimDetailCard.tsx | 48 +++--- src/Components/HCX/ClaimsItemsBuilder.tsx | 4 +- src/Components/HCX/CreateClaimCard.tsx | 2 +- .../HCX/InsuranceDetailsBuilder.tsx | 4 +- .../Medicine/AdministerMedicine.tsx | 2 +- .../Medicine/ManagePrescriptions.tsx | 2 +- .../MedibaseAutocompleteFormField.tsx | 4 +- .../Medicine/MedicineAdministration.tsx | 4 +- .../AdministrationEventCell.tsx | 8 +- .../AdministrationEventSeperator.tsx | 4 +- .../AdministrationTable.tsx | 10 +- .../AdministrationTableRow.tsx | 14 +- .../MedicineAdministrationSheet/index.tsx | 4 +- .../Medicine/MedicinePrescriptionSummary.tsx | 6 +- .../Medicine/PrescriptionBuilder.tsx | 2 +- .../Medicine/PrescriptionDetailCard.tsx | 18 ++- .../Medicine/PrescriptionsTable.tsx | 8 +- .../Medicine/ResponsiveMedicineTables.tsx | 14 +- src/Components/Notifications/NoticeBoard.tsx | 8 +- .../Notifications/NotificationsList.tsx | 6 +- src/Components/Patient/DailyRounds.tsx | 4 +- src/Components/Patient/FileUpload.tsx | 14 +- src/Components/Patient/InsuranceDetails.tsx | 2 +- .../Patient/InsuranceDetailsCard.tsx | 6 +- src/Components/Patient/ManagePatients.tsx | 24 +-- .../Patient/PatientConsentRecordBlock.tsx | 6 +- .../Patient/PatientConsentRecords.tsx | 2 +- src/Components/Patient/PatientHome.tsx | 90 +++++------ src/Components/Patient/PatientInfoCard.tsx | 46 +++--- src/Components/Patient/PatientNotes.tsx | 8 +- src/Components/Patient/PatientRegister.tsx | 14 +- src/Components/Patient/SamplePreview.tsx | 22 +-- src/Components/Patient/SampleTestCard.tsx | 14 +- src/Components/Patient/SampleViewAdmin.tsx | 14 +- src/Components/Patient/UpdateStatusDialog.tsx | 2 +- src/Components/Patient/Waveform.tsx | 4 +- src/Components/Resource/CommentSection.tsx | 10 +- src/Components/Resource/ListView.tsx | 20 +-- src/Components/Resource/ResourceBoard.tsx | 34 ++-- src/Components/Resource/ResourceDetails.tsx | 4 +- src/Components/Scribe/Scribe.tsx | 30 ++-- src/Components/Shifting/CommentsSection.tsx | 10 +- src/Components/Shifting/Commons.tsx | 2 +- src/Components/Shifting/ListView.tsx | 28 ++-- src/Components/Shifting/ShiftDetails.tsx | 10 +- src/Components/Shifting/ShiftingBoard.tsx | 42 ++--- src/Components/Symptoms/SymptomsBuilder.tsx | 22 +-- src/Components/Symptoms/SymptomsCard.tsx | 12 +- .../Users/ConfirmHomeFacilityUpdateDialog.tsx | 2 +- src/Components/Users/ManageUsers.tsx | 20 +-- src/Components/Users/ProfileComponents.tsx | 8 +- .../Users/SkillsSlideOverComponents.tsx | 2 +- src/Components/Users/UnlinkFacilityDialog.tsx | 2 +- src/Components/Users/UserAdd.tsx | 6 +- src/Components/Users/UserProfile.tsx | 50 +++--- .../VitalsMonitor/HL7PatientVitalsMonitor.tsx | 2 +- .../VitalsMonitorAssetPopover.tsx | 6 +- .../VitalsMonitor/VitalsMonitorFooter.tsx | 2 +- .../VitalsMonitor/VitalsMonitorHeader.tsx | 6 +- src/Routers/AppRouter.tsx | 4 +- src/Utils/AutoSave.tsx | 2 +- src/Utils/VoiceRecorder.tsx | 2 +- src/Utils/useFileManager.tsx | 4 +- src/style/CAREUI.css | 4 +- src/style/index.css | 40 ++--- tailwind.config.js | 2 +- 225 files changed, 1466 insertions(+), 1341 deletions(-) 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.text}
{props.loading ? ( -
+
) : (
{props.count} diff --git a/src/CAREUI/display/FilterBadge.tsx b/src/CAREUI/display/FilterBadge.tsx index a4cd743b86a..0259439a4b8 100644 --- a/src/CAREUI/display/FilterBadge.tsx +++ b/src/CAREUI/display/FilterBadge.tsx @@ -16,13 +16,13 @@ const FilterBadge = ({ name, value, onRemove }: FilterBadgeProps) => { data-testid={name} className={`${ !value && "hidden" - } flex flex-row items-center rounded-full border border-gray-300 bg-white px-3 py-1 text-xs font-medium leading-4 text-gray-600`} + } flex flex-row items-center rounded-full border border-secondary-300 bg-white px-3 py-1 text-xs font-medium leading-4 text-secondary-600`} > {`${name}: ${value}`} diff --git a/src/CAREUI/display/SubHeading.tsx b/src/CAREUI/display/SubHeading.tsx index a9024e83687..1161ecd8e55 100644 --- a/src/CAREUI/display/SubHeading.tsx +++ b/src/CAREUI/display/SubHeading.tsx @@ -13,11 +13,11 @@ export default function SubHeading(props: Props) { return (
- + {props.title} {props.lastModified && ( -
+
diff --git a/src/CAREUI/display/Timeline.tsx b/src/CAREUI/display/Timeline.tsx index 3414a792398..bbbf5e24859 100644 --- a/src/CAREUI/display/Timeline.tsx +++ b/src/CAREUI/display/Timeline.tsx @@ -62,7 +62,7 @@ export const TimelineNode = (props: TimelineNodeProps) => { "absolute left-0 top-0 flex w-6 justify-center", )} > -
+
{ {props.title || (
-

+

{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} )}

@@ -131,13 +131,13 @@ export const TimelineNodeTitle = (props: TimelineNodeTitleProps) => {