@kenyaemr/esm-patient-list-management-app 8.0.1-pre.99 → 8.0.3-pre.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +22 -23
- package/dist/130.js +1 -1
- package/dist/130.js.LICENSE.txt +2 -0
- package/dist/130.js.map +1 -1
- package/dist/233.js +2 -0
- package/dist/233.js.map +1 -0
- package/dist/271.js +1 -2
- package/dist/319.js +1 -1
- package/dist/325.js +1 -0
- package/dist/325.js.map +1 -0
- package/dist/37.js +1 -1
- package/dist/37.js.map +1 -1
- package/dist/455.js +1 -0
- package/dist/455.js.map +1 -0
- package/dist/460.js +1 -1
- package/dist/574.js +1 -1
- package/dist/644.js +1 -1
- package/dist/658.js +2 -0
- package/dist/{271.js.LICENSE.txt → 658.js.LICENSE.txt} +10 -0
- package/dist/658.js.map +1 -0
- package/dist/757.js +1 -1
- package/dist/788.js +1 -1
- package/dist/807.js +1 -1
- package/dist/814.js +1 -0
- package/dist/814.js.map +1 -0
- package/dist/833.js +1 -1
- package/dist/kenyaemr-esm-patient-list-management-app.js +1 -1
- package/dist/kenyaemr-esm-patient-list-management-app.js.buildmanifest.json +116 -143
- package/dist/kenyaemr-esm-patient-list-management-app.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package-lock.json +5901 -0
- package/package.json +2 -2
- package/src/add-patient/add-patient.component.tsx +81 -152
- package/src/add-patient/add-patient.scss +73 -4
- package/src/add-patient/add-patient.test.tsx +100 -0
- package/src/add-patient-to-patient-list-menu-item.component.tsx +1 -0
- package/src/add-patient-to-patient-list-menu-item.test.tsx +5 -1
- package/src/api/api-remote.ts +90 -2
- package/src/api/types.ts +7 -0
- package/src/lists-dashboard/lists-dashboard.component.tsx +22 -16
- package/src/lists-dashboard/lists-dashboard.scss +6 -0
- package/src/routes.json +6 -4
- package/translations/am.json +0 -1
- package/translations/ar.json +0 -1
- package/translations/en.json +2 -3
- package/translations/es.json +0 -1
- package/translations/fr.json +35 -36
- package/translations/he.json +0 -1
- package/translations/km.json +0 -1
- package/translations/zh.json +0 -1
- package/translations/zh_CN.json +0 -1
- package/dist/112.js +0 -1
- package/dist/112.js.map +0 -1
- package/dist/255.js +0 -2
- package/dist/255.js.map +0 -1
- package/dist/271.js.map +0 -1
- package/dist/382.js +0 -1
- package/dist/382.js.map +0 -1
- package/dist/384.js +0 -1
- package/dist/635.js +0 -1
- package/dist/635.js.map +0 -1
- package/dist/729.js +0 -1
- package/dist/729.js.map +0 -1
- package/src/header/header.component.tsx +0 -52
- package/src/illo.component.tsx +0 -25
- /package/dist/{255.js.LICENSE.txt → 233.js.LICENSE.txt} +0 -0
|
@@ -2,12 +2,12 @@ import React, { useMemo, useState } from 'react';
|
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { useLocation } from 'react-router-dom';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { Tab, Tabs, TabList } from '@carbon/react';
|
|
6
|
-
import {
|
|
5
|
+
import { Tab, Tabs, TabList, Button } from '@carbon/react';
|
|
6
|
+
import { Add } from '@carbon/react/icons';
|
|
7
|
+
import { PageHeader, PageHeaderContent, PatientListsPictogram } from '@openmrs/esm-framework';
|
|
7
8
|
import { type PatientListFilter, PatientListType } from '../api/types';
|
|
8
9
|
import { useAllPatientLists } from '../api/hooks';
|
|
9
10
|
import CreateEditPatientList from '../create-edit-patient-list/create-edit-list.component';
|
|
10
|
-
import Header from '../header/header.component';
|
|
11
11
|
import ListsTable from '../lists-table/lists-table.component';
|
|
12
12
|
import styles from './lists-dashboard.scss';
|
|
13
13
|
|
|
@@ -42,19 +42,13 @@ const ListsDashboard: React.FC = () => {
|
|
|
42
42
|
const patientListFilter = usePatientListFilterForCurrentTab(selectedTab);
|
|
43
43
|
const { patientLists, isLoading, error, mutate } = useAllPatientLists(patientListFilter);
|
|
44
44
|
const { search } = useLocation();
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
.slice(1)
|
|
50
|
-
.split('&')
|
|
51
|
-
?.map((searchParam) => searchParam?.split('=')),
|
|
52
|
-
)['new_cohort'] === 'true';
|
|
45
|
+
const [showCreatePatientList, setShowCreatePatientList] = useState(!!search);
|
|
46
|
+
const handleShowNewListOverlay = () => {
|
|
47
|
+
setShowCreatePatientList(true);
|
|
48
|
+
};
|
|
53
49
|
|
|
54
50
|
const handleHideNewListOverlay = () => {
|
|
55
|
-
|
|
56
|
-
to: window.getOpenmrsSpaBase() + 'home/patient-lists',
|
|
57
|
-
});
|
|
51
|
+
setShowCreatePatientList(false);
|
|
58
52
|
};
|
|
59
53
|
|
|
60
54
|
const tableHeaders = [
|
|
@@ -67,7 +61,19 @@ const ListsDashboard: React.FC = () => {
|
|
|
67
61
|
return (
|
|
68
62
|
<main className={classnames('omrs-main-content', styles.dashboardContainer)}>
|
|
69
63
|
<section className={styles.dashboard}>
|
|
70
|
-
<
|
|
64
|
+
<PageHeader>
|
|
65
|
+
<PageHeaderContent title={t('patientLists', 'Patient lists')} illustration={<PatientListsPictogram />} />
|
|
66
|
+
<Button
|
|
67
|
+
className={styles.newListButton}
|
|
68
|
+
data-openmrs-role="New List"
|
|
69
|
+
kind="ghost"
|
|
70
|
+
iconDescription="Add"
|
|
71
|
+
renderIcon={(props) => <Add {...props} size={16} />}
|
|
72
|
+
onClick={handleShowNewListOverlay}
|
|
73
|
+
size="sm">
|
|
74
|
+
{t('newList', 'New list')}
|
|
75
|
+
</Button>
|
|
76
|
+
</PageHeader>
|
|
71
77
|
<Tabs
|
|
72
78
|
className={styles.tabs}
|
|
73
79
|
onChange={({ selectedIndex }) => {
|
|
@@ -95,7 +101,7 @@ const ListsDashboard: React.FC = () => {
|
|
|
95
101
|
</div>
|
|
96
102
|
</section>
|
|
97
103
|
<section>
|
|
98
|
-
{
|
|
104
|
+
{showCreatePatientList && <CreateEditPatientList close={handleHideNewListOverlay} onSuccess={() => mutate()} />}
|
|
99
105
|
</section>
|
|
100
106
|
</main>
|
|
101
107
|
);
|
package/src/routes.json
CHANGED
|
@@ -23,14 +23,16 @@
|
|
|
23
23
|
"name": "list-details-table",
|
|
24
24
|
"component": "listDetailsTable"
|
|
25
25
|
},
|
|
26
|
-
{
|
|
27
|
-
"name": "add-patient-to-patient-list-modal",
|
|
28
|
-
"component": "addPatientToListModal"
|
|
29
|
-
},
|
|
30
26
|
{
|
|
31
27
|
"name": "add-patient-to-patient-list-button",
|
|
32
28
|
"slot": "patient-actions-slot",
|
|
33
29
|
"component": "addPatientToPatientListMenuItem"
|
|
34
30
|
}
|
|
31
|
+
],
|
|
32
|
+
"modals": [
|
|
33
|
+
{
|
|
34
|
+
"name": "add-patient-to-patient-list-modal",
|
|
35
|
+
"component": "addPatientToListModal"
|
|
36
|
+
}
|
|
35
37
|
]
|
|
36
38
|
}
|
package/translations/am.json
CHANGED
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"errorDeletingList": "Error deleting patient list",
|
|
30
30
|
"errorRemovingPatientFromList": "Failed to remove patient from list",
|
|
31
31
|
"errorUpdatingList": "Error updating list",
|
|
32
|
-
"home": "Home",
|
|
33
32
|
"identifier": "Identifier",
|
|
34
33
|
"items": "items",
|
|
35
34
|
"itemsDisplayed": "{{numberOfItemsDisplayed}} items",
|
package/translations/ar.json
CHANGED
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"errorDeletingList": "Error deleting patient list",
|
|
30
30
|
"errorRemovingPatientFromList": "Failed to remove patient from list",
|
|
31
31
|
"errorUpdatingList": "Error updating list",
|
|
32
|
-
"home": "الرئيسية",
|
|
33
32
|
"identifier": "المعرف",
|
|
34
33
|
"items": "العناصر",
|
|
35
34
|
"itemsDisplayed": "{{numberOfItemsDisplayed}} items",
|
package/translations/en.json
CHANGED
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"errorDeletingList": "Error deleting patient list",
|
|
30
30
|
"errorRemovingPatientFromList": "Failed to remove patient from list",
|
|
31
31
|
"errorUpdatingList": "Error updating list",
|
|
32
|
-
"home": "Home",
|
|
33
32
|
"identifier": "Identifier",
|
|
34
33
|
"items": "items",
|
|
35
34
|
"itemsDisplayed": "{{numberOfItemsDisplayed}} items",
|
|
@@ -48,11 +47,10 @@
|
|
|
48
47
|
"newPatientListNameLabel": "List name",
|
|
49
48
|
"nextPage": "Next page",
|
|
50
49
|
"noMatchingLists": "No matching lists to display",
|
|
50
|
+
"noMatchingListsFound": "No matching lists found",
|
|
51
51
|
"noMatchingPatients": "No matching patients to display",
|
|
52
52
|
"noOfPatients": "No. of patients",
|
|
53
|
-
"noPatientListFound": "No patient list found",
|
|
54
53
|
"noPatientsInList": "There are no patients in this list",
|
|
55
|
-
"offlinePatients": "Offline patients",
|
|
56
54
|
"openPatientList": "Add to list",
|
|
57
55
|
"patientListMemberCount_one": "This list has {{count}} patient",
|
|
58
56
|
"patientListMemberCount_other": "This list has {{count}} patients",
|
|
@@ -78,6 +76,7 @@
|
|
|
78
76
|
"successfullyAdded": "Successfully added",
|
|
79
77
|
"systemDefined": "system-defined",
|
|
80
78
|
"systemLists": "System lists",
|
|
79
|
+
"trySearchingForADifferentList": "Try searching for a different list",
|
|
81
80
|
"unstarList": "Unstar list",
|
|
82
81
|
"updated": "Updated",
|
|
83
82
|
"userDefined": "user-defined"
|
package/translations/es.json
CHANGED
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"errorDeletingList": "Error deleting patient list",
|
|
30
30
|
"errorRemovingPatientFromList": "Failed to remove patient from list",
|
|
31
31
|
"errorUpdatingList": "Error updating list",
|
|
32
|
-
"home": "Inicio",
|
|
33
32
|
"identifier": "Identificador",
|
|
34
33
|
"items": "elementos",
|
|
35
34
|
"itemsDisplayed": "{{numberOfItemsDisplayed}} items",
|
package/translations/fr.json
CHANGED
|
@@ -5,41 +5,40 @@
|
|
|
5
5
|
"allLists": "Toutes les listes",
|
|
6
6
|
"backToListsPage": "Retour sur la page des listes",
|
|
7
7
|
"cancel": "Annuler",
|
|
8
|
-
"checkFilters": "
|
|
8
|
+
"checkFilters": "Vérifiez les filtres ci-dessus",
|
|
9
9
|
"configureList": "Configurez votre liste de patients à l'aide des champs ci-dessous",
|
|
10
|
-
"confirmDeletePatientList": "
|
|
11
|
-
"created": "
|
|
10
|
+
"confirmDeletePatientList": "Êtes-vous sûr de vouloir supprimer cette liste de patients?",
|
|
11
|
+
"created": "Créé(e)",
|
|
12
12
|
"createdOn": "Créé le",
|
|
13
13
|
"createList": "Créer une liste",
|
|
14
14
|
"createNewPatientList": "Créer une nouvelle liste de patients",
|
|
15
|
-
"createPatientList": "
|
|
15
|
+
"createPatientList": "Créer une liste de patients",
|
|
16
16
|
"deleted": "Supprimé",
|
|
17
17
|
"deletedPatientList": "Liste des patients supprimés",
|
|
18
|
-
"deletePatientList": "
|
|
18
|
+
"deletePatientList": "Supprimer la liste des patients",
|
|
19
19
|
"editList": "Modifier la liste",
|
|
20
20
|
"editNameDescription": "Modifier le Nom/ la Description",
|
|
21
21
|
"editPatientListHeader": "Modifier la liste des patients",
|
|
22
|
-
"emptyList": "
|
|
22
|
+
"emptyList": "Cette liste ne contient aucun patient",
|
|
23
23
|
"emptyStateIllustration": "Empty state illustration",
|
|
24
24
|
"emptyStateText": "Il n'y a pas de liste de patient {{listType}} à afficher",
|
|
25
25
|
"error": "Erreur",
|
|
26
26
|
"errorAddPatientToList": "Patient non ajouté à la liste",
|
|
27
27
|
"errorCopy": "Désolé, une erreur s’est produite à l’affichage. Vous pouvez tenter de rafraîchir la page, ou bien contacter l'administrateur du site et transmettre le message d'erreur ci-dessus.",
|
|
28
|
-
"errorCreatingList": "
|
|
29
|
-
"errorDeletingList": "
|
|
30
|
-
"errorRemovingPatientFromList": "
|
|
31
|
-
"errorUpdatingList": "
|
|
32
|
-
"home": "Accueil",
|
|
28
|
+
"errorCreatingList": "Erreur lors de la création de la liste",
|
|
29
|
+
"errorDeletingList": "Erreur lors de la suppression de la liste de patients",
|
|
30
|
+
"errorRemovingPatientFromList": "Échec de la suppression du patient de la liste",
|
|
31
|
+
"errorUpdatingList": "Erreur lors de la mise à jour de la liste",
|
|
33
32
|
"identifier": "Identifiant",
|
|
34
33
|
"items": "eléments",
|
|
35
34
|
"itemsDisplayed": "{{numberOfItemsDisplayed}} eléments",
|
|
36
|
-
"listCreated": "
|
|
35
|
+
"listCreated": "Liste créée avec succès",
|
|
37
36
|
"listDescriptionPlaceholder": "par ex. Les patients atteints d'asthme diagnostiqué qui peuvent être disposés à faire partie d'une étude de recherche universitaire",
|
|
38
|
-
"listName": "
|
|
37
|
+
"listName": "Nom de la liste",
|
|
39
38
|
"listNamePlaceholder": "par ex. Participants potentiels de la recherche",
|
|
40
|
-
"listType": "
|
|
41
|
-
"listUpdated": "
|
|
42
|
-
"listUpToDate": "
|
|
39
|
+
"listType": "Type de liste",
|
|
40
|
+
"listUpdated": "Liste mise à jour avec succès",
|
|
41
|
+
"listUpToDate": "La liste est maintenant à jour",
|
|
43
42
|
"myLists": "Mes listes",
|
|
44
43
|
"name": "Nom",
|
|
45
44
|
"newList": "Nouvelle liste",
|
|
@@ -48,37 +47,37 @@
|
|
|
48
47
|
"newPatientListNameLabel": "Nom de la liste",
|
|
49
48
|
"nextPage": "Page suivante",
|
|
50
49
|
"noMatchingLists": "Aucun liste à afficher",
|
|
51
|
-
"noMatchingPatients": "
|
|
52
|
-
"noOfPatients": "
|
|
50
|
+
"noMatchingPatients": "Aucun patient correspondant à afficher",
|
|
51
|
+
"noOfPatients": "Nombre de patients",
|
|
53
52
|
"noPatientListFound": "Aucune liste de patients trouvée",
|
|
54
53
|
"noPatientsInList": "Il n'y a pas de patient dans cette liste",
|
|
55
54
|
"offlinePatients": "Patients hors ligne",
|
|
56
55
|
"openPatientList": "Ajouter à la liste",
|
|
57
|
-
"patientListMemberCount_one": "
|
|
58
|
-
"patientListMemberCount_other": "
|
|
56
|
+
"patientListMemberCount_one": "Cette liste a {{count}} patient",
|
|
57
|
+
"patientListMemberCount_other": "Cette liste a {{count}} patients",
|
|
59
58
|
"patientLists": "Listes de patients",
|
|
60
|
-
"patientRemovedFromList": "Patient
|
|
59
|
+
"patientRemovedFromList": "Patient retiré de la liste",
|
|
61
60
|
"patients": "Patients",
|
|
62
61
|
"previousPage": "Page précédente",
|
|
63
|
-
"problemCreatingList": "
|
|
64
|
-
"problemUpdatingList": "
|
|
65
|
-
"removeFromList": "
|
|
66
|
-
"removePatientFromListConfirmation": "
|
|
62
|
+
"problemCreatingList": "Problème lors de la création de la liste",
|
|
63
|
+
"problemUpdatingList": "Problème lors de la mise à jour de la liste",
|
|
64
|
+
"removeFromList": "Supprimer la liste",
|
|
65
|
+
"removePatientFromListConfirmation": "Êtes-vous sûr de vouloir retirer {{patientName}} de cette liste?",
|
|
67
66
|
"searchForAListToAddThisPatientTo": "Rechercher une liste à laquelle ajouter ce patient.",
|
|
68
67
|
"searchForList": "Rechercher une liste",
|
|
69
|
-
"searchThisList": "
|
|
68
|
+
"searchThisList": "Recherchez dans cette liste",
|
|
70
69
|
"sex": "Sexe",
|
|
71
|
-
"starList": "
|
|
72
|
-
"starred": "
|
|
73
|
-
"starredLists": "Listes
|
|
74
|
-
"starringPatientListFailed": "Marquage des listes de patients
|
|
70
|
+
"starList": "Étoile de la liste",
|
|
71
|
+
"starred": "étoilé",
|
|
72
|
+
"starredLists": "Listes etoilées",
|
|
73
|
+
"starringPatientListFailed": "Marquage des listes de patients étoilées / non étoilées a échoué",
|
|
75
74
|
"startDate": "Date de début",
|
|
76
|
-
"submitting": "
|
|
75
|
+
"submitting": "En cours de soumission",
|
|
77
76
|
"successAddPatientToList": "Patient ajouté à la liste",
|
|
78
77
|
"successfullyAdded": "Ajouté avec succès",
|
|
79
|
-
"systemDefined": "
|
|
80
|
-
"systemLists": "Listes
|
|
81
|
-
"unstarList": "Enlever comme
|
|
82
|
-
"updated": "
|
|
83
|
-
"userDefined": "
|
|
78
|
+
"systemDefined": "définie par le système",
|
|
79
|
+
"systemLists": "Listes du système",
|
|
80
|
+
"unstarList": "Enlever comme étoilée",
|
|
81
|
+
"updated": "Mis à jour",
|
|
82
|
+
"userDefined": "définie par I'utilisateur"
|
|
84
83
|
}
|
package/translations/he.json
CHANGED
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"errorDeletingList": "שגיאה במחיקת רשימת המטופלים",
|
|
30
30
|
"errorRemovingPatientFromList": "נכשל להסיר מטופל מהרשימה",
|
|
31
31
|
"errorUpdatingList": "שגיאה בעדכון רשימה",
|
|
32
|
-
"home": "בית",
|
|
33
32
|
"identifier": "מזהה",
|
|
34
33
|
"items": "פריטים",
|
|
35
34
|
"itemsDisplayed": "{{numberOfItemsDisplayed}} items",
|
package/translations/km.json
CHANGED
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"errorDeletingList": "Error deleting patient list",
|
|
30
30
|
"errorRemovingPatientFromList": "Failed to remove patient from list",
|
|
31
31
|
"errorUpdatingList": "Error updating list",
|
|
32
|
-
"home": "ទំព័រដើម",
|
|
33
32
|
"identifier": "អ្នកកំណត់អត្តសញ្ញាណ",
|
|
34
33
|
"items": "ពត៌មានតាមមុខនិមួយៗ",
|
|
35
34
|
"itemsDisplayed": "{{numberOfItemsDisplayed}} items",
|
package/translations/zh.json
CHANGED
package/translations/zh_CN.json
CHANGED