@bahmni/services 0.0.1-dev.49

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 (230) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +21 -0
  3. package/dist/AppointmentService/appointmmetService.d.ts +4 -0
  4. package/dist/AppointmentService/appointmmetService.d.ts.map +1 -0
  5. package/dist/AppointmentService/constatns.d.ts +3 -0
  6. package/dist/AppointmentService/constatns.d.ts.map +1 -0
  7. package/dist/AppointmentService/index.d.ts +3 -0
  8. package/dist/AppointmentService/index.d.ts.map +1 -0
  9. package/dist/AppointmentService/models.d.ts +71 -0
  10. package/dist/AppointmentService/models.d.ts.map +1 -0
  11. package/dist/allergyService/__mocks__/mocks.d.ts +56 -0
  12. package/dist/allergyService/__mocks__/mocks.d.ts.map +1 -0
  13. package/dist/allergyService/allergyService.d.ts +41 -0
  14. package/dist/allergyService/allergyService.d.ts.map +1 -0
  15. package/dist/allergyService/constants.d.ts +15 -0
  16. package/dist/allergyService/constants.d.ts.map +1 -0
  17. package/dist/allergyService/index.d.ts +3 -0
  18. package/dist/allergyService/index.d.ts.map +1 -0
  19. package/dist/allergyService/models.d.ts +60 -0
  20. package/dist/allergyService/models.d.ts.map +1 -0
  21. package/dist/api/api.d.ts +27 -0
  22. package/dist/api/api.d.ts.map +1 -0
  23. package/dist/api/client.d.ts +4 -0
  24. package/dist/api/client.d.ts.map +1 -0
  25. package/dist/api/constants.d.ts +2 -0
  26. package/dist/api/constants.d.ts.map +1 -0
  27. package/dist/api/index.d.ts +2 -0
  28. package/dist/api/index.d.ts.map +1 -0
  29. package/dist/api/utils.d.ts +20 -0
  30. package/dist/api/utils.d.ts.map +1 -0
  31. package/dist/applicationConfigService/ApplicationConfigService.d.ts +17 -0
  32. package/dist/applicationConfigService/ApplicationConfigService.d.ts.map +1 -0
  33. package/dist/applicationConfigService/constants.d.ts +3 -0
  34. package/dist/applicationConfigService/constants.d.ts.map +1 -0
  35. package/dist/applicationConfigService/index.d.ts +2 -0
  36. package/dist/applicationConfigService/index.d.ts.map +1 -0
  37. package/dist/auditLogService/auditEventDispatcher.d.ts +20 -0
  38. package/dist/auditLogService/auditEventDispatcher.d.ts.map +1 -0
  39. package/dist/auditLogService/auditLogService.d.ts +11 -0
  40. package/dist/auditLogService/auditLogService.d.ts.map +1 -0
  41. package/dist/auditLogService/constants.d.ts +44 -0
  42. package/dist/auditLogService/constants.d.ts.map +1 -0
  43. package/dist/auditLogService/globalAuditListener.d.ts +11 -0
  44. package/dist/auditLogService/globalAuditListener.d.ts.map +1 -0
  45. package/dist/auditLogService/index.d.ts +6 -0
  46. package/dist/auditLogService/index.d.ts.map +1 -0
  47. package/dist/auditLogService/models.d.ts +12 -0
  48. package/dist/auditLogService/models.d.ts.map +1 -0
  49. package/dist/cameraService/index.d.ts +2 -0
  50. package/dist/cameraService/index.d.ts.map +1 -0
  51. package/dist/cameraService/useCamera.d.ts +7 -0
  52. package/dist/cameraService/useCamera.d.ts.map +1 -0
  53. package/dist/conceptService/conceptService.d.ts +17 -0
  54. package/dist/conceptService/conceptService.d.ts.map +1 -0
  55. package/dist/conceptService/constants.d.ts +4 -0
  56. package/dist/conceptService/constants.d.ts.map +1 -0
  57. package/dist/conceptService/index.d.ts +3 -0
  58. package/dist/conceptService/index.d.ts.map +1 -0
  59. package/dist/conceptService/models.d.ts +11 -0
  60. package/dist/conceptService/models.d.ts.map +1 -0
  61. package/dist/conditionService/__mocks__/mocks.d.ts +22 -0
  62. package/dist/conditionService/__mocks__/mocks.d.ts.map +1 -0
  63. package/dist/conditionService/conditionService.d.ts +14 -0
  64. package/dist/conditionService/conditionService.d.ts.map +1 -0
  65. package/dist/conditionService/constants.d.ts +2 -0
  66. package/dist/conditionService/constants.d.ts.map +1 -0
  67. package/dist/conditionService/index.d.ts +3 -0
  68. package/dist/conditionService/index.d.ts.map +1 -0
  69. package/dist/conditionService/models.d.ts +13 -0
  70. package/dist/conditionService/models.d.ts.map +1 -0
  71. package/dist/configService/__mocks__/configMocks.d.ts +191 -0
  72. package/dist/configService/__mocks__/configMocks.d.ts.map +1 -0
  73. package/dist/configService/configService.d.ts +31 -0
  74. package/dist/configService/configService.d.ts.map +1 -0
  75. package/dist/configService/constants.d.ts +22 -0
  76. package/dist/configService/constants.d.ts.map +1 -0
  77. package/dist/configService/index.d.ts +3 -0
  78. package/dist/configService/index.d.ts.map +1 -0
  79. package/dist/configService/models/config.d.ts +27 -0
  80. package/dist/configService/models/config.d.ts.map +1 -0
  81. package/dist/configService/models/dashboardConfig.d.ts +11 -0
  82. package/dist/configService/models/dashboardConfig.d.ts.map +1 -0
  83. package/dist/configService/models/medicationConfig.d.ts +41 -0
  84. package/dist/configService/models/medicationConfig.d.ts.map +1 -0
  85. package/dist/configService/models/registrationConfig.d.ts +84 -0
  86. package/dist/configService/models/registrationConfig.d.ts.map +1 -0
  87. package/dist/configService/models.d.ts +5 -0
  88. package/dist/configService/models.d.ts.map +1 -0
  89. package/dist/configService/schemas/clinicalConfig.schema.json.d.ts +98 -0
  90. package/dist/configService/schemas/dashboardConfig.schema.json.d.ts +40 -0
  91. package/dist/configService/schemas/medicationConfig.schema.json.d.ts +40 -0
  92. package/dist/configService/schemas/registrationConfig.schema.json.d.ts +329 -0
  93. package/dist/constants/app.d.ts +10 -0
  94. package/dist/constants/app.d.ts.map +1 -0
  95. package/dist/constants/fhir.d.ts +11 -0
  96. package/dist/constants/fhir.d.ts.map +1 -0
  97. package/dist/date/constants.d.ts +6 -0
  98. package/dist/date/constants.d.ts.map +1 -0
  99. package/dist/date/date.d.ts +71 -0
  100. package/dist/date/date.d.ts.map +1 -0
  101. package/dist/date/errors.d.ts +8 -0
  102. package/dist/date/errors.d.ts.map +1 -0
  103. package/dist/date/index.d.ts +3 -0
  104. package/dist/date/index.d.ts.map +1 -0
  105. package/dist/diagnosesService/constants.d.ts +4 -0
  106. package/dist/diagnosesService/constants.d.ts.map +1 -0
  107. package/dist/diagnosesService/diagnosesService.d.ts +8 -0
  108. package/dist/diagnosesService/diagnosesService.d.ts.map +1 -0
  109. package/dist/diagnosesService/index.d.ts +3 -0
  110. package/dist/diagnosesService/index.d.ts.map +1 -0
  111. package/dist/diagnosesService/models.d.ts +22 -0
  112. package/dist/diagnosesService/models.d.ts.map +1 -0
  113. package/dist/encounterService/__mocks__/mocks.d.ts +182 -0
  114. package/dist/encounterService/__mocks__/mocks.d.ts.map +1 -0
  115. package/dist/encounterService/constants.d.ts +2 -0
  116. package/dist/encounterService/constants.d.ts.map +1 -0
  117. package/dist/encounterService/encounterService.d.ts +20 -0
  118. package/dist/encounterService/encounterService.d.ts.map +1 -0
  119. package/dist/encounterService/index.d.ts +2 -0
  120. package/dist/encounterService/index.d.ts.map +1 -0
  121. package/dist/encounterSessionService/constants.d.ts +4 -0
  122. package/dist/encounterSessionService/constants.d.ts.map +1 -0
  123. package/dist/encounterSessionService/encounterSessionService.d.ts +43 -0
  124. package/dist/encounterSessionService/encounterSessionService.d.ts.map +1 -0
  125. package/dist/encounterSessionService/index.d.ts +2 -0
  126. package/dist/encounterSessionService/index.d.ts.map +1 -0
  127. package/dist/errorHandling/index.d.ts +2 -0
  128. package/dist/errorHandling/index.d.ts.map +1 -0
  129. package/dist/errorHandling/utils.d.ts +10 -0
  130. package/dist/errorHandling/utils.d.ts.map +1 -0
  131. package/dist/i18n/constants.d.ts +5 -0
  132. package/dist/i18n/constants.d.ts.map +1 -0
  133. package/dist/i18n/i18n.d.ts +10 -0
  134. package/dist/i18n/i18n.d.ts.map +1 -0
  135. package/dist/i18n/index.d.ts +3 -0
  136. package/dist/i18n/index.d.ts.map +1 -0
  137. package/dist/i18n/translationService.d.ts +25 -0
  138. package/dist/i18n/translationService.d.ts.map +1 -0
  139. package/dist/index.d.ts +31 -0
  140. package/dist/index.d.ts.map +1 -0
  141. package/dist/index.js +12066 -0
  142. package/dist/investigationService/constants.d.ts +5 -0
  143. package/dist/investigationService/constants.d.ts.map +1 -0
  144. package/dist/investigationService/index.d.ts +3 -0
  145. package/dist/investigationService/index.d.ts.map +1 -0
  146. package/dist/investigationService/investigationService.d.ts +3 -0
  147. package/dist/investigationService/investigationService.d.ts.map +1 -0
  148. package/dist/investigationService/model.d.ts +20 -0
  149. package/dist/investigationService/model.d.ts.map +1 -0
  150. package/dist/labInvestigationService/constants.d.ts +4 -0
  151. package/dist/labInvestigationService/constants.d.ts.map +1 -0
  152. package/dist/labInvestigationService/index.d.ts +3 -0
  153. package/dist/labInvestigationService/index.d.ts.map +1 -0
  154. package/dist/labInvestigationService/labInvestigationService.d.ts +49 -0
  155. package/dist/labInvestigationService/labInvestigationService.d.ts.map +1 -0
  156. package/dist/labInvestigationService/models.d.ts +37 -0
  157. package/dist/labInvestigationService/models.d.ts.map +1 -0
  158. package/dist/medicationRequestService/constants.d.ts +2 -0
  159. package/dist/medicationRequestService/constants.d.ts.map +1 -0
  160. package/dist/medicationRequestService/index.d.ts +3 -0
  161. package/dist/medicationRequestService/index.d.ts.map +1 -0
  162. package/dist/medicationRequestService/medicationRequestService.d.ts +15 -0
  163. package/dist/medicationRequestService/medicationRequestService.d.ts.map +1 -0
  164. package/dist/medicationRequestService/models.d.ts +58 -0
  165. package/dist/medicationRequestService/models.d.ts.map +1 -0
  166. package/dist/notification/index.d.ts +3 -0
  167. package/dist/notification/index.d.ts.map +1 -0
  168. package/dist/notification/models.d.ts +9 -0
  169. package/dist/notification/models.d.ts.map +1 -0
  170. package/dist/notification/notificationService.d.ts +22 -0
  171. package/dist/notification/notificationService.d.ts.map +1 -0
  172. package/dist/observationFormsService/index.d.ts +3 -0
  173. package/dist/observationFormsService/index.d.ts.map +1 -0
  174. package/dist/observationFormsService/models.d.ts +26 -0
  175. package/dist/observationFormsService/models.d.ts.map +1 -0
  176. package/dist/observationFormsService/observationFormsService.d.ts +6 -0
  177. package/dist/observationFormsService/observationFormsService.d.ts.map +1 -0
  178. package/dist/patientService/constants.d.ts +27 -0
  179. package/dist/patientService/constants.d.ts.map +1 -0
  180. package/dist/patientService/index.d.ts +4 -0
  181. package/dist/patientService/index.d.ts.map +1 -0
  182. package/dist/patientService/models.d.ts +224 -0
  183. package/dist/patientService/models.d.ts.map +1 -0
  184. package/dist/patientService/patientService.d.ts +123 -0
  185. package/dist/patientService/patientService.d.ts.map +1 -0
  186. package/dist/privilegeService/index.d.ts +3 -0
  187. package/dist/privilegeService/index.d.ts.map +1 -0
  188. package/dist/privilegeService/models.d.ts +9 -0
  189. package/dist/privilegeService/models.d.ts.map +1 -0
  190. package/dist/privilegeService/privilegeService.d.ts +15 -0
  191. package/dist/privilegeService/privilegeService.d.ts.map +1 -0
  192. package/dist/providerService/constants.d.ts +2 -0
  193. package/dist/providerService/constants.d.ts.map +1 -0
  194. package/dist/providerService/index.d.ts +3 -0
  195. package/dist/providerService/index.d.ts.map +1 -0
  196. package/dist/providerService/models.d.ts +51 -0
  197. package/dist/providerService/models.d.ts.map +1 -0
  198. package/dist/providerService/providerService.d.ts +7 -0
  199. package/dist/providerService/providerService.d.ts.map +1 -0
  200. package/dist/radiologyInvestigationService/__mocks__/mocks.d.ts +17 -0
  201. package/dist/radiologyInvestigationService/__mocks__/mocks.d.ts.map +1 -0
  202. package/dist/radiologyInvestigationService/constants.d.ts +2 -0
  203. package/dist/radiologyInvestigationService/constants.d.ts.map +1 -0
  204. package/dist/radiologyInvestigationService/index.d.ts +3 -0
  205. package/dist/radiologyInvestigationService/index.d.ts.map +1 -0
  206. package/dist/radiologyInvestigationService/models.d.ts +12 -0
  207. package/dist/radiologyInvestigationService/models.d.ts.map +1 -0
  208. package/dist/radiologyInvestigationService/radiologyInvestigationService.d.ts +15 -0
  209. package/dist/radiologyInvestigationService/radiologyInvestigationService.d.ts.map +1 -0
  210. package/dist/userService/constants.d.ts +3 -0
  211. package/dist/userService/constants.d.ts.map +1 -0
  212. package/dist/userService/index.d.ts +3 -0
  213. package/dist/userService/index.d.ts.map +1 -0
  214. package/dist/userService/models.d.ts +18 -0
  215. package/dist/userService/models.d.ts.map +1 -0
  216. package/dist/userService/userService.d.ts +10 -0
  217. package/dist/userService/userService.d.ts.map +1 -0
  218. package/dist/utils/index.d.ts +2 -0
  219. package/dist/utils/index.d.ts.map +1 -0
  220. package/dist/utils/utils.d.ts +84 -0
  221. package/dist/utils/utils.d.ts.map +1 -0
  222. package/dist/vitalFlowSheetService/constants.d.ts +2 -0
  223. package/dist/vitalFlowSheetService/constants.d.ts.map +1 -0
  224. package/dist/vitalFlowSheetService/index.d.ts +3 -0
  225. package/dist/vitalFlowSheetService/index.d.ts.map +1 -0
  226. package/dist/vitalFlowSheetService/model.d.ts +22 -0
  227. package/dist/vitalFlowSheetService/model.d.ts.map +1 -0
  228. package/dist/vitalFlowSheetService/vitalFlowSheetService.d.ts +11 -0
  229. package/dist/vitalFlowSheetService/vitalFlowSheetService.d.ts.map +1 -0
  230. package/package.json +44 -0
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
3
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
4
+ * obtain one at http://mozilla.org/MPL/2.0/. Bahmni is also distributed under
5
+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
6
+ *
7
+ * Copyright 2025. Thoughtworks, Inc. Thoughtworks is a registered trademark
8
+ * and the Thoughtworks graphic logo is a trademark of Thoughtworks Inc.
9
+ */
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+
2
+ # @bahmni/services
3
+
4
+ ## Description
5
+
6
+ A set of service utilities and API integration helpers that act as an abstraction layer for communicating with OpenMRS backend APIs.
7
+
8
+ ## Bundler Configuration
9
+
10
+ When bundling this library in your application, you need to configure your bundler to define the `process.env` environment variable
11
+
12
+ ### Example Configurations:
13
+
14
+ **Vite:**
15
+
16
+ ```typescript
17
+ // vite.config.ts
18
+ define: {
19
+ 'process.env': {}
20
+ }
21
+ ```
@@ -0,0 +1,4 @@
1
+ import { Appointment } from './models';
2
+ export declare const searchAppointmentsByAttribute: (searchTerm: Record<string, string>) => Promise<Appointment[]>;
3
+ export declare const updateAppointmentStatus: (appointmentUuid: string, toStatus: string, onDate?: Date) => Promise<Appointment>;
4
+ //# sourceMappingURL=appointmmetService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appointmmetService.d.ts","sourceRoot":"","sources":["../../src/AppointmentService/appointmmetService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,6BAA6B,GACxC,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACjC,OAAO,CAAC,WAAW,EAAE,CAMvB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,iBAAiB,MAAM,EACvB,UAAU,MAAM,EAChB,SAAS,IAAI,KACZ,OAAO,CAAC,WAAW,CAMrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const APPOINTMENTS_SEARCH_URL: string;
2
+ export declare const APPOINTMENTS_URL: string;
3
+ //# sourceMappingURL=constatns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constatns.d.ts","sourceRoot":"","sources":["../../src/AppointmentService/constatns.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,QAA2C,CAAC;AAChF,eAAO,MAAM,gBAAgB,QAAoC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { searchAppointmentsByAttribute, updateAppointmentStatus, } from './appointmmetService';
2
+ export { type Appointment, type AppointmentSearchResult, type Reason, } from './models';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/AppointmentService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,MAAM,GACZ,MAAM,UAAU,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { PatientSearchResult } from '../patientService/models';
2
+ export interface AppointmentSearchResult extends PatientSearchResult {
3
+ appointmentUuid?: string;
4
+ appointmentNumber?: string;
5
+ appointmentDate?: string;
6
+ appointmentReason?: string;
7
+ appointmentStatus?: string;
8
+ }
9
+ export interface Appointment {
10
+ length: number;
11
+ uuid: string;
12
+ appointmentNumber: string;
13
+ dateCreated: number;
14
+ dateAppointmentScheduled: number;
15
+ patient: Patient;
16
+ service: AppointmentService;
17
+ serviceType: ServiceType | null;
18
+ provider: Provider | null;
19
+ location: Location;
20
+ startDateTime: number;
21
+ endDateTime: number;
22
+ appointmentKind: string;
23
+ status: string;
24
+ comments: string | null;
25
+ reasons: Reason[];
26
+ }
27
+ export interface Patient {
28
+ identifier: string;
29
+ gender: string;
30
+ name: string;
31
+ uuid: string;
32
+ birthDate: number;
33
+ age: number;
34
+ PatientIdentifier: string;
35
+ customAttributes: [];
36
+ }
37
+ export interface AppointmentService {
38
+ appointmentServiceId: number;
39
+ name: string;
40
+ description: string | null;
41
+ speciality: null;
42
+ startTime: string;
43
+ endTime: string;
44
+ location: Location;
45
+ uuid: string;
46
+ color: string;
47
+ initialAppointmentStatus: string | null;
48
+ }
49
+ export interface Location {
50
+ name: string;
51
+ uuid: string;
52
+ }
53
+ export interface Provider {
54
+ id?: number;
55
+ name?: string;
56
+ uuid?: string;
57
+ }
58
+ export interface Extensions {
59
+ patientEmailDefined: boolean;
60
+ }
61
+ export interface Reason {
62
+ conceptUuid: string;
63
+ name: string;
64
+ }
65
+ export interface ServiceType {
66
+ id?: number;
67
+ name?: string;
68
+ description?: string;
69
+ uuid?: string;
70
+ }
71
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/AppointmentService/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,MAAM;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,56 @@
1
+ import { AllergyIntolerance, Bundle } from 'fhir/r4';
2
+ export declare const mockAllergyIntolerance: AllergyIntolerance;
3
+ export declare const mockAllergyIntoleranceWithoutNote: AllergyIntolerance;
4
+ export declare const mockAllergyIntoleranceBundle: Bundle;
5
+ export declare const mockEmptyAllergyIntoleranceBundle: Bundle;
6
+ export declare const mockAllergyIntoleranceBundleWithoutEntries: Bundle;
7
+ /**
8
+ * Mock allergy with missing fields (recorder, reactions, note)
9
+ */
10
+ export declare const mockAllergyWithMissingFields: AllergyIntolerance;
11
+ export declare const mockAllergyWithEmptyReactions: AllergyIntolerance;
12
+ export declare const mockAllergyWithIncompleteReactions: AllergyIntolerance;
13
+ export declare const mockAllergyWithoutClinicalStatusDisplay: AllergyIntolerance;
14
+ /**
15
+ * Mock allergy with multiple detailed notes
16
+ */
17
+ export declare const mockAllergyWithMultipleNotes: AllergyIntolerance;
18
+ /**
19
+ * Mock allergy with empty notes array
20
+ */
21
+ export declare const mockAllergyWithEmptyNotes: AllergyIntolerance;
22
+ /**
23
+ * Mock allergy with multiple categories
24
+ */
25
+ export declare const mockAllergyWithMultipleCategories: AllergyIntolerance;
26
+ /**
27
+ * Mock allergy with different criticality levels
28
+ */
29
+ export declare const mockAllergyWithHighCriticality: AllergyIntolerance;
30
+ export declare const mockAllergyWithLowCriticality: AllergyIntolerance;
31
+ /**
32
+ * Mock allergy with specific type
33
+ */
34
+ export declare const mockAllergyWithType: AllergyIntolerance;
35
+ export declare const mockIntoleranceWithType: AllergyIntolerance;
36
+ /**
37
+ * Mock allergy with inactive status
38
+ */
39
+ export declare const mockInactiveAllergy: AllergyIntolerance;
40
+ /**
41
+ * Mock malformed FHIR bundle
42
+ */
43
+ export declare const mockMalformedFhirBundle: Bundle;
44
+ /**
45
+ * Mock bundle with invalid entry structure
46
+ */
47
+ export declare const mockBundleWithInvalidEntry: Bundle;
48
+ /**
49
+ * Mock allergy with invalid coding array
50
+ */
51
+ export declare const mockAllergyWithInvalidCoding: AllergyIntolerance;
52
+ /**
53
+ * Mock allergy with multiple reactions of different severities
54
+ */
55
+ export declare const mockAllergyWithMultipleSeverities: AllergyIntolerance;
56
+ //# sourceMappingURL=mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/allergyService/__mocks__/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,sBAAsB,EAAE,kBAgEpC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,kBAG/C,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAoB1C,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,MAc/C,CAAC;AAEF,eAAO,MAAM,0CAA0C,EAAE,MAcxD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,kBAgC1C,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,kBAI3C,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,kBAYhD,CAAC;AAEF,eAAO,MAAM,uCAAuC,EAAE,kBAMrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,kBAc1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAIvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,kBAI/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,kBAI5C,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,kBAI3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBAIjC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,kBAIrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBAajC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAOpB,MAAM,CAAC;AAEvB;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAwBxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,kBAU1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,kBAkD/C,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { AllergyIntolerance, Bundle, Coding } from 'fhir/r4';
2
+ import { AllergenConcept, FormattedAllergy } from './models';
3
+ /**
4
+ * Fetches and formats allergen concepts from FHIR ValueSets
5
+ * @param medicationUuid - Optional UUID for medication allergen concepts
6
+ * @param foodUuid - Optional UUID for food allergen concepts
7
+ * @param environmentUuid - Optional UUID for environment allergen concepts
8
+ * @returns Promise resolving to an array of formatted allergen concepts
9
+ */
10
+ export declare const fetchAndFormatAllergenConcepts: (medicationUuid?: string, foodUuid?: string, environmentUuid?: string) => Promise<AllergenConcept[]>;
11
+ /**
12
+ * Fetches and formats reaction concepts from FHIR ValueSet
13
+ * @param reactionUuid - Optional UUID for reaction concepts
14
+ * @returns Promise resolving to an array of formatted reaction concepts
15
+ */
16
+ export declare const fetchReactionConcepts: (reactionUuid?: string) => Promise<Coding[]>;
17
+ /**
18
+ * Fetches allergies for a given patient UUID from the FHIR R4 endpoint
19
+ * @param patientUUID - The UUID of the patient
20
+ * @returns Promise resolving to a Bundle
21
+ */
22
+ export declare function getPatientAllergiesBundle(patientUUID: string): Promise<Bundle>;
23
+ /**
24
+ * Fetches and transforms allergies for a given patient UUID
25
+ * @param patientUUID - The UUID of the patient
26
+ * @returns Promise resolving to an array of AllergyIntolerance
27
+ */
28
+ export declare function getAllergies(patientUUID: string): Promise<AllergyIntolerance[]>;
29
+ /**
30
+ * Formats a FHIR allergy into a more user-friendly format
31
+ * @param allergies - The FHIR allergy array to format
32
+ * @returns A formatted allergy object array
33
+ */
34
+ export declare function formatAllergies(allergies: AllergyIntolerance[]): FormattedAllergy[];
35
+ /**
36
+ * Fetches and formats allergies for a given patient UUID
37
+ * @param patientUUID - The UUID of the patient
38
+ * @returns Promise resolving to an array of FormattedAllergy
39
+ */
40
+ export declare function getFormattedAllergies(patientUUID: string): Promise<FormattedAllergy[]>;
41
+ //# sourceMappingURL=allergyService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allergyService.d.ts","sourceRoot":"","sources":["../../src/allergyService/allergyService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAY,MAAM,SAAS,CAAC;AAQ5E,OAAO,EAAE,eAAe,EAAgB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAkD3E;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,GACzC,iBAAiB,MAAM,EACvB,WAAW,MAAM,EACjB,kBAAkB,MAAM,KACvB,OAAO,CAAC,eAAe,EAAE,CA6B3B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,eAAe,MAAM,KACpB,OAAO,CAAC,MAAM,EAAE,CAIlB,CAAC;AACF;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAO/B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,kBAAkB,EAAE,GAC9B,gBAAgB,EAAE,CAuBpB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAG7B"}
@@ -0,0 +1,15 @@
1
+ import { Coding } from 'fhir/r4';
2
+ import { AllergenType } from './models';
3
+ export declare const PATIENT_ALLERGY_RESOURCE_URL: (patientUUID: string) => string;
4
+ export declare const ALLERGY_SEVERITY_CONCEPTS: Coding[];
5
+ export declare const ALLERGEN_TYPES: Record<Uppercase<AllergenType>, {
6
+ code: string;
7
+ display: AllergenType;
8
+ system: string;
9
+ }>;
10
+ export declare const ALLERGY_REACTION: {
11
+ code: string;
12
+ display: string;
13
+ system: string;
14
+ };
15
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/allergyService/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,4BAA4B,GAAI,aAAa,MAAM,WAEa,CAAC;AAE9E,eAAO,MAAM,yBAAyB,EAAE,MAAM,EAgB7C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,SAAS,CAAC,YAAY,CAAC,EACvB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,CAiBF,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getAllergies, getFormattedAllergies, fetchAndFormatAllergenConcepts, fetchReactionConcepts, } from './allergyService';
2
+ export { type FormattedAllergy, AllergyStatus, AllergySeverity, type AllergenType, } from './models';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/allergyService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,gBAAgB,EACrB,aAAa,EACb,eAAe,EACf,KAAK,YAAY,GAClB,MAAM,UAAU,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { Coding } from 'fhir/r4';
2
+ export declare enum AllergyStatus {
3
+ Active = "Active",
4
+ Inactive = "Inactive"
5
+ }
6
+ export declare enum AllergySeverity {
7
+ mild = "mild",
8
+ moderate = "moderate",
9
+ severe = "severe"
10
+ }
11
+ /**
12
+ * Interface representing a formatted allergy for easier consumption by components
13
+ */
14
+ export interface FormattedAllergy {
15
+ readonly id: string;
16
+ readonly display: string;
17
+ readonly category?: ReadonlyArray<string>;
18
+ readonly criticality?: string;
19
+ readonly status: AllergyStatus;
20
+ readonly recordedDate: string;
21
+ readonly recorder?: string;
22
+ readonly reactions?: ReadonlyArray<{
23
+ readonly manifestation: string[];
24
+ readonly severity?: AllergySeverity;
25
+ }>;
26
+ readonly severity?: AllergySeverity;
27
+ readonly note?: string;
28
+ }
29
+ /**
30
+ * Interface representing an allergy input entry for form handling
31
+ */
32
+ export interface AllergyInputEntry {
33
+ id: string;
34
+ display: string;
35
+ type: string;
36
+ selectedSeverity: Coding | null;
37
+ selectedReactions: Coding[];
38
+ note?: string;
39
+ errors: {
40
+ severity?: string;
41
+ reactions?: string;
42
+ };
43
+ hasBeenValidated: boolean;
44
+ }
45
+ export type AllergenType = 'food' | 'medication' | 'environment';
46
+ export interface AllergenConcept {
47
+ uuid: string;
48
+ display: string;
49
+ type: AllergenType;
50
+ disabled?: boolean;
51
+ }
52
+ export interface AllergenConceptResponse {
53
+ uuid: string;
54
+ setMembers: {
55
+ uuid: string;
56
+ display: string;
57
+ retired: boolean;
58
+ }[];
59
+ }
60
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/allergyService/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,eAAe;IACzB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED;;GAEG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;QACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC;QACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;KACrC,CAAC,CAAC;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QACN,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,aAAa,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,OAAO,CAAC;KAClB,EAAE,CAAC;CACL"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * HTTP GET request
3
+ * @param url - The URL to send the GET request to
4
+ * @returns Promise resolving to the response data
5
+ */
6
+ export declare const get: <T = unknown>(url: string) => Promise<T>;
7
+ /**
8
+ * HTTP POST request
9
+ * @param url - The URL to send the POST request to
10
+ * @param data - The data to send in the request body
11
+ * @returns Promise resolving to the response data
12
+ */
13
+ export declare const post: <T = unknown, D = unknown>(url: string, data: D) => Promise<T>;
14
+ /**
15
+ * HTTP PUT request
16
+ * @param url - The URL to send the PUT request to
17
+ * @param data - The data to send in the request body
18
+ * @returns Promise resolving to the response data
19
+ */
20
+ export declare const put: <T = unknown, D = unknown>(url: string, data: D) => Promise<T>;
21
+ /**
22
+ * HTTP DELETE request
23
+ * @param url - The URL to send the DELETE request to
24
+ * @returns Promise resolving to the response data
25
+ */
26
+ export declare const del: <T = unknown>(url: string) => Promise<T>;
27
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,GAAG,GAAU,CAAC,GAAG,OAAO,EAAE,KAAK,MAAM,KAAG,OAAO,CAAC,CAAC,CAG7D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,IAAI,GAAU,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EACjD,KAAK,MAAM,EACX,MAAM,CAAC,KACN,OAAO,CAAC,CAAC,CAGX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,GAAG,GAAU,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAChD,KAAK,MAAM,EACX,MAAM,CAAC,KACN,OAAO,CAAC,CAAC,CAGX,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,GAAG,GAAU,CAAC,GAAG,OAAO,EAAE,KAAK,MAAM,KAAG,OAAO,CAAC,CAAC,CAG7D,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { AxiosInstance } from 'axios';
2
+ declare const client: AxiosInstance;
3
+ export default client;
4
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS7C,QAAA,MAAM,MAAM,EAAE,aAA8B,CAAC;AAsC7C,eAAe,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const LOGIN_PATH = "/bahmni/home/index.html#/login";
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/api/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,mCAAmC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { get, post, put, del } from './api';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ /**
3
+ * Recursively decodes HTML entities in response data
4
+ * @param data - The data to decode
5
+ * @returns The decoded data
6
+ */
7
+ export declare const decodeHtmlEntities: (data: unknown) => unknown;
8
+ /**
9
+ * Checks if URL matches OpenMRS Web Service REST API pattern
10
+ * @param url - The URL to check
11
+ * @returns True if URL is OpenMRS Web Service REST API
12
+ */
13
+ export declare const isOpenMRSWebServiceApi: (url: string) => boolean;
14
+ /**
15
+ * Gets the URL from axios config safely
16
+ * @param config - Axios request config
17
+ * @returns The URL or empty string if not found
18
+ */
19
+ export declare const getResponseUrl: (config: AxiosRequestConfig) => string;
20
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/api/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAG3C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,OAAO,KAAG,OAiBlD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,KAAK,MAAM,KAAG,OAEpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,kBAAkB,KAAG,MAE3D,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Get app property value from OpenMRS
3
+ * @param property - The app property name
4
+ * @returns Promise<string | null>
5
+ */
6
+ /**
7
+ * Don't use `getAppProperty` directly in components,
8
+ * use property specific accessors instead
9
+ * eg.,isAuditLogEnabled
10
+ */
11
+ export declare const getAppProperty: (property: string) => Promise<string | null>;
12
+ /**
13
+ * Check if audit logging is enabled
14
+ * @returns Promise<boolean>
15
+ */
16
+ export declare const isAuditLogEnabled: () => Promise<boolean>;
17
+ //# sourceMappingURL=ApplicationConfigService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApplicationConfigService.d.ts","sourceRoot":"","sources":["../../src/applicationConfigService/ApplicationConfigService.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,UAAU,MAAM,KACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAsBvB,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAa,OAAO,CAAC,OAAO,CAIzD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const AUDIT_LOG_APP_PROPERTY = "bahmni.enableAuditLog";
2
+ export declare const APP_PROPERTY_URL: (property: string) => string;
3
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/applicationConfigService/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,0BAA0B,CAAC;AAC9D,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,WACwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { isAuditLogEnabled } from './ApplicationConfigService';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/applicationConfigService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { AuditEventType } from './models';
2
+ export interface AuditEventPayload {
3
+ eventType: AuditEventType;
4
+ patientUuid?: string;
5
+ messageParams?: Record<string, unknown>;
6
+ module?: string;
7
+ }
8
+ /**
9
+ * Dispatch an audit event to window
10
+ * @param payload - Event payload
11
+ */
12
+ export declare const dispatchAuditEvent: (payload: AuditEventPayload) => void;
13
+ /**
14
+ * Set up global audit event listener
15
+ * Call this once in your app to handle all audit events
16
+ * @param handler - Function to handle audit events
17
+ * @returns Cleanup function
18
+ */
19
+ export declare const setupAuditEventListener: (handler: (payload: AuditEventPayload) => Promise<void>) => (() => void);
20
+ //# sourceMappingURL=auditEventDispatcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auditEventDispatcher.d.ts","sourceRoot":"","sources":["../../src/auditLogService/auditEventDispatcher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,cAAc,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,iBAAiB,KAAG,IAG/D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,KACrD,CAAC,MAAM,IAAI,CAWb,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { AuditLogResponse, AuditEventType } from './models';
2
+ /**
3
+ * Log an audit event
4
+ * @param patientUuid - Patient UUID (optional for some events)
5
+ * @param eventType - Type of audit event
6
+ * @param messageParams - Additional parameters for the message (optional)
7
+ * @param module - Module identifier
8
+ * @returns Promise<AuditLogResponse>
9
+ */
10
+ export declare const logAuditEvent: (patientUuid: string | undefined, eventType: AuditEventType, messageParams?: Record<string, unknown>, module?: string) => Promise<AuditLogResponse>;
11
+ //# sourceMappingURL=auditLogService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auditLogService.d.ts","sourceRoot":"","sources":["../../src/auditLogService/auditLogService.ts"],"names":[],"mappings":"AASA,OAAO,EAAiB,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE3E;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GACxB,aAAa,MAAM,GAAG,SAAS,EAC/B,WAAW,cAAc,EACzB,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,SAAQ,MAA+B,KACtC,OAAO,CAAC,gBAAgB,CA6C1B,CAAC"}
@@ -0,0 +1,44 @@
1
+ export declare const MODULE_LABELS: {
2
+ readonly CLINICAL: "MODULE_LABEL_CLINICAL_KEY";
3
+ readonly REGISTRATION: "MODULE_LABEL_REGISTRATION_KEY";
4
+ };
5
+ export declare const AUDIT_LOG_EVENT_DETAILS: {
6
+ VIEWED_CLINICAL_DASHBOARD: {
7
+ eventType: string;
8
+ message: string;
9
+ };
10
+ EDIT_ENCOUNTER: {
11
+ eventType: string;
12
+ message: string;
13
+ };
14
+ VIEWED_REGISTRATION_PATIENT_SEARCH: {
15
+ eventType: string;
16
+ message: string;
17
+ module: "MODULE_LABEL_REGISTRATION_KEY";
18
+ };
19
+ REGISTER_NEW_PATIENT: {
20
+ eventType: string;
21
+ message: string;
22
+ module: "MODULE_LABEL_REGISTRATION_KEY";
23
+ };
24
+ VIEWED_NEW_PATIENT_PAGE: {
25
+ eventType: string;
26
+ message: string;
27
+ module: "MODULE_LABEL_REGISTRATION_KEY";
28
+ };
29
+ OPEN_VISIT: {
30
+ eventType: string;
31
+ message: string;
32
+ module: "MODULE_LABEL_REGISTRATION_KEY";
33
+ };
34
+ EDIT_PATIENT_DETAILS: {
35
+ eventType: string;
36
+ message: string;
37
+ module: "MODULE_LABEL_REGISTRATION_KEY";
38
+ };
39
+ };
40
+ export declare const AUDIT_LOG_URL: string;
41
+ export declare const AUDIT_LOG_ERROR_MESSAGES: {
42
+ UNKNOWN_EVENT_TYPE: string;
43
+ };
44
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/auditLogService/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAGX,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCnC,CAAC;AAEF,eAAO,MAAM,aAAa,QAAgC,CAAC;AAC3D,eAAO,MAAM,wBAAwB;;CAEpC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Global audit event listener setup
3
+ * Call this once in your application to handle all audit events
4
+ */
5
+ /**
6
+ * Initialize global audit event listener
7
+ * Call this once when your app starts
8
+ * @returns Cleanup function to remove the listener
9
+ */
10
+ export declare const initializeAuditListener: () => (() => void);
11
+ //# sourceMappingURL=globalAuditListener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globalAuditListener.d.ts","sourceRoot":"","sources":["../../src/auditLogService/globalAuditListener.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,QAAO,CAAC,MAAM,IAAI,CAWrD,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { dispatchAuditEvent } from './auditEventDispatcher';
2
+ export { type AuditEventType } from './models';
3
+ export { AUDIT_LOG_EVENT_DETAILS } from './constants';
4
+ export { initializeAuditListener } from './globalAuditListener';
5
+ export { logAuditEvent } from './auditLogService';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auditLogService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface AuditLogEntry {
2
+ patientUuid?: string;
3
+ eventType: string;
4
+ message: string;
5
+ module: string;
6
+ }
7
+ export interface AuditLogResponse {
8
+ logged: boolean;
9
+ error?: string;
10
+ }
11
+ export type AuditEventType = 'VIEWED_CLINICAL_DASHBOARD' | 'EDIT_ENCOUNTER' | 'VIEWED_REGISTRATION_PATIENT_SEARCH';
12
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/auditLogService/models.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,MAAM,cAAc,GACtB,2BAA2B,GAC3B,gBAAgB,GAChB,oCAAoC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { useCamera } from './useCamera';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cameraService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare function useCamera(): {
2
+ videoRef: import('react').RefObject<HTMLVideoElement | null>;
3
+ start: () => Promise<void>;
4
+ stop: () => void;
5
+ capture: () => string | undefined;
6
+ };
7
+ //# sourceMappingURL=useCamera.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCamera.d.ts","sourceRoot":"","sources":["../../src/cameraService/useCamera.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS;;;;;EA6CxB"}