@uxland/primary-shell 8.3.4 → 8.3.5

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 (146) hide show
  1. package/README.md +18 -1
  2. package/package.json +6 -14
  3. package/src/UI/bootstrapper.ts +0 -14
  4. package/src/UI/components/bootstrapper.ts +0 -25
  5. package/src/UI/components/clinical-pathways-action-menu/clinical-pathways-action-menu.ts +0 -13
  6. package/src/UI/components/communication-action-menu/communication-action-menu.ts +0 -13
  7. package/src/UI/components/error-view/component.ts +0 -17
  8. package/src/UI/components/error-view/styles.css +0 -27
  9. package/src/UI/components/error-view/template.ts +0 -12
  10. package/src/UI/components/nav-divider/nav-divider.ts +0 -41
  11. package/src/UI/components/nav-divider/styles.css +0 -21
  12. package/src/UI/components/nav-divider/template.ts +0 -8
  13. package/src/UI/components/petitioner-action-menu/petitioner-action-menu.ts +0 -13
  14. package/src/UI/components/primaria-accordion/primaria-accordion.ts +0 -45
  15. package/src/UI/components/primaria-shell/constants.ts +0 -4
  16. package/src/UI/components/primaria-shell/primaria-shell.ts +0 -105
  17. package/src/UI/components/primaria-shell/shell-header/header-divider/header-divider.ts +0 -13
  18. package/src/UI/components/primaria-shell/shell-header/header-divider/styles.css +0 -5
  19. package/src/UI/components/primaria-shell/shell-header/header-divider/template.ts +0 -8
  20. package/src/UI/components/primaria-shell/shell-header/shell-header.ts +0 -71
  21. package/src/UI/components/primaria-shell/shell-header/styles.css +0 -45
  22. package/src/UI/components/primaria-shell/shell-header/template.ts +0 -37
  23. package/src/UI/components/primaria-shell/styles.css +0 -185
  24. package/src/UI/components/primaria-shell/template.ts +0 -72
  25. package/src/UI/components/sidenav-action-menu/sidenav-action-menu.ts +0 -62
  26. package/src/UI/components/sidenav-action-menu/styles.css +0 -25
  27. package/src/UI/components/sidenav-action-menu/template.ts +0 -24
  28. package/src/UI/fonts/fonts.css +0 -48
  29. package/src/UI/fonts/open-sans-v40-latin-300.woff2 +0 -0
  30. package/src/UI/fonts/open-sans-v40-latin-500.woff2 +0 -0
  31. package/src/UI/fonts/open-sans-v40-latin-600.woff2 +0 -0
  32. package/src/UI/fonts/open-sans-v40-latin-700.woff2 +0 -0
  33. package/src/UI/fonts/open-sans-v40-latin-800.woff2 +0 -0
  34. package/src/UI/fonts/open-sans-v40-latin-regular.woff2 +0 -0
  35. package/src/UI/images/Gencat_Logotip.svg +0 -70
  36. package/src/UI/images/Salut_Logotip.svg +0 -8
  37. package/src/UI/index.ts +0 -1
  38. package/src/UI/internal-views/administrative-nav-menu.ts +0 -302
  39. package/src/UI/internal-views/common-nav-menu.ts +0 -94
  40. package/src/UI/internal-views/doctor-nav-menu.ts +0 -297
  41. package/src/UI/internal-views/doctor-quick-action-menu.ts +0 -16
  42. package/src/UI/internal-views/handle-views.ts +0 -24
  43. package/src/UI/shared-components/bootstrapper.ts +0 -18
  44. package/src/UI/shared-components/index.ts +0 -1
  45. package/src/UI/shared-components/primaria-character-limit-badge/primaria-character-limit-badge.ts +0 -27
  46. package/src/UI/shared-components/primaria-character-limit-badge/styles.css +0 -8
  47. package/src/UI/shared-components/primaria-content-switcher/primaria-content-switcher.ts +0 -78
  48. package/src/UI/shared-components/primaria-nav-item/primaria-nav-item.ts +0 -71
  49. package/src/UI/shared-components/primaria-nav-item/styles.css +0 -25
  50. package/src/UI/shared-components/primaria-nav-item/template.ts +0 -27
  51. package/src/UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu.ts +0 -41
  52. package/src/UI/shared-components/primaria-nav-tree-menu/styles.css +0 -11
  53. package/src/UI/shared-components/primaria-nav-tree-menu/template.ts +0 -46
  54. package/src/UI/shared-components/primaria-region/index.ts +0 -1
  55. package/src/UI/shared-components/primaria-region/primaria-region.ts +0 -199
  56. package/src/UI/shared-components/primaria-text-editor/primaria-rich-text-editor.ts +0 -261
  57. package/src/UI/shared-components/primaria-text-editor/styles.css +0 -966
  58. package/src/UI/shared-components/primaria-text-editor/template.ts +0 -8
  59. package/src/UI/shared-components/primaria-text-editor/utils.ts +0 -39
  60. package/src/UI/shared-components/quick-action-item/quick-action-item.ts +0 -21
  61. package/src/UI/shared-components/quick-action-item/template.ts +0 -8
  62. package/src/UI/shared-components/typings.ts +0 -19
  63. package/src/api/activity-monitor/activity-monitor.test.ts +0 -67
  64. package/src/api/activity-monitor/activity-monitor.ts +0 -26
  65. package/src/api/api.test.ts +0 -37
  66. package/src/api/api.ts +0 -119
  67. package/src/api/broker/broker-events.ts +0 -39
  68. package/src/api/broker/broker-requests.ts +0 -20
  69. package/src/api/broker/factory.test.ts +0 -378
  70. package/src/api/broker/factory.ts +0 -151
  71. package/src/api/broker/primaria-broker.ts +0 -20
  72. package/src/api/context-manager/context-manager.test.ts +0 -86
  73. package/src/api/context-manager/context-manager.ts +0 -42
  74. package/src/api/ecap-event-manager/ecap-event-manager.test.ts +0 -100
  75. package/src/api/ecap-event-manager/ecap-event-manager.ts +0 -58
  76. package/src/api/ecap-event-manager/typings.ts +0 -6
  77. package/src/api/exit-guard-manager/exit-guard-manager.test.ts +0 -75
  78. package/src/api/exit-guard-manager/exit-guard-manager.ts +0 -31
  79. package/src/api/global-state/global-state.test.ts +0 -45
  80. package/src/api/global-state/global-state.ts +0 -38
  81. package/src/api/http-client/http-client.test.ts +0 -196
  82. package/src/api/http-client/http-client.ts +0 -97
  83. package/src/api/import-data-manager/component/component.ts +0 -29
  84. package/src/api/import-data-manager/component/styles.css +0 -79
  85. package/src/api/import-data-manager/component/template.ts +0 -49
  86. package/src/api/import-data-manager/import-data-manager-impl.test.ts +0 -364
  87. package/src/api/import-data-manager/import-data-manager-impl.ts +0 -121
  88. package/src/api/import-data-manager/import-data-manager.ts +0 -42
  89. package/src/api/import-data-manager/index.ts +0 -2
  90. package/src/api/interaction-service/confirmation-message.tsx +0 -5
  91. package/src/api/interaction-service/index.ts +0 -1
  92. package/src/api/interaction-service/interaction-service-impl.tsx +0 -260
  93. package/src/api/interaction-service/interaction-service.ts +0 -52
  94. package/src/api/interaction-service/modal-styles.css +0 -97
  95. package/src/api/localization/localization.test.ts +0 -61
  96. package/src/api/localization/localization.ts +0 -58
  97. package/src/api/notification-service/notification-service-impl.test.ts +0 -84
  98. package/src/api/notification-service/notification-service.ts +0 -6
  99. package/src/api/notification-service/notification.service-impl.ts +0 -67
  100. package/src/api/pdf-viewer-manager/constants.ts +0 -1
  101. package/src/api/pdf-viewer-manager/events.ts +0 -5
  102. package/src/api/pdf-viewer-manager/handle-views.ts +0 -32
  103. package/src/api/pdf-viewer-manager/pdf-viewer-manager.test.ts +0 -126
  104. package/src/api/pdf-viewer-manager/pdf-viewer-manager.ts +0 -96
  105. package/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/pdf-selector.ts +0 -39
  106. package/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/styles.css +0 -45
  107. package/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/template.ts +0 -32
  108. package/src/api/pdf-viewer-manager/pdf-visor/pdf-visor.ts +0 -122
  109. package/src/api/pdf-viewer-manager/pdf-visor/styles.css +0 -29
  110. package/src/api/pdf-viewer-manager/pdf-visor/utils.ts +0 -16
  111. package/src/api/quick-action-busy-manager/quick-action-busy-manager.test.ts +0 -61
  112. package/src/api/quick-action-busy-manager/quick-action-busy-manager.ts +0 -45
  113. package/src/api/region-manager/region-manager.test.ts +0 -239
  114. package/src/api/region-manager/region-manager.ts +0 -263
  115. package/src/api/region-manager/regions.ts +0 -30
  116. package/src/api/region-manager/remove-view-idempotency.test.ts +0 -98
  117. package/src/api/session-refresh-timer/session-refresh-timer.test.ts +0 -102
  118. package/src/api/session-refresh-timer/session-refresh-timer.ts +0 -75
  119. package/src/api/token-manager/token-manager.test.ts +0 -146
  120. package/src/api/token-manager/token-manager.ts +0 -70
  121. package/src/api/user-manager/user-manager.ts +0 -79
  122. package/src/bootstrapper.ts +0 -41
  123. package/src/constants.ts +0 -1
  124. package/src/disposer.ts +0 -19
  125. package/src/features/bootstrapper.ts +0 -21
  126. package/src/features/exit/bootstrapper.ts +0 -17
  127. package/src/features/exit/handler.test.ts +0 -187
  128. package/src/features/exit/handler.ts +0 -58
  129. package/src/features/exit/request.ts +0 -10
  130. package/src/features/get-patient-cip/action.ts +0 -5
  131. package/src/features/get-user-info/backend-adapter.ts +0 -48
  132. package/src/features/get-user-info/bootstrapper.ts +0 -20
  133. package/src/features/get-user-info/handler.test.ts +0 -66
  134. package/src/features/get-user-info/handler.ts +0 -23
  135. package/src/features/get-user-info/model.ts +0 -10
  136. package/src/features/get-user-info/pds-token.ts +0 -28
  137. package/src/features/get-user-info/request.ts +0 -4
  138. package/src/features/get-visi-id/action.ts +0 -11
  139. package/src/features/navigate-to-ecap/navigate-to-ecap.ts +0 -21
  140. package/src/features/utils.ts +0 -27
  141. package/src/handle-plugins.ts +0 -82
  142. package/src/index.ts +0 -101
  143. package/src/infrastructure/ioc/container.ts +0 -14
  144. package/src/infrastructure/ioc/types.ts +0 -5
  145. package/src/locales.ts +0 -70
  146. package/src/types/custom.d.ts +0 -30
