Skip to content

Commit

Permalink
Removes "Bed Status" for Domiciliary Care encounters
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed May 23, 2024
1 parent cd6ce2c commit 676f8df
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
9 changes: 7 additions & 2 deletions src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,11 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
) {
return null;
}

if (isUpdate && sectionTitle === "Bed Status") {
return null;
}

const isCurrent = currentSection === sectionTitle;
const section = sections[sectionTitle as ConsultationFormSection];
return (
Expand Down Expand Up @@ -1350,7 +1355,7 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
</div>
)}

{["A", "DC"].includes(state.form.suggestion) && !isUpdate && (
{state.form.suggestion === "A" && !isUpdate && (
<div className="col-span-6 mb-6" ref={fieldRef["bed"]}>
<FieldLabel>Bed</FieldLabel>
<BedSelect
Expand Down Expand Up @@ -1678,7 +1683,7 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
</div>
</div>
</form>
{isUpdate && (
{state.form.suggestion === "A" && isUpdate && (
<>
<div className="mx-auto mt-4 max-w-4xl rounded bg-white px-11 py-8">
{sectionTitle("Bed Status")}
Expand Down
16 changes: 9 additions & 7 deletions src/Components/Patient/PatientInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,15 @@ export default function PatientInfoCard(props: {
{category.toUpperCase()}
</div>
)}
<ButtonV2
ghost
onClick={() => setOpen(true)}
className="mt-1 px-[10px] py-1"
>
{bedDialogTitle}
</ButtonV2>
{consultation?.admitted && (
<ButtonV2
ghost
onClick={() => setOpen(true)}
className="mt-1 px-[10px] py-1"
>
{bedDialogTitle}
</ButtonV2>
)}
</div>
<div className="flex items-center justify-center">
<div
Expand Down

0 comments on commit 676f8df

Please sign in to comment.