@bahmni/services 0.0.1-dev.100

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 (266) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +21 -0
  3. package/dist/AppointmentService/appointmmetService.d.ts +5 -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 +70 -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 +48 -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 +18 -0
  54. package/dist/conceptService/conceptService.d.ts.map +1 -0
  55. package/dist/conceptService/constants.d.ts +5 -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 +83 -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 +15 -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 +109 -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 +57 -0
  91. package/dist/configService/schemas/medicationConfig.schema.json.d.ts +40 -0
  92. package/dist/configService/schemas/registrationConfig.schema.json.d.ts +406 -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 +24 -0
  96. package/dist/constants/fhir.d.ts.map +1 -0
  97. package/dist/date/constants.d.ts +7 -0
  98. package/dist/date/constants.d.ts.map +1 -0
  99. package/dist/date/date.d.ts +75 -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/encounterFilterUtils.d.ts +17 -0
  118. package/dist/encounterService/encounterFilterUtils.d.ts.map +1 -0
  119. package/dist/encounterService/encounterService.d.ts +20 -0
  120. package/dist/encounterService/encounterService.d.ts.map +1 -0
  121. package/dist/encounterService/index.d.ts +3 -0
  122. package/dist/encounterService/index.d.ts.map +1 -0
  123. package/dist/encounterSessionService/constants.d.ts +4 -0
  124. package/dist/encounterSessionService/constants.d.ts.map +1 -0
  125. package/dist/encounterSessionService/encounterSessionService.d.ts +43 -0
  126. package/dist/encounterSessionService/encounterSessionService.d.ts.map +1 -0
  127. package/dist/encounterSessionService/index.d.ts +2 -0
  128. package/dist/encounterSessionService/index.d.ts.map +1 -0
  129. package/dist/episodeOfCareService/constants.d.ts +2 -0
  130. package/dist/episodeOfCareService/constants.d.ts.map +1 -0
  131. package/dist/episodeOfCareService/episodeOfCareService.d.ts +8 -0
  132. package/dist/episodeOfCareService/episodeOfCareService.d.ts.map +1 -0
  133. package/dist/episodeOfCareService/index.d.ts +3 -0
  134. package/dist/episodeOfCareService/index.d.ts.map +1 -0
  135. package/dist/episodeOfCareService/models.d.ts +5 -0
  136. package/dist/episodeOfCareService/models.d.ts.map +1 -0
  137. package/dist/errorHandling/index.d.ts +2 -0
  138. package/dist/errorHandling/index.d.ts.map +1 -0
  139. package/dist/errorHandling/utils.d.ts +10 -0
  140. package/dist/errorHandling/utils.d.ts.map +1 -0
  141. package/dist/events/consultationEvents.d.ts +51 -0
  142. package/dist/events/consultationEvents.d.ts.map +1 -0
  143. package/dist/events/index.d.ts +2 -0
  144. package/dist/events/index.d.ts.map +1 -0
  145. package/dist/i18n/constants.d.ts +5 -0
  146. package/dist/i18n/constants.d.ts.map +1 -0
  147. package/dist/i18n/i18n.d.ts +10 -0
  148. package/dist/i18n/i18n.d.ts.map +1 -0
  149. package/dist/i18n/index.d.ts +4 -0
  150. package/dist/i18n/index.d.ts.map +1 -0
  151. package/dist/i18n/translationService.d.ts +40 -0
  152. package/dist/i18n/translationService.d.ts.map +1 -0
  153. package/dist/index.d.ts +36 -0
  154. package/dist/index.d.ts.map +1 -0
  155. package/dist/index.js +12257 -0
  156. package/dist/investigationService/constants.d.ts +6 -0
  157. package/dist/investigationService/constants.d.ts.map +1 -0
  158. package/dist/investigationService/index.d.ts +4 -0
  159. package/dist/investigationService/index.d.ts.map +1 -0
  160. package/dist/investigationService/investigationService.d.ts +5 -0
  161. package/dist/investigationService/investigationService.d.ts.map +1 -0
  162. package/dist/investigationService/model.d.ts +20 -0
  163. package/dist/investigationService/model.d.ts.map +1 -0
  164. package/dist/labInvestigationService/constants.d.ts +2 -0
  165. package/dist/labInvestigationService/constants.d.ts.map +1 -0
  166. package/dist/labInvestigationService/index.d.ts +3 -0
  167. package/dist/labInvestigationService/index.d.ts.map +1 -0
  168. package/dist/labInvestigationService/labInvestigationService.d.ts +54 -0
  169. package/dist/labInvestigationService/labInvestigationService.d.ts.map +1 -0
  170. package/dist/labInvestigationService/models.d.ts +38 -0
  171. package/dist/labInvestigationService/models.d.ts.map +1 -0
  172. package/dist/medicationRequestService/constants.d.ts +2 -0
  173. package/dist/medicationRequestService/constants.d.ts.map +1 -0
  174. package/dist/medicationRequestService/index.d.ts +3 -0
  175. package/dist/medicationRequestService/index.d.ts.map +1 -0
  176. package/dist/medicationRequestService/medicationRequestService.d.ts +15 -0
  177. package/dist/medicationRequestService/medicationRequestService.d.ts.map +1 -0
  178. package/dist/medicationRequestService/models.d.ts +58 -0
  179. package/dist/medicationRequestService/models.d.ts.map +1 -0
  180. package/dist/notification/index.d.ts +3 -0
  181. package/dist/notification/index.d.ts.map +1 -0
  182. package/dist/notification/models.d.ts +9 -0
  183. package/dist/notification/models.d.ts.map +1 -0
  184. package/dist/notification/notificationService.d.ts +22 -0
  185. package/dist/notification/notificationService.d.ts.map +1 -0
  186. package/dist/observationFormsService/constants.d.ts +6 -0
  187. package/dist/observationFormsService/constants.d.ts.map +1 -0
  188. package/dist/observationFormsService/index.d.ts +4 -0
  189. package/dist/observationFormsService/index.d.ts.map +1 -0
  190. package/dist/observationFormsService/models.d.ts +71 -0
  191. package/dist/observationFormsService/models.d.ts.map +1 -0
  192. package/dist/observationFormsService/observationFormsService.d.ts +12 -0
  193. package/dist/observationFormsService/observationFormsService.d.ts.map +1 -0
  194. package/dist/observationFormsService/observationFormsTransformer.d.ts +19 -0
  195. package/dist/observationFormsService/observationFormsTransformer.d.ts.map +1 -0
  196. package/dist/orderRequestService/constants.d.ts +2 -0
  197. package/dist/orderRequestService/constants.d.ts.map +1 -0
  198. package/dist/orderRequestService/index.d.ts +2 -0
  199. package/dist/orderRequestService/index.d.ts.map +1 -0
  200. package/dist/orderRequestService/orderRequestService.d.ts +12 -0
  201. package/dist/orderRequestService/orderRequestService.d.ts.map +1 -0
  202. package/dist/patientService/attributeFormatMapper.d.ts +55 -0
  203. package/dist/patientService/attributeFormatMapper.d.ts.map +1 -0
  204. package/dist/patientService/constants.d.ts +26 -0
  205. package/dist/patientService/constants.d.ts.map +1 -0
  206. package/dist/patientService/index.d.ts +5 -0
  207. package/dist/patientService/index.d.ts.map +1 -0
  208. package/dist/patientService/models.d.ts +372 -0
  209. package/dist/patientService/models.d.ts.map +1 -0
  210. package/dist/patientService/patientService.d.ts +128 -0
  211. package/dist/patientService/patientService.d.ts.map +1 -0
  212. package/dist/privilegeService/index.d.ts +3 -0
  213. package/dist/privilegeService/index.d.ts.map +1 -0
  214. package/dist/privilegeService/models.d.ts +9 -0
  215. package/dist/privilegeService/models.d.ts.map +1 -0
  216. package/dist/privilegeService/privilegeService.d.ts +15 -0
  217. package/dist/privilegeService/privilegeService.d.ts.map +1 -0
  218. package/dist/programService/index.d.ts +3 -0
  219. package/dist/programService/index.d.ts.map +1 -0
  220. package/dist/programService/model.d.ts +171 -0
  221. package/dist/programService/model.d.ts.map +1 -0
  222. package/dist/programService/programService.d.ts +8 -0
  223. package/dist/programService/programService.d.ts.map +1 -0
  224. package/dist/providerService/constants.d.ts +2 -0
  225. package/dist/providerService/constants.d.ts.map +1 -0
  226. package/dist/providerService/index.d.ts +3 -0
  227. package/dist/providerService/index.d.ts.map +1 -0
  228. package/dist/providerService/models.d.ts +51 -0
  229. package/dist/providerService/models.d.ts.map +1 -0
  230. package/dist/providerService/providerService.d.ts +7 -0
  231. package/dist/providerService/providerService.d.ts.map +1 -0
  232. package/dist/radiologyInvestigationService/__mocks__/mocks.d.ts +10 -0
  233. package/dist/radiologyInvestigationService/__mocks__/mocks.d.ts.map +1 -0
  234. package/dist/radiologyInvestigationService/index.d.ts +2 -0
  235. package/dist/radiologyInvestigationService/index.d.ts.map +1 -0
  236. package/dist/radiologyInvestigationService/radiologyInvestigationService.d.ts +29 -0
  237. package/dist/radiologyInvestigationService/radiologyInvestigationService.d.ts.map +1 -0
  238. package/dist/userService/constants.d.ts +3 -0
  239. package/dist/userService/constants.d.ts.map +1 -0
  240. package/dist/userService/index.d.ts +3 -0
  241. package/dist/userService/index.d.ts.map +1 -0
  242. package/dist/userService/models.d.ts +18 -0
  243. package/dist/userService/models.d.ts.map +1 -0
  244. package/dist/userService/userService.d.ts +10 -0
  245. package/dist/userService/userService.d.ts.map +1 -0
  246. package/dist/utils/index.d.ts +2 -0
  247. package/dist/utils/index.d.ts.map +1 -0
  248. package/dist/utils/utils.d.ts +90 -0
  249. package/dist/utils/utils.d.ts.map +1 -0
  250. package/dist/visitService/constants.d.ts +5 -0
  251. package/dist/visitService/constants.d.ts.map +1 -0
  252. package/dist/visitService/index.d.ts +3 -0
  253. package/dist/visitService/index.d.ts.map +1 -0
  254. package/dist/visitService/models.d.ts +19 -0
  255. package/dist/visitService/models.d.ts.map +1 -0
  256. package/dist/visitService/visitService.d.ts +29 -0
  257. package/dist/visitService/visitService.d.ts.map +1 -0
  258. package/dist/vitalFlowSheetService/constants.d.ts +2 -0
  259. package/dist/vitalFlowSheetService/constants.d.ts.map +1 -0
  260. package/dist/vitalFlowSheetService/index.d.ts +3 -0
  261. package/dist/vitalFlowSheetService/index.d.ts.map +1 -0
  262. package/dist/vitalFlowSheetService/model.d.ts +22 -0
  263. package/dist/vitalFlowSheetService/model.d.ts.map +1 -0
  264. package/dist/vitalFlowSheetService/vitalFlowSheetService.d.ts +11 -0
  265. package/dist/vitalFlowSheetService/vitalFlowSheetService.d.ts.map +1 -0
  266. package/package.json +44 -0
