From 0a1aab09b50077aa53344e9fef193228fd4bb0c0 Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Wed, 5 Feb 2025 18:26:30 +0530 Subject: [PATCH 1/2] added PatientDetailsTabDemographyGeneralInfo plaggable --- src/components/Patient/PatientDetailsTab/Demography.tsx | 6 ++++++ src/pluginTypes.ts | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/components/Patient/PatientDetailsTab/Demography.tsx b/src/components/Patient/PatientDetailsTab/Demography.tsx index a246d8d464c..d2151f72f78 100644 --- a/src/components/Patient/PatientDetailsTab/Demography.tsx +++ b/src/components/Patient/PatientDetailsTab/Demography.tsx @@ -12,6 +12,7 @@ import { PatientProps } from "@/components/Patient/PatientDetailsTab"; import { GENDER_TYPES } from "@/common/constants"; +import { PLUGIN_Component } from "@/PluginEngine"; import { formatPatientAge } from "@/Utils/utils"; import { Organization, @@ -135,6 +136,11 @@ export const Demography = (props: PatientProps) => { id: "general-info", allowEdit: true, details: [ + , { label: t("full_name"), value: patientData.name }, { label: t("phone_number"), diff --git a/src/pluginTypes.ts b/src/pluginTypes.ts index 36d2bbb0467..0664ad5a341 100644 --- a/src/pluginTypes.ts +++ b/src/pluginTypes.ts @@ -41,6 +41,12 @@ export type PatientRegistrationFormComponentType = React.FC<{ patientId?: string; }>; +export type PatientDetailsTabDemographyGeneralInfoComponentType = React.FC<{ + facilityId: string; + id: string; + patientData: Patient; +}>; + // Define supported plugin components export type SupportedPluginComponents = { DoctorConnectButtons: DoctorConnectButtonComponentType; @@ -49,6 +55,7 @@ export type SupportedPluginComponents = { PatientInfoCardActions: PatientInfoCardActionsComponentType; FacilityHomeActions: FacilityHomeActionsComponentType; PatientRegistrationForm: PatientRegistrationFormComponentType; + PatientDetailsTabDemographyGeneralInfo: PatientDetailsTabDemographyGeneralInfoComponentType; }; // Create a type for lazy-loaded components From 8cdf9894a90efe46ca5f237d64557523d6382c6d Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Wed, 5 Feb 2025 18:44:51 +0530 Subject: [PATCH 2/2] fixed build failure --- src/components/Facility/FacilityHome.tsx | 2 +- src/pluginTypes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Facility/FacilityHome.tsx b/src/components/Facility/FacilityHome.tsx index 4856911d5e7..be79cce3c63 100644 --- a/src/components/Facility/FacilityHome.tsx +++ b/src/components/Facility/FacilityHome.tsx @@ -251,7 +251,7 @@ export const FacilityHome = ({ facilityId }: Props) => {
- +