From 52f3a690d2bcebe7647819fb040f248c738da7f2 Mon Sep 17 00:00:00 2001
From: Shivank Kacker
Date: Wed, 3 Jul 2024 19:11:18 +0530
Subject: [PATCH] show on all bed types
---
src/Components/Facility/ConsultationForm.tsx | 5 -----
src/Components/Patient/DailyRounds.tsx | 6 ------
src/Components/Patient/PatientCategorySelect.tsx | 6 ++----
src/Components/Patient/ShiftCreate.tsx | 5 -----
src/Components/Shifting/ShiftDetailsUpdate.tsx | 3 ---
5 files changed, 2 insertions(+), 23 deletions(-)
diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/Components/Facility/ConsultationForm.tsx
index c30c8ecc4aa..d330063603b 100644
--- a/src/Components/Facility/ConsultationForm.tsx
+++ b/src/Components/Facility/ConsultationForm.tsx
@@ -1295,11 +1295,6 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
)
}
- hideDescription={
- (Array.isArray(bed)
- ? bed[0].bed_type
- : bed?.bed_type) !== "ICU"
- }
required
label="Category"
{...field("category")}
diff --git a/src/Components/Patient/DailyRounds.tsx b/src/Components/Patient/DailyRounds.tsx
index 15b0cfc6f20..dd68e1f7dd6 100644
--- a/src/Components/Patient/DailyRounds.tsx
+++ b/src/Components/Patient/DailyRounds.tsx
@@ -121,7 +121,6 @@ export const DailyRounds = (props: any) => {
const [isLoading, setIsLoading] = useState(false);
const [facilityName, setFacilityName] = useState("");
const [patientName, setPatientName] = useState("");
- const [bedType, setBedType] = useState("");
const [consultationSuggestion, setConsultationSuggestion] = useState("");
const [prevReviewInterval, setPreviousReviewInterval] = useState(-1);
const [prevAction, setPreviousAction] = useState("NO_ACTION");
@@ -181,9 +180,6 @@ export const DailyRounds = (props: any) => {
if (data) {
setPatientName(data.name!);
setFacilityName(data.facility_object!.name);
- setBedType(
- data.last_consultation?.current_bed?.bed_object?.bed_type || "",
- );
setConsultationSuggestion(data.last_consultation?.suggestion);
setDiagnoses(
data.last_consultation?.diagnoses?.sort(
@@ -210,7 +206,6 @@ export const DailyRounds = (props: any) => {
};
}
} else {
- setBedType("");
setPatientName("");
setFacilityName("");
}
@@ -522,7 +517,6 @@ export const DailyRounds = (props: any) => {
diff --git a/src/Components/Patient/PatientCategorySelect.tsx b/src/Components/Patient/PatientCategorySelect.tsx
index 85a479e071b..e1383bc3aea 100644
--- a/src/Components/Patient/PatientCategorySelect.tsx
+++ b/src/Components/Patient/PatientCategorySelect.tsx
@@ -8,7 +8,7 @@ import { FormFieldBaseProps } from "../Form/FormFields/Utils";
* field.
*/
export default function PatientCategorySelect(
- props: FormFieldBaseProps
& { hideDescription?: boolean },
+ props: FormFieldBaseProps,
) {
return (
option.id}
optionLabel={(option) => option.text}
- optionDescription={
- props.hideDescription ? undefined : (option) => option.description
- }
+ optionDescription={(option) => option.description}
optionSelectedLabel={(option) => (
{
const { facilityId, patientId } = props;
const [isLoading, setIsLoading] = useState(false);
const [patientCategory, setPatientCategory] = useState
();
- const [bedType, setBedType] = useState("");
const { t } = useTranslation();
const { wartime_shifting } = useConfig();
@@ -121,9 +120,6 @@ export const ShiftCreate = (props: patientShiftProps) => {
setPatientCategory(
PATIENT_CATEGORIES.find((c) => c.text === patient_category)?.id,
);
- setBedType(
- data.last_consultation?.current_bed?.bed_object.bed_type || "",
- );
}
},
});
@@ -335,7 +331,6 @@ export const ShiftCreate = (props: patientShiftProps) => {
setPatientCategory(e.value)}
label="Patient Category"
diff --git a/src/Components/Shifting/ShiftDetailsUpdate.tsx b/src/Components/Shifting/ShiftDetailsUpdate.tsx
index b27a4f6d8f5..d327e402889 100644
--- a/src/Components/Shifting/ShiftDetailsUpdate.tsx
+++ b/src/Components/Shifting/ShiftDetailsUpdate.tsx
@@ -399,9 +399,6 @@ export const ShiftDetailsUpdate = (props: patientShiftProps) => {
required={true}
name="patient_category"
value={state.form.patient_category}
- hideDescription={
- consultationData.current_bed?.bed_object.bed_type !== "ICU"
- }
onChange={handleFormFieldChange}
label="Patient Category"
className="md:col-span-2"