@kenyaemr/esm-admin-app 5.4.4-pre.34 → 5.4.4-pre.340
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 +5 -12
- package/dist/100.js +1 -0
- package/dist/100.js.map +1 -0
- package/dist/1074.js +1 -0
- package/dist/1074.js.map +1 -0
- package/dist/1242.js +1 -0
- package/dist/1242.js.map +1 -0
- package/dist/1311.js +1 -0
- package/dist/1311.js.map +1 -0
- package/dist/1442.js +1 -0
- package/dist/1442.js.map +1 -0
- package/dist/1462.js +1 -0
- package/dist/1462.js.map +1 -0
- package/dist/1469.js +1 -0
- package/dist/1469.js.map +1 -0
- package/dist/1506.js +13 -0
- package/dist/1506.js.map +1 -0
- package/dist/1718.js +1 -0
- package/dist/1718.js.map +1 -0
- package/dist/1722.js +1 -0
- package/dist/1722.js.map +1 -0
- package/dist/1772.js +1 -0
- package/dist/1772.js.map +1 -0
- package/dist/1889.js +1 -0
- package/dist/1889.js.map +1 -0
- package/dist/1972.js +1 -0
- package/dist/1972.js.map +1 -0
- package/dist/1990.js +1 -0
- package/dist/1990.js.map +1 -0
- package/dist/2016.js +1 -0
- package/dist/2016.js.map +1 -0
- package/dist/2080.js +1 -0
- package/dist/2080.js.map +1 -0
- package/dist/2096.js +1 -0
- package/dist/2096.js.map +1 -0
- package/dist/2153.js +1 -0
- package/dist/2153.js.map +1 -0
- package/dist/216.js +1 -0
- package/dist/216.js.map +1 -0
- package/dist/2270.js +1 -0
- package/dist/2270.js.map +1 -0
- package/dist/2294.js +1 -0
- package/dist/2294.js.map +1 -0
- package/dist/2345.js +1 -0
- package/dist/2345.js.map +1 -0
- package/dist/2467.js +1 -0
- package/dist/2467.js.map +1 -0
- package/dist/2500.js +1 -0
- package/dist/2500.js.map +1 -0
- package/dist/251.js +1 -0
- package/dist/251.js.map +1 -0
- package/dist/257.js +1 -0
- package/dist/257.js.map +1 -0
- package/dist/2586.js +1 -0
- package/dist/2586.js.map +1 -0
- package/dist/2625.js +1 -0
- package/dist/2625.js.map +1 -0
- package/dist/2652.js +1 -0
- package/dist/2652.js.map +1 -0
- package/dist/2685.js +1 -0
- package/dist/2685.js.map +1 -0
- package/dist/2948.js +1 -0
- package/dist/2948.js.map +1 -0
- package/dist/3089.js +1 -0
- package/dist/3089.js.map +1 -0
- package/dist/3190.js +1 -0
- package/dist/3190.js.map +1 -0
- package/dist/3224.js +1 -0
- package/dist/3224.js.map +1 -0
- package/dist/3380.js +1 -0
- package/dist/3380.js.map +1 -0
- package/dist/3548.js +1 -0
- package/dist/3548.js.map +1 -0
- package/dist/3571.js +1 -0
- package/dist/3571.js.map +1 -0
- package/dist/3691.js +1 -0
- package/dist/3691.js.map +1 -0
- package/dist/3775.js +1 -0
- package/dist/3775.js.map +1 -0
- package/dist/3816.js +1 -0
- package/dist/3816.js.map +1 -0
- package/dist/3906.js +1 -0
- package/dist/3906.js.map +1 -0
- package/dist/3963.js +1 -0
- package/dist/3963.js.map +1 -0
- package/dist/405.js +1 -0
- package/dist/405.js.map +1 -0
- package/dist/4296.js +1 -0
- package/dist/4296.js.map +1 -0
- package/dist/4337.js +1 -0
- package/dist/4337.js.map +1 -0
- package/dist/4584.js +1 -0
- package/dist/4584.js.map +1 -0
- package/dist/4687.js +1 -0
- package/dist/4687.js.map +1 -0
- package/dist/4735.js +1 -0
- package/dist/4735.js.map +1 -0
- package/dist/4744.js +1 -0
- package/dist/4744.js.map +1 -0
- package/dist/4813.js +2 -0
- package/dist/4813.js.map +1 -0
- package/dist/4858.js +1 -0
- package/dist/4858.js.map +1 -0
- package/dist/487.js +1 -0
- package/dist/487.js.map +1 -0
- package/dist/4970.js +1 -0
- package/dist/4970.js.map +1 -0
- package/dist/5202.js +1 -0
- package/dist/5202.js.map +1 -0
- package/dist/5294.js +1 -0
- package/dist/5294.js.map +1 -0
- package/dist/5297.js +1 -0
- package/dist/5297.js.map +1 -0
- package/dist/545.js +1 -0
- package/dist/545.js.map +1 -0
- package/dist/5592.js +1 -0
- package/dist/5592.js.map +1 -0
- package/dist/5669.js +1 -0
- package/dist/5669.js.map +1 -0
- package/dist/5884.js +1 -0
- package/dist/5884.js.map +1 -0
- package/dist/5910.js +1 -0
- package/dist/5910.js.map +1 -0
- package/dist/5940.js +1 -0
- package/dist/5940.js.map +1 -0
- package/dist/6155.js +1 -0
- package/dist/6155.js.map +1 -0
- package/dist/6178.js +1 -0
- package/dist/6178.js.map +1 -0
- package/dist/6253.js +1 -0
- package/dist/6253.js.map +1 -0
- package/dist/6455.js +1 -0
- package/dist/6455.js.map +1 -0
- package/dist/6456.js +1 -0
- package/dist/6466.js +3 -0
- package/dist/6466.js.map +1 -0
- package/dist/6492.js +1 -0
- package/dist/6492.js.map +1 -0
- package/dist/6800.js +1 -0
- package/dist/6800.js.map +1 -0
- package/dist/6925.js +1 -0
- package/dist/6925.js.map +1 -0
- package/dist/7005.js +1 -0
- package/dist/7005.js.map +1 -0
- package/dist/7201.js +1 -0
- package/dist/7201.js.map +1 -0
- package/dist/7210.js +1 -0
- package/dist/7210.js.map +1 -0
- package/dist/7234.js +1 -0
- package/dist/7234.js.map +1 -0
- package/dist/7261.js +1 -0
- package/dist/7261.js.map +1 -0
- package/dist/7326.js +1 -0
- package/dist/7463.js +1 -0
- package/dist/7463.js.map +1 -0
- package/dist/7528.js +1 -0
- package/dist/7528.js.map +1 -0
- package/dist/7607.js +1 -0
- package/dist/7717.js +1 -0
- package/dist/7717.js.map +1 -0
- package/dist/7737.js +1 -0
- package/dist/7737.js.map +1 -0
- package/dist/7739.js +1 -0
- package/dist/7739.js.map +1 -0
- package/dist/7765.js +1 -0
- package/dist/7765.js.map +1 -0
- package/dist/7820.js +1 -0
- package/dist/7820.js.map +1 -0
- package/dist/7844.js +1 -0
- package/dist/7844.js.map +1 -0
- package/dist/7866.js +1 -0
- package/dist/7866.js.map +1 -0
- package/dist/7971.js +1 -0
- package/dist/7971.js.map +1 -0
- package/dist/8159.js +7 -0
- package/dist/8159.js.map +1 -0
- package/dist/8206.js +1 -0
- package/dist/8206.js.map +1 -0
- package/dist/8244.js +1 -0
- package/dist/8244.js.map +1 -0
- package/dist/8262.js +1 -0
- package/dist/8262.js.map +1 -0
- package/dist/8376.js +1 -0
- package/dist/8376.js.map +1 -0
- package/dist/845.js +1 -0
- package/dist/845.js.map +1 -0
- package/dist/846.js +17 -0
- package/dist/846.js.map +1 -0
- package/dist/8487.js +1 -0
- package/dist/8487.js.map +1 -0
- package/dist/8528.js +1 -0
- package/dist/8528.js.map +1 -0
- package/dist/8570.js +1 -0
- package/dist/8570.js.map +1 -0
- package/dist/87.js +1 -0
- package/dist/87.js.map +1 -0
- package/dist/8727.js +1 -0
- package/dist/8828.js +1 -0
- package/dist/8828.js.map +1 -0
- package/dist/8860.js +1 -0
- package/dist/8860.js.map +1 -0
- package/dist/9036.js +1 -0
- package/dist/9036.js.map +1 -0
- package/dist/9124.js +1 -0
- package/dist/9124.js.map +1 -0
- package/dist/9182.js +1 -0
- package/dist/921.js +1 -0
- package/dist/921.js.map +1 -0
- package/dist/9404.js +1 -0
- package/dist/9404.js.map +1 -0
- package/dist/9446.js +1 -0
- package/dist/9446.js.map +1 -0
- package/dist/9449.js +1 -0
- package/dist/9449.js.map +1 -0
- package/dist/9566.js +5 -0
- package/dist/9566.js.map +1 -0
- package/dist/9585.js +1 -0
- package/dist/9585.js.map +1 -0
- package/dist/9641.js +1 -0
- package/dist/9641.js.map +1 -0
- package/dist/9647.js +1 -0
- package/dist/9647.js.map +1 -0
- package/dist/9801.js +1 -0
- package/dist/9801.js.map +1 -0
- package/dist/9835.js +11 -0
- package/dist/9835.js.map +1 -0
- package/dist/kenyaemr-esm-admin-app.js +5 -5
- package/dist/kenyaemr-esm-admin-app.js.buildmanifest.json +2672 -154
- package/dist/kenyaemr-esm-admin-app.js.map +1 -1
- package/dist/main.js +5 -31
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +5 -7
- package/rspack.config.js +1 -1
- package/src/components/confirm-modal/confirmation-operation.test.tsx +8 -19
- package/src/components/dashboard/dashboard.component.tsx +4 -1
- package/src/components/empty-state/empty-state-log.test.tsx +3 -4
- package/src/components/facility-setup/constant/index.ts +3 -0
- package/src/components/facility-setup/facility-info.component.tsx +247 -108
- package/src/components/facility-setup/facility-info.scss +136 -55
- package/src/components/facility-setup/facility-setup.component.tsx +2 -2
- package/src/components/facility-setup/header/header.component.tsx +4 -10
- package/src/components/facility-setup/header/header.scss +3 -9
- package/src/components/facility-setup/shared/custom-info.component.tsx +9 -0
- package/src/components/facility-setup/shared/custom-section-card.component.tsx +10 -0
- package/src/components/facility-setup/shared/custom-status-tag.component.tsx +22 -0
- package/src/components/facility-setup/type/index.ts +61 -0
- package/src/components/facility-setup/useFacilityRegistry.ts +29 -0
- package/src/components/global-property/dashboard/global-property-dashboard.component.tsx +23 -0
- package/src/components/global-property/dashboard/global-property-dashboard.scss +6 -0
- package/src/components/global-property/hooks/useGlobalProperty.ts +64 -0
- package/src/components/global-property/index.ts +14 -0
- package/src/components/global-property/modal/delete-global-property-modal.component.tsx +71 -0
- package/src/components/global-property/modal/delete-global-property-modal.test.tsx +131 -0
- package/src/components/global-property/table/global-property-table.component.tsx +249 -0
- package/src/components/global-property/table/global-property-table.scss +34 -0
- package/src/components/global-property/table/global-property-table.test.tsx +198 -0
- package/src/components/global-property/workspace/global-property-form-schema.ts +32 -0
- package/src/components/global-property/workspace/global-property.workspace.scss +40 -0
- package/src/components/global-property/workspace/global-property.workspace.test.tsx +172 -0
- package/src/components/global-property/workspace/global-property.workspace.tsx +260 -0
- package/src/components/hook/healthWorkerRegistry.ts +78 -0
- package/src/components/hook/useProfessionalRegistryEnums.ts +59 -0
- package/src/components/locations/forms/add-location/add-location.workspace.tsx +96 -95
- package/src/components/locations/forms/search-location/search-location.workspace.tsx +90 -85
- package/src/components/locations/tables/locations-table.component.tsx +117 -121
- package/src/components/logs-table/operation-log-table.component.tsx +87 -75
- package/src/components/logs-table/operation-log.test.tsx +134 -28
- package/src/components/modal/hwr-confirmation.modal.scss +80 -4
- package/src/components/modal/hwr-confirmation.modal.tsx +118 -128
- package/src/components/modal/hwr-sync.modal.tsx +194 -106
- package/src/components/users/manage-users/manage-user-role-scope/user-role-scope-workspace/user-role-scope.workspace.tsx +13 -13
- package/src/components/users/manage-users/user-details/user-detail.scss +167 -39
- package/src/components/users/manage-users/user-details/user-details.component.tsx +130 -122
- package/src/components/users/manage-users/user-list/user-list.component.tsx +22 -9
- package/src/components/users/manage-users/user-management.workspace.scss +233 -95
- package/src/components/users/manage-users/user-management.workspace.tsx +800 -687
- package/src/components/users/userManagementFormSchema.tsx +17 -8
- package/src/config-schema.ts +48 -68
- package/src/index.ts +64 -31
- package/src/left-pannel-link.component.tsx +5 -3
- package/src/root.component.tsx +13 -13
- package/src/routes.json +57 -38
- package/src/types/index.ts +40 -3
- package/translations/am.json +196 -13
- package/translations/en.json +207 -24
- package/translations/fr.json +243 -58
- package/translations/sw.json +312 -129
- package/tsconfig.json +1 -1
- package/dist/127.js +0 -1
- package/dist/267.js +0 -1
- package/dist/267.js.map +0 -1
- package/dist/281.js +0 -15
- package/dist/281.js.map +0 -1
- package/dist/329.js +0 -1
- package/dist/329.js.map +0 -1
- package/dist/40.js +0 -1
- package/dist/466.js +0 -1
- package/dist/466.js.map +0 -1
- package/dist/472.js +0 -1
- package/dist/472.js.map +0 -1
- package/dist/478.js +0 -1
- package/dist/478.js.map +0 -1
- package/dist/585.js +0 -1
- package/dist/585.js.map +0 -1
- package/dist/630.js +0 -1
- package/dist/630.js.map +0 -1
- package/dist/675.js +0 -1
- package/dist/675.js.map +0 -1
- package/dist/689.js +0 -1
- package/dist/689.js.map +0 -1
- package/dist/706.js +0 -27
- package/dist/706.js.map +0 -1
- package/dist/729.js +0 -17
- package/dist/729.js.map +0 -1
- package/dist/774.js +0 -1
- package/dist/774.js.map +0 -1
- package/dist/847.js +0 -1
- package/dist/847.js.map +0 -1
- package/dist/85.js +0 -1
- package/dist/85.js.map +0 -1
- package/dist/882.js +0 -1
- package/dist/91.js +0 -1
- package/dist/91.js.map +0 -1
- package/dist/916.js +0 -1
- package/dist/998.js +0 -1
- package/dist/998.js.map +0 -1
- package/jest.config.js +0 -8
- package/src/components/facility-setup/card.component.tsx +0 -16
- package/src/components/facility-setup/facility-setup.resource.tsx +0 -7
- package/src/components/hook/healthWorkerAdapter.ts +0 -213
- package/src/components/hook/useFacilityInfo.tsx +0 -37
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTranslation } from 'react-i18next';
|
|
2
|
-
import {
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
const UserManagementFormSchema = (existingUsernames: Array<string>, isEdit?: boolean) => {
|
|
5
5
|
const { t } = useTranslation();
|
|
@@ -13,9 +13,10 @@ const UserManagementFormSchema = (existingUsernames: Array<string>, isEdit?: boo
|
|
|
13
13
|
message: t('genderRequired', 'Gender is required'),
|
|
14
14
|
}),
|
|
15
15
|
}),
|
|
16
|
+
|
|
16
17
|
phoneNumber: z.string().optional(),
|
|
17
18
|
email: z.string().optional(),
|
|
18
|
-
|
|
19
|
+
|
|
19
20
|
username: z
|
|
20
21
|
.string()
|
|
21
22
|
.nonempty(t('usernameRequired', 'Username is required'))
|
|
@@ -25,25 +26,33 @@ const UserManagementFormSchema = (existingUsernames: Array<string>, isEdit?: boo
|
|
|
25
26
|
password: z.string().optional(),
|
|
26
27
|
confirmPassword: z.string().optional(),
|
|
27
28
|
forcePasswordChange: z.boolean().optional(),
|
|
29
|
+
|
|
28
30
|
roles: z
|
|
29
31
|
.array(
|
|
30
32
|
z.object({
|
|
31
|
-
uuid: z.string().min(1, '
|
|
33
|
+
uuid: z.string().min(1, 'UUID is required'),
|
|
32
34
|
display: z.string().min(1, 'Role name is required'),
|
|
33
35
|
description: z.string().nullable().optional(),
|
|
34
36
|
}),
|
|
35
37
|
)
|
|
36
38
|
.optional(),
|
|
37
39
|
primaryRole: z.string().optional(),
|
|
40
|
+
|
|
41
|
+
providerIdentifiers: z.boolean().optional(),
|
|
42
|
+
isEditProvider: z.boolean().optional(),
|
|
38
43
|
systemId: z.string().optional(),
|
|
39
|
-
|
|
40
|
-
licenseExpiryDate: z.date().optional(),
|
|
41
|
-
registrationNumber: z.string().optional(),
|
|
42
|
-
qualification: z.string().optional(),
|
|
44
|
+
|
|
43
45
|
nationalId: z.string().optional(),
|
|
44
46
|
passportNumber: z.string().optional(),
|
|
45
|
-
|
|
47
|
+
|
|
46
48
|
providerUniqueIdentifier: z.string().optional(),
|
|
49
|
+
providerLicense: z.string().optional(),
|
|
50
|
+
licenseExpiryDate: z.date().optional(),
|
|
51
|
+
licenseBody: z.string().optional(),
|
|
52
|
+
qualification: z.string().optional(),
|
|
53
|
+
specialty: z.string().optional(),
|
|
54
|
+
providerCadre: z.string().optional(),
|
|
55
|
+
practiceType: z.string().optional(),
|
|
47
56
|
});
|
|
48
57
|
|
|
49
58
|
return { userManagementFormSchema };
|
package/src/config-schema.ts
CHANGED
|
@@ -4,7 +4,7 @@ import dayjs from 'dayjs';
|
|
|
4
4
|
export const configSchema = {
|
|
5
5
|
providerNationalIdUuid: {
|
|
6
6
|
_type: Type.String,
|
|
7
|
-
_description: 'UUID for provider national
|
|
7
|
+
_description: 'UUID for provider national ID',
|
|
8
8
|
_default: '3d152c97-2293-4a2b-802e-e0f1009b7b15',
|
|
9
9
|
},
|
|
10
10
|
passportNumberUuid: {
|
|
@@ -12,21 +12,17 @@ export const configSchema = {
|
|
|
12
12
|
_description: 'UUID for passport number identification for provider',
|
|
13
13
|
_default: '5b4b88e8-9db3-41e6-a175-5e39f2c8a9a5',
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
_type: Type.String,
|
|
17
|
-
_description: 'UUID for provider hie fhir reference',
|
|
18
|
-
_default: '67b94e8e-4d61-4810-b0f1-d86497f6e553',
|
|
19
|
-
},
|
|
20
|
-
qualificationUuid: {
|
|
15
|
+
providerUniqueIdentifierAttributeTypeUuid: {
|
|
21
16
|
_type: Type.String,
|
|
22
|
-
_description: 'UUID for provider
|
|
23
|
-
_default: '
|
|
17
|
+
_description: 'UUID for cross-regulator provider unique identifier (PUID)',
|
|
18
|
+
_default: 'dace9d99-9f29-4653-9eae-c05929f34a32',
|
|
24
19
|
},
|
|
25
|
-
|
|
20
|
+
externalProviderIdentifierUuid: {
|
|
26
21
|
_type: Type.String,
|
|
27
|
-
_description: 'UUID for
|
|
28
|
-
_default: '
|
|
22
|
+
_description: 'UUID for external provider identifier (regulator-public reference)',
|
|
23
|
+
_default: 'bbdf67e8-c020-40ff-8ad6-74ba34893882',
|
|
29
24
|
},
|
|
25
|
+
|
|
30
26
|
licenseNumberUuid: {
|
|
31
27
|
_type: Type.String,
|
|
32
28
|
_description: 'UUID for license number',
|
|
@@ -37,6 +33,31 @@ export const configSchema = {
|
|
|
37
33
|
_description: 'UUID for license expiry date',
|
|
38
34
|
_default: '00539959-a1c7-4848-a5ed-8941e9d5e835',
|
|
39
35
|
},
|
|
36
|
+
licenseBodyUuid: {
|
|
37
|
+
_type: Type.String,
|
|
38
|
+
_description: 'UUID for licensing body (e.g. KMPDC, NCK, PPB, COC)',
|
|
39
|
+
_default: 'ba18bb97-d17c-4640-80d2-58e7df90ca4c',
|
|
40
|
+
},
|
|
41
|
+
qualificationUuid: {
|
|
42
|
+
_type: Type.String,
|
|
43
|
+
_description: 'UUID for provider educational qualification',
|
|
44
|
+
_default: '43f99413-6e7f-4812-bc60-066bb1d43f94',
|
|
45
|
+
},
|
|
46
|
+
specialtyUuid: {
|
|
47
|
+
_type: Type.String,
|
|
48
|
+
_description: 'UUID for provider clinical specialty',
|
|
49
|
+
_default: '7f5d8e2c-3a1b-4d6e-9c0f-2b4a1d5e8c91',
|
|
50
|
+
},
|
|
51
|
+
providerCadreUuid: {
|
|
52
|
+
_type: Type.String,
|
|
53
|
+
_description: 'UUID for provider professional cadre',
|
|
54
|
+
_default: '8a6e9f3d-4b2c-5e7f-ad10-3c5b2e6f9da2',
|
|
55
|
+
},
|
|
56
|
+
practiceTypeUuid: {
|
|
57
|
+
_type: Type.String,
|
|
58
|
+
_description: 'UUID for provider practice type (clinical, non-clinical, etc.)',
|
|
59
|
+
_default: '9b7faa4e-5c3d-6f80-be21-4d6c3f70aeb3',
|
|
60
|
+
},
|
|
40
61
|
phoneNumberUuid: {
|
|
41
62
|
_type: Type.String,
|
|
42
63
|
_description: 'UUID for provider phone number',
|
|
@@ -44,9 +65,14 @@ export const configSchema = {
|
|
|
44
65
|
},
|
|
45
66
|
providerAddressUuid: {
|
|
46
67
|
_type: Type.String,
|
|
47
|
-
_description: 'UUID for provider address',
|
|
68
|
+
_description: 'UUID for provider postal address',
|
|
48
69
|
_default: '033ff604-ecf7-464f-b623-5b77c733667f',
|
|
49
70
|
},
|
|
71
|
+
providerHieFhirReference: {
|
|
72
|
+
_type: Type.String,
|
|
73
|
+
_description: 'UUID for provider HIE FHIR reference',
|
|
74
|
+
_default: '67b94e8e-4d61-4810-b0f1-d86497f6e553',
|
|
75
|
+
},
|
|
50
76
|
personEmailAttributeUuid: {
|
|
51
77
|
_type: Type.String,
|
|
52
78
|
_description: 'UUID for person email attribute',
|
|
@@ -57,48 +83,6 @@ export const configSchema = {
|
|
|
57
83
|
_description: 'UUID for person phone number attribute',
|
|
58
84
|
_default: 'b2c38640-2603-4629-aebd-3b54f33f1e3a',
|
|
59
85
|
},
|
|
60
|
-
providerUniqueIdentifierAttributeTypeUuid: {
|
|
61
|
-
_type: Type.String,
|
|
62
|
-
_description: 'UUID for provider unique identifier attribute type',
|
|
63
|
-
_default: 'dace9d99-9f29-4653-9eae-c05929f34a32',
|
|
64
|
-
},
|
|
65
|
-
identifierTypes: {
|
|
66
|
-
_type: Type.Array,
|
|
67
|
-
_elements: {
|
|
68
|
-
_type: Type.Object,
|
|
69
|
-
properties: {
|
|
70
|
-
key: { _type: Type.String },
|
|
71
|
-
name: { _type: Type.String },
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
_default: [
|
|
75
|
-
{ key: 'National ID', name: 'National ID' },
|
|
76
|
-
{ key: 'registration_number', name: 'Registration Number' },
|
|
77
|
-
{ key: 'Passport', name: 'Passport Number' },
|
|
78
|
-
],
|
|
79
|
-
_description: 'List of identifier types with unique keys for each.',
|
|
80
|
-
},
|
|
81
|
-
regulatorOptions: {
|
|
82
|
-
_type: Type.Array,
|
|
83
|
-
_elements: {
|
|
84
|
-
_type: Type.Object,
|
|
85
|
-
properties: {
|
|
86
|
-
key: { _type: Type.String },
|
|
87
|
-
name: { _type: Type.String },
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
_default: [
|
|
91
|
-
{ key: 'Clinical Officers Council', name: 'Clinical Officers Council' },
|
|
92
|
-
{ key: 'Pharmacy and Poisons Board', name: 'Pharmacy and Poisons Board' },
|
|
93
|
-
{ key: 'Nursing Council', name: 'Nursing Council' },
|
|
94
|
-
{ key: 'KMPDC', name: 'Kenya Medical Practitioners and Dentists Council (KMPDC)' },
|
|
95
|
-
{
|
|
96
|
-
key: 'Kenya Medical Laboratory Technicians & Technologists Board',
|
|
97
|
-
name: 'Kenya Medical Laboratory Technicians & Technologists Board',
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
_description: 'List of regulator options with unique keys for each.',
|
|
101
|
-
},
|
|
102
86
|
};
|
|
103
87
|
|
|
104
88
|
export interface UserProperties {
|
|
@@ -109,22 +93,18 @@ export interface UserProperties {
|
|
|
109
93
|
export interface ConfigObject {
|
|
110
94
|
providerNationalIdUuid: string;
|
|
111
95
|
passportNumberUuid: string;
|
|
112
|
-
providerHieFhirReference: string;
|
|
113
96
|
providerUniqueIdentifierAttributeTypeUuid: string;
|
|
97
|
+
externalProviderIdentifierUuid: string;
|
|
98
|
+
licenseNumberUuid: string;
|
|
99
|
+
licenseExpiryDateUuid: string;
|
|
100
|
+
licenseBodyUuid: string;
|
|
101
|
+
qualificationUuid: string;
|
|
102
|
+
specialtyUuid: string;
|
|
103
|
+
providerCadreUuid: string;
|
|
104
|
+
practiceTypeUuid: string;
|
|
114
105
|
phoneNumberUuid: string;
|
|
115
106
|
providerAddressUuid: string;
|
|
116
|
-
|
|
117
|
-
licenseBodyUuid: string;
|
|
118
|
-
licenseNumberUuid: string;
|
|
107
|
+
providerHieFhirReference: string;
|
|
119
108
|
personEmailAttributeUuid: string;
|
|
120
109
|
personPhonenumberAttributeUuid: string;
|
|
121
|
-
licenseExpiryDateUuid: string;
|
|
122
|
-
identifierTypes: Array<{
|
|
123
|
-
key: string;
|
|
124
|
-
name: string;
|
|
125
|
-
}>;
|
|
126
|
-
regulatorOptions: Array<{
|
|
127
|
-
key: string;
|
|
128
|
-
name: string;
|
|
129
|
-
}>;
|
|
130
110
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import { defineConfigSchema, getSyncLifecycle } from '@openmrs/esm-framework';
|
|
1
|
+
import { defineConfigSchema, getSyncLifecycle, getAsyncLifecycle } from '@openmrs/esm-framework';
|
|
2
2
|
import { configSchema } from './config-schema';
|
|
3
3
|
import { moduleName } from './constants';
|
|
4
4
|
import OperationConfirmation from './components/confirm-modal/confirmation-operation-modal.component';
|
|
5
|
-
import Root from './root.component';
|
|
6
|
-
import ManageUserWorkspace from './components/users/manage-users/user-management.workspace';
|
|
7
|
-
import { createLeftPanelLink } from './left-pannel-link.component';
|
|
8
|
-
import HWRConfirmModal from './components/modal/hwr-confirmation.modal';
|
|
9
|
-
import HWREmptyModal from './components/modal/hwr-empty.modal.component';
|
|
10
|
-
import UserRoleScopeWorkspace from './components/users/manage-users/manage-user-role-scope/user-role-scope-workspace/user-role-scope.workspace';
|
|
11
|
-
import HWRSyncModal from './components/modal/hwr-sync.modal';
|
|
12
|
-
import AddLocationWorkspace from './components/locations/forms/add-location/add-location.workspace';
|
|
13
|
-
import SearchLocationWorkspace from './components/locations/forms/search-location/search-location.workspace';
|
|
14
|
-
import ProviderBannerTag from './components/provider-banner/provider-banner.component';
|
|
15
5
|
|
|
16
6
|
const options = {
|
|
17
7
|
featureName: 'esm-admin-app',
|
|
@@ -19,41 +9,84 @@ const options = {
|
|
|
19
9
|
};
|
|
20
10
|
|
|
21
11
|
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
|
|
22
|
-
|
|
23
|
-
export const root =
|
|
12
|
+
export * from './components/global-property/index';
|
|
13
|
+
export const root = getAsyncLifecycle(() => import('./root.component'), options);
|
|
24
14
|
|
|
25
15
|
export function startupApp() {
|
|
26
16
|
defineConfigSchema(moduleName, configSchema);
|
|
27
17
|
}
|
|
28
18
|
|
|
29
19
|
export const operationConfirmationModal = getSyncLifecycle(OperationConfirmation, options);
|
|
30
|
-
export const manageUserWorkspace =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export const userManagementLeftPannelLink = getSyncLifecycle(
|
|
34
|
-
createLeftPanelLink({ title: 'Manage Users', name: 'user-management' }),
|
|
20
|
+
export const manageUserWorkspace = getAsyncLifecycle(
|
|
21
|
+
() => import('./components/users/manage-users/user-management.workspace'),
|
|
35
22
|
options,
|
|
36
23
|
);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
export const userRoleScopeWorkspace = getAsyncLifecycle(
|
|
25
|
+
() =>
|
|
26
|
+
import(
|
|
27
|
+
'./components/users/manage-users/manage-user-role-scope/user-role-scope-workspace/user-role-scope.workspace'
|
|
28
|
+
),
|
|
29
|
+
options,
|
|
30
|
+
);
|
|
31
|
+
// t("manageUsers", "Manage Users")
|
|
32
|
+
export const userManagementLeftPannelLink = getAsyncLifecycle(
|
|
33
|
+
() =>
|
|
34
|
+
import('./left-pannel-link.component').then((m) => ({
|
|
35
|
+
default: m.createLeftPanelLink({ title: 'manageUsers', name: 'user-management' }),
|
|
36
|
+
})),
|
|
40
37
|
options,
|
|
41
38
|
);
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
// t("etlAdministration", "ETL Administration")
|
|
40
|
+
export const etlAdministrationLeftPannelLink = getAsyncLifecycle(
|
|
41
|
+
() =>
|
|
42
|
+
import('./left-pannel-link.component').then((m) => ({
|
|
43
|
+
default: m.createLeftPanelLink({ title: 'etlAdministration', name: 'etl-administration' }),
|
|
44
|
+
})),
|
|
44
45
|
options,
|
|
45
46
|
);
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
// t("locations", "Locations")
|
|
48
|
+
export const locationsLeftPanelLink = getAsyncLifecycle(
|
|
49
|
+
() =>
|
|
50
|
+
import('./left-pannel-link.component').then((m) => ({
|
|
51
|
+
default: m.createLeftPanelLink({ title: 'locations', name: 'locations' }),
|
|
52
|
+
})),
|
|
53
|
+
options,
|
|
54
|
+
);
|
|
55
|
+
// t("facilityDetails", "Facility Details")
|
|
56
|
+
export const facilitySetupLeftPanelLink = getAsyncLifecycle(
|
|
57
|
+
() =>
|
|
58
|
+
import('./left-pannel-link.component').then((m) => ({
|
|
59
|
+
default: m.createLeftPanelLink({ title: 'facilityDetails', name: 'facility-setup' }),
|
|
60
|
+
})),
|
|
48
61
|
options,
|
|
49
62
|
);
|
|
50
63
|
|
|
51
|
-
export const hwrConfirmationModal =
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
export const hwrConfirmationModal = getAsyncLifecycle(
|
|
65
|
+
() => import('./components/modal/hwr-confirmation.modal'),
|
|
66
|
+
options,
|
|
67
|
+
);
|
|
68
|
+
export const hwrEmptyModal = getAsyncLifecycle(() => import('./components/modal/hwr-empty.modal.component'), options);
|
|
69
|
+
export const hwrSyncModal = getAsyncLifecycle(() => import('./components/modal/hwr-sync.modal'), options);
|
|
54
70
|
|
|
55
|
-
export const addLocation =
|
|
56
|
-
|
|
71
|
+
export const addLocation = getAsyncLifecycle(
|
|
72
|
+
() => import('./components/locations/forms/add-location/add-location.workspace'),
|
|
73
|
+
options,
|
|
74
|
+
);
|
|
75
|
+
export const searchLocationWorkspace = getAsyncLifecycle(
|
|
76
|
+
() => import('./components/locations/forms/search-location/search-location.workspace'),
|
|
77
|
+
options,
|
|
78
|
+
);
|
|
79
|
+
export const globalPropertyWorkspace = getAsyncLifecycle(
|
|
80
|
+
() => import('./components/global-property/workspace/global-property.workspace'),
|
|
81
|
+
options,
|
|
82
|
+
);
|
|
83
|
+
export const deleteGlobalPropertyModal = getAsyncLifecycle(
|
|
84
|
+
() => import('./components/global-property/modal/delete-global-property-modal.component'),
|
|
85
|
+
options,
|
|
86
|
+
);
|
|
57
87
|
|
|
58
88
|
// t('providerBanner', 'Provider banner')
|
|
59
|
-
export const providerBanner =
|
|
89
|
+
export const providerBanner = getAsyncLifecycle(
|
|
90
|
+
() => import('./components/provider-banner/provider-banner.component'),
|
|
91
|
+
options,
|
|
92
|
+
);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
2
2
|
import last from 'lodash-es/last';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
3
5
|
import { BrowserRouter, useLocation } from 'react-router-dom';
|
|
4
|
-
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
5
6
|
|
|
6
7
|
export interface LinkConfig {
|
|
7
8
|
name: string;
|
|
@@ -9,6 +10,7 @@ export interface LinkConfig {
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
function LinkExtension({ config }: { config: LinkConfig }) {
|
|
13
|
+
const { t } = useTranslation();
|
|
12
14
|
const { name, title } = config;
|
|
13
15
|
const location = useLocation();
|
|
14
16
|
|
|
@@ -27,7 +29,7 @@ function LinkExtension({ config }: { config: LinkConfig }) {
|
|
|
27
29
|
<ConfigurableLink
|
|
28
30
|
to={`${window.getOpenmrsSpaBase()}admin${name && name !== 'admin' ? `/${name}` : ''}`}
|
|
29
31
|
className={`cds--side-nav__link ${name === urlSegment && 'active-left-nav-link'}`}>
|
|
30
|
-
{title}
|
|
32
|
+
{t(title)}
|
|
31
33
|
</ConfigurableLink>
|
|
32
34
|
);
|
|
33
35
|
}
|
package/src/root.component.tsx
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useLeftNav } from '@openmrs/esm-framework';
|
|
2
3
|
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
|
3
|
-
|
|
4
|
-
import styles from './root.scss';
|
|
4
|
+
|
|
5
5
|
import LeftPanel from './components/side-menu/left-pannel.component';
|
|
6
6
|
import UserManagentLandingPage from './components/users/manage-users/manage-user.component';
|
|
7
7
|
import EtlAdminDashboard from './components/dashboard/etl-dashboard.component';
|
|
8
8
|
import FacilitySetup from './components/facility-setup/facility-setup.component';
|
|
9
9
|
import HomeComponent from './components/locations/home/home-locations.component';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const adminBasename = window.getOpenmrsSpaBase() + 'admin';
|
|
11
|
+
import styles from './root.scss';
|
|
12
|
+
import GlobalPropertyDashboard from './components/global-property/dashboard/global-property-dashboard.component';
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
14
|
+
const Root: React.FC = () => {
|
|
15
|
+
const spaBasePath = globalThis.spaBase;
|
|
16
|
+
const adminBasename = globalThis.getOpenmrsSpaBase() + 'admin';
|
|
17
|
+
useLeftNav({
|
|
18
|
+
name: 'admin-left-panel-slot',
|
|
19
|
+
basePath: spaBasePath,
|
|
20
|
+
});
|
|
22
21
|
|
|
23
22
|
return (
|
|
24
23
|
<BrowserRouter basename={adminBasename}>
|
|
@@ -30,6 +29,7 @@ const Root: React.FC = () => {
|
|
|
30
29
|
<Route path="/etl-administration" element={<EtlAdminDashboard />} />
|
|
31
30
|
<Route path="/facility-setup" element={<FacilitySetup />} />
|
|
32
31
|
<Route path="/locations" element={<HomeComponent />} />
|
|
32
|
+
<Route path="/global-property" element={<GlobalPropertyDashboard />} />
|
|
33
33
|
</Routes>
|
|
34
34
|
</main>
|
|
35
35
|
</BrowserRouter>
|
package/src/routes.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"component": "userManagementLeftPannelLink",
|
|
14
14
|
"name": "user-management-left-panel-link",
|
|
15
15
|
"slot": "admin-left-panel-slot"
|
|
16
|
-
},
|
|
16
|
+
},
|
|
17
17
|
{
|
|
18
18
|
"component": "etlAdministrationLeftPannelLink",
|
|
19
19
|
"name": "etl-administration-left-panel-link",
|
|
@@ -29,71 +29,90 @@
|
|
|
29
29
|
"name": "facility-setup-left-panel-link",
|
|
30
30
|
"slot": "admin-left-panel-slot"
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
"name":"global-property-link",
|
|
34
|
+
"component":"globalPropertyLink",
|
|
35
|
+
"slot": "admin-left-panel-slot"
|
|
36
|
+
},
|
|
32
37
|
{
|
|
33
38
|
"component": "providerBanner",
|
|
34
39
|
"name": "provider-banner",
|
|
35
40
|
"slot": "provider-banner-info-slot",
|
|
36
|
-
"order":1
|
|
41
|
+
"order": 1
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"component": "globalPropertyDashboard",
|
|
45
|
+
"name": "global-property-dashboard"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"modals": [
|
|
49
|
+
{
|
|
50
|
+
"component": "operationConfirmationModal",
|
|
51
|
+
"name": "operation-confirmation-modal"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"component": "hwrConfirmationModal",
|
|
55
|
+
"name": "hwr-confirmation-modal"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"component": "hwrEmptyModal",
|
|
59
|
+
"name": "hwr-empty-modal"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"component": "hwrSyncModal",
|
|
63
|
+
"name": "hwr-syncing-modal"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"component": "deleteGlobalPropertyModal",
|
|
67
|
+
"name": "delete-global-property-modal"
|
|
37
68
|
}
|
|
38
69
|
],
|
|
39
|
-
"
|
|
70
|
+
"workspaces2": [
|
|
40
71
|
{
|
|
41
72
|
"name": "manage-user-workspace",
|
|
42
73
|
"component": "manageUserWorkspace",
|
|
43
|
-
"
|
|
44
|
-
"type": "other-form",
|
|
45
|
-
"canMaximize": true,
|
|
46
|
-
"width": "extra-wide"
|
|
74
|
+
"window": "esm-admin-extra-wide-workspace-window"
|
|
47
75
|
},
|
|
48
76
|
{
|
|
49
77
|
"name": "user-role-scope-workspace",
|
|
50
78
|
"component": "userRoleScopeWorkspace",
|
|
51
|
-
"
|
|
52
|
-
"type": "other-form",
|
|
53
|
-
"canMaximize": true,
|
|
54
|
-
"width": "extra-wide"
|
|
79
|
+
"window": "esm-admin-workspace-window"
|
|
55
80
|
},
|
|
56
81
|
{
|
|
57
82
|
"name": "add-location-workspace",
|
|
58
|
-
"title": "Add Location",
|
|
59
83
|
"component": "addLocation",
|
|
60
|
-
"
|
|
84
|
+
"window": "esm-admin-workspace-window"
|
|
61
85
|
},
|
|
62
86
|
{
|
|
63
87
|
"name": "search-location-workspace",
|
|
64
|
-
"title": "Search Location",
|
|
65
88
|
"component": "searchLocationWorkspace",
|
|
66
|
-
"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"name": "hwr-sync-workspace",
|
|
70
|
-
"title": "HWR Sync Workspace",
|
|
71
|
-
"component": "hwrSyncWorkspace",
|
|
72
|
-
"type": "other-form"
|
|
89
|
+
"window": "esm-admin-workspace-window"
|
|
73
90
|
},
|
|
74
91
|
{
|
|
75
|
-
"name": "
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"type": "modal"
|
|
92
|
+
"name": "global-property-workspace",
|
|
93
|
+
"component": "globalPropertyWorkspace",
|
|
94
|
+
"window": "esm-admin-workspace-window"
|
|
79
95
|
}
|
|
80
96
|
],
|
|
81
|
-
"
|
|
97
|
+
"workspaceWindows2": [
|
|
82
98
|
{
|
|
83
|
-
"
|
|
84
|
-
"
|
|
99
|
+
"name": "esm-admin-workspace-window",
|
|
100
|
+
"canMaximize": true,
|
|
101
|
+
"group": "esm-admin-workspace-group",
|
|
102
|
+
"width":"wider"
|
|
85
103
|
},
|
|
86
104
|
{
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
|
|
105
|
+
"name": "esm-admin-extra-wide-workspace-window",
|
|
106
|
+
"canMaximize": true,
|
|
107
|
+
"group": "esm-admin-workspace-group",
|
|
108
|
+
"width": "extra-wide"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"workspaceGroups2": [
|
|
90
112
|
{
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
{
|
|
95
|
-
"component": "hwrSyncModal",
|
|
96
|
-
"name": "hwr-syncing-modal"
|
|
113
|
+
"name": "esm-admin-workspace-group",
|
|
114
|
+
"scopePattern": "/admin",
|
|
115
|
+
"closeable": true
|
|
97
116
|
}
|
|
98
117
|
],
|
|
99
118
|
"pages": [
|
|
@@ -102,4 +121,4 @@
|
|
|
102
121
|
"route": "admin"
|
|
103
122
|
}
|
|
104
123
|
]
|
|
105
|
-
}
|
|
124
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { fhirBaseUrl, Type } from '@openmrs/esm-framework';
|
|
2
|
-
|
|
3
1
|
export interface ETLResponse {
|
|
4
2
|
script_name: string;
|
|
5
3
|
start_time: string;
|
|
@@ -27,8 +25,36 @@ export interface SHAFacility {
|
|
|
27
25
|
shaFacilityLicenseNumber: string;
|
|
28
26
|
facilityRegistryCode: string;
|
|
29
27
|
source: string;
|
|
28
|
+
officialName: string;
|
|
29
|
+
facilityType: string;
|
|
30
|
+
facilityOwnership: string;
|
|
31
|
+
fidCode: string;
|
|
32
|
+
isHub: string;
|
|
33
|
+
facilityLicenseStatus: string;
|
|
34
|
+
facilityLicenseStartDate: string;
|
|
35
|
+
regulatoryBody: string;
|
|
36
|
+
shaContractStatus: string;
|
|
37
|
+
shaContractStartDate: string;
|
|
38
|
+
shaContractEndDate: string;
|
|
39
|
+
facilityPhoneNumber: string;
|
|
40
|
+
facilityEmail: string;
|
|
41
|
+
facilityAdministratorName: string;
|
|
42
|
+
facilityAdministratorPhone: string;
|
|
43
|
+
facilityAdministratorEmail: string;
|
|
44
|
+
county: string;
|
|
45
|
+
subCounty: string;
|
|
46
|
+
town: string;
|
|
47
|
+
physicalLocation: string;
|
|
48
|
+
postalAddress: string;
|
|
49
|
+
latitude: string;
|
|
50
|
+
longitude: string;
|
|
51
|
+
totalBeds: string;
|
|
52
|
+
normalBeds: string;
|
|
53
|
+
icuBeds: string;
|
|
54
|
+
hduBeds: string;
|
|
55
|
+
dialysisBeds: string;
|
|
56
|
+
shaContractedServices: string;
|
|
30
57
|
}
|
|
31
|
-
|
|
32
58
|
export interface DefaultFacility {
|
|
33
59
|
locationId: number;
|
|
34
60
|
uuid: string;
|
|
@@ -383,3 +409,14 @@ export interface CustomHIEPractitionerResponse {
|
|
|
383
409
|
};
|
|
384
410
|
fhirFormat: boolean;
|
|
385
411
|
}
|
|
412
|
+
|
|
413
|
+
export type SystemSettings = {
|
|
414
|
+
property: string;
|
|
415
|
+
description?: string;
|
|
416
|
+
datatypeClassname?: string;
|
|
417
|
+
datatypeConfig?: string;
|
|
418
|
+
preferredHandlerClassname?: string;
|
|
419
|
+
handlerConfig?: string | null;
|
|
420
|
+
value: string;
|
|
421
|
+
uuid?: string;
|
|
422
|
+
};
|