@bahmni/services 0.0.1-dev.7

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 (226) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +20 -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/conceptService/conceptService.d.ts +17 -0
  50. package/dist/conceptService/conceptService.d.ts.map +1 -0
  51. package/dist/conceptService/constants.d.ts +4 -0
  52. package/dist/conceptService/constants.d.ts.map +1 -0
  53. package/dist/conceptService/index.d.ts +3 -0
  54. package/dist/conceptService/index.d.ts.map +1 -0
  55. package/dist/conceptService/models.d.ts +11 -0
  56. package/dist/conceptService/models.d.ts.map +1 -0
  57. package/dist/conditionService/__mocks__/mocks.d.ts +22 -0
  58. package/dist/conditionService/__mocks__/mocks.d.ts.map +1 -0
  59. package/dist/conditionService/conditionService.d.ts +14 -0
  60. package/dist/conditionService/conditionService.d.ts.map +1 -0
  61. package/dist/conditionService/constants.d.ts +2 -0
  62. package/dist/conditionService/constants.d.ts.map +1 -0
  63. package/dist/conditionService/index.d.ts +3 -0
  64. package/dist/conditionService/index.d.ts.map +1 -0
  65. package/dist/conditionService/models.d.ts +13 -0
  66. package/dist/conditionService/models.d.ts.map +1 -0
  67. package/dist/configService/__mocks__/configMocks.d.ts +191 -0
  68. package/dist/configService/__mocks__/configMocks.d.ts.map +1 -0
  69. package/dist/configService/configService.d.ts +31 -0
  70. package/dist/configService/configService.d.ts.map +1 -0
  71. package/dist/configService/constants.d.ts +22 -0
  72. package/dist/configService/constants.d.ts.map +1 -0
  73. package/dist/configService/index.d.ts +3 -0
  74. package/dist/configService/index.d.ts.map +1 -0
  75. package/dist/configService/models/config.d.ts +27 -0
  76. package/dist/configService/models/config.d.ts.map +1 -0
  77. package/dist/configService/models/dashboardConfig.d.ts +11 -0
  78. package/dist/configService/models/dashboardConfig.d.ts.map +1 -0
  79. package/dist/configService/models/medicationConfig.d.ts +41 -0
  80. package/dist/configService/models/medicationConfig.d.ts.map +1 -0
  81. package/dist/configService/models/registrationConfig.d.ts +40 -0
  82. package/dist/configService/models/registrationConfig.d.ts.map +1 -0
  83. package/dist/configService/models.d.ts +5 -0
  84. package/dist/configService/models.d.ts.map +1 -0
  85. package/dist/configService/schemas/clinicalConfig.schema.json.d.ts +98 -0
  86. package/dist/configService/schemas/dashboardConfig.schema.json.d.ts +40 -0
  87. package/dist/configService/schemas/medicationConfig.schema.json.d.ts +40 -0
  88. package/dist/configService/schemas/registrationConfig.schema.json.d.ts +200 -0
  89. package/dist/constants/app.d.ts +10 -0
  90. package/dist/constants/app.d.ts.map +1 -0
  91. package/dist/constants/fhir.d.ts +11 -0
  92. package/dist/constants/fhir.d.ts.map +1 -0
  93. package/dist/date/constants.d.ts +6 -0
  94. package/dist/date/constants.d.ts.map +1 -0
  95. package/dist/date/date.d.ts +71 -0
  96. package/dist/date/date.d.ts.map +1 -0
  97. package/dist/date/errors.d.ts +8 -0
  98. package/dist/date/errors.d.ts.map +1 -0
  99. package/dist/date/index.d.ts +3 -0
  100. package/dist/date/index.d.ts.map +1 -0
  101. package/dist/diagnosesService/constants.d.ts +4 -0
  102. package/dist/diagnosesService/constants.d.ts.map +1 -0
  103. package/dist/diagnosesService/diagnosesService.d.ts +8 -0
  104. package/dist/diagnosesService/diagnosesService.d.ts.map +1 -0
  105. package/dist/diagnosesService/index.d.ts +3 -0
  106. package/dist/diagnosesService/index.d.ts.map +1 -0
  107. package/dist/diagnosesService/models.d.ts +22 -0
  108. package/dist/diagnosesService/models.d.ts.map +1 -0
  109. package/dist/encounterService/__mocks__/mocks.d.ts +182 -0
  110. package/dist/encounterService/__mocks__/mocks.d.ts.map +1 -0
  111. package/dist/encounterService/constants.d.ts +2 -0
  112. package/dist/encounterService/constants.d.ts.map +1 -0
  113. package/dist/encounterService/encounterService.d.ts +20 -0
  114. package/dist/encounterService/encounterService.d.ts.map +1 -0
  115. package/dist/encounterService/index.d.ts +2 -0
  116. package/dist/encounterService/index.d.ts.map +1 -0
  117. package/dist/encounterSessionService/constants.d.ts +4 -0
  118. package/dist/encounterSessionService/constants.d.ts.map +1 -0
  119. package/dist/encounterSessionService/encounterSessionService.d.ts +43 -0
  120. package/dist/encounterSessionService/encounterSessionService.d.ts.map +1 -0
  121. package/dist/encounterSessionService/index.d.ts +2 -0
  122. package/dist/encounterSessionService/index.d.ts.map +1 -0
  123. package/dist/errorHandling/index.d.ts +2 -0
  124. package/dist/errorHandling/index.d.ts.map +1 -0
  125. package/dist/errorHandling/utils.d.ts +10 -0
  126. package/dist/errorHandling/utils.d.ts.map +1 -0
  127. package/dist/i18n/constants.d.ts +5 -0
  128. package/dist/i18n/constants.d.ts.map +1 -0
  129. package/dist/i18n/i18n.d.ts +10 -0
  130. package/dist/i18n/i18n.d.ts.map +1 -0
  131. package/dist/i18n/index.d.ts +3 -0
  132. package/dist/i18n/index.d.ts.map +1 -0
  133. package/dist/i18n/translationService.d.ts +25 -0
  134. package/dist/i18n/translationService.d.ts.map +1 -0
  135. package/dist/index.d.ts +30 -0
  136. package/dist/index.d.ts.map +1 -0
  137. package/dist/index.js +12033 -0
  138. package/dist/investigationService/constants.d.ts +5 -0
  139. package/dist/investigationService/constants.d.ts.map +1 -0
  140. package/dist/investigationService/index.d.ts +3 -0
  141. package/dist/investigationService/index.d.ts.map +1 -0
  142. package/dist/investigationService/investigationService.d.ts +3 -0
  143. package/dist/investigationService/investigationService.d.ts.map +1 -0
  144. package/dist/investigationService/model.d.ts +20 -0
  145. package/dist/investigationService/model.d.ts.map +1 -0
  146. package/dist/labInvestigationService/constants.d.ts +4 -0
  147. package/dist/labInvestigationService/constants.d.ts.map +1 -0
  148. package/dist/labInvestigationService/index.d.ts +3 -0
  149. package/dist/labInvestigationService/index.d.ts.map +1 -0
  150. package/dist/labInvestigationService/labInvestigationService.d.ts +49 -0
  151. package/dist/labInvestigationService/labInvestigationService.d.ts.map +1 -0
  152. package/dist/labInvestigationService/models.d.ts +37 -0
  153. package/dist/labInvestigationService/models.d.ts.map +1 -0
  154. package/dist/medicationRequestService/constants.d.ts +2 -0
  155. package/dist/medicationRequestService/constants.d.ts.map +1 -0
  156. package/dist/medicationRequestService/index.d.ts +3 -0
  157. package/dist/medicationRequestService/index.d.ts.map +1 -0
  158. package/dist/medicationRequestService/medicationRequestService.d.ts +15 -0
  159. package/dist/medicationRequestService/medicationRequestService.d.ts.map +1 -0
  160. package/dist/medicationRequestService/models.d.ts +58 -0
  161. package/dist/medicationRequestService/models.d.ts.map +1 -0
  162. package/dist/notification/index.d.ts +3 -0
  163. package/dist/notification/index.d.ts.map +1 -0
  164. package/dist/notification/models.d.ts +9 -0
  165. package/dist/notification/models.d.ts.map +1 -0
  166. package/dist/notification/notificationService.d.ts +22 -0
  167. package/dist/notification/notificationService.d.ts.map +1 -0
  168. package/dist/observationFormsService/index.d.ts +3 -0
  169. package/dist/observationFormsService/index.d.ts.map +1 -0
  170. package/dist/observationFormsService/models.d.ts +26 -0
  171. package/dist/observationFormsService/models.d.ts.map +1 -0
  172. package/dist/observationFormsService/observationFormsService.d.ts +6 -0
  173. package/dist/observationFormsService/observationFormsService.d.ts.map +1 -0
  174. package/dist/patientService/constants.d.ts +25 -0
  175. package/dist/patientService/constants.d.ts.map +1 -0
  176. package/dist/patientService/index.d.ts +4 -0
  177. package/dist/patientService/index.d.ts.map +1 -0
  178. package/dist/patientService/models.d.ts +218 -0
  179. package/dist/patientService/models.d.ts.map +1 -0
  180. package/dist/patientService/patientService.d.ts +109 -0
  181. package/dist/patientService/patientService.d.ts.map +1 -0
  182. package/dist/privilegeService/index.d.ts +3 -0
  183. package/dist/privilegeService/index.d.ts.map +1 -0
  184. package/dist/privilegeService/models.d.ts +9 -0
  185. package/dist/privilegeService/models.d.ts.map +1 -0
  186. package/dist/privilegeService/privilegeService.d.ts +15 -0
  187. package/dist/privilegeService/privilegeService.d.ts.map +1 -0
  188. package/dist/providerService/constants.d.ts +2 -0
  189. package/dist/providerService/constants.d.ts.map +1 -0
  190. package/dist/providerService/index.d.ts +3 -0
  191. package/dist/providerService/index.d.ts.map +1 -0
  192. package/dist/providerService/models.d.ts +51 -0
  193. package/dist/providerService/models.d.ts.map +1 -0
  194. package/dist/providerService/providerService.d.ts +7 -0
  195. package/dist/providerService/providerService.d.ts.map +1 -0
  196. package/dist/radiologyInvestigationService/__mocks__/mocks.d.ts +17 -0
  197. package/dist/radiologyInvestigationService/__mocks__/mocks.d.ts.map +1 -0
  198. package/dist/radiologyInvestigationService/constants.d.ts +2 -0
  199. package/dist/radiologyInvestigationService/constants.d.ts.map +1 -0
  200. package/dist/radiologyInvestigationService/index.d.ts +3 -0
  201. package/dist/radiologyInvestigationService/index.d.ts.map +1 -0
  202. package/dist/radiologyInvestigationService/models.d.ts +12 -0
  203. package/dist/radiologyInvestigationService/models.d.ts.map +1 -0
  204. package/dist/radiologyInvestigationService/radiologyInvestigationService.d.ts +15 -0
  205. package/dist/radiologyInvestigationService/radiologyInvestigationService.d.ts.map +1 -0
  206. package/dist/userService/constants.d.ts +3 -0
  207. package/dist/userService/constants.d.ts.map +1 -0
  208. package/dist/userService/index.d.ts +3 -0
  209. package/dist/userService/index.d.ts.map +1 -0
  210. package/dist/userService/models.d.ts +18 -0
  211. package/dist/userService/models.d.ts.map +1 -0
  212. package/dist/userService/userService.d.ts +10 -0
  213. package/dist/userService/userService.d.ts.map +1 -0
  214. package/dist/utils/index.d.ts +2 -0
  215. package/dist/utils/index.d.ts.map +1 -0
  216. package/dist/utils/utils.d.ts +84 -0
  217. package/dist/utils/utils.d.ts.map +1 -0
  218. package/dist/vitalFlowSheetService/constants.d.ts +2 -0
  219. package/dist/vitalFlowSheetService/constants.d.ts.map +1 -0
  220. package/dist/vitalFlowSheetService/index.d.ts +3 -0
  221. package/dist/vitalFlowSheetService/index.d.ts.map +1 -0
  222. package/dist/vitalFlowSheetService/model.d.ts +22 -0
  223. package/dist/vitalFlowSheetService/model.d.ts.map +1 -0
  224. package/dist/vitalFlowSheetService/vitalFlowSheetService.d.ts +11 -0
  225. package/dist/vitalFlowSheetService/vitalFlowSheetService.d.ts.map +1 -0
  226. package/package.json +44 -0
