From e172f62d4900fd6d086dc776cbc56f701d705225 Mon Sep 17 00:00:00 2001 From: Laurent Ouma <98098891+Omoshlawi@users.noreply.github.com> Date: Wed, 31 Jul 2024 21:13:35 +0300 Subject: [PATCH] Added link to pharmacy patient, cleaned up community pharmacy (#281) --- .../pharmacy-metrics-header.component.tsx | 118 +----------------- .../pharmacy-patients.component.tsx | 9 +- .../esm-pharmacy-app/translations/en.json | 1 - 3 files changed, 11 insertions(+), 117 deletions(-) diff --git a/packages/esm-pharmacy-app/src/pharmacy-metrics/pharmacy-metrics-header.component.tsx b/packages/esm-pharmacy-app/src/pharmacy-metrics/pharmacy-metrics-header.component.tsx index e943dc36..d9cb7e2d 100644 --- a/packages/esm-pharmacy-app/src/pharmacy-metrics/pharmacy-metrics-header.component.tsx +++ b/packages/esm-pharmacy-app/src/pharmacy-metrics/pharmacy-metrics-header.component.tsx @@ -1,9 +1,8 @@ -/* eslint-disable no-console */ +import { Button } from '@carbon/react'; +import { ArrowRight } from '@carbon/react/icons'; import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { ArrowRight } from '@carbon/react/icons'; import styles from './pharmacy-header.scss'; -import { Button, TextInput, Modal, Select, ComboBox, SelectItem, DatePickerInput, DatePicker } from '@carbon/react'; const MetricsHeader = () => { const { t } = useTranslation(); @@ -20,121 +19,10 @@ const MetricsHeader = () => { - setIsModalOpen(false)} - modalLabel="ADMIT BROUGHT IN BODY" - modalHeading="ADMISSION" - hasScrollingContent> - - - -
- -
- - - -
- { - console.log(e); - }} - id="carbon-combobox" - items={[ - 'Married Polygamous', - 'Married Monogamous', - 'Divorced', - 'Widowed', - 'Cohabiting', - 'Single', - 'Not Married', - ]} - downshiftProps={{ - onStateChange: () => { - console.log('the state has changed'); - }, - }} - titleText="Marital Status*" - /> -
-
- - - -
- -
- { - console.log(e); - }} - id="carbon-combobox" - items={['TB', 'Malaria']} - downshiftProps={{ - onStateChange: () => { - console.log('the state has changed'); - }, - }} - titleText="Cause of death*" - /> -
-
-
); }; diff --git a/packages/esm-pharmacy-app/src/pharmacy-tables/pharmacy-patients.component.tsx b/packages/esm-pharmacy-app/src/pharmacy-tables/pharmacy-patients.component.tsx index 378d1f80..f8563b1a 100644 --- a/packages/esm-pharmacy-app/src/pharmacy-tables/pharmacy-patients.component.tsx +++ b/packages/esm-pharmacy-app/src/pharmacy-tables/pharmacy-patients.component.tsx @@ -15,6 +15,7 @@ import { } from '@carbon/react'; import { Add, TrashCan } from '@carbon/react/icons'; import { + ConfigurableLink, ErrorState, UserHasAccess, isDesktop, @@ -92,7 +93,13 @@ export const PharmacyPatients: React.FC = () => { return { id: `${patient.uuid}`, openmrsId: patient.openmrsId, - name: patient.name, + name: ( + + {patient.name} + + ), age: patient.age ?? '--', sex: patient.gender ?? '--', contact: patient.telephoneContact ?? '--', diff --git a/packages/esm-pharmacy-app/translations/en.json b/packages/esm-pharmacy-app/translations/en.json index 1b6fb08e..bdd551be 100644 --- a/packages/esm-pharmacy-app/translations/en.json +++ b/packages/esm-pharmacy-app/translations/en.json @@ -8,7 +8,6 @@ "contact": "Contact", "countyDistrict": "County District", "dateMapped": "Date Mapped", - "enroll": "Enroll new body", "name": "NAME", "noCommunityPharmacyToList": "No Community Pharmacies to list.", "noPharmacyPatients": "No Pharmacy Patients to list.",