@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
@@ -0,0 +1,98 @@
1
+ declare const _default: {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Clinical App Configuration Schema",
4
+ "description": "Schema for global clinical app configuration including patient information, actions and available dashboards",
5
+ "type": "object",
6
+ "required": [
7
+ "patientInformation",
8
+ "actions",
9
+ "dashboards",
10
+ "consultationPad"
11
+ ],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "patientInformation": {
15
+ "type": "object",
16
+ "description": "Patient information configuration",
17
+ "additionalProperties": false
18
+ },
19
+ "actions": {
20
+ "type": "array",
21
+ "description": "List of available actions"
22
+ },
23
+ "dashboards": {
24
+ "type": "array",
25
+ "description": "List of available dashboards",
26
+ "items": {
27
+ "type": "object",
28
+ "required": ["name", "requiredPrivileges", "url"],
29
+ "additionalProperties": false,
30
+ "properties": {
31
+ "name": {
32
+ "type": "string",
33
+ "description": "Display name of the dashboard"
34
+ },
35
+ "requiredPrivileges": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "string"
39
+ },
40
+ "description": "List of permissions required to access this dashboard"
41
+ },
42
+ "icon": {
43
+ "type": "string",
44
+ "description": "Icon class name for the dashboard"
45
+ },
46
+ "default": {
47
+ "type": "boolean",
48
+ "description": "Whether this is the default dashboard"
49
+ },
50
+ "url": {
51
+ "type": "string",
52
+ "description": "URL to access the dashboard data"
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "consultationPad": {
58
+ "type": "object",
59
+ "description": "Configuration for consultation pad forms",
60
+ "required": ["allergyConceptMap"],
61
+ "additionalProperties": false,
62
+ "properties": {
63
+ "allergyConceptMap": {
64
+ "type": "object",
65
+ "description": "UUID mappings for allergy concepts",
66
+ "required": [
67
+ "medicationAllergenUuid",
68
+ "foodAllergenUuid",
69
+ "environmentalAllergenUuid",
70
+ "allergyReactionUuid"
71
+ ],
72
+ "additionalProperties": false,
73
+ "properties": {
74
+ "medicationAllergenUuid": {
75
+ "type": "string",
76
+ "description": "UUID for medication allergen concept"
77
+ },
78
+ "foodAllergenUuid": {
79
+ "type": "string",
80
+ "description": "UUID for food allergen concept"
81
+ },
82
+ "environmentalAllergenUuid": {
83
+ "type": "string",
84
+ "description": "UUID for environmental allergen concept"
85
+ },
86
+ "allergyReactionUuid": {
87
+ "type": "string",
88
+ "description": "UUID for allergy reaction concept"
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ;
97
+
98
+ export default _default;
@@ -0,0 +1,40 @@
1
+ declare const _default: {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Clinical Dashboard Configuration Schema",
4
+ "description": "Schema for dashboards in clinical app which contains sections and associated controls",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["sections"],
8
+ "properties": {
9
+ "sections": {
10
+ "type": "array",
11
+ "description": "Section in a dashboard",
12
+ "items": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["name", "icon", "controls"],
16
+ "properties": {
17
+ "name": {
18
+ "type": "string",
19
+ "description": "Display name of the section"
20
+ },
21
+ "translationKey": {
22
+ "type": "string",
23
+ "description": "Translation key for the section name"
24
+ },
25
+ "icon": {
26
+ "type": "string",
27
+ "description": "Fontawesome Icon name for the section"
28
+ },
29
+ "controls": {
30
+ "type": "array",
31
+ "description": "List of controls in the section"
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ;
39
+
40
+ export default _default;
@@ -0,0 +1,40 @@
1
+ declare const _default: {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Medication Configuration Schema",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "defaultDurationUnit": {
8
+ "type": "string",
9
+ "enum": ["min", "h", "d", "wk", "mo"],
10
+ "description": "Default unit for medication duration"
11
+ },
12
+ "defaultInstructions": {
13
+ "type": "string",
14
+ "description": "Default instructions for medication"
15
+ },
16
+ "drugFormDefaults": {
17
+ "type": "object",
18
+ "description": "Default dose units and routes for different drug forms",
19
+ "patternProperties": {
20
+ "^.*$": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "doseUnits": {
25
+ "type": "string",
26
+ "description": "Default dose units for this drug form"
27
+ },
28
+ "route": {
29
+ "type": "string",
30
+ "description": "Default route of administration for this drug form"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ;
39
+
40
+ export default _default;
@@ -0,0 +1,329 @@
1
+ declare const _default: {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Registration Configuration Schema",
4
+ "description": "Schema for validating registration app configuration",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "id": {
9
+ "type": "string",
10
+ "description": "Unique identifier for the registration configuration"
11
+ },
12
+ "contextModel": {
13
+ "type": "array",
14
+ "description": "Array of context model configurations",
15
+ "items": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "patientSearch": {
20
+ "type": "object",
21
+ "description": "Patient search configuration",
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "customAttributes": {
25
+ "type": "array",
26
+ "description": "Array of available search fields",
27
+ "items": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "properties": {
31
+ "translationKey": {
32
+ "type": "string",
33
+ "description": "Translation key for the dropdown label"
34
+ },
35
+ "fields": {
36
+ "type": "array",
37
+ "description": "Array of field names to search against",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "expectedFields": {
43
+ "type": "array",
44
+ "description": "Array of fields configurations with translation keys to display on table headers",
45
+ "items": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "properties": {
49
+ "field": {
50
+ "type": "string",
51
+ "description": "field corresponding to table header"
52
+ },
53
+ "translationKey": {
54
+ "type": "string",
55
+ "description": "Translation key for the table header"
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "type": {
61
+ "type": "string",
62
+ "enum": ["person", "address", "program", "appointment"],
63
+ "description": "Type of the search field (person, address, program, appointment)"
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "appointment": {
69
+ "type": "array",
70
+ "description": "Array of available search fields for appointments",
71
+ "items": {
72
+ "type": "object",
73
+ "additionalProperties": true,
74
+ "required": ["translationKey", "fields"],
75
+ "properties": {
76
+ "translationKey": {
77
+ "type": "string",
78
+ "description": "Translation key for the field label"
79
+ },
80
+ "fields": {
81
+ "type": "array",
82
+ "description": "Array of field names to search against",
83
+ "items": {
84
+ "type": "string"
85
+ }
86
+ },
87
+ "expectedFields": {
88
+ "type": "array",
89
+ "description": "Array of expected fields with optional types",
90
+ "items": {
91
+ "type": "object",
92
+ "required": ["field", "translationKey"],
93
+ "properties": {
94
+ "field": {
95
+ "type": "string",
96
+ "description": "The field name (e.g., apptNumber, apptDate)"
97
+ },
98
+ "translationKey": {
99
+ "type": "string",
100
+ "description": "Translation key for the field's display label"
101
+ },
102
+ "type": {
103
+ "type": "string",
104
+ "description": "Optional field type (e.g., date, string)"
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "type": {
110
+ "type": "string",
111
+ "enum": ["appointment"],
112
+ "description": "Type of the search field (appointment)"
113
+ },
114
+ "actions": {
115
+ "type": "array",
116
+ "description": "Array of actions allowed on this search field",
117
+ "items": {
118
+ "type": "object",
119
+ "required": [
120
+ "translationKey",
121
+ "type",
122
+ "enabledRule",
123
+ "onAction"
124
+ ],
125
+ "properties": {
126
+ "translationKey": {
127
+ "type": "string",
128
+ "description": "Translation key for the action button label"
129
+ },
130
+ "type": {
131
+ "type": "string",
132
+ "enum": ["changeStatus", "navigate"],
133
+ "description": "Type of action to perform"
134
+ },
135
+ "enabledRule": {
136
+ "type": "array",
137
+ "description": "Conditions to enable this action (rules)",
138
+ "items": {
139
+ "type": "object",
140
+ "properties": {
141
+ "type": {
142
+ "type": "string",
143
+ "enum": [
144
+ "privilegeCheck",
145
+ "statusCheck",
146
+ "appDateCheck"
147
+ ],
148
+ "description": "Type of rule to evaluate"
149
+ },
150
+ "values": {
151
+ "type": "array",
152
+ "items": { "type": "string" },
153
+ "description": "Values to check against for the rule"
154
+ }
155
+ }
156
+ }
157
+ },
158
+ "onAction": {
159
+ "type": "object",
160
+ "description": "What happens when action is triggered",
161
+ "additionalProperties": true,
162
+ "properties": {
163
+ "status": {
164
+ "type": "string",
165
+ "description": "Status to set (for changeStatus type)"
166
+ },
167
+ "navigation": {
168
+ "type": "string",
169
+ "description": "URL path to navigate to (for navigate type)"
170
+ }
171
+ }
172
+ },
173
+ "onSuccess": {
174
+ "type": "object",
175
+ "description": "Notification or other success response",
176
+ "additionalProperties": true,
177
+ "properties": {
178
+ "notification": {
179
+ "type": "string",
180
+ "description": "Translation key for success notification message"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "defaultVisitType": {
193
+ "type": "string",
194
+ "description": "Default visit type for patient registration"
195
+ },
196
+ "patientInformation": {
197
+ "type": "object",
198
+ "description": "Patient name related fields configuration",
199
+ "additionalProperties": true,
200
+ "properties": {
201
+ "defaultIdentifierPrefix": {
202
+ "type": "string",
203
+ "description": "Default prefix for patient identifiers"
204
+ },
205
+ "showMiddleName": { "type": "boolean" },
206
+ "showLastName": { "type": "boolean" },
207
+ "isLastNameMandatory": { "type": "boolean" },
208
+ "patientNameDisplayOrder": {
209
+ "type": "array",
210
+ "description": "Order in which patient name fields should be displayed",
211
+ "items": { "type": "string" }
212
+ },
213
+ "showBirthTime": { "type": "boolean" },
214
+ "showDOBEstimated": { "type": "boolean" },
215
+ "additionalPatientInformation": {
216
+ "type": "object",
217
+ "description": "Additional patient information configuration",
218
+ "additionalProperties": true,
219
+ "properties": {
220
+ "translationKey": {
221
+ "type": "string",
222
+ "description": "Translation key for the section title"
223
+ },
224
+ "expectedFields": {
225
+ "type": "array",
226
+ "description": "Array of expected fields with translation keys",
227
+ "items": {
228
+ "type": "object",
229
+ "properties": {
230
+ "field": {
231
+ "type": "string",
232
+ "description": "Field name"
233
+ },
234
+ "translationKey": {
235
+ "type": "string",
236
+ "description": "Translation key for the field label"
237
+ }
238
+ }
239
+ }
240
+ }
241
+ }
242
+ },
243
+ "addressHierarchy": {
244
+ "type": "object",
245
+ "description": "Address hierarchy levels to be displayed",
246
+ "additionalProperties": false,
247
+ "properties": {
248
+ "showAddressFieldsTopDown": { "type": "boolean" },
249
+ "strictAutocompleteFromLevel": { "type": "string" },
250
+ "expectedFields": {
251
+ "type": "array",
252
+ "description": "Array of expected fields with translation keys",
253
+ "items": {
254
+ "type": "object",
255
+ "properties": {
256
+ "addressField": {
257
+ "type": "string",
258
+ "description": "Field name"
259
+ },
260
+ "translationKey": {
261
+ "type": "string",
262
+ "description": "Translation key for the field label"
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ }
269
+ }
270
+ },
271
+ "fieldValidation": {
272
+ "type": "object",
273
+ "description": "Field validation rules with regex patterns and error messages",
274
+ "additionalProperties": true,
275
+ "properties": {
276
+ "firstName": {
277
+ "type": "object",
278
+ "properties": {
279
+ "pattern": {
280
+ "type": "string",
281
+ "description": "Regular expression pattern for field validation"
282
+ },
283
+ "errorMessage": {
284
+ "type": "string",
285
+ "description": "Error message to display when validation fails"
286
+ },
287
+ "required": {
288
+ "type": "boolean",
289
+ "description": "Whether the field is required"
290
+ }
291
+ }
292
+ },
293
+ "lastName": {
294
+ "type": "object",
295
+ "properties": {
296
+ "pattern": {
297
+ "type": "string",
298
+ "description": "Regular expression pattern for field validation"
299
+ },
300
+ "errorMessage": {
301
+ "type": "string",
302
+ "description": "Error message to display when validation fails"
303
+ },
304
+ "required": {
305
+ "type": "boolean",
306
+ "description": "Whether the field is required"
307
+ }
308
+ }
309
+ },
310
+ "email": {
311
+ "type": "object",
312
+ "properties": {
313
+ "pattern": {
314
+ "type": "string",
315
+ "description": "Regular expression pattern for email validation"
316
+ },
317
+ "errorMessage": {
318
+ "type": "string",
319
+ "description": "Error message to display when email validation fails"
320
+ }
321
+ }
322
+ }
323
+ }
324
+ }
325
+ }
326
+ }
327
+ ;
328
+
329
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export declare const BASE_PATH: string;
2
+ export declare const OPENMRS_FHIR_R4 = "/openmrs/ws/fhir2/R4";
3
+ export declare const OPENMRS_REST_V1 = "/openmrs/ws/rest/v1";
4
+ export declare const BAHMNI_USER_COOKIE_NAME = "bahmni.user";
5
+ export declare const BAHMNI_HOME_PATH = "/bahmni/home/index.html";
6
+ export declare const USER_PRIVILEGES_URL: string;
7
+ export declare const OBSERVATION_FORMS_URL: string;
8
+ export declare const USER_PINNED_PREFERENCE_URL: (userUuid: string) => string;
9
+ export declare const VISIT_LOCATION_UUID: string;
10
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,QAAgC,CAAC;AACvD,eAAO,MAAM,eAAe,yBAAyB,CAAC;AACtD,eAAO,MAAM,eAAe,wBAAwB,CAAC;AACrD,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAC1D,eAAO,MAAM,mBAAmB,QAAyC,CAAC;AAC1E,eAAO,MAAM,qBAAqB,QACuB,CAAC;AAC1D,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,WACb,CAAC;AAC/C,eAAO,MAAM,mBAAmB,QACgB,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const FHIR_ENCOUNTER_TYPE_CODE_SYSTEM = "http://fhir.openmrs.org/code-system/encounter-type";
2
+ export declare const HL7_CONDITION_CATEGORY_CONDITION_CODE = "problem-list-item";
3
+ export declare const HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM = "http://terminology.hl7.org/CodeSystem/condition-ver-status";
4
+ export declare const HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE = "encounter-diagnosis";
5
+ export declare const HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM = "http://terminology.hl7.org/CodeSystem/condition-clinical";
6
+ export declare const HL7_CONDITION_CATEGORY_CODE_SYSTEM = "http://terminology.hl7.org/CodeSystem/condition-category";
7
+ export declare const FHIR_CONCEPT_CLASS_EXTENSION_URL = "http://fhir.bahmni.org/ext/ValueSet/concept-class";
8
+ export declare const FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL = "http://fhir.bahmni.org/ext/lab-order-concept-type";
9
+ export declare const FHIR_MEDICATION_EXTENSION_URL = "http://fhir.openmrs.org/ext/medicine";
10
+ export declare const FHIR_MEDICATION_NAME_EXTENSION_URL = "http://fhir.openmrs.org/ext/medicine#drugName";
11
+ //# sourceMappingURL=fhir.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fhir.d.ts","sourceRoot":"","sources":["../../src/constants/fhir.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,uDACU,CAAC;AACvD,eAAO,MAAM,qCAAqC,sBAAsB,CAAC;AACzE,eAAO,MAAM,6CAA6C,+DACI,CAAC;AAC/D,eAAO,MAAM,qCAAqC,wBAAwB,CAAC;AAC3E,eAAO,MAAM,yCAAyC,6DACM,CAAC;AAC7D,eAAO,MAAM,kCAAkC,6DACa,CAAC;AAC7D,eAAO,MAAM,gCAAgC,sDACQ,CAAC;AACtD,eAAO,MAAM,yCAAyC,sDACD,CAAC;AACtD,eAAO,MAAM,6BAA6B,yCACF,CAAC;AACzC,eAAO,MAAM,kCAAkC,kDACE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const DATE_FORMAT = "dd/MM/yyyy";
2
+ export declare const FULL_MONTH_DATE_FORMAT = "MMMM dd, yyyy";
3
+ export declare const DATE_TIME_FORMAT = "dd/MM/yyyy HH:mm";
4
+ export declare const ISO_DATE_FORMAT = "yyyy-MM-dd";
5
+ export declare const DATE_PICKER_INPUT_FORMAT = "d/m/Y";
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/date/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,eAAe,CAAC;AACxC,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AACtD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,eAAe,eAAe,CAAC;AAC5C,eAAO,MAAM,wBAAwB,UAAU,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { Age } from '../patientService/models';
2
+ export interface FormatDateResult {
3
+ formattedResult: string;
4
+ error?: {
5
+ title: string;
6
+ message: string;
7
+ };
8
+ }
9
+ /**
10
+ * Calculates age based on a date string in the format yyyy-mm-dd
11
+ * Returns age as an object with years, months, and days properties
12
+ *
13
+ * @param dateString - Birth date string in the format yyyy-mm-dd
14
+ * @returns Age object containing years, months, and days or null if the input is invalid
15
+ */
16
+ export declare function calculateAge(dateString: string): Age | null;
17
+ /**
18
+ * Formats a date string or Date object into the specified date time format.
19
+ * @param date - The date string or Date object to format.
20
+ * @returns A FormatDateResult object containing either a formatted date string or an error.
21
+ */
22
+ export declare function formatDateTime(date: string | Date | number, t: (key: string, options?: {
23
+ count?: number;
24
+ }) => string): FormatDateResult;
25
+ /**
26
+ * Formats a date string or Date object into the specified date format.
27
+ * @param date - The date string or Date object to format.
28
+ * @param format - The date format to use (default is 'dd/MM/yyyy').
29
+ * @returns A FormatDateResult object containing either a formatted date string or an error.
30
+ */
31
+ export declare function formatDate(date: string | Date | number, t: (key: string, options?: {
32
+ count?: number;
33
+ }) => string, format?: string): FormatDateResult;
34
+ /**
35
+ * Calculates onset date by subtracting duration from given date
36
+ * @param givenDate - The given date as baseline
37
+ * @param durationValue - The duration value to subtract
38
+ * @param durationUnit - The unit of duration ('days', 'months', 'years')
39
+ * @returns Calculated onset date or undefined if inputs are invalid
40
+ */
41
+ export declare function calculateOnsetDate(givenDate: Date, durationValue: number | null, durationUnit: 'days' | 'months' | 'years' | null): Date | undefined;
42
+ /**
43
+ * Formats a date string into a clean relative time format for use with i18n templates.
44
+ * Converts all time periods to days/months/years only and removes qualifiers like "about", "almost", "ago".
45
+ * Minutes and hours are rounded up to "1 day".
46
+ *
47
+ * @param date - ISO date string to format (e.g., "2025-06-17T07:02:38.000Z" or "2025-06-17")
48
+ * @returns FormatDateResult with clean time format (e.g., "3 days", "1 month", "2 years")
49
+ */
50
+ export declare function formatDateDistance(date: string, t: (key: string, options?: {
51
+ count?: number;
52
+ }) => string): FormatDateResult;
53
+ export declare const getTodayDate: () => Date;
54
+ export declare function formatDateAndTime(date: number, includeTime: boolean): string;
55
+ export declare function calculateAgeinYearsAndMonths(birthDateMillis: number): string;
56
+ /**
57
+ * Sorts an array of objects by a date field
58
+ * @param array - Array of objects to sort
59
+ * @param dateField - The field name containing the date value
60
+ * @param ascending - Sort order: true for ascending (oldest first), false for descending (newest first)
61
+ * @returns sorted array
62
+ */
63
+ export declare function sortByDate(array: any[], dateField: string, ascending?: boolean): any[];
64
+ /**
65
+ * Compare given date with specified timeframe: 'past', 'today', or 'future'.
66
+ * @dateFrom string - The date string to compare (in a format parseable by Date constructor)
67
+ * @timeframe string - The timeframe to compare against ('past', 'today', 'future')
68
+ * @returns boolean - true if the date matches the specified timeframe, false otherwise
69
+ */
70
+ export declare const dateComparator: (dateFrom: string, timeframe: string) => boolean;
71
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/date/date.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAI/C,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AA2BD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAmB3D;AAkGD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAC5B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,MAAM,GACvD,gBAAgB,CAElB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAC5B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,MAAM,EACxD,MAAM,GAAE,MAAoB,GAC3B,gBAAgB,CAElB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,IAAI,EACf,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,GAC/C,IAAI,GAAG,SAAS,CAwBlB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,MAAM,GACvD,gBAAgB,CAiFlB;AAED,eAAO,MAAM,YAAY,QAAO,IAI/B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,MAAM,CAwB5E;AACD,wBAAgB,4BAA4B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAQ5E;AACD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAExB,KAAK,EAAE,GAAG,EAAE,EACZ,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,OAAe,GAEzB,GAAG,EAAE,CAeP;AAED;;;;;GAKG;AAEH,eAAO,MAAM,cAAc,GACzB,UAAU,MAAM,EAChB,WAAW,MAAM,KAChB,OAYF,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const DATE_ERROR_MESSAGES: {
2
+ PARSE_ERROR: string;
3
+ FORMAT_ERROR: string;
4
+ EMPTY_OR_INVALID: string;
5
+ INVALID_FORMAT: string;
6
+ NULL_OR_UNDEFINED: string;
7
+ };
8
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/date/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;CAM/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { type FormatDateResult, calculateAge, formatDateTime, formatDate, formatDateDistance, calculateOnsetDate, sortByDate, getTodayDate, calculateAgeinYearsAndMonths, formatDateAndTime, dateComparator, } from './date';
2
+ export { DATE_FORMAT, DATE_PICKER_INPUT_FORMAT, DATE_TIME_FORMAT, ISO_DATE_FORMAT, FULL_MONTH_DATE_FORMAT, } from './constants';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/date/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,YAAY,EACZ,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,4BAA4B,EAC5B,iBAAiB,EACjB,cAAc,GACf,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,GACvB,MAAM,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Coding } from 'fhir/r4';
2
+ export declare const PATIENT_DIAGNOSIS_RESOURCE_URL: (patientUUID: string) => string;
3
+ export declare const CERTAINITY_CONCEPTS: Coding[];
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/diagnosesService/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAIjC,eAAO,MAAM,8BAA8B,GAAI,aAAa,MAAM,WAEoD,CAAC;AAEvH,eAAO,MAAM,mBAAmB,EAAE,MAAM,EAWvC,CAAC"}