@@ -0,0 +1,5 @@
1
+ export declare const ALL_ORDERABLES_CONCEPT_NAME = "All Orderables";
2
+ export declare const ORDER_TYPE_URL = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))";
3
+ export declare const PANEL_CONCEPT_CLASS_NAME = "LabSet";
4
+ export declare const FHIR_CONCEPT_CLASS_EXTENSION_URL = "http://fhir.bahmni.org/ext/ValueSet/concept-class";
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/investigationService/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,mBAAmB,CAAC;AAC5D,eAAO,MAAM,cAAc,qFACyD,CAAC;AACrF,eAAO,MAAM,wBAAwB,WAAW,CAAC;AACjD,eAAO,MAAM,gCAAgC,sDACQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getFlattenedInvestigations } from './investigationService';
2
+ export { type FlattenedInvestigations, type OrderType, type OrderTypeResponse, } from './model';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/investigationService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FlattenedInvestigations } from './model';
2
+ export declare const getFlattenedInvestigations: () => Promise<FlattenedInvestigations[]>;
3
+ //# sourceMappingURL=investigationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"investigationService.d.ts","sourceRoot":"","sources":["../../src/investigationService/investigationService.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,uBAAuB,EAAgC,MAAM,SAAS,CAAC;AAuFhF,eAAO,MAAM,0BAA0B,QAAa,OAAO,CACzD,uBAAuB,EAAE,CAK1B,CAAC"}
@@ -0,0 +1,20 @@
1
+ export interface FlattenedInvestigations {
2
+ code: string;
3
+ display: string;
4
+ category: string;
5
+ categoryCode: string;
6
+ disabled?: boolean;
7
+ }
8
+ export interface ConceptClass {
9
+ uuid: string;
10
+ name: string;
11
+ }
12
+ export interface OrderType {
13
+ uuid: string;
14
+ display: string;
15
+ conceptClasses: ConceptClass[];
16
+ }
17
+ export interface OrderTypeResponse {
18
+ results: OrderType[];
19
+ }
20
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/investigationService/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,YAAY,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB"}
@@ -0,0 +1,4 @@
1
+ export declare const LAB_ORDER_TYPE_UUID = "d3560b17-5e07-11ef-8f7c-0242ac120002";
2
+ export declare const FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL = "http://fhir.bahmni.org/ext/lab-order-concept-type";
3
+ export declare const PATIENT_LAB_INVESTIGATION_RESOURCE_URL: (patientUUID: string) => string;
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/labInvestigationService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,yCAAyC,CAAC;AAC1E,eAAO,MAAM,yCAAyC,sDACD,CAAC;AACtD,eAAO,MAAM,sCAAsC,GAAI,aAAa,MAAM,WAEgD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getPatientLabTestsBundle, getPatientLabInvestigations, groupLabTestsByDate, } from './labInvestigationService';
2
+ export { type FormattedLabTest, type LabTestsByDate, LabTestPriority, } from './models';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/labInvestigationService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,eAAe,GAChB,MAAM,UAAU,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { Bundle, ServiceRequest } from 'fhir/r4';
2
+ import { FormattedLabTest, LabTestPriority, LabTestsByDate } from './models';
3
+ /**
4
+ * Maps a FHIR priority code to LabTestPriority enum
5
+ */
6
+ export declare const mapLabTestPriority: (labTest: ServiceRequest) => LabTestPriority;
7
+ /**
8
+ * Fetches lab tests for a given patient UUID from the FHIR R4 endpoint
9
+ * @param patientUUID - The UUID of the patient
10
+ * @returns Promise resolving to a FhirLabTestBundle
11
+ */
12
+ export declare function getPatientLabTestsBundle(patientUUID: string): Promise<Bundle<ServiceRequest>>;
13
+ /**
14
+ * Fetches lab tests for a given patient UUID
15
+ * @param patientUUID - The UUID of the patient
16
+ * @returns Promise resolving to an array of FhirLabTest
17
+ */
18
+ export declare function getLabTests(patientUUID: string): Promise<ServiceRequest[]>;
19
+ /**
20
+ * Determines if a lab test is a panel based on its extension
21
+ * @param labTest - The FHIR lab test to check
22
+ * @returns A string indicating the test type: "Panel", "Single Test", or "X Tests"
23
+ */
24
+ export declare const determineTestType: (labTest: ServiceRequest) => string;
25
+ /**
26
+ * Formats FHIR lab tests into a more user-friendly format
27
+ * @param labTests - The FHIR lab test array to format
28
+ * @returns An array of formatted lab test objects
29
+ */
30
+ export declare function formatLabTests(labTests: ServiceRequest[], t: (key: string) => string): FormattedLabTest[];
31
+ /**
32
+ * Groups lab tests by date
33
+ * @param labTests - The formatted lab tests to group
34
+ * @returns An array of lab tests grouped by date
35
+ */
36
+ export declare function groupLabTestsByDate(labTests: FormattedLabTest[]): LabTestsByDate[];
37
+ /**
38
+ * Fetches and formats lab tests for a given patient UUID
39
+ * @param patientUUID - The UUID of the patient
40
+ * @returns Promise resolving to an array of lab tests grouped by date
41
+ */
42
+ export declare function getPatientLabTestsByDate(patientUUID: string, t: (key: string) => string): Promise<LabTestsByDate[]>;
43
+ /**
44
+ * Fetches and formats lab investigations for a given patient UUID
45
+ * @param patientUUID - The UUID of the patient
46
+ * @returns Promise resolving to an array of lab investigations
47
+ */
48
+ export declare function getPatientLabInvestigations(patientUUID: string, t: (key: string) => string): Promise<FormattedLabTest[]>;
49
+ //# sourceMappingURL=labInvestigationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labInvestigationService.d.ts","sourceRoot":"","sources":["../../src/labInvestigationService/labInvestigationService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAOjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,cAAc,KACtB,eASF,CAAC;AAsBF;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAWjC;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,EAAE,CAAC,CAO3B;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,cAAc,KAAG,MAc3D,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,cAAc,EAAE,EAC1B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GACzB,gBAAgB,EAAE,CA6BpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,gBAAgB,EAAE,GAC3B,cAAc,EAAE,CAqBlB;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GACzB,OAAO,CAAC,cAAc,EAAE,CAAC,CAI3B;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GACzB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAO7B"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Enum representing the possible priorities of a lab test
3
+ */
4
+ export declare enum LabTestPriority {
5
+ stat = "Urgent",
6
+ routine = "Routine"
7
+ }
8
+ /**
9
+ * Interface representing a formatted lab test for easier consumption by components
10
+ */
11
+ export interface FormattedLabTest {
12
+ readonly id: string;
13
+ readonly testName: string;
14
+ readonly priority: LabTestPriority;
15
+ readonly orderedBy: string;
16
+ readonly orderedDate: string;
17
+ readonly formattedDate: string;
18
+ readonly result?: string | LabTestResult[];
19
+ readonly testType: string;
20
+ }
21
+ /**
22
+ * Interface representing lab tests grouped by date
23
+ */
24
+ export interface LabTestsByDate {
25
+ readonly date: string;
26
+ readonly rawDate: string;
27
+ readonly tests: FormattedLabTest[];
28
+ }
29
+ export interface LabTestResult {
30
+ status: string;
31
+ TestName: string;
32
+ Result: string;
33
+ referenceRange: string;
34
+ reportedOn: string;
35
+ actions: string;
36
+ }
37
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/labInvestigationService/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,eAAe;IACzB,IAAI,WAAW;IACf,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export declare const PATIENT_MEDICATION_RESOURCE_URL: (patientUUID: string) => string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/medicationRequestService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,+BAA+B,GAAI,aAAa,MAAM,WAES,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { type FormattedMedicationRequest, type MedicationRequest, MedicationStatus, } from './models';
2
+ export { getPatientMedications, getPatientMedicationBundle, } from './medicationRequestService';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/medicationRequestService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,iBAAiB,EACtB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Bundle } from 'fhir/r4';
2
+ import { MedicationRequest } from './models';
3
+ /**
4
+ * Fetches medications for a given patient UUID from the FHIR R4 endpoint
5
+ * @param patientUUID - The UUID of the patient
6
+ * @returns Promise resolving to a Bundle containing medications
7
+ */
8
+ export declare function getPatientMedicationBundle(patientUUID: string): Promise<Bundle>;
9
+ /**
10
+ * Fetches and formats medications for a given patient UUID
11
+ * @param patientUUID - The UUID of the patient
12
+ * @returns Promise resolving to an array of medications
13
+ */
14
+ export declare function getPatientMedications(patientUUID: string): Promise<MedicationRequest[]>;
15
+ //# sourceMappingURL=medicationRequestService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medicationRequestService.d.ts","sourceRoot":"","sources":["../../src/medicationRequestService/medicationRequestService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA8C,MAAM,SAAS,CAAC;AAG7E,OAAO,EAAE,iBAAiB,EAAoB,MAAM,UAAU,CAAC;AA8B/D;;;;GAIG;AACH,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAiJD;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAG9B"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Enum representing canonical statuses of a medication request
3
+ */
4
+ export declare enum MedicationStatus {
5
+ Active = "active",
6
+ OnHold = "on-hold",
7
+ Completed = "completed",
8
+ Stopped = "stopped",
9
+ Cancelled = "cancelled",
10
+ EnteredInError = "entered-in-error",
11
+ Draft = "draft",
12
+ Unknown = "unknown"
13
+ }
14
+ /**
15
+ * Interface representing a formatted medication for easier consumption by components
16
+ */
17
+ export interface MedicationRequest {
18
+ readonly id: string;
19
+ readonly name: string;
20
+ readonly dose?: {
21
+ readonly value: number;
22
+ readonly unit: string;
23
+ };
24
+ readonly frequency?: string;
25
+ readonly route?: string;
26
+ readonly duration?: {
27
+ readonly duration: number;
28
+ readonly durationUnit?: string;
29
+ };
30
+ readonly quantity: {
31
+ readonly value: number;
32
+ readonly unit: string;
33
+ };
34
+ readonly status: MedicationStatus;
35
+ readonly priority: string;
36
+ readonly startDate: string;
37
+ readonly orderDate: string;
38
+ readonly orderedBy: string;
39
+ readonly instructions: string;
40
+ readonly additionalInstructions?: string;
41
+ readonly asNeeded: boolean;
42
+ readonly isImmediate: boolean;
43
+ }
44
+ export interface FormattedMedicationRequest {
45
+ readonly id: string;
46
+ readonly name: string;
47
+ readonly dosage: string;
48
+ readonly dosageUnit: string;
49
+ readonly quantity: string;
50
+ readonly instruction: string;
51
+ readonly startDate: string;
52
+ readonly orderDate: string;
53
+ readonly orderedBy: string;
54
+ readonly status: MedicationStatus;
55
+ readonly asNeeded: boolean;
56
+ readonly isImmediate: boolean;
57
+ }
58
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/medicationRequestService/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,YAAY;IAClB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,cAAc,qBAAqB;IACnC,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE;QACd,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;KAChC,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B"}
@@ -0,0 +1,3 @@
1
+ export { type Notification } from './models';
2
+ export { notificationService } from './notificationService';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export type NotificationType = 'error' | 'warning' | 'info' | 'success';
2
+ export interface Notification {
3
+ id: string;
4
+ title: string;
5
+ message: string;
6
+ type: NotificationType;
7
+ timeout?: number;
8
+ }
9
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/notification/models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,22 @@
1
+ import { Notification } from './models';
2
+ /**
3
+ * Interface for the notification service
4
+ */
5
+ interface NotificationServiceInterface {
6
+ showSuccess: (title: string, message: string, timeout?: number) => void;
7
+ showInfo: (title: string, message: string, timeout?: number) => void;
8
+ showWarning: (title: string, message: string, timeout?: number) => void;
9
+ showError: (title: string, message: string, timeout?: number) => void;
10
+ }
11
+ /**
12
+ * Creates a notification service that can be used outside of React components
13
+ * (e.g., in API interceptors, services, etc.)
14
+ */
15
+ export declare const createNotificationService: () => NotificationServiceInterface & {
16
+ register: (callback: (notification: Omit<Notification, "id">) => void) => void;
17
+ };
18
+ export declare const notificationService: NotificationServiceInterface & {
19
+ register: (callback: (notification: Omit<Notification, "id">) => void) => void;
20
+ };
21
+ export default notificationService;
22
+ //# sourceMappingURL=notificationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notificationService.d.ts","sourceRoot":"","sources":["../../src/notification/notificationService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;GAEG;AACH,UAAU,4BAA4B;IACpC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACvE;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAO,4BAA4B,GAAG;IAC1E,QAAQ,EAAE,CACR,QAAQ,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,IAAI,KACvD,IAAI,CAAC;CAyDX,CAAC;AAGF,eAAO,MAAM,mBAAmB;cA9DpB,CACR,QAAQ,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,IAAI,KACvD,IAAI;CA4DmD,CAAC;AAE/D,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { fetchObservationForms } from './observationFormsService';
2
+ export { type ObservationForm, type FormApiResponse, type ApiNameTranslation, type FormPrivilege, type ApiFormPrivilege, } from './models';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,UAAU,CAAC"}
@@ -0,0 +1,26 @@
1
+ export interface FormPrivilege {
2
+ privilegeName: string;
3
+ editable: boolean;
4
+ }
5
+ export interface ObservationForm {
6
+ uuid: string;
7
+ name: string;
8
+ id: number;
9
+ privileges: FormPrivilege[];
10
+ }
11
+ export interface ApiFormPrivilege {
12
+ privilegeName: string;
13
+ editable: boolean;
14
+ }
15
+ export interface ApiNameTranslation {
16
+ display: string;
17
+ locale: string;
18
+ }
19
+ export interface FormApiResponse {
20
+ uuid: string;
21
+ name: string;
22
+ id: number;
23
+ privileges: ApiFormPrivilege[];
24
+ nameTranslation: string;
25
+ }
26
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAGD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,aAAa,EAAE,CAAC;CAC7B;AAGD,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,6 @@
1
+ import { ObservationForm } from './models';
2
+ /**
3
+ * Function to fetch and process observation forms
4
+ */
5
+ export declare const fetchObservationForms: () => Promise<ObservationForm[]>;
6
+ //# sourceMappingURL=observationFormsService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observationFormsService.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/observationFormsService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAuC,MAAM,UAAU,CAAC;AA6DhF;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,eAAe,EAAE,CAOvE,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { PatientSearchField } from '../configService/models/registrationConfig';
2
+ export declare const PATIENT_RESOURCE_URL: (patientUUID: string) => string;
3
+ export declare const PATIENT_LUCENE_SEARCH_URL: (searchTerm: string, loginLocationUuid: string) => string;
4
+ export declare const PATIENT_CUSTOM_ATTRIBUTE_SEARCH_URL: (searchTerm: string, fieldType: string, fieldsToSearch: string[], allSearchFields: PatientSearchField[], loginLocationUuid: string) => string;
5
+ export declare const IDENTIFIER_TYPES_URL: string;
6
+ export declare const APP_SETTINGS_URL: (module: string) => string;
7
+ export declare const PRIMARY_IDENTIFIER_TYPE_PROPERTY = "bahmni.primaryIdentifierType";
8
+ export declare const CREATE_PATIENT_URL: string;
9
+ export declare const CREATE_VISIT_URL: string;
10
+ export declare const GET_ACTIVE_VISIT_URL: (patientUuid: string) => string;
11
+ export declare const GET_VISIT_LOCATION: (loginLocation: string) => string;
12
+ export declare const ADDRESS_HIERARCHY_URL: (addressField: string, searchString: string, limit?: number) => string;
13
+ export declare const ADDRESS_HIERARCHY_DEFAULT_LIMIT = 20;
14
+ export declare const ADDRESS_HIERARCHY_MIN_SEARCH_LENGTH = 2;
15
+ export declare const PATIENT_SEARCH_MIN_LENGTH = 2;
16
+ export declare const DEFAULT_PAGE_SIZE = 20;
17
+ export declare const MAX_PAGE_SIZE = 100;
18
+ export declare const APPOINTMENTS_SEARCH_URL: string;
19
+ export declare const MAX_PATIENT_AGE_YEARS = 120;
20
+ export declare const UUID_PATTERN: RegExp;
21
+ export declare const PHONE_NUMBER_UUID = "a384873b-847a-4a86-b869-28fb601162dd";
22
+ export declare const ALTERNATE_PHONE_NUMBER_UUID = "27fa84ff-fdd6-4895-9c77-254b60555f39";
23
+ export declare const EMAIL_UUID = "e3123cba-5e07-11ef-8f7c-0242ac120002";
24
+ export declare const VISIT_TYPES_URL: () => string;
25
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/patientService/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAOhF,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,WACX,CAAC;AAE9C,eAAO,MAAM,yBAAyB,GACpC,YAAY,MAAM,EAClB,mBAAmB,MAAM,WAGuN,CAAC;AAEnP,eAAO,MAAM,mCAAmC,GAC9C,YAAY,MAAM,EAClB,WAAW,MAAM,EACjB,gBAAgB,MAAM,EAAE,EACxB,iBAAiB,kBAAkB,EAAE,EACrC,mBAAmB,MAAM,WAuD1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAA4C,CAAC;AAE9E,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,WACW,CAAC;AAE3D,eAAO,MAAM,gCAAgC,iCAAiC,CAAC;AAE/E,eAAO,MAAM,kBAAkB,QACiB,CAAC;AAEjD,eAAO,MAAM,gBAAgB,QAA6B,CAAC;AAE3D,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,WAEyC,CAAC;AAElG,eAAO,MAAM,kBAAkB,GAAI,eAAe,MAAM,WACd,CAAC;AAC3C,eAAO,MAAM,qBAAqB,GAChC,cAAc,MAAM,EACpB,cAAc,MAAM,EACpB,QAAO,MAAW,WAEqK,CAAC;AAG1L,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAClD,eAAO,MAAM,mCAAmC,IAAI,CAAC;AACrD,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,eAAO,MAAM,uBAAuB,QAA2C,CAAC;AAGhF,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,YAAY,QAAqB,CAAC;AAC/C,eAAO,MAAM,iBAAiB,yCAAyC,CAAC;AACxE,eAAO,MAAM,2BAA2B,yCACA,CAAC;AACzC,eAAO,MAAM,UAAU,yCAAyC,CAAC;AAEjE,eAAO,MAAM,eAAe,cAE8C,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { getPatientById, getFormattedPatientById, searchPatientByNameOrId, searchPatientByCustomAttribute, getPrimaryIdentifierType, createPatient, createVisit, getActiveVisitByPatient, getIdentifierData, getGenders, getAddressHierarchyEntries, getVisitTypes, getVisitLocationUUID, } from './patientService';
2
+ export { type FormattedPatientData, type PatientSearchResultBundle, type PatientSearchResult, type IdentifierSource, type IdentifierType, type IdentifierTypesResponse, type CreatePatientRequest, type CreatePatientResponse, type VisitData, type PatientName, type PatientAddress, type PatientIdentifier, type PatientAttribute, type AddressHierarchyEntry, type VisitType, type VisitLocationResponse, type ActiveVisit, } from './models';
3
+ export { MAX_PATIENT_AGE_YEARS, PHONE_NUMBER_UUID, EMAIL_UUID, ALTERNATE_PHONE_NUMBER_UUID, } from './constants';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patientService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,aAAa,EACb,WAAW,EACX,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,0BAA0B,EAC1B,aAAa,EACb,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,qBAAqB,EAC1B,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,UAAU,EACV,2BAA2B,GAC5B,MAAM,aAAa,CAAC"}
@@ -0,0 +1,218 @@
1
+ export interface Age {
2
+ years: number;
3
+ months: number;
4
+ days: number;
5
+ }
6
+ export interface FormattedPatientData {
7
+ id: string;
8
+ fullName: string | null;
9
+ gender: string | null;
10
+ birthDate: string | null;
11
+ formattedAddress: string | null;
12
+ formattedContact: string | null;
13
+ identifiers: Map<string, string>;
14
+ age: Age | null;
15
+ }
16
+ export interface PatientSearchResult {
17
+ uuid: string;
18
+ birthDate: Date | string;
19
+ extraIdentifiers: string | null;
20
+ personId: number;
21
+ deathDate: Date | null;
22
+ identifier: string;
23
+ addressFieldValue: string | null;
24
+ patientProgramAttributeValue: string | null;
25
+ givenName: string;
26
+ middleName: string;
27
+ familyName: string;
28
+ gender: string;
29
+ dateCreated: Date;
30
+ activeVisitUuid: string;
31
+ customAttribute: string;
32
+ hasBeenAdmitted: boolean;
33
+ age: string;
34
+ }
35
+ export interface PatientSearchResultBundle {
36
+ totalCount: number;
37
+ pageOfResults: PatientSearchResult[] | AppointmentSearchResult[];
38
+ }
39
+ export interface IdentifierSource {
40
+ uuid: string;
41
+ name: string;
42
+ prefix: string;
43
+ }
44
+ export interface IdentifierType {
45
+ uuid: string;
46
+ name: string;
47
+ description: string;
48
+ format: string | null;
49
+ required: boolean;
50
+ primary: boolean;
51
+ identifierSources: IdentifierSource[];
52
+ }
53
+ export type IdentifierTypesResponse = IdentifierType[];
54
+ export interface AppSetting {
55
+ property: string;
56
+ value: string;
57
+ }
58
+ export type AppSettingsResponse = AppSetting[];
59
+ export interface PatientName {
60
+ givenName: string;
61
+ middleName?: string;
62
+ familyName: string;
63
+ display?: string;
64
+ preferred?: boolean;
65
+ }
66
+ export interface PatientAddress {
67
+ address1?: string;
68
+ address2?: string;
69
+ cityVillage?: string;
70
+ countyDistrict?: string;
71
+ stateProvince?: string;
72
+ postalCode?: string;
73
+ }
74
+ export interface PatientIdentifier {
75
+ identifierSourceUuid?: string;
76
+ identifierPrefix?: string;
77
+ identifierType: string;
78
+ preferred: boolean;
79
+ voided?: boolean;
80
+ }
81
+ export interface PatientAttribute {
82
+ attributeType: {
83
+ uuid: string;
84
+ };
85
+ voided?: boolean;
86
+ value?: string;
87
+ }
88
+ export interface CreatePatientRequest {
89
+ patient: {
90
+ person: {
91
+ names: PatientName[];
92
+ gender: string;
93
+ birthdate: string;
94
+ birthdateEstimated?: boolean;
95
+ birthtime?: string | null;
96
+ addresses?: PatientAddress[];
97
+ attributes?: PatientAttribute[];
98
+ deathDate?: string | null;
99
+ causeOfDeath?: string;
100
+ };
101
+ identifiers: PatientIdentifier[];
102
+ };
103
+ relationships?: unknown[];
104
+ }
105
+ export interface CreatePatientResponse {
106
+ patient: {
107
+ uuid: string;
108
+ display: string;
109
+ person: {
110
+ uuid: string;
111
+ names: Array<{
112
+ display: string;
113
+ }>;
114
+ };
115
+ identifiers: Array<{
116
+ identifier: string;
117
+ }>;
118
+ };
119
+ }
120
+ export interface AddressHierarchyEntry {
121
+ name: string;
122
+ uuid: string;
123
+ userGeneratedId: string | null;
124
+ level?: string;
125
+ parent?: AddressHierarchyEntry;
126
+ }
127
+ export interface AddressHierarchyResponse {
128
+ results: AddressHierarchyEntry[];
129
+ }
130
+ export interface VisitType {
131
+ visitTypes: Record<string, string>;
132
+ }
133
+ export interface VisitData {
134
+ patient: string;
135
+ visitType: string;
136
+ location: string;
137
+ }
138
+ export interface VisitLocationResponse {
139
+ uuid: string;
140
+ }
141
+ export interface ActiveVisit {
142
+ results: string[];
143
+ }
144
+ export interface AppointmentSearchResult extends PatientSearchResult {
145
+ appointmentNumber?: string;
146
+ appointmentDate?: string;
147
+ appointmentReason?: string;
148
+ appointmentStatus?: string;
149
+ }
150
+ export interface Appointment {
151
+ length: number;
152
+ uuid: string;
153
+ appointmentNumber: string;
154
+ dateCreated: number;
155
+ dateAppointmentScheduled: number;
156
+ patient: Patient;
157
+ service: AppointmentService;
158
+ serviceType: ServiceType | null;
159
+ provider: Provider | null;
160
+ location: Location;
161
+ startDateTime: number;
162
+ endDateTime: number;
163
+ appointmentKind: string;
164
+ status: string;
165
+ comments: string | null;
166
+ additionalInfo: string | null;
167
+ teleconsultation: string | null;
168
+ providers: Provider[];
169
+ reasons: Reason[];
170
+ }
171
+ export interface Patient {
172
+ identifier: string;
173
+ gender: string;
174
+ name: string;
175
+ uuid: string;
176
+ birthDate: number;
177
+ age: number;
178
+ PatientIdentifier: string;
179
+ customAttributes: [];
180
+ }
181
+ export interface AppointmentService {
182
+ appointmentServiceId: number;
183
+ name: string;
184
+ description: string | null;
185
+ speciality: null;
186
+ startTime: string;
187
+ endTime: string;
188
+ maxAppointmentsLimit: number;
189
+ durationMins: number | null;
190
+ location: Location;
191
+ uuid: string;
192
+ color: string;
193
+ initialAppointmentStatus: string | null;
194
+ creatorName: string | null;
195
+ }
196
+ export interface Location {
197
+ name: string;
198
+ uuid: string;
199
+ }
200
+ export interface Provider {
201
+ id?: number;
202
+ name?: string;
203
+ uuid?: string;
204
+ }
205
+ export interface Extensions {
206
+ patientEmailDefined: boolean;
207
+ }
208
+ export interface Reason {
209
+ conceptUuid: string;
210
+ name: string;
211
+ }
212
+ export interface ServiceType {
213
+ id?: number;
214
+ name?: string;
215
+ description?: string;
216
+ uuid?: string;
217
+ }
218
+ //# sourceMappingURL=models.d.ts.map