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

Consultation update page form UI updated #9074

Closed
wants to merge 46 commits into from
Closed
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2be148b
Consultation update page form UI updated
modamaan Nov 10, 2024
d78ddf9
Lint issues solved
modamaan Nov 10, 2024
5cfc314
Badge component coderabbitai suggestion
modamaan Nov 10, 2024
6ac3d93
card component coderabbitai suggestion
modamaan Nov 10, 2024
f713b4f
lint issue again solved
modamaan Nov 10, 2024
860cd70
CriticalCarePreview updated
modamaan Nov 12, 2024
6e7a497
lucid-react icon removed deploy issue
modamaan Nov 12, 2024
ab7ff27
npm lucid-react uninstalled
modamaan Nov 12, 2024
3c5fcc9
Merge branch 'develop' into issues/9067/edit-form_ui
modamaan Nov 23, 2024
bfd8451
failing iisue solved
modamaan Nov 24, 2024
64f99af
Save local changes to ShiftDetails.tsx
modamaan Nov 24, 2024
1f27622
Merge branch 'issues/9067/edit-form_ui' of https://github.com/modamaa…
modamaan Nov 24, 2024
3dbc4f6
Save local changes to ShiftDetails.tsx
modamaan Nov 24, 2024
87d1cc6
Merge remote-tracking branch 'upstream/develop' into issues/9067/edit…
modamaan Nov 30, 2024
c1a0abe
merge conflict
modamaan Nov 30, 2024
4705c41
merge conflict
modamaan Dec 6, 2024
dfcca36
code corrected
modamaan Dec 6, 2024
d2bb301
custom separator removed
modamaan Dec 6, 2024
d4c350c
Lint issue solved
modamaan Dec 6, 2024
075c4bf
custom component src/components/ui/separator.tsx removed
modamaan Dec 6, 2024
bfac22a
Ensure the box is not displayed when there is no data
modamaan Dec 6, 2024
fc3cbc8
Cypress issue
modamaan Dec 7, 2024
b1f9151
Cypress (3) issue
modamaan Dec 7, 2024
c39ba72
Cypress (3) issue again
modamaan Dec 7, 2024
7838528
Merge remote-tracking branch 'upstream/develop' into issues/9067/edit…
modamaan Dec 11, 2024
ae15064
Card component
modamaan Dec 11, 2024
e27d9c1
Tessting deploy
modamaan Dec 11, 2024
bb36216
cypress testing
modamaan Dec 13, 2024
37d2f26
Merge remote-tracking branch 'upstream/develop' into issues/9067/edit…
modamaan Dec 13, 2024
46e982e
Merge branch 'develop' into issues/9067/edit-form_ui
modamaan Dec 13, 2024
5334d0b
Badge component issue
modamaan Dec 13, 2024
df8150e
Merge remote-tracking branch 'upstream/develop' into issues/9067/edit…
modamaan Dec 13, 2024
264de3e
Merge branch 'issues/9067/edit-form_ui' of https://github.com/modamaa…
modamaan Dec 13, 2024
31e6ab7
Cypress timeout issue
modamaan Dec 13, 2024
7149c93
Cypress timeout issue try
modamaan Dec 13, 2024
318e688
removed changes causes cypress test issue
modamaan Dec 15, 2024
5da968e
patientLogupdate changes removed
modamaan Dec 15, 2024
94728f1
changes removed
modamaan Dec 15, 2024
7ac0e8d
Merge remote-tracking branch 'upstream/develop' into issues/9067/edit…
modamaan Dec 15, 2024
a60f993
Merge branch 'develop' into issues/9067/edit-form_ui
modamaan Dec 15, 2024
d146152
Merge branch 'issues/9067/edit-form_ui' of https://github.com/modamaa…
modamaan Dec 15, 2024
5734e2e
Merge remote-tracking branch 'upstream/develop' into issues/9067/edit…
modamaan Dec 17, 2024
82a7a69
badge ui component corrected
modamaan Dec 17, 2024
66a8b0b
cypress timeout
modamaan Dec 17, 2024
933632c
cypress timeout increased
modamaan Dec 17, 2024
2e4ad9c
cypress timeout issue
modamaan Dec 17, 2024
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
260 changes: 163 additions & 97 deletions src/components/Patient/DailyRoundListDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { useTranslation } from "react-i18next";

import CareIcon from "@/CAREUI/icons/CareIcon";

