Skip to content

Commit

Permalink
Capitalized patient names (#7773)
Browse files Browse the repository at this point in the history
* Capitalized names

* shifted to lodash

---------

Co-authored-by: Khavin Shankar <[email protected]>
  • Loading branch information
shivankacker and khavinshankar committed May 14, 2024
1 parent c82ab74 commit 191f6e3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
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 @@ -343,7 +343,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 @@ -218,7 +218,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 @@ -263,7 +263,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";
import { ILocalBodies } from "../ExternalResult/models.js";

const Loading = lazy(() => import("../Common/Loading"));
Expand Down Expand Up @@ -810,7 +811,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

0 comments on commit 191f6e3

Please sign in to comment.