@@ -1,302 +0,0 @@
1
- import { shellApi } from "../../api/api";
2
- import { navigateToEcap } from "../../features/navigate-to-ecap/navigate-to-ecap";
3
- import { QuickActionItem } from "../shared-components/quick-action-item/quick-action-item";
4
- import { MenuItemConfig, registerCommunicationNavMenu, registerNavMenuDivider, registerNavMenuViews } from "./common-nav-menu";
5
-
6
- const administrativeNavMenuItems: MenuItemConfig[] = [
7
- {
8
- id: "create-visits",
9
- icon: "today",
10
- label: "Crear visites",
11
- type: "tree",
12
- sortHint: "0040",
13
- actionMenuItems: [
14
- {
15
- icon: "open_in_new",
16
- label: "Metge/essa",
17
- callbackFn: () => navigateToEcap("CREAR_VISITA_ADM", "", { TipusCrida: "UAB" }),
18
- },
19
- {
20
- icon: "open_in_new",
21
- label: "Infermeria",
22
- callbackFn: () => navigateToEcap("CREAR_VISITA_ADM", "", { TipusCrida: "UI" }),
23
- },
24
- {
25
- icon: "open_in_new",
26
- label: "Administrativa",
27
- callbackFn: () => navigateToEcap("CREAR_VISITA_ADM", "", { TipusCrida: "UAS" }),
28
- },
29
- {
30
- icon: "open_in_new",
31
- label: "Entre sectors",
32
- callbackFn: () => navigateToEcap("CREAR_VISITA_SECTORS_ADM", ""),
33
- },
34
- {
35
- icon: "open_in_new",
36
- label: "Multiprogramació",
37
- callbackFn: () => navigateToEcap("MULTIPROGRAMACIO_ADM", ""),
38
- },
39
- {
40
- icon: "open_in_new",
41
- label: "Vacunació internacional",
42
- callbackFn: () => navigateToEcap("VACUNACIO_INTERNACIONAL_ADM", "", {}, false),
43
- },
44
- ],
45
- },
46
- {
47
- id: "register-visits",
48
- icon: "event_note",
49
- label: "Registre de visites",
50
- type: "tree",
51
- sortHint: "0050",
52
- actionMenuItems: [
53
- {
54
- icon: "open_in_new",
55
- label: "Programades",
56
- callbackFn: () => navigateToEcap("VISITES_PROGRAMADES_ADM", ""),
57
- },
58
- {
59
- icon: "open_in_new",
60
- label: "Passades",
61
- callbackFn: () => navigateToEcap("VISITES_PASSADES_ADM", ""),
62
- },
63
- {
64
- icon: "open_in_new",
65
- label: "Anul·lades",
66
- callbackFn: () => navigateToEcap("VISITES_ANULADES_ADM", ""),
67
- },
68
- ],
69
- },
70
- {
71
- id: "petitions",
72
- icon: "alt_route",
73
- label: "Peticions",
74
- type: "tree",
75
- sortHint: "0060",
76
- actionMenuItems: [
77
- {
78
- icon: "open_in_new",
79
- label: "Gestió de pendents",
80
- callbackFn: () => navigateToEcap("GESTIO_PENDENTS_ADM", ""),
81
- },
82
- {
83
- icon: "open_in_new",
84
- label: "Gestió d'anul·lades",
85
- callbackFn: () => navigateToEcap("GESTIO_ANULADES_ADM", ""),
86
- },
87
- {
88
- icon: "open_in_new",
89
- label: "Modificació/consulta derivacions",
90
- callbackFn: () => navigateToEcap("MOD_CONS_DERIVACIONS_ADM", ""),
91
- },
92
- {
93
- icon: "open_in_new",
94
- label: "Ordres clíniques",
95
- callbackFn: () => navigateToEcap("ORDRES_CLINIQUES_ADM", ""),
96
- },
97
- {
98
- icon: "open_in_new",
99
- label: "Gestió IS3",
100
- callbackFn: () => navigateToEcap("PETICIONS_PEND_PROG_ADM", "", {}, false),
101
- },
102
- {
103
- icon: "",
104
- label: "Altres accessos",
105
- hasNestedMenu: true,
106
- nestedMenuItems: [
107
- {
108
- icon: "open_in_new",
109
- label: "Sol·licituds eliminades",
110
- callbackFn: () => navigateToEcap("DERIVACIONS_BAIXA_ADM", ""),
111
- },
112
- {
113
- icon: "open_in_new",
114
- label: "Impressió recordatori",
115
- callbackFn: () => navigateToEcap("DERIVACIONS_IMP_RECORD_ADM", ""),
116
- },
117
- {
118
- icon: "open_in_new",
119
- label: "Correcció de visita de laboratori",
120
- callbackFn: () => navigateToEcap("CORRECCIO_VISITA_LAB_ADM", ""),
121
- },
122
- {
123
- icon: "open_in_new",
124
- label: "Sol·licitud de trasllat",
125
- callbackFn: () => navigateToEcap("TRASLLAT_ADM", ""),
126
- },
127
- {
128
- icon: "open_in_new",
129
- label: "Informes d'autoritzacions",
130
- callbackFn: () => navigateToEcap("INFORME_AUT_ADM", "", {}, false),
131
- },
132
- {
133
- icon: "open_in_new",
134
- label: "Informes d'analítiques",
135
- callbackFn: () => navigateToEcap("INF_ANALITIQUES_ADM", ""),
136
- },
137
- ],
138
- },
139
- ],
140
- },
141
- {
142
- id: "administrative-procedures",
143
- icon: "list_alt",
144
- label: "Procediments administratius",
145
- type: "tree",
146
- sortHint: "0070",
147
- actionMenuItems: [
148
- {
149
- icon: "open_in_new",
150
- label: "Modificació",
151
- callbackFn: () => navigateToEcap("PROCEDIMENTS_MOD_ADM", ""),
152
- },
153
- {
154
- icon: "open_in_new",
155
- label: "SIUAC",
156
- callbackFn: () => navigateToEcap("SIUAC_ADM", "", {}, false),
157
- },
158
- ],
159
- },
160
- {
161
- id: "billing",
162
- icon: "receipt",
163
- label: "Facturació",
164
- type: "tree",
165
- sortHint: "0080",
166
- actionMenuItems: [
167
- {
168
- icon: "open_in_new",
169
- label: "Gestió de factures",
170
- callbackFn: () => navigateToEcap("FACTURACIO_GESTIO_ADM", "", {}, false),
171
- },
172
- {
173
- icon: "open_in_new",
174
- label: "Registres de factures",
175
- callbackFn: () => navigateToEcap("FACTURACIO_REGISTRE_ADM", ""),
176
- },
177
- {
178
- icon: "open_in_new",
179
- label: "Registres de cobraments",
180
- callbackFn: () => navigateToEcap("FACTURACIO_COBRAMENTS_ADM", "", {}, false),
181
- },
182
- {
183
- icon: "open_in_new",
184
- label: "Desvincular règim de finançament",
185
- callbackFn: () => navigateToEcap("FACTURACIO_DESVINCULAR_ADM", ""),
186
- },
187
- ],
188
- },
189
- {
190
- id: "user-docs",
191
- icon: "library_books",
192
- label: "Documents de l'usuari",
193
- type: "tree",
194
- sortHint: "0090",
195
- actionMenuItems: [
196
- {
197
- icon: "open_in_new",
198
- label: "Carrega l'escàner",
199
- callbackFn: () => navigateToEcap("ESCANER_ADM", "", {}, false),
200
- },
201
- {
202
- icon: "open_in_new",
203
- label: "Visualització documents usuari",
204
- callbackFn: () => navigateToEcap("DOCUMENTS_USUARI_ADM", ""),
205
- },
206
- {
207
- icon: "open_in_new",
208
- label: "Servei digitalització segura",
209
- callbackFn: () => navigateToEcap("DIGITALITZACIO_ADM", ""),
210
- },
211
- ],
212
- },
213
- {
214
- id: "healthcare-procedures",
215
- icon: "folder",
216
- label: "Gestions sanitàries",
217
- type: "tree",
218
- sortHint: "0100",
219
- actionMenuItems: [
220
- {
221
- icon: "open_in_new",
222
- label: "Manteniment IT",
223
- callbackFn: () => navigateToEcap("IT_MANTENIMENT_CONSULTAR", ""),
224
- },
225
- {
226
- icon: "open_in_new",
227
- label: "Pla de medicació",
228
- callbackFn: () => navigateToEcap("PLA_MEDICACIO_ADM", ""),
229
- },
230
- {
231
- icon: "",
232
- label: "Materials diabètics",
233
- hasNestedMenu: true,
234
- nestedMenuItems: [
235
- {
236
- icon: "open_in_new",
237
- label: "Lliurament de material",
238
- callbackFn: () => navigateToEcap("LLIURAMENT_MATERIAL_ADM", ""),
239
- },
240
- {
241
- icon: "open_in_new",
242
- label: "Llistats",
243
- callbackFn: () => navigateToEcap("DIABETICS_LLISTAT_ADM", "", {}, false),
244
- },
245
- ],
246
- },
247
- {
248
- icon: "open_in_new",
249
- label: "Full dosificació TAO",
250
- callbackFn: () => navigateToEcap("TAO_ADM", ""),
251
- },
252
- {
253
- icon: "open_in_new",
254
- label: "Consultar pautes demandes a l'hospital",
255
- callbackFn: () => navigateToEcap("CONSULTAR_PAUTES_ADM", "", {}, false),
256
- },
257
- ],
258
- },
259
- ];
260
-
261
- export const registerAdministrativeCommunicationMenuActions = () => {
262
- const communicationItems = [
263
- {
264
- id: "1",
265
- sortHint: "0010",
266
- icon: "open_in_new",
267
- label: "Seguretat",
268
- callbackFn: () => navigateToEcap("SEGURETAT_ADM", ""),
269
- },
270
- {
271
- id: "3",
272
- sortHint: "0030",
273
- icon: "open_in_new",
274
- label: "SMS",
275
- callbackFn: () => navigateToEcap("COMUNICACIO_MISSATGES_ADM", "", { TipusMissatge: "SMS" }),
276
- },
277
- {
278
- id: "4",
279
- sortHint: "0040",
280
- icon: "open_in_new",
281
- label: "Correu electrònic",
282
- callbackFn: () => navigateToEcap("COMUNICACIO_MISSATGES_ADM", "", { TipusMissatge: "CORREU" }),
283
- },
284
- ];
285
- for (const item of communicationItems) {
286
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.communicationSidenav, {
287
- id: item.id,
288
- sortHint: item.sortHint,
289
- factory: () => {
290
- const menuTest = new QuickActionItem(item.icon, item.label, item.callbackFn);
291
- return Promise.resolve(menuTest as any);
292
- },
293
- });
294
- }
295
- };
296
-
297
- export const registerAdministrativeNavMenuViews = () => {
298
- registerCommunicationNavMenu();
299
- registerAdministrativeCommunicationMenuActions();
300
- registerNavMenuViews(administrativeNavMenuItems);
301
- registerNavMenuDivider();
302
- };
@@ -1,94 +0,0 @@
1
- import { shellApi } from "../../api/api";
2
- import { ExitShell } from "../../features/exit/request";
3
- import { CommunicationActionMenu } from "../components/communication-action-menu/communication-action-menu";
4
- import { NavDivider } from "../components/nav-divider/nav-divider";
5
- import { PrimariaNavItem } from "../shared-components/primaria-nav-item/primaria-nav-item";
6
- import { PrimariaNavTreeMenu } from "../shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu";
7
-
8
- export type MenuItemConfig =
9
- | {
10
- id: string;
11
- sortHint?: string;
12
- icon: string;
13
- label: string;
14
- type: "item";
15
- callbackFn: () => void | Promise<void>;
16
- }
17
- | {
18
- id: string;
19
- sortHint?: string;
20
- icon: string;
21
- label: string;
22
- type: "tree";
23
- actionMenuItems: {
24
- icon: string;
25
- label: string;
26
- callbackFn?: () => void | Promise<void>;
27
- hasNestedMenu?: boolean;
28
- nestedMenuItems?: {
29
- icon: string;
30
- label: string;
31
- callbackFn: () => void | Promise<void>;
32
- }[];
33
- }[];
34
- };
35
-
36
- export const commonNavMenuItems = [
37
- {
38
- id: "landing",
39
- icon: "door_front",
40
- label: "Sortir de l’usuari",
41
- type: "item",
42
- sortHint: "0010",
43
- callbackFn: () => shellApi.broker.send(new ExitShell("OBRIR_PI")),
44
- },
45
- ];
46
-
47
- export const registerNavMenuViews = (views: MenuItemConfig[]) => {
48
- const finalViews = [...commonNavMenuItems, ...views] as MenuItemConfig[];
49
- for (const item of finalViews) {
50
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.navigationMenu, {
51
- id: item.id,
52
- sortHint: item.sortHint,
53
- factory: () => {
54
- const menuItem =
55
- item.type === "item"
56
- ? new PrimariaNavItem({
57
- icon: item.icon,
58
- label: item.label,
59
- callbackFn: item.callbackFn,
60
- })
61
- : new PrimariaNavTreeMenu({
62
- icon: item.icon,
63
- label: item.label,
64
- actionMenuItems: (item as any).actionMenuItems,
65
- });
66
-
67
- return Promise.resolve(menuItem as any);
68
- },
69
- });
70
- }
71
- };
72
-
73
- export const registerCommunicationNavMenu = () => {
74
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.navigationMenu, {
75
- id: "communication",
76
- sortHint: "0120",
77
- factory: () => {
78
- const menuItem = new CommunicationActionMenu("3p", "Comunicació");
79
-
80
- return Promise.resolve(menuItem as any);
81
- },
82
- });
83
- };
84
-
85
- export const registerNavMenuDivider = () => {
86
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.navigationMenu, {
87
- id: "nav-divider",
88
- sortHint: "0020",
89
- factory: () => {
90
- const divider = new NavDivider();
91
- return Promise.resolve(divider);
92
- },
93
- });
94
- };
@@ -1,297 +0,0 @@
1
- import { shellApi } from "../../api/api";
2
- import { getPatientCip } from "../../features/get-patient-cip/action";
3
- import { getVisiId } from "../../features/get-visi-id/action";
4
- import { navigateToEcap } from "../../features/navigate-to-ecap/navigate-to-ecap";
5
- import { ClinicalPathwaysActionMenu } from "../components/clinical-pathways-action-menu/clinical-pathways-action-menu";
6
- import { PetitionerActionMenu } from "../components/petitioner-action-menu/petitioner-action-menu";
7
- import { QuickActionItem } from "../shared-components/quick-action-item/quick-action-item";
8
- import { MenuItemConfig, registerCommunicationNavMenu, registerNavMenuDivider, registerNavMenuViews } from "./common-nav-menu";
9
-
10
- const doctorNavMenuItems: MenuItemConfig[] = [
11
- {
12
- id: "dinamic-monitoring",
13
- icon: "poll",
14
- label: "Monitoratge dinàmic",
15
- type: "item",
16
- sortHint: "0030",
17
- callbackFn: () => navigateToEcap("IA_DEV"),
18
- },
19
- {
20
- id: "analytics-monitoring", // id correcta?
21
- icon: "science",
22
- label: "Seguiment analític",
23
- type: "item",
24
- sortHint: "0060",
25
- callbackFn: () => navigateToEcap("SEGUIMENT_ANALITIC"),
26
- },
27
- {
28
- id: "results-reports",
29
- icon: "folder_shared",
30
- label: "Documents",
31
- type: "tree",
32
- sortHint: "0070",
33
- actionMenuItems: [
34
- {
35
- icon: "open_in_new",
36
- label: "Resultats i informes",
37
- callbackFn: () => navigateToEcap("RESULTAT_INFORMES"),
38
- },
39
- {
40
- icon: "open_in_new",
41
- label: "Documents usuari",
42
- callbackFn: () => {
43
- setTimeout(() => {
44
- navigateToEcap("CRIDA_DOCS_USU");
45
- }, 0);
46
- },
47
- },
48
- {
49
- icon: "open_in_new",
50
- label: "Informes clínics",
51
- callbackFn: () => navigateToEcap("INFORME_CLINIC_NET"),
52
- },
53
- ],
54
- },
55
- {
56
- id: "test-cabinets",
57
- icon: "list_alt",
58
- label: "Gabinets de proves",
59
- type: "item",
60
- sortHint: "0080",
61
- callbackFn: () => navigateToEcap("GABINETS_PROVES"),
62
- },
63
- {
64
- id: "prescriptions",
65
- icon: "pill",
66
- label: "Prescripció",
67
- type: "tree",
68
- sortHint: "0090",
69
- actionMenuItems: [
70
- {
71
- icon: "open_in_new",
72
- label: "Prescripció",
73
- callbackFn: async () => {
74
- const visiId = await getVisiId(shellApi);
75
- navigateToEcap("PRESCRIPCIO_ACTIVA", "NO_TANCAR", visiId ? { VisiId: visiId } : {});
76
- },
77
- },
78
- {
79
- icon: "open_in_new",
80
- label: "Ordres de tractament",
81
- callbackFn: () => navigateToEcap("ORDRE_TRACTAMENT"),
82
- },
83
- {
84
- icon: "open_in_new",
85
- label: "Dispensació material sanitari",
86
- callbackFn: () => navigateToEcap("DISPENSACIO_MATERIAL_PACIENT"),
87
- },
88
- {
89
- icon: "open_in_new",
90
- label: "Prescripció social",
91
- callbackFn: () => navigateToEcap("PRESCRIPCIO_SOCIAL"),
92
- },
93
- ],
94
- },
95
- {
96
- id: "vaccines",
97
- icon: "vaccines",
98
- label: "Immunitzacions",
99
- type: "item",
100
- sortHint: "0100",
101
- callbackFn: () => navigateToEcap("IMMUNITZACIONS"),
102
- },
103
- {
104
- id: "it",
105
- icon: "history_toggle_off",
106
- label: "Incapacitat temporal",
107
- type: "item",
108
- sortHint: "0100",
109
- callbackFn: async () => {
110
- const visiId = await getVisiId(shellApi);
111
- navigateToEcap("REV_IT", "NO_TANCAR", visiId ? { VisiId: visiId } : {});
112
- },
113
- },
114
- {
115
- id: "visits",
116
- icon: "event",
117
- label: "Visites",
118
- type: "item",
119
- sortHint: "0130",
120
- callbackFn: () => navigateToEcap("CONSULTA_VISITES"),
121
- },
122
- ];
123
-
124
- export const registerClinicalPathwaysNavMenu = () => {
125
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.navigationMenu, {
126
- id: "processes",
127
- sortHint: "0040",
128
- factory: () => {
129
- const menuItem = new ClinicalPathwaysActionMenu("account_tree", "Vies clíniques");
130
-
131
- return Promise.resolve(menuItem as any);
132
- },
133
- });
134
- };
135
-
136
- export const registerDoctorCommunicationMenuActions = () => {
137
- const communicationItems = [
138
- {
139
- id: "1",
140
- sortHint: "0010",
141
- icon: "open_in_new",
142
- label: "SMS",
143
- callbackFn: async () => {
144
- const CIP = await getPatientCip(shellApi);
145
- shellApi.ecapEventManager.publish("MISSATGES_DEV", "NO_TANCAR", {
146
- CIP: CIP || "",
147
- TipusMissatge: "SMS",
148
- });
149
- },
150
- },
151
- {
152
- id: "3",
153
- icon: "open_in_new",
154
- label: "Mail",
155
- callbackFn: async () => {
156
- const CIP = await getPatientCip(shellApi);
157
- shellApi.ecapEventManager.publish("COMUNICACIO_MISSATGES_CREAR", "NO_TANCAR", {
158
- CIP: CIP || "",
159
- TipusMissatge: "SMS",
160
- });
161
- },
162
- },
163
- {
164
- id: "4",
165
- sortHint: "0030",
166
- icon: "open_in_new",
167
- label: "Veu IP",
168
- callbackFn: () => navigateToEcap("VOIP"),
169
- },
170
- // { id: "5", sortHint: "0040", icon: "open_in_new", label: "Videoconsulta", callbackFn: () => {} },
171
- ];
172
- for (const item of communicationItems) {
173
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.communicationSidenav, {
174
- id: item.id,
175
- sortHint: item.sortHint,
176
- factory: () => {
177
- const menuTest = new QuickActionItem(item.icon, item.label, item.callbackFn);
178
- return Promise.resolve(menuTest as any);
179
- },
180
- });
181
- }
182
- };
183
-
184
- export const registerDoctorClinicalPathwaysMenuActions = () => {
185
- const clinicalPathwaysItems = [
186
- {
187
- id: "3",
188
- sortHint: "0030",
189
- icon: "open_in_new",
190
- label: "Nen sa",
191
- callbackFn: () => navigateToEcap("NEN_SA"),
192
- },
193
- {
194
- id: "4",
195
- sortHint: "0040",
196
- icon: "open_in_new",
197
- label: "ASSIR",
198
- callbackFn: () => navigateToEcap("NAVEGACIO_ASSIR"),
199
- },
200
- {
201
- id: "5",
202
- sortHint: "0050",
203
- icon: "open_in_new",
204
- label: "Odontologia",
205
- callbackFn: () => navigateToEcap("ODONTOLOGO"),
206
- },
207
- {
208
- id: "6",
209
- sortHint: "0060",
210
- icon: "open_in_new",
211
- label: "Situació d'especial cura",
212
- callbackFn: () => navigateToEcap("SIT_ESPEC_CURA_DEV"),
213
- },
214
- {
215
- id: "7",
216
- sortHint: "0070",
217
- icon: "open_in_new",
218
- label: "Valoració social",
219
- callbackFn: () => navigateToEcap("VALORACIO_SOCIAL"),
220
- },
221
- ];
222
- for (const item of clinicalPathwaysItems) {
223
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.clinicalPathwaysSidenav, {
224
- id: item.id,
225
- sortHint: item.sortHint,
226
- factory: () => {
227
- const menuTest = new QuickActionItem(item.icon, item.label, item.callbackFn);
228
- return Promise.resolve(menuTest as any);
229
- },
230
- });
231
- }
232
- };
233
-
234
- export const registerPetitionerNavMenu = () => {
235
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.navigationMenu, {
236
- id: "petitioner",
237
- sortHint: "0050",
238
- factory: () => {
239
- const menuItem = new PetitionerActionMenu("playlist_add", "Peticionari");
240
- return Promise.resolve(menuItem as any);
241
- },
242
- });
243
- };
244
-
245
- export const registerDoctorPetitionerMenuActions = () => {
246
- const petitionerItems = [
247
- {
248
- id: "1",
249
- sortHint: "0010",
250
- icon: "open_in_new",
251
- label: "Analítiques",
252
- callbackFn: () => navigateToEcap("LABORATORI"),
253
- },
254
- {
255
- id: "2",
256
- sortHint: "0020",
257
- icon: "open_in_new",
258
- label: "Ordres Clíniques",
259
- callbackFn: () => navigateToEcap("RESULT_OC"),
260
- },
261
- {
262
- id: "3",
263
- sortHint: "0030",
264
- icon: "open_in_new",
265
- label: "OC Exprés",
266
- callbackFn: () => navigateToEcap("OC_EXPRES"),
267
- },
268
- {
269
- id: "4",
270
- sortHint: "0040",
271
- icon: "open_in_new",
272
- label: "Sol·licitud de trasllat",
273
- callbackFn: () => navigateToEcap("TRANSPORT"),
274
- },
275
- ];
276
- for (const item of petitionerItems) {
277
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.petitionerSidenav, {
278
- id: item.id,
279
- sortHint: item.sortHint,
280
- factory: () => {
281
- const menuItem = new QuickActionItem(item.icon, item.label, item.callbackFn);
282
- return Promise.resolve(menuItem as any);
283
- },
284
- });
285
- }
286
- };
287
-
288
- export const registerDoctorNavMenuViews = () => {
289
- registerCommunicationNavMenu();
290
- registerDoctorCommunicationMenuActions();
291
- registerClinicalPathwaysNavMenu();
292
- registerDoctorClinicalPathwaysMenuActions();
293
- registerPetitionerNavMenu();
294
- registerDoctorPetitionerMenuActions();
295
- registerNavMenuViews(doctorNavMenuItems);
296
- registerNavMenuDivider();
297
- };
@@ -1,16 +0,0 @@
1
- import { shellApi } from "../../api/api";
2
- import { QuickActionItem } from "../shared-components/quick-action-item/quick-action-item";
3
- import { navigateToEcap } from "../../features/navigate-to-ecap/navigate-to-ecap";
4
-
5
- export const registerDoctorQuickActionViews = () => {
6
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.quickActions, {
7
- id: "dates",
8
- sortHint: "0011",
9
- factory: () => {
10
- const quickActionItem = new QuickActionItem("", "Cita", () => {
11
- navigateToEcap("CREAR_VISITA");
12
- });
13
- return Promise.resolve(quickActionItem);
14
- },
15
- });
16
- };