From 294f6b03a1313bf31f840111a4b5c717626f2ed9 Mon Sep 17 00:00:00 2001 From: Nithish Kumar Siliveru Date: Mon, 18 Nov 2024 19:04:31 +0530 Subject: [PATCH 1/4] fixed doctor calling button size and added types (#9130) --- public/locale/en.json | 1 + src/components/Patient/ManagePatients.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/locale/en.json b/public/locale/en.json index 36c25a06682..21fa1bea6ba 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -905,6 +905,7 @@ "no_log_update_delta": "No changes since previous log update", "no_log_updates": "No log updates found", "no_notices_for_you": "No notices for you.", + "no_patients_found": "No Patients Found", "no_patients_to_show": "No patients to show.", "no_policy_added": "No Insurance Policy Added", "no_policy_found": "No Insurance Policy Found for this Patient", diff --git a/src/components/Patient/ManagePatients.tsx b/src/components/Patient/ManagePatients.tsx index d42f0072794..0664532b0a1 100644 --- a/src/components/Patient/ManagePatients.tsx +++ b/src/components/Patient/ManagePatients.tsx @@ -392,7 +392,7 @@ export const PatientManager = () => { ); const LastAdmittedToTypeBadges = () => { - const badge = (key: string, value: any, id: string) => { + const badge = (key: string, value: string | undefined, id: string) => { return ( value && ( { }; const HasConsentTypesBadges = () => { - const badge = (key: string, value: any, id: string) => { + const badge = (key: string, value: string | undefined, id: string) => { return ( value && ( { managePatients = (

- No Patients Found + {t("no_patients_found")}

); @@ -875,6 +875,7 @@ export const PatientManager = () => { /> {!!params.facility && ( { triggerGoal("Doctor Connect Clicked", { From a8beedcf981089650a82bf120a287981d765ff7a Mon Sep 17 00:00:00 2001 From: Anvesh Nalimela <151531961+AnveshNalimela@users.noreply.github.com> Date: Mon, 18 Nov 2024 19:06:06 +0530 Subject: [PATCH 2/4] Design of List View layout in Resource Page (#9096) --- public/locale/en.json | 4 + src/components/Resource/ResourceList.tsx | 174 ++++++++++++++++++++--- 2 files changed, 160 insertions(+), 18 deletions(-) diff --git a/public/locale/en.json b/public/locale/en.json index 21fa1bea6ba..e281d8239bf 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -5,6 +5,7 @@ "APPETITE__NO_TASTE_FOR_FOOD": "No taste for food", "APPETITE__REDUCED": "Reduced", "APPETITE__SATISFACTORY": "Satisfactory", + "APPROVED": "Approved", "AUTOMATED": "Automated", "BED_WITH_OXYGEN_SUPPORT": "Bed with Oxygen Support", "BLADDER_DRAINAGE__CONDOM_CATHETER": "Condom Catheter", @@ -140,6 +141,7 @@ "OXYGEN_MODALITY__NON_REBREATHING_MASK_short": "NRM", "OXYGEN_MODALITY__SIMPLE_FACE_MASK": "Simple Face Mask", "OXYGEN_MODALITY__SIMPLE_FACE_MASK_short": "SFM", + "PENDING": "Pending", "PRESCRIPTION_FREQUENCY_BD": "Twice daily", "PRESCRIPTION_FREQUENCY_HS": "Night only", "PRESCRIPTION_FREQUENCY_OD": "Once daily", @@ -205,6 +207,7 @@ "SORT_OPTIONS__taken_at": "Oldest taken date first", "Submit": "Submit", "TELEMEDICINE": "Telemedicine", + "TRANSPORTATION TO BE ARRANGED": "Transportation", "URINATION_FREQUENCY__DECREASED": "Decreased", "URINATION_FREQUENCY__INCREASED": "Increased", "URINATION_FREQUENCY__NORMAL": "Normal", @@ -1103,6 +1106,7 @@ "resource_approving_facility": "Resource approving facility", "resource_origin_facility": "Origin Facility", "resource_request": "Resource Request", + "resource_status": "Resource Status", "result": "Result", "result_date": "Result Date", "result_details": "Result details", diff --git a/src/components/Resource/ResourceList.tsx b/src/components/Resource/ResourceList.tsx index 8a12545d7d1..6eecf7fcef2 100644 --- a/src/components/Resource/ResourceList.tsx +++ b/src/components/Resource/ResourceList.tsx @@ -1,6 +1,7 @@ -import { navigate } from "raviger"; +import { Link, navigate } from "raviger"; import { useTranslation } from "react-i18next"; +import Chip from "@/CAREUI/display/Chip"; import CareIcon from "@/CAREUI/icons/CareIcon"; import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; @@ -11,7 +12,6 @@ import Page from "@/components/Common/Page"; import { ResourceModel } from "@/components/Facility/models"; import SearchInput from "@/components/Form/SearchInput"; import BadgesList from "@/components/Resource/ResourceBadges"; -import ResourceBlock from "@/components/Resource/ResourceBlock"; import { formatFilter } from "@/components/Resource/ResourceCommons"; import ListFilter from "@/components/Resource/ResourceFilter"; @@ -20,6 +20,7 @@ import useFilters from "@/hooks/useFilters"; import routes from "@/Utils/request/api"; import request from "@/Utils/request/request"; import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; export default function ListView() { const { @@ -48,15 +49,140 @@ export default function ListView() { const showResourceCardList = (data: ResourceModel[]) => { if (data && !data.length) { return ( -
+
{t("no_results_found")}
); } - return data.map((resource, i) => ( -
- + return data.map((resource: ResourceModel, i) => ( +
+
+
+
{resource.title}
+
+ +
+
+
+ +
+ {resource.category || ""} +
+ +
+
+
+ {resource.sub_category || "--"} +
+
+
+ +
+
+ {resource.status === "TRANSPORTATION TO BE ARRANGED" ? ( +
+ +
+ ) : ( +
+ +
+ )} + +
+ {resource.emergency && ( + + {t("emergency")} + + )} +
+
+ +
+
+ +
+ {formatDateTime(resource.modified_date) || "--"} +
+ +
+
+ +
+
+ +
+ {resource.origin_facility_object?.name} +
+ + +
+ +
+ {resource.approving_facility_object?.name} +
+ + +
+ +
+ {resource.assigned_facility_object?.name || + t("yet_to_be_decided")} +
+ +
+
+ + {t("all_details")} + +
+
)); }; @@ -79,7 +205,8 @@ export default function ListView() { breadcrumbs={false} options={ <> -
+
+
-
- {/* dummy div to align space as per board view */} -
-
- - - {t("board_view")} - +
advancedFilter.setShow(true)} /> + + + {t("board_view")} +
} @@ -123,10 +247,24 @@ export default function ListView() { {t("refresh_list")}
- -
- {data?.results && showResourceCardList(data?.results)} +
+
+ {t("resource")} +
+
+ {t("LOG_UPDATE_FIELD_LABEL__patient_category")} +
+
+ {t("consent__status")} +
+
+ {t("facilities")} +
+
+ {t("LOG_UPDATE_FIELD_LABEL__action")} +
+
{showResourceCardList(data?.results || [])}
From e49c274892e6e7d5a1263c0a59507efbe7cacbea Mon Sep 17 00:00:00 2001 From: Srayash Singh <146334722+Srayash@users.noreply.github.com> Date: Mon, 18 Nov 2024 19:06:36 +0530 Subject: [PATCH 3/4] disable "Save Button" if no file is selected (#9111) --- src/components/Common/AvatarEditModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Common/AvatarEditModal.tsx b/src/components/Common/AvatarEditModal.tsx index 38b54b1f1d2..bcc61819fde 100644 --- a/src/components/Common/AvatarEditModal.tsx +++ b/src/components/Common/AvatarEditModal.tsx @@ -292,7 +292,7 @@ const AvatarEditModal = ({ {isProcessing ? ( Date: Mon, 18 Nov 2024 19:11:14 +0530 Subject: [PATCH 4/4] Fixed:Show more monitors in CNS on very large displays #6503 (#9013) Co-authored-by: Rithvik Nishad Co-authored-by: rithviknishad --- .../Facility/CentralNursingStation.tsx | 50 ++++++++++--------- src/hooks/useBreakpoints.ts | 4 +- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/src/components/Facility/CentralNursingStation.tsx b/src/components/Facility/CentralNursingStation.tsx index 6c5d1381064..f5c17b52360 100644 --- a/src/components/Facility/CentralNursingStation.tsx +++ b/src/components/Facility/CentralNursingStation.tsx @@ -21,14 +21,13 @@ import HL7PatientVitalsMonitor from "@/components/VitalsMonitor/HL7PatientVitals import useVitalsAspectRatioConfig from "@/components/VitalsMonitor/useVitalsAspectRatioConfig"; import { getVitalsMonitorSocketUrl } from "@/components/VitalsMonitor/utils"; +import useBreakpoints from "@/hooks/useBreakpoints"; import useFilters from "@/hooks/useFilters"; import useFullscreen from "@/hooks/useFullscreen"; import routes from "@/Utils/request/api"; import useQuery from "@/Utils/request/useQuery"; -const PER_PAGE_LIMIT = 6; - const SORT_OPTIONS: SortOption[] = [ { isAscending: true, value: "bed__name" }, { isAscending: false, value: "-bed__name" }, @@ -41,31 +40,34 @@ interface Props { } export default function CentralNursingStation({ facilityId }: Props) { + const perPageLimit = useBreakpoints({ + default: 6, + "4xl": 9, + "4k": 24, + }); const { t } = useTranslation(); const [isFullscreen, setFullscreen] = useFullscreen(); const { qParams, updateQuery, removeFilter, updatePage } = useFilters({ - limit: PER_PAGE_LIMIT, + limit: perPageLimit, }); const query = useQuery(routes.listPatientAssetBeds, { pathParams: { facility_external_id: facilityId }, query: { ...qParams, page: qParams.page || 1, - limit: PER_PAGE_LIMIT, - offset: (qParams.page ? qParams.page - 1 : 0) * PER_PAGE_LIMIT, + limit: perPageLimit, + offset: (qParams.page ? qParams.page - 1 : 0) * perPageLimit, asset_class: "HL7MONITOR", ordering: qParams.ordering || "bed__name", bed_is_occupied: qParams.monitors_without_patient === "true" ? undefined : "true", }, }); - const totalCount = query.data?.count ?? 0; const data = query.data?.results.map((obj) => ({ patientAssetBed: obj, socketUrl: getVitalsMonitorSocketUrl(obj.asset), })); - const { config, hash } = useVitalsAspectRatioConfig({ default: 6 / 11, sm: 17 / 11, @@ -88,7 +90,7 @@ export default function CentralNursingStation({ facilityId }: Props) { updatePage(page)} /> @@ -216,21 +218,23 @@ export default function CentralNursingStation({ facilityId }: Props) { {t("no_vitals_present")}
) : ( -
- {data.map((props, i) => ( -
- -
- ))} +
+
+ {data.map((props, i) => ( +
+ +
+ ))} +
)} diff --git a/src/hooks/useBreakpoints.ts b/src/hooks/useBreakpoints.ts index bba811ab88e..2b36e4664eb 100644 --- a/src/hooks/useBreakpoints.ts +++ b/src/hooks/useBreakpoints.ts @@ -1,6 +1,6 @@ import useWindowDimensions from "@/hooks/useWindowDimensions"; -type Breakpoints = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl"; +type Breakpoints = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "4k"; // Ensure that the breakpoint widths are sorted in ascending order. const BREAKPOINT_WIDTH: Record = { @@ -10,6 +10,8 @@ const BREAKPOINT_WIDTH: Record = { xl: 1280, "2xl": 1536, "3xl": 1920, + "4xl": 2560, + "4k": 3840, }; /**