From bac5096a56f2b53d2cc1b05f55755802f364c8ba Mon Sep 17 00:00:00 2001 From: Vijay Kv Date: Mon, 9 Sep 2024 17:02:34 +0530 Subject: [PATCH] (feat) O3-3921: Change `End date` to `Discontinue date` in medications table (#2003) * (feat) : Changes text to DISCONTINUED DATE * update unit tests for medications * Remove spacers * Remove translation updates for non-en translation files --------- Co-authored-by: Dennis Kigen --- .../src/active-medications/active-medications.test.tsx | 2 +- .../src/components/medications-details-table.component.tsx | 4 +++- packages/esm-patient-medications-app/translations/am.json | 1 - packages/esm-patient-medications-app/translations/ar.json | 1 - packages/esm-patient-medications-app/translations/en.json | 2 +- packages/esm-patient-medications-app/translations/es.json | 1 - packages/esm-patient-medications-app/translations/fr.json | 1 - packages/esm-patient-medications-app/translations/he.json | 1 - packages/esm-patient-medications-app/translations/km.json | 1 - packages/esm-patient-medications-app/translations/zh.json | 1 - packages/esm-patient-medications-app/translations/zh_CN.json | 1 - 11 files changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/esm-patient-medications-app/src/active-medications/active-medications.test.tsx b/packages/esm-patient-medications-app/src/active-medications/active-medications.test.tsx index cecced2388..8a2708432d 100644 --- a/packages/esm-patient-medications-app/src/active-medications/active-medications.test.tsx +++ b/packages/esm-patient-medications-app/src/active-medications/active-medications.test.tsx @@ -90,7 +90,7 @@ describe('ActiveMedications', () => { const expectedTableRows = [ /14-Aug-2023 Admin User Acetaminophen 325 mg — 325mg — tablet DOSE 2 tablet — oral — twice daily — indefinite duration — take it sometimes INDICATION Bad boo-boo/, - /14-Aug-2023 Admin User Acetaminophen 325 mg — 325mg — tablet DOSE 2 tablet — oral — twice daily — indefinite duration INDICATION No good — END DATE 14-Aug-2023/, + /14-Aug-2023 Admin User Acetaminophen 325 mg — 325mg — tablet DOSE 2 tablet — oral — twice daily — indefinite duration INDICATION No good — DISCONTINUED DATE 14-Aug-2023/, /14-Aug-2023 Admin User Sulfacetamide 0.1 — 10% DOSE 1 application — for {{duration}} weeks — REFILLS 1 — apply it INDICATION Pain — QUANTITY 8 Application/, /14-Aug-2023 Admin User Aspirin 162.5mg — 162.5mg — tablet DOSE 1 tablet — oral — once daily — for {{duration}} days INDICATION Heart — QUANTITY 30 Tablet/, ]; diff --git a/packages/esm-patient-medications-app/src/components/medications-details-table.component.tsx b/packages/esm-patient-medications-app/src/components/medications-details-table.component.tsx index 2765dda6ff..de272b9e50 100644 --- a/packages/esm-patient-medications-app/src/components/medications-details-table.component.tsx +++ b/packages/esm-patient-medications-app/src/components/medications-details-table.component.tsx @@ -142,7 +142,9 @@ const MedicationsDetailsTable: React.FC = ({ ) : null} {medication.dateStopped ? ( - — {t('endDate', 'End date').toUpperCase()}{' '} + + — {t('discontinuedDate', 'Discontinued date').toUpperCase()} + {formatDate(new Date(medication.dateStopped))} ) : null} diff --git a/packages/esm-patient-medications-app/translations/am.json b/packages/esm-patient-medications-app/translations/am.json index 31cedbe89a..76c37b5641 100644 --- a/packages/esm-patient-medications-app/translations/am.json +++ b/packages/esm-patient-medications-app/translations/am.json @@ -27,7 +27,6 @@ "editDoseComboBoxTitle": "Dose", "editFrequencyComboBoxTitle": "Frequency", "editRouteComboBoxTitle": "Route", - "endDate": "End date", "error": "Error", "errorFetchingDrugOrderTemplates": "Error fetching drug order templates", "errorFetchingDrugResults": "Error fetching results for \"{{searchTerm}}\"", diff --git a/packages/esm-patient-medications-app/translations/ar.json b/packages/esm-patient-medications-app/translations/ar.json index cc265c3a90..54b7bf569e 100644 --- a/packages/esm-patient-medications-app/translations/ar.json +++ b/packages/esm-patient-medications-app/translations/ar.json @@ -27,7 +27,6 @@ "editDoseComboBoxTitle": "الجرعة", "editFrequencyComboBoxTitle": "التكرار", "editRouteComboBoxTitle": "الطريقة", - "endDate": "تاريخ الانتهاء", "error": "خطأ", "errorFetchingDrugOrderTemplates": "خطأ في جلب قوالب طلب الدواء", "errorFetchingDrugResults": "خطأ في جلب النتائج لـ \"{{searchTerm}}\"", diff --git a/packages/esm-patient-medications-app/translations/en.json b/packages/esm-patient-medications-app/translations/en.json index 31cedbe89a..127717645b 100644 --- a/packages/esm-patient-medications-app/translations/en.json +++ b/packages/esm-patient-medications-app/translations/en.json @@ -11,6 +11,7 @@ "directlyAddToBasket": "Add to basket", "discard": "Discard", "discontinue": "Discontinue", + "discontinuedDate": "Discontinued date", "dispensingInformation": "3. Dispensing instructions", "dosageInstructions": "1. Dosage instructions", "dosageRequiredErrorMessage": "A dosage is required", @@ -27,7 +28,6 @@ "editDoseComboBoxTitle": "Dose", "editFrequencyComboBoxTitle": "Frequency", "editRouteComboBoxTitle": "Route", - "endDate": "End date", "error": "Error", "errorFetchingDrugOrderTemplates": "Error fetching drug order templates", "errorFetchingDrugResults": "Error fetching results for \"{{searchTerm}}\"", diff --git a/packages/esm-patient-medications-app/translations/es.json b/packages/esm-patient-medications-app/translations/es.json index 3dbe4504c1..82db7aea91 100644 --- a/packages/esm-patient-medications-app/translations/es.json +++ b/packages/esm-patient-medications-app/translations/es.json @@ -27,7 +27,6 @@ "editDoseComboBoxTitle": "Dosis", "editFrequencyComboBoxTitle": "Frecuencia", "editRouteComboBoxTitle": "Ruta", - "endDate": "Fecha de finalización", "error": "Error", "errorFetchingDrugOrderTemplates": "Error en la obtención de plantillas de pedidos de medicamentos", "errorFetchingDrugResults": "Error al buscar resultados para \"{{searchTerm}}\"", diff --git a/packages/esm-patient-medications-app/translations/fr.json b/packages/esm-patient-medications-app/translations/fr.json index 31cedbe89a..76c37b5641 100644 --- a/packages/esm-patient-medications-app/translations/fr.json +++ b/packages/esm-patient-medications-app/translations/fr.json @@ -27,7 +27,6 @@ "editDoseComboBoxTitle": "Dose", "editFrequencyComboBoxTitle": "Frequency", "editRouteComboBoxTitle": "Route", - "endDate": "End date", "error": "Error", "errorFetchingDrugOrderTemplates": "Error fetching drug order templates", "errorFetchingDrugResults": "Error fetching results for \"{{searchTerm}}\"", diff --git a/packages/esm-patient-medications-app/translations/he.json b/packages/esm-patient-medications-app/translations/he.json index 5d96fdbb55..bc87583f8e 100644 --- a/packages/esm-patient-medications-app/translations/he.json +++ b/packages/esm-patient-medications-app/translations/he.json @@ -27,7 +27,6 @@ "editDoseComboBoxTitle": "מינון", "editFrequencyComboBoxTitle": "תדירות", "editRouteComboBoxTitle": "דרך", - "endDate": "תאריך סיום", "error": "שגיאה", "errorFetchingDrugOrderTemplates": "שגיאה בקבלת תבניות הזמנת תרופות", "errorFetchingDrugResults": "שגיאה בקבלת תוצאות עבור \"{{searchTerm}}\"", diff --git a/packages/esm-patient-medications-app/translations/km.json b/packages/esm-patient-medications-app/translations/km.json index 7fc926b314..b6e78125cc 100644 --- a/packages/esm-patient-medications-app/translations/km.json +++ b/packages/esm-patient-medications-app/translations/km.json @@ -27,7 +27,6 @@ "editDoseComboBoxTitle": "បញ្ចូលកំរិតប្រើប្រាស់", "editFrequencyComboBoxTitle": "បញ្ចូលភាពញឹកញាប់នៃការមកពិនិត្យជំងឺ", "editRouteComboBoxTitle": "បញ្ចូល ផ្លូវបញ្ចូលថ្នាំ", - "endDate": "កាលបរិច្ឆេទបញ្ចប់", "error": "កំហុស/លំអៀង", "errorFetchingDrugOrderTemplates": "មានបញ្ហាក្នុងការទាញយកទម្រង់គំរូវេជ្ជបញ្ជាសម្រាប់ឱសថ", "errorFetchingDrugResults": "មានបញ្ហាក្នុងការទាញយកលទ្ធផលសម្រាប់ \"{{searchTerm}}\"", diff --git a/packages/esm-patient-medications-app/translations/zh.json b/packages/esm-patient-medications-app/translations/zh.json index cb09b52c94..8c70032db8 100644 --- a/packages/esm-patient-medications-app/translations/zh.json +++ b/packages/esm-patient-medications-app/translations/zh.json @@ -27,7 +27,6 @@ "editDoseComboBoxTitle": "剂量", "editFrequencyComboBoxTitle": "频率", "editRouteComboBoxTitle": "途径", - "endDate": "结束日期", "error": "错误", "errorFetchingDrugOrderTemplates": "获取药物医嘱模板时出现错误", "errorFetchingDrugResults": "获取“{{searchTerm}}”的结果时出现错误", diff --git a/packages/esm-patient-medications-app/translations/zh_CN.json b/packages/esm-patient-medications-app/translations/zh_CN.json index cb09b52c94..8c70032db8 100644 --- a/packages/esm-patient-medications-app/translations/zh_CN.json +++ b/packages/esm-patient-medications-app/translations/zh_CN.json @@ -27,7 +27,6 @@ "editDoseComboBoxTitle": "剂量", "editFrequencyComboBoxTitle": "频率", "editRouteComboBoxTitle": "途径", - "endDate": "结束日期", "error": "错误", "errorFetchingDrugOrderTemplates": "获取药物医嘱模板时出现错误", "errorFetchingDrugResults": "获取“{{searchTerm}}”的结果时出现错误",