import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";

import Loading from "@/components/Common/Loading";
import Page from "@/components/Common/Page";
Expand Down Expand Up @@ -41,17 +43,27 @@ export const DailyRoundListDetails = (props: any) => {
title={t("log_update") + ` #${id}`}
backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/log_updates`}
>
<div
className="mt-4 h-full rounded-lg border bg-white p-4 text-black shadow hover:border-primary-500"
id="consultation-preview"
>
<div className="flex justify-between">
<div className="max-w-md">
<div>
<span className="font-semibold leading-relaxed">
Patient Category:{" "}
</span>
{dailyRoundListDetailsData.patient_category ?? "-"}
<Card className="w-full max-w-8xl mx-auto my-5">
<CardHeader className="flex flex-col sm:flex-row items-start sm:items-center justify-between space-y-2 sm:space-y-0 pb-4">
<div className="space-y-1">
<CardTitle className="text-md">Patient Details</CardTitle>
<div className="flex flex-col sm:flex-row sm:items-center gap-2">
<div>
<span className=" leading-relaxed text-md font-medium">
Patient Category:{" "}
</span>
<Badge variant={"secondary"}>
{dailyRoundListDetailsData.patient_category ?? "-"}
</Badge>
</div>
<div className="text-sm">
<span className=" text-muted-foreground text-md font-medium">
Taken at:{" "}
</span>
{dailyRoundListDetailsData.taken_at
? formatDateTime(dailyRoundListDetailsData.taken_at)
: "-"}
</div>
</div>
</div>

Expand All @@ -67,103 +79,157 @@ export const DailyRoundListDetails = (props: any) => {
</Button>
</div>
</div>
</div>

<div className="mt-4 grid grid-cols-1 gap-4 md:grid-cols-2">
<div>
<span className="font-semibold leading-relaxed">Temperature: </span>
{dailyRoundListDetailsData.temperature ?? "-"}
</div>
<div>
<span className="font-semibold leading-relaxed">Taken at: </span>
{dailyRoundListDetailsData.taken_at
? formatDateTime(dailyRoundListDetailsData.taken_at)
: "-"}
</div>
<div>
<span className="font-semibold leading-relaxed">SpO2: </span>
{dailyRoundListDetailsData.ventilator_spo2 ?? "-"}
</div>
<div className="capitalize md:col-span-2">
<span className="font-semibold leading-relaxed">
Admitted To *:{" "}
</span>
{dailyRoundListDetailsData.admitted_to ?? "-"}
</div>
<div className="md:col-span-2">
<span className="font-semibold leading-relaxed">
Physical Examination Info:{" "}
</span>
{dailyRoundListDetailsData.physical_examination_info ?? "-"}
</div>
<div className="md:col-span-2">
<span className="font-semibold leading-relaxed">
Other Details:{" "}
</span>
{dailyRoundListDetailsData.other_details ?? "-"}
</div>
<div className="md:col-span-2">
<span className="font-semibold leading-relaxed">Pulse(bpm): </span>
{dailyRoundListDetailsData.pulse ?? "-"}
</CardHeader>
<CardContent className="grid gap-6">
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
<div className="flex items-center gap-4 rounded-lg border p-4">
<div>
<p className="text-sm font-medium leading-none mb-1">
Temperature:{" "}
</p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.temperature ?? "-"}
</p>
</div>
</div>
<div className="flex items-center gap-4 rounded-lg border p-4">
<div>
<p className="text-sm font-medium leading-none mb-1">SpO2: </p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.ventilator_spo2 ?? "-"}
</p>
</div>
</div>
<div className="flex items-center gap-4 rounded-lg border p-4">
<div>
<p className="text-sm font-medium leading-none mb-1">
Pulse (bpm):{" "}
</p>
<p className="text-sm text-muted-foreground">
{" "}
{dailyRoundListDetailsData.pulse ?? "-"}
</p>
</div>
</div>
</div>
<div className="md:col-span-2">
<span className="font-semibold leading-relaxed">BP</span>
<div className="flex flex-row space-x-20">
<div className="flex">
<span className="font-semibold leading-relaxed">

<div className="border-t border-gray-300 my-4"></div>

<div className="space-y-4">
<h3 className="text-lg font-medium">Blood Pressure</h3>
<div className="grid gap-4 sm:grid-cols-2">
<div className="rounded-lg border p-4">
<p className="text-sm font-medium leading-none mb-1">
Systolic:{" "}
</span>
{dailyRoundListDetailsData.bp?.systolic ?? "-"}
</p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.bp?.systolic ?? "-"}
</p>
</div>
<div className="flex">
{" "}
<span className="font-semibold leading-relaxed">
Diastolic:
</span>
{dailyRoundListDetailsData.bp?.diastolic ?? "-"}
<div className="rounded-lg border p-4">
<p className="text-sm font-medium leading-none mb-1">
Diastolic:{" "}
</p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.bp?.diastolic ?? "-"}
</p>
</div>
</div>
</div>

<div className="md:col-span-2">
<span className="font-semibold leading-relaxed">
Respiratory Rate (bpm):
</span>
<div className="grid gap-6 sm:grid-cols-2">
<div className="space-y-4">
<h3 className="text-lg font-medium">Respiratory Information</h3>
<div className="grid gap-4">
<div className="flex items-center gap-4 rounded-lg border p-4">
<div>
<p className="text-sm font-medium leading-none mb-1">
Respiratory Rate (bpm):{" "}
</p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.resp ?? "-"}
</p>
</div>
</div>
<div className="flex items-center gap-4 rounded-lg border p-4">
<div>
<p className="text-sm font-medium leading-none mb-1">
Rhythm:{" "}
</p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.rhythm ?? "-"}
</p>
</div>
</div>
<div className="flex items-center gap-4 rounded-lg border p-4">
<div>
<p className="text-sm font-medium leading-none mb-1">
Rhythm Description:{" "}
</p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.rhythm_detail ?? "-"}
</p>
</div>
</div>
</div>
</div>

{dailyRoundListDetailsData.resp ?? "-"}
</div>
<div className="md:col-span-2">
<span className="font-semibold leading-relaxed">Rhythm: </span>
{dailyRoundListDetailsData.rhythm ?? "-"}
</div>
<div className="md:col-span-2">
<span className="font-semibold leading-relaxed">
Rhythm Description:{" "}
</span>
{dailyRoundListDetailsData.rhythm_detail ?? "-"}
<div className="space-y-4">
<h3 className="text-lg font-medium">Additional Information</h3>
<div className="grid gap-4">
<div className="rounded-lg border p-4">
<p className="text-sm font-medium leading-none mb-1">
Admitted To*:{" "}
</p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.admitted_to ?? "-"}
</p>
</div>
<div className="rounded-lg border p-4">
<p className="text-sm font-medium leading-none mb-1">
Level of Consciousness:{" "}
</p>
<p className="text-sm text-muted-foreground">
{" "}
{(dailyRoundListDetailsData.consciousness_level &&
t(
`CONSCIOUSNESS_LEVEL__${dailyRoundListDetailsData.consciousness_level}`,
)) ||
"-"}
</p>
</div>
<div className="rounded-lg border p-4">
<p className="text-sm font-medium leading-none mb-1">
Other Details:{" "}
</p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.other_details ?? "-"}
</p>
</div>
</div>
</div>
</div>
<div className="md:col-span-2">
<span className="font-semibold leading-relaxed">
Level Of Consciousness:{" "}
</span>
{(dailyRoundListDetailsData.consciousness_level &&
t(
`CONSCIOUSNESS_LEVEL__${dailyRoundListDetailsData.consciousness_level}`,
)) ||
"-"}

<div className="rounded-lg border p-4">
<p className="text-sm font-medium"> Physical Examination Info: </p>
<p className="text-sm text-muted-foreground">
{dailyRoundListDetailsData.physical_examination_info ?? "-"}
</p>
</div>
<div>
<span className="font-semibold leading-relaxed">
Recommend Discharge:{" "}
</span>
{dailyRoundListDetailsData.recommend_discharge ? (
<span className="badge badge-pill badge-warning">Yes</span>
) : (
<span className="badge badge-pill badge-secondary">No</span>
)}

<div className="flex items-center gap-2">
<span className="text-sm font-medium">Recommend Discharge: </span>
<div>
{" "}
{dailyRoundListDetailsData.recommend_discharge ? (
<span className="badge badge-pill badge-warning">Yes</span>
) : (
<span className="badge badge-pill badge-secondary">No</span>
)}
</div>
modamaan marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
</div>
</CardContent>
</Card>
</Page>
);
};
Loading