@@ -0,0 +1,171 @@
1
+ interface Link {
2
+ rel: string;
3
+ uri: string;
4
+ resourceAlias?: string;
5
+ }
6
+ interface BaseResource {
7
+ uuid: string;
8
+ display: string;
9
+ links?: Link[];
10
+ resourceVersion?: string;
11
+ }
12
+ interface User extends BaseResource {
13
+ links: Link[];
14
+ }
15
+ interface AuditInfo {
16
+ creator?: User;
17
+ dateCreated?: string;
18
+ changedBy?: User | null;
19
+ dateChanged?: string | null;
20
+ }
21
+ interface PersonName extends BaseResource {
22
+ links?: Link[];
23
+ }
24
+ interface PersonAttribute extends BaseResource {
25
+ links?: Link[];
26
+ }
27
+ interface Person extends BaseResource {
28
+ gender: string;
29
+ age: number;
30
+ birthdate: string;
31
+ birthdateEstimated: boolean;
32
+ dead: boolean;
33
+ deathDate: string | null;
34
+ causeOfDeath: unknown | null;
35
+ preferredName: PersonName;
36
+ preferredAddress: unknown | null;
37
+ attributes: PersonAttribute[];
38
+ voided: boolean;
39
+ birthtime: string | null;
40
+ deathdateEstimated: boolean;
41
+ links: Link[];
42
+ resourceVersion: string;
43
+ }
44
+ interface PatientIdentifier extends BaseResource {
45
+ links: Link[];
46
+ }
47
+ interface Patient extends BaseResource {
48
+ identifiers: PatientIdentifier[];
49
+ person: Person;
50
+ voided: boolean;
51
+ links: Link[];
52
+ resourceVersion: string;
53
+ }
54
+ interface ConceptName extends BaseResource {
55
+ name: string;
56
+ locale: string;
57
+ localePreferred: boolean;
58
+ conceptNameType: string;
59
+ links: Link[];
60
+ resourceVersion: string;
61
+ }
62
+ interface ConceptDatatype extends BaseResource {
63
+ name?: string;
64
+ description?: string;
65
+ hl7Abbreviation?: string;
66
+ retired: boolean;
67
+ links: Link[];
68
+ resourceVersion: string;
69
+ }
70
+ interface ConceptClass extends BaseResource {
71
+ name?: string;
72
+ description?: string;
73
+ retired: boolean;
74
+ links: Link[];
75
+ resourceVersion: string;
76
+ }
77
+ interface ConceptDescription extends BaseResource {
78
+ description?: string;
79
+ locale?: string;
80
+ links?: Link[];
81
+ resourceVersion?: string;
82
+ }
83
+ interface ConceptMapping extends BaseResource {
84
+ links?: Link[];
85
+ }
86
+ interface Concept extends BaseResource {
87
+ name?: ConceptName;
88
+ names?: ConceptName[];
89
+ datatype?: ConceptDatatype;
90
+ conceptClass?: ConceptClass;
91
+ set?: boolean;
92
+ version?: string | null;
93
+ retired?: boolean;
94
+ descriptions?: ConceptDescription[];
95
+ mappings?: ConceptMapping[];
96
+ answers?: Concept[];
97
+ setMembers?: Concept[];
98
+ attributes?: unknown[];
99
+ auditInfo?: AuditInfo;
100
+ links: Link[];
101
+ resourceVersion: string;
102
+ }
103
+ interface ProgramAttributeType extends BaseResource {
104
+ description: string;
105
+ retired: boolean;
106
+ links: Link[];
107
+ }
108
+ interface ProgramEnrollmentAttribute extends BaseResource {
109
+ attributeType: ProgramAttributeType;
110
+ value: string | Concept;
111
+ voided: boolean;
112
+ links: Link[];
113
+ resourceVersion: string;
114
+ }
115
+ interface WorkflowState extends BaseResource {
116
+ description?: string | null;
117
+ retired: boolean;
118
+ concept: Concept;
119
+ links: Link[];
120
+ resourceVersion: string;
121
+ }
122
+ interface ProgramEnrollmentState {
123
+ uuid: string;
124
+ startDate: string;
125
+ endDate: string | null;
126
+ voided: boolean;
127
+ state: WorkflowState;
128
+ auditInfo?: AuditInfo;
129
+ }
130
+ interface Workflow extends BaseResource {
131
+ concept: Concept;
132
+ description?: string | null;
133
+ retired: boolean;
134
+ states: WorkflowState[];
135
+ links: Link[];
136
+ resourceVersion: string;
137
+ }
138
+ interface Program extends BaseResource {
139
+ name: string;
140
+ description?: string;
141
+ retired: boolean;
142
+ concept: Concept;
143
+ allWorkflows: Workflow[];
144
+ outcomesConcept?: Concept;
145
+ links: Link[];
146
+ resourceVersion: string;
147
+ }
148
+ export interface ProgramEnrollment extends BaseResource {
149
+ patient: Patient;
150
+ program: Program;
151
+ dateEnrolled: string;
152
+ dateCompleted: string | null;
153
+ dateEnded?: string | null;
154
+ location: {
155
+ uuid: string;
156
+ display: string;
157
+ } | null;
158
+ voided: boolean;
159
+ outcome: Concept | null;
160
+ states: ProgramEnrollmentState[];
161
+ attributes: ProgramEnrollmentAttribute[];
162
+ episodeUuid: string;
163
+ auditInfo: AuditInfo;
164
+ links: Link[];
165
+ resourceVersion: string;
166
+ }
167
+ export interface PatientProgramsResponse {
168
+ results: ProgramEnrollment[];
169
+ }
170
+ export {};
171
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/programService/model.ts"],"names":[],"mappings":"AAAA,UAAU,IAAI;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,IAAK,SAAQ,YAAY;IACjC,KAAK,EAAE,IAAI,EAAE,CAA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AC;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,OAAQ,SAAQ,YAAY;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,IAAI,CAAC;IACT,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,UAAU,EAAE,0BAA0B,EAAE,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B"}
@@ -0,0 +1,8 @@
1
+ import { PatientProgramsResponse } from './model';
2
+ /**
3
+ * Fetches programs for a given patient UUID
4
+ * @param patientUUID - The UUID of the patient
5
+ * @returns Promise resolving to a list containing programs
6
+ */
7
+ export declare const getPatientPrograms: (patientUUID: string) => Promise<PatientProgramsResponse>;
8
+ //# sourceMappingURL=programService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"programService.d.ts","sourceRoot":"","sources":["../../src/programService/programService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAGlD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,aAAa,MAAM,KAClB,OAAO,CAAC,uBAAuB,CAEjC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const PROVIDER_RESOURCE_URL: (userUUID: string) => string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/providerService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,WACyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getCurrentProvider } from './providerService';
2
+ export { type Provider, type Person } from './models';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providerService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Interface representing a link to a resource
3
+ */
4
+ export interface Link {
5
+ rel: string;
6
+ uri: string;
7
+ resourceAlias: string;
8
+ }
9
+ /**
10
+ * Interface representing a person's name
11
+ */
12
+ export interface PersonName {
13
+ uuid: string;
14
+ display: string;
15
+ links: Link[];
16
+ }
17
+ /**
18
+ * Interface representing a person in OpenMRS
19
+ */
20
+ export interface Person {
21
+ uuid: string;
22
+ display: string;
23
+ gender: string;
24
+ age: number | null;
25
+ birthdate: string | null;
26
+ birthdateEstimated: boolean;
27
+ dead: boolean;
28
+ deathDate: string | null;
29
+ causeOfDeath: string | null;
30
+ preferredName: PersonName;
31
+ voided: boolean;
32
+ birthtime: string | null;
33
+ deathdateEstimated: boolean;
34
+ links: Link[];
35
+ resourceVersion: string;
36
+ }
37
+ /**
38
+ * Interface representing OpenMRS Provider resource from REST API
39
+ */
40
+ export interface Provider {
41
+ uuid: string;
42
+ display: string;
43
+ person: Person;
44
+ }
45
+ /**
46
+ * Interface representing Provider response from REST API
47
+ */
48
+ export interface ProviderResponse {
49
+ results: Provider[];
50
+ }
51
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/providerService/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,UAAU,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,QAAQ,EAAE,CAAC;CACrB"}
@@ -0,0 +1,7 @@
1
+ import { Provider } from './models';
2
+ /**
3
+ * Fetches the current user's username from cookies and provider uuid fromREST endpoint
4
+ * @returns Promise resolving to provider UUID or null if not found
5
+ */
6
+ export declare function getCurrentProvider(userUUID: string): Promise<Provider | null>;
7
+ //# sourceMappingURL=providerService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providerService.d.ts","sourceRoot":"","sources":["../../src/providerService/providerService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAoB,MAAM,UAAU,CAAC;AAEtD;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAU1B"}
@@ -0,0 +1,10 @@
1
+ import { Bundle, ServiceRequest, ImagingStudy } from 'fhir/r4';
2
+ export declare const mockPatientUUID = "c81876c3-b464-486a-9ebf-20eea9431fb1";
3
+ export declare const mockPatientIdentifier = "PA000001";
4
+ export declare const mockRadiologyInvestigations: ServiceRequest[];
5
+ export declare const mockRadiologyInvestigationBundle: Bundle;
6
+ export declare const mockEmptyRadiologyInvestigationBundle: Bundle;
7
+ export declare const mockMalformedBundle: Bundle;
8
+ export declare const mockImagingStudies: ImagingStudy[];
9
+ export declare const mockRadiologyInvestigationBundleWithImagingStudy: Bundle<ServiceRequest | ImagingStudy>;
10
+ //# sourceMappingURL=mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/radiologyInvestigationService/__mocks__/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG/D,eAAO,MAAM,eAAe,yCAAyC,CAAC;AACtE,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAGhD,eAAO,MAAM,2BAA2B,EAAE,cAAc,EAkMvD,CAAC;AAGF,eAAO,MAAM,gCAAgC,EAAE,MAkB9C,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,MAKnD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAcjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAAY,EA2D5C,CAAC;AAEF,eAAO,MAAM,gDAAgD,EAAE,MAAM,CACnE,cAAc,GAAG,YAAY,CAyB9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getPatientRadiologyInvestigations, getPatientRadiologyInvestigationBundle, getPatientRadiologyInvestigationBundleWithImagingStudy, } from './radiologyInvestigationService';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigationService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,sCAAsC,EACtC,sDAAsD,GACvD,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { Bundle, ServiceRequest, ImagingStudy } from 'fhir/r4';
2
+ /**
3
+ * Fetches radiology investigations for a given patient UUID from the FHIR R4 endpoint
4
+ * @param patientUUID - The UUID of the patient
5
+ * @param category - The category of the investigations
6
+ * @param encounterUuids - Optional array of encounter UUIDs to filter the investigations
7
+ * @param numberOfVisits - Optional number of visits to consider
8
+ * @returns Promise resolving to a Bundle containing radiology investigations
9
+ */
10
+ export declare function getPatientRadiologyInvestigationBundle(patientUUID: string, category: string, encounterUuids?: string[], numberOfVisits?: number): Promise<Bundle<ServiceRequest>>;
11
+ /**
12
+ * Fetches radiology investigations bundle with ImagingStudy resources included
13
+ * @param patientUUID - The UUID of the patient
14
+ * @param category - The category of the investigations
15
+ * @param encounterUuids - Optional array of encounter UUIDs to filter the investigations
16
+ * @param numberOfVisits - Optional number of visits to consider
17
+ * @returns Promise resolving to a Bundle containing both ServiceRequest and ImagingStudy resources
18
+ */
19
+ export declare function getPatientRadiologyInvestigationBundleWithImagingStudy(patientUUID: string, category: string, encounterUuids?: string[], numberOfVisits?: number): Promise<Bundle<ServiceRequest | ImagingStudy>>;
20
+ /**
21
+ * Fetches and formats radiology investigations for a given patient UUID
22
+ * @param patientUUID - The UUID of the patient
23
+ * @param category
24
+ * @param encounterUuids
25
+ * @param numberOfVisits
26
+ * @returns Promise resolving to an array of radiology investigations
27
+ */
28
+ export declare function getPatientRadiologyInvestigations(patientUUID: string, category: string, encounterUuids?: string[], numberOfVisits?: number): Promise<ServiceRequest[]>;
29
+ //# sourceMappingURL=radiologyInvestigationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radiologyInvestigationService.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigationService/radiologyInvestigationService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG/D;;;;;;;GAOG;AACH,wBAAsB,sCAAsC,CAC1D,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAOjC;AAED;;;;;;;GAOG;AACH,wBAAsB,sDAAsD,CAC1E,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,cAAc,GAAG,YAAY,CAAC,CAAC,CAQhD;AAED;;;;;;;GAOG;AACH,wBAAsB,iCAAiC,CACrD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,EAAE,CAAC,CAY3B"}
@@ -0,0 +1,3 @@
1
+ export declare const USER_RESOURCE_URL: (username: string) => string;
2
+ export declare const BAHMNI_USER_LOCATION_COOKIE = "bahmni.user.location";
3
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/userService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,WACuB,CAAC;AAC1E,eAAO,MAAM,2BAA2B,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getCurrentUser, getUserLoginLocation } from './userService';
2
+ export { type User, type UserLocation } from './models';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/userService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Interface representing OpenMRS User resource from REST API
3
+ */
4
+ export interface User {
5
+ username: string;
6
+ uuid: string;
7
+ }
8
+ export interface UserLocation {
9
+ name: string;
10
+ uuid: string;
11
+ }
12
+ /**
13
+ * Interface representing User response from REST API
14
+ */
15
+ export interface UserResponse {
16
+ results: User[];
17
+ }
18
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/userService/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,IAAI,EAAE,CAAC;CACjB"}
@@ -0,0 +1,10 @@
1
+ import { User, UserLocation } from './models';
2
+ export declare function getCurrentUser(): Promise<User | null>;
3
+ /**
4
+ * Fetches user's log in location details from the cache.
5
+ * @returns The user's log in location if valid
6
+ * @returns null if user location cookie not found or invalid
7
+ * @throws Error when the user login location is null / invalid
8
+ */
9
+ export declare const getUserLoginLocation: () => UserLocation;
10
+ //# sourceMappingURL=userService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userService.d.ts","sourceRoot":"","sources":["../../src/userService/userService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,IAAI,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE5D,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAuB3D;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAAO,YAWvC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { capitalize, generateId, getCookieByName, isStringEmpty, getPriorityByOrder, groupByDate, filterReplacementEntries, refreshQueries, parseQueryParams, formatUrl, blobToDataUrl, } from './utils';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,wBAAwB,EACxB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { QueryClient, QueryKey } from '@tanstack/react-query';
2
+ /**
3
+ * Refreshes React Query cache with advanced options
4
+ * Performs cache operations: cancel, remove, invalidate, and optionally refetch
5
+ *
6
+ * @param queryClient - The React Query client instance
7
+ * @param queryKey - The query key to refresh
8
+ * @param opts - Optional configuration for cache refresh behavior
9
+ * @param opts.exact - Whether to match query key exactly (default: true)
10
+ * @param opts.refetchActiveNow - Whether to immediately refetch active queries (default: true)
11
+ * @returns Promise that resolves when all operations complete
12
+ */
13
+ export declare const refreshQueries: (queryClient: QueryClient, queryKey: QueryKey, opts?: {
14
+ exact?: boolean;
15
+ refetchActiveNow?: boolean;
16
+ }) => Promise<void>;
17
+ /**
18
+ * Generates a random ID
19
+ * @returns {string} A random ID
20
+ */
21
+ export declare const generateId: () => string;
22
+ /**
23
+ * Converts a string to capital case (e.g., 'foo bar' -> 'Foo Bar')
24
+ * @param input - The string to convert
25
+ * @param delimiters - Optional string of delimiter characters (default: " -", space and hyphen)
26
+ * @returns The string in capital case
27
+ */
28
+ export declare function capitalize(input: string, delimiters?: string): string;
29
+ /**
30
+ * Gets the cookie value by name
31
+ * @param name The name of the cookie to retrieve
32
+ * @returns The cookie value or empty string if not found
33
+ */
34
+ export declare function getCookieByName(name: string): string;
35
+ export declare const isStringEmpty: (input?: string) => boolean;
36
+ /**
37
+ * Returns priority index based on position in priority order array
38
+ * Case insensitive matching with whitespace trimming
39
+ * @param value - The value to find priority for
40
+ * @param priorityOrder - Array defining priority order (index 0 = highest priority)
41
+ * @returns Priority number (lower = higher priority), 999 for unknown values
42
+ */
43
+ export declare const getPriorityByOrder: (value: string, priorityOrder: string[]) => number;
44
+ /**
45
+ * Interface for grouped items by date
46
+ */
47
+ export interface GroupedByDate<T> {
48
+ date: string;
49
+ items: T[];
50
+ }
51
+ /**
52
+ * Groups items by date extracted from each item
53
+ * @param items - Array of items to group
54
+ * @param dateExtractor - Function to extract date string from item
55
+ * @returns Array of grouped items by date (no sorting applied)
56
+ */
57
+ export declare function groupByDate<T>(items: T[], dateExtractor: (item: T) => string): GroupedByDate<T>[];
58
+ /**
59
+ * Filters out items that have replacement relationships
60
+ * Removes both the replacing items (have replacement references) and the replaced items (referenced by others)
61
+ * This prevents duplicate entries from showing in the UI where one item replaces another
62
+ *
63
+ * @param items - Array of items to filter
64
+ * @param idExtractor - Function to extract unique identifier from each item
65
+ * @param replacesExtractor - Function to extract array of replaced item IDs from each item
66
+ * @returns Filtered array without replacement-related entries
67
+ */
68
+ export declare function filterReplacementEntries<T>(items: T[], idExtractor: (item: T) => string, replacesExtractor: (item: T) => string[] | undefined): T[];
69
+ /**
70
+ * Parses URL query parameters from a query string
71
+ * @param locationSearchString - Optional query string to parse (defaults to window.location.search)
72
+ * @returns Object containing parsed query parameters as key-value pairs
73
+ */
74
+ export declare function parseQueryParams(locationSearchString?: string): Record<string, string>;
75
+ /**
76
+ * Formats a URL by replacing template placeholders with actual values
77
+ * Template placeholders are in the format {{key}}
78
+ * @param url - The URL template string containing placeholders
79
+ * @param options - Object containing key-value pairs for placeholder replacement
80
+ * @param useQueryParams - Whether to fallback to query parameters if a value is not found in options
81
+ * @returns The formatted URL with all placeholders replaced
82
+ */
83
+ export declare function formatUrl(url: string, options: Record<string, string>, useQueryParams?: boolean): string;
84
+ /**
85
+ * Convert blob to base64 data URL
86
+ * @param blob - The image blob
87
+ * @returns Promise<string> - The base64 data URL
88
+ */
89
+ export declare const blobToDataUrl: (blob: Blob) => Promise<string>;
90
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,GACzB,aAAa,WAAW,EACxB,UAAU,QAAQ,EAClB,OAAO;IACL,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,KACA,OAAO,CAAC,IAAI,CAUd,CAAC;AAE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O,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,OAAO,CAAC,MAAM,CAOxD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const VISIT_TYPES_URL: () => string;
2
+ export declare const CREATE_VISIT_URL: string;
3
+ export declare const GET_ACTIVE_VISIT_URL: (patientUuid: string) => string;
4
+ export declare const GET_VISIT_LOCATION: (loginLocation: string) => string;
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/visitService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,cAE8C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,QAA6B,CAAC;AAE3D,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,WAEoD,CAAC;AAE7G,eAAO,MAAM,kBAAkB,GAAI,eAAe,MAAM,WACQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { VisitType, VisitTypes, VisitData, ActiveVisit } from './models';
2
+ export { getVisitTypes, checkIfActiveVisitExists, createVisitForPatient, getActiveVisitByPatient, } from './visitService';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/visitService/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,19 @@
1
+ export interface VisitType {
2
+ name: string;
3
+ uuid: string;
4
+ }
5
+ export interface VisitTypes {
6
+ visitTypes: Record<string, string>;
7
+ }
8
+ export interface VisitData {
9
+ patient: string;
10
+ visitType: string;
11
+ location: string;
12
+ }
13
+ export interface VisitLocationResponse {
14
+ uuid: string;
15
+ }
16
+ export interface ActiveVisit {
17
+ results: string[];
18
+ }
19
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/visitService/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
@@ -0,0 +1,29 @@
1
+ import { ActiveVisit, VisitType, VisitTypes } from './models';
2
+ /**
3
+ * Fetches visit types from Bahmni configuration
4
+ * @returns Promise<VisitTypes> - Visit types response with name-uuid mapping
5
+ */
6
+ export declare const getVisitTypes: () => Promise<VisitTypes>;
7
+ /**
8
+ * Get active visits for a patient
9
+ * @param patientUuid - The UUID of the patient
10
+ * @returns Promise<{results: Array<{uuid: string}>}> - The active visit data
11
+ */
12
+ export declare const getActiveVisitByPatient: (patientUuid: string) => Promise<ActiveVisit>;
13
+ /**
14
+ * Checks if a patient has an active visit
15
+ * @param patientUuid - The UUID of the patient
16
+ * @returns Promise<boolean> - True if patient has an active visit, false otherwise
17
+ */
18
+ export declare const checkIfActiveVisitExists: (patientUuid: string) => Promise<boolean>;
19
+ /**
20
+ * Creates a new visit for a patient with the specified visit type
21
+ * Automatically sets the visit location based on the user's login location
22
+ * Fetches the correct visit location UUID from Bahmni's visitLocation endpoint
23
+ * Dispatches an audit event after successful visit creation
24
+ * @param patientUuid - The UUID of the patient
25
+ * @param visitType - The visit type object containing name and uuid
26
+ * @returns Promise<string> - The created visit UUID
27
+ */
28
+ export declare const createVisitForPatient: (patientUuid: string, visitType: VisitType) => Promise<string>;
29
+ //# sourceMappingURL=visitService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visitService.d.ts","sourceRoot":"","sources":["../../src/visitService/visitService.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,WAAW,EAGX,SAAS,EACT,UAAU,EACX,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,UAAU,CAExD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAClC,aAAa,MAAM,KAClB,OAAO,CAAC,WAAW,CAErB,CAAC;AAsBF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAa,MAAM,KAClB,OAAO,CAAC,OAAO,CAGjB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,EACnB,WAAW,SAAS,oBAsBrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const VITAL_FLOW_SHEET_URL: string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/vitalFlowSheetService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,QACoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getVitalFlowSheetData } from './vitalFlowSheetService';
2
+ export type { VitalFlowSheetData, VitalFlowSheetConceptDetail } from './model';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vitalFlowSheetService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,22 @@
1
+ export interface VitalFlowSheetData {
2
+ tabularData: Record<string, Record<string, VitalFlowSheetObservation>>;
3
+ conceptDetails: VitalFlowSheetConceptDetail[];
4
+ }
5
+ export interface VitalFlowSheetConceptDetail {
6
+ name: string;
7
+ fullName: string;
8
+ units: string;
9
+ hiNormal: number;
10
+ lowNormal: number;
11
+ attributes: Record<string, unknown>;
12
+ }
13
+ export interface VitalFlowSheetObservation {
14
+ value: string;
15
+ abnormal: boolean;
16
+ }
17
+ export interface VitalFlowSheetConfig {
18
+ latestCount?: number;
19
+ numberOfVisits?: number;
20
+ obsConcepts: string[];
21
+ }
22
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/vitalFlowSheetService/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC;IACvE,cAAc,EAAE,2BAA2B,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB"}
@@ -0,0 +1,11 @@
1
+ import { VitalFlowSheetData } from './model';
2
+ /**
3
+ * Fetches vital flow sheet data for a patient using direct parameters
4
+ * @param patientUuid - The patient UUID
5
+ * @param latestCount - Number of latest observations to fetch
6
+ * @param obsConcepts - Array of observation concepts to fetch
7
+ * @param groupBy - How to group the data (default: 'obstime')
8
+ * @returns Promise<VitalFlowSheetData>
9
+ */
10
+ export declare const getVitalFlowSheetData: (patientUuid: string, latestCount: number, obsConcepts: string[], groupBy: string) => Promise<VitalFlowSheetData>;
11
+ //# sourceMappingURL=vitalFlowSheetService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitalFlowSheetService.d.ts","sourceRoot":"","sources":["../../src/vitalFlowSheetService/vitalFlowSheetService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,EACnB,aAAa,MAAM,EACnB,aAAa,MAAM,EAAE,EACrB,SAAS,MAAM,KACd,OAAO,CAAC,kBAAkB,CAc5B,CAAC"}