@kenyaemr/esm-admin-app 5.4.1-pre.1908 → 5.4.1-pre.1912

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.
Files changed (52) hide show
  1. package/.turbo/turbo-build.log +31 -24
  2. package/dist/102.js +2 -0
  3. package/dist/102.js.map +1 -0
  4. package/dist/{325.js → 137.js} +2 -2
  5. package/dist/{325.js.map → 137.js.map} +1 -1
  6. package/dist/294.js +2 -0
  7. package/dist/294.js.LICENSE.txt +32 -0
  8. package/dist/294.js.map +1 -0
  9. package/dist/300.js +1 -1
  10. package/dist/654.js +1 -0
  11. package/dist/654.js.map +1 -0
  12. package/dist/675.js +2 -0
  13. package/dist/{485.js.map → 675.js.map} +1 -1
  14. package/dist/{493.js → 719.js} +1 -1
  15. package/dist/{493.js.map → 719.js.map} +1 -1
  16. package/dist/893.js +1 -1
  17. package/dist/893.js.map +1 -1
  18. package/dist/913.js +1 -1
  19. package/dist/913.js.LICENSE.txt +4 -27
  20. package/dist/913.js.map +1 -1
  21. package/dist/kenyaemr-esm-admin-app.js +1 -1
  22. package/dist/kenyaemr-esm-admin-app.js.buildmanifest.json +117 -114
  23. package/dist/kenyaemr-esm-admin-app.js.map +1 -1
  24. package/dist/main.js +1 -1
  25. package/dist/main.js.map +1 -1
  26. package/dist/routes.json +1 -1
  27. package/package.json +1 -1
  28. package/src/components/hook/useHWR.ts +22 -0
  29. package/src/components/modal/hwr-confirmation.modal.scss +21 -0
  30. package/src/components/modal/hwr-confirmation.modal.tsx +130 -0
  31. package/src/components/modal/hwr-empty.modal.component.tsx +54 -0
  32. package/src/components/users/manage-users/user-list/user-list.component.tsx +27 -22
  33. package/src/components/users/manage-users/user-management.workspace.scss +36 -0
  34. package/src/components/users/manage-users/user-management.workspace.tsx +388 -193
  35. package/src/components/users/userManagementFormSchema.tsx +5 -1
  36. package/src/config-schema.ts +55 -3
  37. package/src/constants.ts +26 -0
  38. package/src/index.ts +5 -0
  39. package/src/routes.json +8 -0
  40. package/src/types/index.ts +97 -0
  41. package/translations/en.json +7 -0
  42. package/dist/373.js +0 -2
  43. package/dist/373.js.map +0 -1
  44. package/dist/387.js +0 -2
  45. package/dist/387.js.LICENSE.txt +0 -15
  46. package/dist/387.js.map +0 -1
  47. package/dist/485.js +0 -2
  48. package/dist/778.js +0 -1
  49. package/dist/778.js.map +0 -1
  50. /package/dist/{373.js.LICENSE.txt → 102.js.LICENSE.txt} +0 -0
  51. /package/dist/{325.js.LICENSE.txt → 137.js.LICENSE.txt} +0 -0
  52. /package/dist/{485.js.LICENSE.txt → 675.js.LICENSE.txt} +0 -0
