Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a pluggable to show abha details #10417

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Facility/FacilityHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export const FacilityHome = ({ facilityId }: Props) => {
</div>
</div>
<div className="flex-shrink-0">
<DropdownMenu>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button
variant="secondary"
Expand Down
6 changes: 6 additions & 0 deletions src/components/Patient/PatientDetailsTab/Demography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -139,6 +140,11 @@ export const Demography = (props: PatientProps) => {
id: "general-info",
allowEdit: true,
details: [
<PLUGIN_Component
key="patient_details_tab__demography__general_info"
__name="PatientDetailsTabDemographyGeneralInfo"
{...props}
/>,
{ label: t("full_name"), value: patientData.name },
{
label: t("phone_number"),
Expand Down
7 changes: 7 additions & 0 deletions src/pluginTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export type PatientRegistrationFormComponentType = React.FC<{
patientId?: string;
}>;

export type PatientDetailsTabDemographyGeneralInfoComponentType = React.FC<{
facilityId: string;
patientId: string;
patientData: Patient;
}>;

// Define supported plugin components
export type SupportedPluginComponents = {
DoctorConnectButtons: DoctorConnectButtonComponentType;
Expand All @@ -49,6 +55,7 @@ export type SupportedPluginComponents = {
PatientInfoCardActions: PatientInfoCardActionsComponentType;
FacilityHomeActions: FacilityHomeActionsComponentType;
PatientRegistrationForm: PatientRegistrationFormComponentType;
PatientDetailsTabDemographyGeneralInfo: PatientDetailsTabDemographyGeneralInfoComponentType;
};

// Create a type for lazy-loaded components
Expand Down
Loading