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

Minor Changes In Encounter Page #10017

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@
"criticality": "Criticality",
"csv_file_in_the_specified_format": "Select a CSV file in the specified format",
"current_address": "Current Address",
"current_organizations": "Current Organizations",
"current_password": "Current Password",
"current_role": "Current Role",
"current_status": "Current Status",
Expand Down Expand Up @@ -1360,6 +1361,7 @@
"next_week_short": "Next wk",
"no": "No",
"no_address_provided": "No address provided",
"no_allergies_recorded": "No allergies recorded",
"no_appointments": "No appointments found",
"no_attachments_found": "This communication has no attachments.",
"no_availabilities_yet": "No availabilities yet",
Expand Down Expand Up @@ -1391,6 +1393,7 @@
"no_notices_for_you": "No notices for you.",
"no_observations": "No Observations",
"no_ongoing_medications": "No Ongoing Medications",
"no_organizations_added_yet": "No organizations added yet",
"no_organizations_found": "No organizations found",
"no_organizations_found_matching": "No organizations found matching {{searchQuery}}",
"no_organizations_selected": "No organizations selected",
Expand Down
16 changes: 9 additions & 7 deletions src/components/Patient/ManageEncounterOrganizations.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { t } from "i18next";
import { Building, Loader2, Trash2 } from "lucide-react";
import { useState } from "react";
import { toast } from "sonner";
Expand Down Expand Up @@ -81,22 +82,21 @@ export default function ManageEncounterOrganizations({
{trigger || (
<Button variant="outline" size="sm">
<Building className="mr-2 h-4 w-4" />
Manage Organizations
{t("manage_organizations")}
</Button>
)}
</SheetTrigger>
<SheetContent>
<SheetHeader>
<SheetTitle>Manage Organizations</SheetTitle>
<SheetTitle>{t("manage_organizations")}</SheetTitle>
<SheetDescription>
Add or remove organizations from this encounter
{t("manage_organizations_description")}
AnveshNalimela marked this conversation as resolved.
Show resolved Hide resolved
</SheetDescription>
</SheetHeader>

<div className="space-y-6 py-4">
<div className="space-y-4">
<div className="space-y-4">
<h3 className="text-sm font-medium">Add Organization</h3>
<FacilityOrganizationSelector
facilityId={facilityId}
value={selectedOrg}
Expand All @@ -109,12 +109,14 @@ export default function ManageEncounterOrganizations({
disabled={!selectedOrg || isAdding}
>
{isAdding && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
Add Organization
{t("add_organizations")}
</Button>
</div>

<div className="space-y-4">
<h3 className="text-sm font-medium">Current Organizations</h3>
<h3 className="text-sm font-medium">
{t("current_organizations")}
</h3>
<div className="space-y-2">
{encounter.organizations.map((org) => (
<div
Expand Down Expand Up @@ -148,7 +150,7 @@ export default function ManageEncounterOrganizations({
))}
{encounter.organizations.length === 0 && (
<p className="text-sm text-muted-foreground">
No organizations added yet
{t("no_organizations_added_yet")}
</p>
)}
</div>
Expand Down
11 changes: 7 additions & 4 deletions src/components/Patient/allergy/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function AllergyList({ patientId, encounterId }: AllergyListProps) {
return (
<Card>
<CardHeader>
<CardTitle>Allergies</CardTitle>
<CardTitle>{t("allergies")}</CardTitle>
</CardHeader>
<CardContent>
<Skeleton className="h-[100px] w-full" />
Expand All @@ -50,10 +50,10 @@ export function AllergyList({ patientId, encounterId }: AllergyListProps) {
return (
<Card>
<CardHeader>
<CardTitle>Allergies</CardTitle>
<CardTitle>{t("allergies")}</CardTitle>
</CardHeader>
<CardContent>
<p className="text-muted-foreground">No allergies recorded</p>
<p className="text-muted-foreground">{t("no_allergies_recorded")}</p>
</CardContent>
</Card>
);
Expand Down Expand Up @@ -136,7 +136,10 @@ export function AllergyList({ patientId, encounterId }: AllergyListProps) {
className="w-4 h-4"
imageUrl={allergy.created_by.profile_picture_url}
/>
<span className="text-sm">{allergy.created_by.username}</span>
<span className="text-sm">
{allergy.created_by?.first_name}{" "}
{allergy.created_by?.last_name}
</span>
</TableCell>
</TableRow>
))}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Encounters/EncounterShow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ export const EncounterShow = (props: Props) => {
</Link>
</div>
</nav>
<div className="mt-4 w-full border-b-2 border-secondary-200">
<div className="mt-2 flex w-full flex-col md:flex-row">
<div className="mt-4 xl:mt-0 w-full border-b-2 border-secondary-200">
<div className="mt-2 xl:mt-0 flex w-full flex-col md:flex-row">
<div className="size-full rounded-lg border bg-white text-black shadow">
<PatientInfoCard
patient={encounterData.patient}
Expand Down
Loading