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

Capitalized patient names #7773

Merged
merged 3 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
4 changes: 3 additions & 1 deletion src/Components/Facility/DischargedPatientsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ const PatientListItem = ({ patient }: { patient: PatientModel }) => {
<CareIcon icon="l-user-injured" className="text-3xl text-gray-800" />
</div>
<div className="ml-5 flex flex-col">
<h2 className="text-lg font-bold text-black">{patient.name}</h2>
<h2 className="text-lg font-bold capitalize text-black">
{patient.name}
</h2>
<span className="text-sm font-medium text-gray-800">
{GENDER_TYPES.find((g) => g.id === patient.gender)?.text} -{" "}
{formatPatientAge(patient)}
Expand Down
4 changes: 3 additions & 1 deletion src/Components/Facility/DuplicatePatientDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ const DuplicatePatientDialog = (props: Props) => {
return (
<tr key={i}>
<td className={tdClass}>
<div className="font-semibold">{patient.name}</div>
<div className="font-semibold capitalize">
{patient.name}
</div>
<div className="break-words text-xs">
ID : {patient.patient_id}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export const PatientHome = (props: any) => {
<div className="flex h-full flex-col justify-between rounded-lg bg-white pb-5 pl-9 pt-11 shadow">
<div>
<div className="flex flex-row gap-4">
<h1 className="flex flex-row pb-3 text-2xl font-bold">
<h1 className="flex flex-row pb-3 text-2xl font-bold capitalize">
{patientData.name} - {formatPatientAge(patientData, true)}
</h1>
<div className="ml-auto mr-9 flex flex-wrap gap-3">
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Patient/PatientInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default function PatientInfoCard(props: {
</div>
<div className="flex items-center justify-center">
<div
className="mb-2 flex flex-col justify-center text-xl font-semibold lg:hidden"
className="mb-2 flex flex-col justify-center text-xl font-semibold capitalize lg:hidden"
id="patient-name-consultation"
>
{patient.name}
Expand Down Expand Up @@ -262,7 +262,7 @@ export default function PatientInfoCard(props: {
</div>
<div className="flex flex-col flex-wrap items-center justify-center lg:items-start lg:justify-normal">
<div
className="mb-2 hidden flex-row text-xl font-semibold lg:flex"
className="mb-2 hidden flex-row text-xl font-semibold capitalize lg:flex"
id="patient-name-consultation"
>
{patient.name}
Expand Down
3 changes: 2 additions & 1 deletion src/Components/Patient/PatientRegister.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import routes from "../../Redux/api.js";
import request from "../../Utils/request/request.js";
import SelectMenuV2 from "../Form/SelectMenuV2.js";
import Checkbox from "../Common/components/CheckBox.js";
import _ from "lodash";

const Loading = lazy(() => import("../Common/Loading"));
const PageTitle = lazy(() => import("../Common/PageTitle"));
Expand Down Expand Up @@ -800,7 +801,7 @@ export const PatientRegister = (props: PatientRegisterProps) => {
: null
: null,
test_type: formData.test_type,
name: formData.name,
name: _.startCase(_.toLower(formData.name)),
pincode: formData.pincode ? formData.pincode : undefined,
gender: Number(formData.gender),
nationality: formData.nationality,
Expand Down
Loading