From ec2239ed06bf62fdb9fa92a0ac013696d83d2c7c Mon Sep 17 00:00:00 2001 From: makombe Date: Mon, 29 Jul 2024 12:16:40 +0300 Subject: [PATCH 1/2] Correctly display Blood pressure values --- .../src/patient-summary/patient-summary.component.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/esm-care-panel-app/src/patient-summary/patient-summary.component.tsx b/packages/esm-care-panel-app/src/patient-summary/patient-summary.component.tsx index 43a50f716..454a8e0be 100644 --- a/packages/esm-care-panel-app/src/patient-summary/patient-summary.component.tsx +++ b/packages/esm-care-panel-app/src/patient-summary/patient-summary.component.tsx @@ -261,7 +261,9 @@ const PatientSummary: React.FC = ({ patientUuid }) => {

{t('bloodPressure', 'Blood pressure')}

- {data?.bloodPressure ? data?.bloodPressure : '--'} + + {data?.bloodPressure && data?.bpDiastolic ? `${data?.bloodPressure}/${data?.bpDiastolic}` : '--'} +

From f6932389cfb0e331217c3ee7e677edbbb28aa1ee Mon Sep 17 00:00:00 2001 From: makombe Date: Wed, 31 Jul 2024 22:47:44 +0300 Subject: [PATCH 2/2] Fix failing test --- __mocks__/patient-summary.mock.ts | 3 ++- .../src/patient-summary/patient-summary.component.test.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/__mocks__/patient-summary.mock.ts b/__mocks__/patient-summary.mock.ts index 22f088686..7e81fd908 100644 --- a/__mocks__/patient-summary.mock.ts +++ b/__mocks__/patient-summary.mock.ts @@ -13,7 +13,8 @@ export const mockPatient = { weight: '70 kg', height: '180 cm', bmi: '24.5', - bloodPressure: '120/80 mmHg', + bloodPressure: '120', + bpDiastolic: '80', oxygenSaturation: '98%', respiratoryRate: '16 breaths per minute', pulseRate: '72 beats per minute', diff --git a/packages/esm-care-panel-app/src/patient-summary/patient-summary.component.test.tsx b/packages/esm-care-panel-app/src/patient-summary/patient-summary.component.test.tsx index 1a25fc4bd..a87531530 100644 --- a/packages/esm-care-panel-app/src/patient-summary/patient-summary.component.test.tsx +++ b/packages/esm-care-panel-app/src/patient-summary/patient-summary.component.test.tsx @@ -86,7 +86,7 @@ describe('PatientSummary', () => { expect(screen.getByText(mockPatient.weight)).toBeInTheDocument(); expect(screen.getByText(mockPatient.height)).toBeInTheDocument(); expect(screen.getByText(mockPatient.bmi)).toBeInTheDocument(); - expect(screen.getByText(mockPatient.bloodPressure)).toBeInTheDocument(); + expect(screen.getByText(`${mockPatient.bloodPressure}/${mockPatient.bpDiastolic}`)).toBeInTheDocument(); expect(screen.getByText(mockPatient.oxygenSaturation)).toBeInTheDocument(); expect(screen.getByText(mockPatient.pulseRate)).toBeInTheDocument(); expect(screen.getByText(mockPatient.familyProtection)).toBeInTheDocument();