+
+
+ );
};
diff --git a/src/components/Facility/FacilityHome.tsx b/src/components/Facility/FacilityHome.tsx
index cf671a51530..1808a1087ee 100644
--- a/src/components/Facility/FacilityHome.tsx
+++ b/src/components/Facility/FacilityHome.tsx
@@ -22,11 +22,7 @@ import Loading from "@/components/Common/Loading";
import { LocationSelect } from "@/components/Common/LocationSelect";
import DropdownMenu, { DropdownItem } from "@/components/Common/Menu";
import Page from "@/components/Common/Page";
-import Table from "@/components/Common/Table";
-import { FacilityBedCapacity } from "@/components/Facility/FacilityBedCapacity";
import FacilityBlock from "@/components/Facility/FacilityBlock";
-import { FacilityHomeTriage } from "@/components/Facility/FacilityHomeTriage";
-import { FacilityStaffList } from "@/components/Facility/FacilityStaffList";
import { FieldLabel } from "@/components/Form/FormFields/FormField";
import useAuthUser from "@/hooks/useAuthUser";
@@ -215,7 +211,10 @@ export const FacilityHome = ({ facilityId }: Props) => {
onClick={() => setEditCoverImage(true)}
className="md:mr-2 lg:mr-6 lg:h-80 lg:w-80"
/>
-
+
@@ -488,44 +487,6 @@ export const FacilityHome = ({ facilityId }: Props) => {
-
-
-
-
-
{t("oxygen_information")}
-
-
-
-
);
};
diff --git a/src/components/Facility/FacilityHomeTriage.tsx b/src/components/Facility/FacilityHomeTriage.tsx
deleted file mode 100644
index 25d2e0a7334..00000000000
--- a/src/components/Facility/FacilityHomeTriage.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import { navigate } from "raviger";
-
-import CareIcon from "@/CAREUI/icons/CareIcon";
-
-import ButtonV2 from "@/components/Common/ButtonV2";
-import Table from "@/components/Common/Table";
-
-import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor";
-import routes from "@/Utils/request/api";
-import useTanStackQueryInstead from "@/Utils/request/useQuery";
-
-interface FacilityHomeTriageProps {
- facilityId: string;
-}
-
-export function FacilityHomeTriage({ facilityId }: FacilityHomeTriageProps) {
- const { data } = useTanStackQueryInstead(routes.getTriage, {
- pathParams: { facilityId },
- });
-
- const tableRows =
- data?.results?.map((result) => [
- String(result.entry_date),
- String(result.num_patients_visited),
- String(result.num_patients_home_quarantine),
- String(result.num_patients_isolation),
- String(result.num_patient_referred),
- String(result.num_patient_confirmed_positive),
-
navigate(`/facility/${facilityId}/triage/${result.id}`)}
- authorizeFor={NonReadOnlyUsers}
- >
- Edit
- ,
- ]) ?? [];
-
- const tableHeadings = [
- "Date",
- "Total Triaged",
- "Advised Home Quarantine",
- "Suspects Isolated",
- "Referred",
- "Confirmed positives",
- "Actions",
- ];
-
- return (
-
-
-
-
Corona Triage
-
navigate(`/facility/${facilityId}/triage`)}
- authorizeFor={NonReadOnlyUsers}
- >
-
- Add Triage
-
-
-
-
-
-
- {tableRows.length === 0 && (
- <>
-
-
- No Data Found
-
- >
- )}
-
-
-
- );
-}
diff --git a/src/components/Facility/FacilityList.tsx b/src/components/Facility/FacilityList.tsx
index 0c1164649ca..f62f630dcaa 100644
--- a/src/components/Facility/FacilityList.tsx
+++ b/src/components/Facility/FacilityList.tsx
@@ -157,30 +157,17 @@ export const FacilityList = () => {
options={
advancedFilter.setShow(true)} />
-
+
+
+
}
>
diff --git a/src/components/Facility/FacilityStaffList.tsx b/src/components/Facility/FacilityStaffList.tsx
deleted file mode 100644
index 5a3cd512ba9..00000000000
--- a/src/components/Facility/FacilityStaffList.tsx
+++ /dev/null
@@ -1,138 +0,0 @@
-import { useState } from "react";
-import { useTranslation } from "react-i18next";
-
-import CareIcon from "@/CAREUI/icons/CareIcon";
-
-import ButtonV2 from "@/components/Common/ButtonV2";
-import DialogModal from "@/components/Common/Dialog";
-import Pagination from "@/components/Common/Pagination";
-import { StaffCapacity } from "@/components/Facility/StaffCapacity";
-import DoctorsCountCard from "@/components/Facility/StaffCountCard";
-import { DoctorModal } from "@/components/Facility/models";
-import { DoctorIcon } from "@/components/TeleIcu/Icons/DoctorIcon";
-
-import useFilters from "@/hooks/useFilters";
-
-import { DOCTOR_SPECIALIZATION } from "@/common/constants";
-
-import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor";
-import routes from "@/Utils/request/api";
-import useTanStackQueryInstead from "@/Utils/request/useQuery";
-
-export const FacilityStaffList = (props: any) => {
- const { t } = useTranslation();
- const [doctorCapacityModalOpen, setDoctorCapacityModalOpen] = useState(false);
- const { qParams, resultsPerPage, updatePage } = useFilters({ limit: 15 });
- const [totalDoctors, setTotalDoctors] = useState(0);
-
- const { data: doctorsList, refetch } = useTanStackQueryInstead(
- routes.listDoctor,
- {
- pathParams: { facilityId: props.facilityId },
- query: {
- limit: resultsPerPage,
- offset: (qParams.page - 1) * resultsPerPage,
- },
- onResponse: ({ res, data }) => {
- if (res?.ok && data) {
- let totalCount = 0;
- data.results.map((doctor: DoctorModal) => {
- if (doctor.count) {
- totalCount += doctor.count;
- }
- });
- setTotalDoctors(totalCount);
- }
- },
- },
- );
-
- let doctorList: any = null;
- if (!doctorsList || !doctorsList.results.length) {
- doctorList = (
-
- {t("no_staff")}
-
- );
- } else {
- doctorList = (
-
-
-
-
-
-
-
-
-
- {t("total_staff")}
-
-
{totalDoctors}
-
-
-
-
-
- {doctorsList.results.map((data: DoctorModal) => {
- return (
-
{
- refetch();
- }}
- {...data}
- removeDoctor={() => refetch()}
- />
- );
- })}
-
- );
- }
-
- return (
-
-
-
-
Staff Capacity
-
setDoctorCapacityModalOpen(true)}
- disabled={doctorList.length === DOCTOR_SPECIALIZATION.length}
- authorizeFor={NonReadOnlyUsers}
- >
-
- Add Staff Types
-
-
-
- {doctorList}
-
-
-
- {doctorCapacityModalOpen && (
- setDoctorCapacityModalOpen(false)}
- title="Add Staff Capacity"
- className="max-w-md md:min-w-[600px]"
- >
- setDoctorCapacityModalOpen(false)}
- handleUpdate={async () => {
- refetch();
- }}
- />
-
- )}
- updatePage(page)}
- />
-
- );
-};
diff --git a/src/components/Facility/StaffCapacity.tsx b/src/components/Facility/StaffCapacity.tsx
deleted file mode 100644
index 53235dd68d0..00000000000
--- a/src/components/Facility/StaffCapacity.tsx
+++ /dev/null
@@ -1,241 +0,0 @@
-import { useReducer, useState } from "react";
-import { useTranslation } from "react-i18next";
-
-import ButtonV2, { Cancel } from "@/components/Common/ButtonV2";
-import { DoctorModal } from "@/components/Facility/models";
-import {
- FieldErrorText,
- FieldLabel,
-} from "@/components/Form/FormFields/FormField";
-import TextFormField from "@/components/Form/FormFields/TextFormField";
-import { FieldChangeEventHandler } from "@/components/Form/FormFields/Utils";
-import SelectMenuV2 from "@/components/Form/SelectMenuV2";
-
-import { DOCTOR_SPECIALIZATION } from "@/common/constants";
-
-import * as Notification from "@/Utils/Notifications";
-import routes from "@/Utils/request/api";
-import request from "@/Utils/request/request";
-import useTanStackQueryInstead from "@/Utils/request/useQuery";
-
-interface DoctorCapacityProps extends DoctorModal {
- facilityId: string;
- handleClose: () => void;
- handleUpdate: () => void;
- className?: string;
- id?: number;
-}
-
-const initForm: any = {
- area: "",
- count: "",
-};
-
-const initialState = {
- form: { ...initForm },
- errors: { ...initForm },
-};
-
-const doctorCapacityReducer = (state = initialState, action: any) => {
- switch (action.type) {
- case "set_form": {
- return {
- ...state,
- form: action.form,
- };
- }
- case "set_error": {
- return {
- ...state,
- errors: action.errors,
- };
- }
- default:
- return state;
- }
-};
-
-const getAllowedDoctorTypes = (existing?: DoctorModal[]) => {
- if (!existing) return [...DOCTOR_SPECIALIZATION];
-
- return DOCTOR_SPECIALIZATION.map((specialization) => {
- const disabled = existing.some((i) => i.area === specialization.id);
- return { ...specialization, disabled };
- });
-};
-
-export const StaffCapacity = (props: DoctorCapacityProps) => {
- const { t } = useTranslation();
- const { facilityId, handleClose, handleUpdate, className, id } = props;
- const [state, dispatch] = useReducer(doctorCapacityReducer, initialState);
- const [isLoading, setIsLoading] = useState(false);
-
- const specializationsQuery = useTanStackQueryInstead(routes.listDoctor, {
- pathParams: { facilityId },
- query: {
- limit: DOCTOR_SPECIALIZATION.length - 1,
- },
- });
-
- const { loading } = useTanStackQueryInstead(routes.getDoctor, {
- pathParams: { facilityId, id: `${id}` },
- prefetch: !!id,
- onResponse: ({ data }) => {
- if (!data) return;
- dispatch({
- type: "set_form",
- form: { area: data.area, count: data.count },
- });
- },
- });
-
- const doctorTypes = getAllowedDoctorTypes(specializationsQuery.data?.results);
-
- const isLastOptionType =
- doctorTypes.filter((i) => i.disabled).length ===
- DOCTOR_SPECIALIZATION.length - 1;
-
- const headerText = !id ? "Add Staff Capacity" : "Edit Staff Capacity";
- const buttonText = !id
- ? `Save ${!isLastOptionType ? "& Add More" : "Staff Capacity"}`
- : "Update Staff Capacity";
-
- const validateData = () => {
- const errors = { ...initForm };
- let invalidForm = false;
- Object.keys(state.form).forEach((field) => {
- if (!state.form[field]) {
- errors[field] = t("field_required");
- invalidForm = true;
- }
- if (field === "count" && state.form[field] < 0) {
- errors[field] = "Staff count cannot be negative";
- invalidForm = true;
- }
- });
- if (invalidForm) {
- dispatch({ type: "set_error", errors });
- return false;
- }
- dispatch({ type: "set_error", errors });
- return true;
- };
-
- const handleFormFieldChange: FieldChangeEventHandler
= (event) => {
- const form = { ...state.form, [event.name]: event.value };
- dispatch({ type: "set_form", form });
- };
-
- const handleSubmit = async (e: any) => {
- const submitBtnID = e.currentTarget?.id;
- e.preventDefault();
- const valid = validateData();
- if (valid) {
- setIsLoading(true);
- const data = {
- area: Number(state.form.area),
- count: Number(state.form.count),
- };
- const { res } = await (id
- ? request(routes.updateDoctor, {
- pathParams: { facilityId, id: `${id}` },
- body: data,
- })
- : request(routes.createDoctor, {
- pathParams: { facilityId },
- body: data,
- }));
- setIsLoading(false);
- if (res?.ok) {
- specializationsQuery.refetch();
- dispatch({ type: "set_form", form: initForm });
- if (!id) {
- Notification.Success({ msg: "Staff count added successfully" });
- } else {
- Notification.Success({ msg: "Staff count updated successfully" });
- }
- }
- handleUpdate();
-
- if (submitBtnID === "save-and-exit") handleClose();
- }
- };
-
- return (
-
- {isLoading || loading || specializationsQuery.loading ? (
-
- ) : (
-
-
-
- Staff Type
-
- type.id == state.form.area)?.id}
- options={
- id ? doctorTypes : doctorTypes.filter((type) => !type.disabled)
- }
- optionLabel={(option) => option.text}
- optionValue={(option) => option.id}
- requiredError={state.errors.area.length !== 0}
- onChange={(e) =>
- handleFormFieldChange({
- name: "area",
- value: e || "",
- })
- }
- disabled={!!id}
- />
-
-
-
-
-
-
- handleClose()} />
- {!isLastOptionType && headerText === "Add Staff Capacity" && (
-
- Save Staff Capacity
-
- )}
-
- {buttonText}
-
-
-
- )}
-
- );
-};
diff --git a/src/components/Facility/StaffCountCard.tsx b/src/components/Facility/StaffCountCard.tsx
deleted file mode 100644
index 0c0984172b1..00000000000
--- a/src/components/Facility/StaffCountCard.tsx
+++ /dev/null
@@ -1,118 +0,0 @@
-import { useState } from "react";
-
-import ButtonV2 from "@/components/Common/ButtonV2";
-import ConfirmDialog from "@/components/Common/ConfirmDialog";
-import DialogModal from "@/components/Common/Dialog";
-import { StaffCapacity } from "@/components/Facility/StaffCapacity";
-import { DoctorModal } from "@/components/Facility/models";
-import { DoctorIcon } from "@/components/TeleIcu/Icons/DoctorIcon";
-
-import { DOCTOR_SPECIALIZATION } from "@/common/constants";
-
-import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor";
-import * as Notification from "@/Utils/Notifications";
-import routes from "@/Utils/request/api";
-import request from "@/Utils/request/request";
-
-interface DoctorsCountProps extends DoctorModal {
- facilityId: string;
- removeDoctor: (doctorId: number | undefined) => void;
- handleUpdate: () => void;
-}
-
-const StaffCountCard = (props: DoctorsCountProps) => {
- const specialization = DOCTOR_SPECIALIZATION.find((i) => i.id === props.area);
- const [openDeleteDialog, setOpenDeleteDialog] = useState(false);
- const [open, setOpen] = useState(false);
- const [selectedId, setSelectedId] = useState(-1);
-
- const handleDeleteSubmit = async () => {
- if (!props.area) return;
-
- const { res } = await request(routes.deleteDoctor, {
- pathParams: { facilityId: props.facilityId, area: `${props.area}` },
- });
-
- if (res?.ok) {
- props.removeDoctor(props.id);
- Notification.Success({
- msg: "Staff specialization type deleted successfully",
- });
- }
- };
-
- const handleDeleteClose = () => {
- setOpenDeleteDialog(false);
- };
-
- return (
-
-
-
-
-
-
-
-
- {specialization?.text}
-
-
{props.count}
-
-
-
- {
- setSelectedId(props.area || 0);
- setOpen(true);
- }}
- authorizeFor={NonReadOnlyUsers}
- >
- Edit
-
- setOpenDeleteDialog(true)}
- authorizeFor={NonReadOnlyUsers}
- >
- Delete
-
-
-
-
- {open && (
-
setOpen(false)}
- title="Update Staff Capacity"
- >
- {
- setOpen(false);
- }}
- handleUpdate={() => {
- props.handleUpdate();
- setOpen(false);
- }}
- id={selectedId}
- />
-
- )}
-
- );
-};
-
-export default StaffCountCard;
diff --git a/src/components/Facility/TriageForm.tsx b/src/components/Facility/TriageForm.tsx
deleted file mode 100644
index 607adb0172f..00000000000
--- a/src/components/Facility/TriageForm.tsx
+++ /dev/null
@@ -1,321 +0,0 @@
-import dayjs from "dayjs";
-import { useReducer, useState } from "react";
-import { useTranslation } from "react-i18next";
-
-import Card from "@/CAREUI/display/Card";
-import CareIcon from "@/CAREUI/icons/CareIcon";
-
-import { Cancel, Submit } from "@/components/Common/ButtonV2";
-import ConfirmDialog from "@/components/Common/ConfirmDialog";
-import Loading from "@/components/Common/Loading";
-import Page from "@/components/Common/Page";
-import { PatientStatsModel } from "@/components/Facility/models";
-import DateFormField from "@/components/Form/FormFields/DateFormField";
-import TextFormField from "@/components/Form/FormFields/TextFormField";
-import { FieldChangeEvent } from "@/components/Form/FormFields/Utils";
-
-import useAppHistory from "@/hooks/useAppHistory";
-
-import * as Notification from "@/Utils/Notifications";
-import routes from "@/Utils/request/api";
-import request from "@/Utils/request/request";
-import useTanStackQueryInstead from "@/Utils/request/useQuery";
-import { dateQueryString, scrollTo } from "@/Utils/utils";
-
-interface Props extends PatientStatsModel {
- facilityId: string;
- id?: string;
-}
-
-const initForm: any = {
- entry_date: null,
- num_patients_visited: "",
- num_patients_home_quarantine: "",
- num_patients_isolation: "",
- num_patient_referred: "",
- num_patient_confirmed_positive: "",
-};
-
-const initialState = {
- form: { ...initForm },
- errors: { ...initForm },
-};
-
-const triageFormReducer = (state = initialState, action: any) => {
- switch (action.type) {
- case "set_form": {
- return {
- ...state,
- form: action.form,
- };
- }
- case "set_error": {
- return {
- ...state,
- errors: action.errors,
- };
- }
- default:
- return state;
- }
-};
-
-export const TriageForm = ({ facilityId, id }: Props) => {
- const { t } = useTranslation();
- const { goBack } = useAppHistory();
- const [state, dispatch] = useReducer(triageFormReducer, initialState);
- const [isLoading, setIsLoading] = useState(false);
- const [openModalForExistingTriage, setOpenModalForExistingTriage] =
- useState(false);
- const headerText = !id ? "Add Triage" : "Edit Triage";
- const buttonText = !id ? "Save Triage" : "Update Triage";
-
- const triageDetailsQuery = useTanStackQueryInstead(routes.getTriageDetails, {
- pathParams: { facilityId, id: id! },
- prefetch: !!id,
- onResponse: ({ data }) => {
- if (!data) return;
- dispatch({
- type: "set_form",
- form: {
- ...data,
- entry_date: data.entry_date ? dayjs(data.entry_date).toDate() : null,
- },
- });
- },
- });
-
- const patientStatsQuery = useTanStackQueryInstead(routes.getTriage, {
- pathParams: { facilityId },
- });
-
- const patientStatsData = patientStatsQuery.data?.results ?? [];
-
- const facilityQuery = useTanStackQueryInstead(routes.getAnyFacility, {
- pathParams: { id: facilityId },
- });
- const facilityName = facilityQuery.data?.name ?? "";
-
- const validateForm = () => {
- const errors = { ...initForm };
- let invalidForm = false;
- Object.keys(state.form).forEach((field, _) => {
- switch (field) {
- case "entry_date":
- if (!state.form[field]) {
- errors[field] = t("field_required");
- invalidForm = true;
- }
- return;
- case "num_patients_visited":
- case "num_patients_home_quarantine":
- case "num_patients_isolation":
- case "num_patient_referred":
- case "num_patient_confirmed_positive":
- if (state.form[field] != null && state.form[field] < 0) {
- errors[field] = "Value must be greater than or equal to 0";
- invalidForm = true;
- }
- return;
-
- default:
- return;
- }
- });
- if (invalidForm) {
- dispatch({ type: "set_error", errors });
- const firstError = Object.keys(errors).find((e) => errors[e]);
- if (firstError) {
- scrollTo(firstError);
- }
- return false;
- }
- dispatch({ type: "set_error", errors });
- return true;
- };
- const isTriageExist = (data: any) => {
- if (
- patientStatsData.filter(
- (triageData) => triageData.entry_date === data.entry_date,
- ).length === 1
- ) {
- return true;
- }
- return false;
- };
-
- const handleSubmit = async () => {
- setOpenModalForExistingTriage(false);
- const validForm = validateForm();
- if (validForm) {
- const data = {
- entry_date: dateQueryString(state.form.entry_date),
- num_patients_visited: Number(state.form.num_patients_visited),
- num_patients_home_quarantine: Number(
- state.form.num_patients_home_quarantine,
- ),
- num_patients_isolation: Number(state.form.num_patients_isolation),
- num_patient_referred: Number(state.form.num_patient_referred),
- num_patient_confirmed_positive: Number(
- state.form.num_patient_confirmed_positive,
- ),
- };
- //proceed if the triage does not exist or proceed has allowed to proceed after seeing the modal or it's a edit feature of the same date
- if (
- !isTriageExist(data) ||
- openModalForExistingTriage ||
- buttonText === "Update Triage"
- ) {
- setOpenModalForExistingTriage(false);
- setIsLoading(true);
- const { res } = await request(routes.createTriage, {
- pathParams: { facilityId },
- body: data,
- });
- setIsLoading(false);
- if (res?.ok) {
- dispatch({ type: "set_form", form: initForm });
- if (id) {
- Notification.Success({ msg: "Triage updated successfully" });
- } else {
- Notification.Success({ msg: "Triage created successfully" });
- }
- goBack();
- }
- } else {
- setOpenModalForExistingTriage(true);
- }
- }
- };
-
- const handleFormFieldChange = (event: FieldChangeEvent) => {
- dispatch({
- type: "set_form",
- form: { ...state.form, [event.name]: event.value },
- });
- };
-
- if (
- isLoading ||
- facilityQuery.loading ||
- triageDetailsQuery.loading ||
- patientStatsQuery.loading
- ) {
- return ;
- }
-
- return (
-
-
-
-
- A Triage already exist on this date
-
- }
- description="A Triage already exist on this date, If you wish to proceed then the existing triage will be over
- written!"
- variant="danger"
- show={openModalForExistingTriage}
- onClose={() => setOpenModalForExistingTriage(false)}
- className="w-[48rem]"
- action="Proceed"
- onConfirm={handleSubmit}
- />
-
-
-
-
- );
-};
diff --git a/src/components/Facility/models.tsx b/src/components/Facility/models.tsx
index a984efe6283..d25258be12d 100644
--- a/src/components/Facility/models.tsx
+++ b/src/components/Facility/models.tsx
@@ -67,16 +67,8 @@ export interface FacilityModel {
latitude: number;
longitude: number;
};
- oxygen_capacity?: number;
phone_number?: string;
- type_b_cylinders?: number;
- type_c_cylinders?: number;
- type_d_cylinders?: number;
middleware_address?: string;
- expected_type_b_cylinders?: number;
- expected_type_c_cylinders?: number;
- expected_type_d_cylinders?: number;
- expected_oxygen_requirement?: number;
local_body_object?: LocalBodyModel;
district_object?: DistrictModel;
state_object?: StateModel;
@@ -115,20 +107,6 @@ export interface FacilitySpokeRequest {
export interface FacilitySpokeErrors {}
-export interface CapacityModal {
- id?: number;
- room_type?: number;
- modified_date?: any;
- total_capacity?: number;
- current_capacity?: number;
-}
-
-export interface DoctorModal {
- id?: number;
- area?: number;
- count?: number;
-}
-
export interface OptionsType {
id: number;
text: string;
@@ -225,17 +203,6 @@ export interface ConsultationModel {
has_consents?: (typeof CONSENT_TYPE_CHOICES)[number]["id"][];
}
-export interface PatientStatsModel {
- id?: string;
- entryDate?: string;
- num_patients_visited?: number;
- num_patients_home_quarantine?: number;
- num_patients_isolation?: number;
- num_patient_referred?: number;
- entry_date?: string;
- num_patient_confirmed_positive?: number;
-}
-
export interface DupPatientModel {
id: number;
gender: string;
diff --git a/src/components/Patient/PatientRegister.tsx b/src/components/Patient/PatientRegister.tsx
index eb0594baa82..daca5e90a21 100644
--- a/src/components/Patient/PatientRegister.tsx
+++ b/src/components/Patient/PatientRegister.tsx
@@ -14,13 +14,13 @@ import Loading from "@/components/Common/Loading";
import PageTitle from "@/components/Common/PageTitle";
import Spinner from "@/components/Common/Spinner";
import Error404 from "@/components/ErrorPages/404";
-import { ILocalBodies } from "@/components/ExternalResult/models";
import DuplicatePatientDialog from "@/components/Facility/DuplicatePatientDialog";
import TransferPatientDialog from "@/components/Facility/TransferPatientDialog";
import {
DistrictModel,
DupPatientModel,
FacilityModel,
+ LocalBodyModel,
WardModel,
} from "@/components/Facility/models";
import {
@@ -205,7 +205,7 @@ export const PatientRegister = (props: PatientRegisterProps) => {
const [isLocalbodyLoading, setIsLocalbodyLoading] = useState(false);
const [isWardLoading, setIsWardLoading] = useState(false);
const [districts, setDistricts] = useState