@@ -33,7 +33,11 @@ const UserManagementFormSchema = () => {
33
33
  systemId: z.string().optional(),
34
34
  primaryFacility: z.string().optional(),
35
35
  providerLicense: z.string().optional(),
36
- licenseExpiryDate: z.string().optional(),
36
+ licenseExpiryDate: z.date().optional(),
37
+ registrationNumber: z.string().optional(),
38
+ qualification: z.string().optional(),
39
+ nationalId: z.string().optional(),
40
+ passportNumber: z.string().optional(),
37
41
  permanent: z.boolean().optional(),
38
42
  enabled: z.boolean().optional(),
39
43
  stockOperation: z
@@ -1,9 +1,49 @@
1
1
  import { fhirBaseUrl, Type } from '@openmrs/esm-framework';
2
2
  import dayjs from 'dayjs';
3
3
 
4
- export const configSchema = {};
5
-
6
- export interface ConfigObject {}
4
+ export const configSchema = {
5
+ providerNationalIdUuid: {
6
+ _type: Type.String,
7
+ _description: 'UUID for provider national id',
8
+ _default: '3d152c97-2293-4a2b-802e-e0f1009b7b15',
9
+ },
10
+ passportNumberUuid: {
11
+ _type: Type.String,
12
+ _description: 'UUID for passport number identification for provider',
13
+ _default: 'b2a8819f-13ae-46b1-b730-f42193724dbc',
14
+ },
15
+ providerHieFhirReference: {
16
+ _type: Type.String,
17
+ _description: 'UUID for provider hie fhir reference',
18
+ _default: '67b94e8e-4d61-4810-b0f1-d86497f6e553',
19
+ },
20
+ qualificationUuid: {
21
+ _type: Type.String,
22
+ _description: 'UUID for provider hie qualification',
23
+ _default: '43f99413-6e7f-4812-bc60-066bb1d43f94',
24
+ },
25
+ licenseBodyUuid: {
26
+ _type: Type.String,
27
+ _description: 'UUID for license body',
28
+ _default: 'ba18bb97-d17c-4640-80d2-58e7df90ca4c',
29
+ },
30
+ identifierTypes: {
31
+ _type: Type.Array,
32
+ _elements: {
33
+ _type: Type.Object,
34
+ properties: {
35
+ key: { _type: Type.String },
36
+ name: { _type: Type.String },
37
+ },
38
+ },
39
+ _default: [
40
+ { key: 'National ID', name: 'National ID' },
41
+ { key: 'registration_number', name: 'Registration Number' },
42
+ { key: 'Passport', name: 'Passport Number' },
43
+ ],
44
+ _description: 'List of identifier types with unique keys for each.',
45
+ },
46
+ };
7
47
 
8
48
  export interface UserProperties {
9
49
  loginAttempts: string;
@@ -168,3 +208,15 @@ export interface UserRoleScope extends BaseOpenmrsData {
168
208
  locations?: Array<UserRoleScopeLocation>;
169
209
  operationTypes?: Array<UserRoleScopeOperationType>;
170
210
  }
211
+
212
+ export interface ConfigObject {
213
+ providerNationalIdUuid: string;
214
+ passportNumberUuid: string;
215
+ providerHieFhirReference: string;
216
+ qualificationUuid: string;
217
+ licenseBodyUuid: string;
218
+ identifierTypes: Array<{
219
+ key: string;
220
+ name: string;
221
+ }>;
222
+ }
package/src/constants.ts CHANGED
@@ -13,3 +13,29 @@ export const DATE_PICKER_FORMAT = 'DD/MM/YYYY';
13
13
  export const formatNewDate = (date: Date | null | undefined) => {
14
14
  return date ? new Date(date) : '';
15
15
  };
16
+
17
+ /**
18
+ * Represents the error response from the Health Care Worker Registry API
19
+ * when no valid credentials are provided or found.
20
+ * @constant {string}
21
+ */
22
+ export const HWR_API_NO_CREDENTIALS = 'NO_API_CREDENNTIALS';
23
+ /**
24
+ * Represents the error response from the Health Care Worker Registry API
25
+ * when when resource is not found
26
+ * @constant {string}
27
+ */
28
+ export const RESOURCE_NOT_FOUND = 'RESOURCE_NOT_FOUND';
29
+ /**
30
+ * Represents the error response from the Health Care Worker Registry API
31
+ * When Uknown error occures
32
+ * @constant {string}
33
+ */
34
+ export const UNKNOWN = 'UNKNOWN';
35
+
36
+ /**
37
+ * Represents the error response from the Health Care Worker Registry API
38
+ * when when prover with given identifier is not found
39
+ * @constant {string}
40
+ */
41
+ export const PROVIDER_NOT_FOUND = 'PROVIDER_NOT_FOUND';
package/src/index.ts CHANGED
@@ -5,6 +5,8 @@ import OperationConfirmation from './components/confirm-modal/confirmation-opera
5
5
  import Root from './root.component';
6
6
  import ManageUserWorkspace from './components/users/manage-users/user-management.workspace';
7
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';
8
10
 
9
11
  const options = {
10
12
  featureName: 'esm-admin-app',
@@ -35,3 +37,6 @@ export const facilitySetupLeftPanelLink = getSyncLifecycle(
35
37
  createLeftPanelLink({ title: 'Facility Details', name: 'facility-setup' }),
36
38
  options,
37
39
  );
40
+
41
+ export const hwrConfirmationModal = getSyncLifecycle(HWRConfirmModal, options);
42
+ export const hwrEmptyModal = getSyncLifecycle(HWREmptyModal, options);
package/src/routes.json CHANGED
@@ -39,6 +39,14 @@
39
39
  {
40
40
  "component": "operationConfirmationModal",
41
41
  "name": "operation-confirmation-modal"
42
+ },
43
+ {
44
+ "component": "hwrConfirmationModal",
45
+ "name": "hwr-confirmation-modal"
46
+ },
47
+ {
48
+ "component": "hwrEmptyModal",
49
+ "name": "hwr-empty-modal"
42
50
  }
43
51
  ],
44
52
  "pages": [
@@ -32,3 +32,100 @@ export interface DefaultFacility {
32
32
  uuid: string;
33
33
  display: string;
34
34
  }
35
+
36
+ export interface PractitionerResponse {
37
+ id: string;
38
+ link: Link[];
39
+ meta: Metadata;
40
+ entry: Entry[];
41
+ }
42
+
43
+ interface Metadata {
44
+ lastUpdated: string;
45
+ }
46
+ interface Link {
47
+ relation: string;
48
+ url: string;
49
+ }
50
+ interface Entry {
51
+ resource: {
52
+ id: string;
53
+ identifier: IdentifierType[];
54
+ active: boolean;
55
+ name: Name[];
56
+ telecom: ContactList[];
57
+ extension: Extension[];
58
+ gender: string;
59
+ qualification: Qualification[];
60
+ };
61
+ }
62
+ export interface Extension {
63
+ url: string;
64
+ valueCodeableConcept: ValueCodeableConcept;
65
+ }
66
+
67
+ export interface ValueCodeableConcept {
68
+ coding: Coding[];
69
+ }
70
+
71
+ export interface Coding {
72
+ system: string;
73
+ code: string;
74
+ display: string;
75
+ }
76
+
77
+ interface IdentifierType {
78
+ type: {
79
+ coding: {
80
+ code: string;
81
+ display: string;
82
+ system?: string;
83
+ }[];
84
+ };
85
+ value: string;
86
+ period?: {
87
+ start?: string;
88
+ end?: string;
89
+ };
90
+ }
91
+
92
+ interface ContactList {
93
+ system: string;
94
+ value?: string;
95
+ }
96
+
97
+ interface Name {
98
+ text: string;
99
+ }
100
+
101
+ interface Qualification {
102
+ extension: QualificationExtension[];
103
+ code: {
104
+ coding: {
105
+ system?: string;
106
+ code?: string;
107
+ display: string;
108
+ }[];
109
+ };
110
+ period: {
111
+ start: string;
112
+ end: string;
113
+ };
114
+ }
115
+
116
+ interface QualificationExtension {
117
+ url: string;
118
+ valueCoding?: {
119
+ system?: string;
120
+ code?: string;
121
+ display?: string;
122
+ };
123
+ valueString?: string;
124
+ valueCodeableConcept?: {
125
+ coding: {
126
+ system: string;
127
+ code: string;
128
+ display: string;
129
+ }[];
130
+ };
131
+ }
@@ -2,9 +2,11 @@
2
2
  "actions": "Actions",
3
3
  "addUser": "Add User",
4
4
  "adminLeftPannel": "Admin left panel",
5
+ "cancel": "Cancel",
5
6
  "clearSearch": "Clear search input",
6
7
  "completionStatus": "Completion status",
7
8
  "confirmation": "Confirmation",
9
+ "continue": "Continue to registration",
8
10
  "edit": "Edit",
9
11
  "editUser": "Edit User",
10
12
  "endTime": "End time",
@@ -19,9 +21,12 @@
19
21
  "familyName": "Family Name",
20
22
  "generalInformation": "General Information",
21
23
  "given": "Given",
24
+ "HealthworkerNotFound": "The health worker records could not be found in Health Worker registry, do you want to continue to create an account",
25
+ "healthWorkerRegistryEmpty": "Create an Account",
22
26
  "hieSynchronizationError": "An error occurred while synchronizing with HIE",
23
27
  "home": "Home",
24
28
  "kephLevel": "Keph Level",
29
+ "noHwrApi": "Health Care Worker Registry API credentials not configured,Kindly contact system admin. Do you want to continue to create an account",
25
30
  "noRecordsFound": "No ETL Operation logs found",
26
31
  "noRespond": "No",
27
32
  "noUsers": "No User Available",
@@ -38,6 +43,7 @@
38
43
  "refreshDwapi": "Refresh DWAPI tables",
39
44
  "refreshed": "refreshed",
40
45
  "refreshTables": "Refresh tables",
46
+ "ResourceNotFound": "The Health Work Registry is not reachable, kindly confirm your internet connectivity and try again. Do you want to continue to create an account",
41
47
  "roles": "Roles",
42
48
  "searchLabel": "Search",
43
49
  "searchUser": "Search user table",
@@ -52,6 +58,7 @@
52
58
  "syncingHieError": "Syncing with HIE Failed",
53
59
  "syncingHieSuccess": "Synchronization Complete",
54
60
  "systemId": "System ID",
61
+ "unknownError": "An error occured while searching Health Worker Registry, kindly contact system admin. Do you want to continue to create an account ",
55
62
  "userManagement": "User Management",
56
63
  "username": "Username",
57
64
  "users": "Users",
package/dist/373.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 373.js.LICENSE.txt */
2
- (globalThis.webpackChunk_kenyaemr_esm_admin_app=globalThis.webpackChunk_kenyaemr_esm_admin_app||[]).push([[373],{3373:(r,t)=>{var n;!function(){"use strict";var e={}.hasOwnProperty;function o(){for(var r="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(r=a(r,i(n)))}return r}function i(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return o.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var n in r)e.call(r,n)&&r[n]&&(t=a(t,n));return t}function a(r,t){return t?r?r+" "+t:r+t:r}r.exports?(o.default=o,r.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(r.exports=n)}()}}]);
package/dist/373.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"373.js","mappings":";8HAAA,OAOC,WACA,aAEA,IAAIA,EAAS,CAAC,EAAEC,eAEhB,SAASC,IAGR,IAFA,IAAIC,EAAU,GAELC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAC1C,IAAIG,EAAMF,UAAUD,GAChBG,IACHJ,EAAUK,EAAYL,EAASM,EAAWF,IAE5C,CAEA,OAAOJ,CACR,CAEA,SAASM,EAAYF,GACpB,GAAmB,iBAARA,GAAmC,iBAARA,EACrC,OAAOA,EAGR,GAAmB,iBAARA,EACV,MAAO,GAGR,GAAIG,MAAMC,QAAQJ,GACjB,OAAOL,EAAWU,MAAM,KAAML,GAG/B,GAAIA,EAAIM,WAAaC,OAAOC,UAAUF,WAAaN,EAAIM,SAASA,WAAWG,SAAS,iBACnF,OAAOT,EAAIM,WAGZ,IAAIV,EAAU,GAEd,IAAK,IAAIc,KAAOV,EACXP,EAAOkB,KAAKX,EAAKU,IAAQV,EAAIU,KAChCd,EAAUK,EAAYL,EAASc,IAIjC,OAAOd,CACR,CAEA,SAASK,EAAaW,EAAOC,GAC5B,OAAKA,EAIDD,EACIA,EAAQ,IAAMC,EAGfD,EAAQC,EAPPD,CAQT,CAEqCE,EAAOC,SAC3CpB,EAAWqB,QAAUrB,EACrBmB,EAAOC,QAAUpB,QAKhB,KAFwB,EAAF,WACtB,OAAOA,CACP,UAFoB,OAEpB,YAIH,CArEA","sources":["webpack://@kenyaemr/esm-admin-app/../../node_modules/classnames/index.js"],"names":["hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","appendClass","parseValue","Array","isArray","apply","toString","Object","prototype","includes","key","call","value","newClass","module","exports","default"],"sourceRoot":""}