@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,372 @@
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
+ uuid?: string;
61
+ givenName: string;
62
+ middleName?: string;
63
+ familyName: string;
64
+ display?: string;
65
+ preferred?: boolean;
66
+ }
67
+ export interface PatientAddress {
68
+ address1?: string;
69
+ address2?: string;
70
+ cityVillage?: string;
71
+ countyDistrict?: string;
72
+ stateProvince?: string;
73
+ postalCode?: string;
74
+ }
75
+ export interface PatientIdentifier {
76
+ identifierSourceUuid?: string;
77
+ identifierPrefix?: string;
78
+ identifierType: string;
79
+ preferred: boolean;
80
+ voided?: boolean;
81
+ }
82
+ export interface PatientAttribute {
83
+ attributeType: {
84
+ uuid: string;
85
+ };
86
+ voided?: boolean;
87
+ value?: string;
88
+ }
89
+ export interface CreatePatientRequest {
90
+ patient: {
91
+ person: {
92
+ names: PatientName[];
93
+ gender: string;
94
+ birthdate: string;
95
+ birthdateEstimated?: boolean;
96
+ birthtime?: string | null;
97
+ addresses?: PatientAddress[];
98
+ attributes?: PatientAttribute[];
99
+ deathDate?: string | null;
100
+ causeOfDeath?: string;
101
+ };
102
+ identifiers: PatientIdentifier[];
103
+ };
104
+ relationships?: unknown[];
105
+ }
106
+ export interface CreatePatientResponse {
107
+ patient: {
108
+ uuid: string;
109
+ display: string;
110
+ person: {
111
+ uuid: string;
112
+ names: Array<{
113
+ display: string;
114
+ }>;
115
+ };
116
+ identifiers: Array<{
117
+ identifier: string;
118
+ }>;
119
+ };
120
+ }
121
+ export interface AddressHierarchyEntry {
122
+ name: string;
123
+ uuid: string;
124
+ userGeneratedId: string | null;
125
+ level?: string;
126
+ parent?: AddressHierarchyEntry;
127
+ }
128
+ export interface AddressHierarchyResponse {
129
+ results: AddressHierarchyEntry[];
130
+ }
131
+ export interface OrderedAddressHierarchyLevel {
132
+ name: string;
133
+ addressField: string;
134
+ required: boolean;
135
+ }
136
+ export type OrderedAddressHierarchyLevels = OrderedAddressHierarchyLevel[];
137
+ export interface AppointmentSearchResult extends PatientSearchResult {
138
+ appointmentNumber?: string;
139
+ appointmentDate?: string;
140
+ appointmentReason?: string;
141
+ appointmentStatus?: string;
142
+ }
143
+ export interface Appointment {
144
+ length: number;
145
+ uuid: string;
146
+ appointmentNumber: string;
147
+ dateCreated: number;
148
+ dateAppointmentScheduled: number;
149
+ patient: Patient;
150
+ service: AppointmentService;
151
+ serviceType: ServiceType | null;
152
+ provider: Provider | null;
153
+ location: Location;
154
+ startDateTime: number;
155
+ endDateTime: number;
156
+ appointmentKind: string;
157
+ status: string;
158
+ comments: string | null;
159
+ additionalInfo: string | null;
160
+ teleconsultation: string | null;
161
+ providers: Provider[];
162
+ reasons: Reason[];
163
+ }
164
+ export interface Patient {
165
+ identifier: string;
166
+ gender: string;
167
+ name: string;
168
+ uuid: string;
169
+ birthDate: number;
170
+ age: number;
171
+ PatientIdentifier: string;
172
+ customAttributes: [];
173
+ }
174
+ export interface AppointmentService {
175
+ appointmentServiceId: number;
176
+ name: string;
177
+ description: string | null;
178
+ speciality: null;
179
+ startTime: string;
180
+ endTime: string;
181
+ maxAppointmentsLimit: number;
182
+ durationMins: number | null;
183
+ location: Location;
184
+ uuid: string;
185
+ color: string;
186
+ initialAppointmentStatus: string | null;
187
+ creatorName: string | null;
188
+ }
189
+ export interface Location {
190
+ name: string;
191
+ uuid: string;
192
+ }
193
+ export interface Provider {
194
+ id?: number;
195
+ name?: string;
196
+ uuid?: string;
197
+ }
198
+ export interface Extensions {
199
+ patientEmailDefined: boolean;
200
+ }
201
+ export interface Reason {
202
+ conceptUuid: string;
203
+ name: string;
204
+ }
205
+ export interface ServiceType {
206
+ id?: number;
207
+ name?: string;
208
+ description?: string;
209
+ uuid?: string;
210
+ }
211
+ export interface PatientProfileResponse {
212
+ patient: {
213
+ uuid: string;
214
+ display?: string;
215
+ identifiers: Array<{
216
+ uuid?: string;
217
+ identifier?: string;
218
+ identifierType: {
219
+ uuid: string;
220
+ name: string;
221
+ description?: string;
222
+ format?: string;
223
+ display?: string;
224
+ };
225
+ preferred: boolean;
226
+ voided?: boolean;
227
+ }>;
228
+ person: {
229
+ uuid: string;
230
+ display?: string;
231
+ gender: string;
232
+ age?: number;
233
+ birthdate: string;
234
+ birthdateEstimated: boolean;
235
+ birthtime?: string;
236
+ dead?: boolean;
237
+ deathDate?: string;
238
+ names: Array<{
239
+ uuid?: string;
240
+ givenName: string;
241
+ middleName?: string;
242
+ familyName: string;
243
+ display?: string;
244
+ preferred?: boolean;
245
+ voided?: boolean;
246
+ }>;
247
+ addresses?: Array<{
248
+ uuid?: string;
249
+ preferred?: boolean;
250
+ address1?: string;
251
+ address2?: string;
252
+ address3?: string;
253
+ address4?: string;
254
+ address5?: string;
255
+ address6?: string;
256
+ cityVillage?: string;
257
+ countyDistrict?: string;
258
+ stateProvince?: string;
259
+ country?: string;
260
+ postalCode?: string;
261
+ voided?: boolean;
262
+ }>;
263
+ attributes?: Array<{
264
+ display?: string;
265
+ uuid?: string;
266
+ value: string | number | boolean;
267
+ attributeType: {
268
+ uuid?: string;
269
+ display?: string;
270
+ links: Array<{
271
+ rel: string;
272
+ uri: string;
273
+ resourceAlias: string;
274
+ }>;
275
+ };
276
+ voided?: boolean;
277
+ links: Array<{
278
+ rel: string;
279
+ uri: string;
280
+ resourceAlias: string;
281
+ }>;
282
+ resourceVersion: string;
283
+ }>;
284
+ voided?: boolean;
285
+ };
286
+ voided?: boolean;
287
+ auditInfo?: {
288
+ dateCreated?: string;
289
+ dateChanged?: string;
290
+ };
291
+ };
292
+ image?: string;
293
+ relationships?: Relationship[];
294
+ resourceVersion?: string;
295
+ }
296
+ /**
297
+ * Concept answer for dropdown/select inputs
298
+ */
299
+ export interface ConceptAnswer {
300
+ uuid: string;
301
+ name: {
302
+ display: string;
303
+ };
304
+ }
305
+ /**
306
+ * Concept with answers for person attributes
307
+ */
308
+ export interface PersonAttributeConcept {
309
+ uuid: string;
310
+ display: string;
311
+ answers?: ConceptAnswer[];
312
+ }
313
+ /**
314
+ * Person Attribute Type from OpenMRS
315
+ * Represents custom attributes that can be added to person records
316
+ */
317
+ export interface PersonAttributeType {
318
+ uuid: string;
319
+ name: string;
320
+ sortWeight: number;
321
+ description: string | null;
322
+ format: string;
323
+ concept?: PersonAttributeConcept | null;
324
+ }
325
+ export interface PersonAttributeTypesResponse {
326
+ results: PersonAttributeType[];
327
+ }
328
+ export interface RelationshipType {
329
+ uuid: string;
330
+ display: string;
331
+ aIsToB: string;
332
+ bIsToA: string;
333
+ description?: string;
334
+ retired: boolean;
335
+ }
336
+ export interface RelationshipTypesResponse {
337
+ results: RelationshipType[];
338
+ }
339
+ export interface Person {
340
+ uuid: string;
341
+ display: string;
342
+ links?: Array<{
343
+ rel: string;
344
+ uri: string;
345
+ resourceAlias?: string;
346
+ }>;
347
+ }
348
+ export interface Relationship {
349
+ uuid: string;
350
+ display: string;
351
+ personA: Person;
352
+ relationshipType: {
353
+ uuid: string;
354
+ display: string;
355
+ links?: Array<{
356
+ rel: string;
357
+ uri: string;
358
+ resourceAlias?: string;
359
+ }>;
360
+ };
361
+ personB: Person;
362
+ voided: boolean;
363
+ startDate: string | null;
364
+ endDate: string | null;
365
+ links?: Array<{
366
+ rel: string;
367
+ uri: string;
368
+ resourceAlias?: string;
369
+ }>;
370
+ resourceVersion?: string;
371
+ }
372
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/patientService/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,EAA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ChB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,KAAK,CAAC;YACZ,GAAG,EAAE,MAAM,CAAC;YACZ,GAAG,EAAE,MAAM,CAAC;YACZ,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC,CAAC;KACJ,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC,CAAC;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,128 @@
1
+ import { Patient } from 'fhir/r4';
2
+ import { PatientSearchField } from '../configService/models/registrationConfig';
3
+ import { FormattedPatientData, PatientSearchResultBundle, IdentifierTypesResponse, CreatePatientRequest, CreatePatientResponse, AddressHierarchyEntry, OrderedAddressHierarchyLevels, PatientProfileResponse, PersonAttributeTypesResponse } from './models';
4
+ export declare const getPatientById: (patientUUID: string) => Promise<Patient>;
5
+ /**
6
+ * Format patient's full name from FHIR patient data
7
+ * @param patient - The FHIR patient to format
8
+ * @returns A formatted name string
9
+ * @returns null if no name is provided
10
+ */
11
+ export declare const formatPatientName: (patient: Patient) => string | null;
12
+ /**
13
+ * Format patient's address from FHIR patient data
14
+ * @param address - The FHIR address to format
15
+ * @returns A formatted address string
16
+ * @returns null if no address is provided
17
+ */
18
+ export declare const formatPatientAddress: (address?: NonNullable<Patient["address"]>[0]) => string | null;
19
+ /**
20
+ * Format patient's contact information from FHIR telecom data
21
+ * @param telecom - The FHIR telecom to format
22
+ * @returns A formatted contact string
23
+ * @returns null if no telecom is provided
24
+ */
25
+ export declare const formatPatientContact: (telecom?: NonNullable<Patient["telecom"]>[0]) => string | null;
26
+ /**
27
+ * Format patient data for display
28
+ * @param patient - The FHIR patient to format
29
+ * @returns A formatted patient data object
30
+ */
31
+ export declare const formatPatientData: (patient: Patient) => FormattedPatientData;
32
+ /**
33
+ * Get formatted patient data by UUID
34
+ * @param patientUUID - The UUID of the patient to retrieve
35
+ * @returns A formatted patient data object
36
+ */
37
+ export declare const getFormattedPatientById: (patientUUID: string) => Promise<FormattedPatientData>;
38
+ /**
39
+ * Fetch patient image and convert to data URL
40
+ * @param patientUUID - The UUID of the patient
41
+ * @returns Promise<string | null> - The image data URL or null
42
+ */
43
+ export declare const getPatientImageAsDataUrl: (patientUUID: string) => Promise<string | null>;
44
+ /**
45
+ * Search patient by Name / Identifier
46
+ * @param searchTerm - The Name / Identifier of the patient
47
+ * @param allSearchFields - Optional array of PatientSearchField objects to dynamically configure search fields
48
+ * @returns A formatted patient search bundle object
49
+ */
50
+ export declare const searchPatientByNameOrId: (searchTerm: string, allSearchFields?: PatientSearchField[]) => Promise<PatientSearchResultBundle>;
51
+ /**
52
+ * Search patient by Custom Attributes (phone, address, program fields)
53
+ * @param searchTerm - The search value entered by user
54
+ * @param searchFields - Array of field names to search in (from PatientSearchField.fields)
55
+ * @param patientSearchFields - Array of PatientSearchField objects to extract result fields from
56
+ * @param t - Translation function
57
+ * @returns A formatted patient search bundle object
58
+ */
59
+ export declare const searchPatientByCustomAttribute: (searchTerm: string, fieldType: string, fieldsToSearch: string[], allSearchFields: PatientSearchField[], t: (key: string) => string) => Promise<PatientSearchResultBundle>;
60
+ /**
61
+ * Get all identifier types from idgen
62
+ * @returns Promise<IdentifierTypesResponse> - Array of all identifier types with their sources
63
+ */
64
+ export declare const getIdentifierTypes: () => Promise<IdentifierTypesResponse>;
65
+ /**
66
+ * Get primary identifier type from Bahmni app settings
67
+ * @returns Promise<string | null> - The primary identifier type UUID or null if not found
68
+ */
69
+ export declare const getPrimaryIdentifierType: () => Promise<string | null>;
70
+ /**
71
+ * Get all identifier data in a single call (prefixes, sources, and primary type)
72
+ * @returns Promise with prefixes array, sources map, and primary identifier type UUID
73
+ */
74
+ export declare const getIdentifierData: () => Promise<{
75
+ prefixes: string[];
76
+ sourcesByPrefix: Map<string, string>;
77
+ primaryIdentifierTypeUuid: string | null;
78
+ }>;
79
+ /**
80
+ * Create a new patient
81
+ * @param patientData - The patient data to create
82
+ * @returns Promise<CreatePatientResponse> - The created patient response
83
+ */
84
+ export declare const createPatient: (patientData: CreatePatientRequest) => Promise<CreatePatientResponse>;
85
+ /**
86
+ * Update an existing patient
87
+ * @param patientUuid - The UUID of the patient to update
88
+ * @param patientData - The patient data to update
89
+ * @returns Promise<CreatePatientResponse> - The updated patient response
90
+ */
91
+ export declare const updatePatient: (patientUuid: string, patientData: CreatePatientRequest) => Promise<CreatePatientResponse>;
92
+ /**
93
+ * Get genders from global property
94
+ * @returns Promise<Record<string, string>> - Object mapping gender codes to display names (e.g., {"M": "Male"})
95
+ */
96
+ export declare const getGenders: () => Promise<Record<string, string>>;
97
+ /**
98
+ * Get address hierarchy entries based on search string
99
+ * @param addressField - The address field type (e.g., 'countyDistrict', 'stateProvince', 'postalCode')
100
+ * @param searchString - The search term
101
+ * @param limit - Maximum number of results (default: 20)
102
+ * @param parentUuid - Optional parent UUID to filter results hierarchically (for top-down mode)
103
+ * @returns Promise<AddressHierarchyEntry[]> - Array of address hierarchy entries with parent information
104
+ */
105
+ export declare const getAddressHierarchyEntries: (addressField: string, searchString: string, limit?: number, parentUuid?: string) => Promise<AddressHierarchyEntry[]>;
106
+ /**
107
+ * Get ordered address hierarchy levels from OpenMRS
108
+ * Returns the configured order of address fields as defined in the system
109
+ * @returns Promise<OrderedAddressHierarchyLevels> - Array of address hierarchy levels with their display names and field names
110
+ */
111
+ export declare const getOrderedAddressHierarchyLevels: () => Promise<OrderedAddressHierarchyLevels>;
112
+ export declare const getPatientProfile: (patientUuid: string) => Promise<PatientProfileResponse>;
113
+ /**
114
+ * Get relationship types from OpenMRS
115
+ * @returns Promise<Array<{uuid: string, aIsToB: string, bIsToA: string}>> - Array of relationship type objects
116
+ */
117
+ export declare const getRelationshipTypes: () => Promise<Array<{
118
+ uuid: string;
119
+ aIsToB: string;
120
+ bIsToA: string;
121
+ }>>;
122
+ /**
123
+ * Get all person attribute types from OpenMRS
124
+ * Returns person attributes configured in the system with their metadata
125
+ * @returns Promise<PersonAttributeTypesResponse> - Array of person attribute type configurations
126
+ */
127
+ export declare const getPersonAttributeTypes: () => Promise<PersonAttributeTypesResponse>;
128
+ //# sourceMappingURL=patientService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patientService.d.ts","sourceRoot":"","sources":["../../src/patientService/patientService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAuBhF,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,EAEvB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,sBAAsB,EACtB,4BAA4B,EAE7B,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,cAAc,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,OAAO,CAUzE,CAAC;AAuBF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,OAAO,KAAG,MAAM,GAAG,IAc7D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,KAC3C,MAAM,GAAG,IAkBX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,KAC3C,M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,OAAO,CAAC,qBAAqB,CAK/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAa,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEjE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,GACrC,cAAc,MAAM,EACpB,cAAc,MAAM,EACpB,QAAO,MAAwC,EAC/C,aAAa,MAAM,KAClB,OAAO,CAAC,qBAAqB,EAAE,CAmBjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,QACjC,OAAO,CAAC,6BAA6B,CAE9C,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,KAClB,OAAO,CAAC,sBAAsB,CAEhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAa,OAAO,CACnD,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAkBxD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,QACxB,OAAO,CAAC,4BAA4B,CAE7C,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getCurrentUserPrivileges, hasPrivilege } from './privilegeService';
2
+ export { type UserPrivilege } from './models';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/privilegeService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Interface for user privilege from whoami API
3
+ */
4
+ export interface UserPrivilege {
5
+ uuid: string;
6
+ name: string;
7
+ description?: string;
8
+ }
9
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/privilegeService/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,15 @@
1
+ import { UserPrivilege } from './models';
2
+ /**
3
+ * Fetches current user privileges from whoami API
4
+ * @returns Promise that resolves to array of user privileges or null if failed
5
+ * @throws Error if fetch fails
6
+ */
7
+ export declare const getCurrentUserPrivileges: () => Promise<UserPrivilege[] | null>;
8
+ /**
9
+ * Check if user has a specific privilege by name
10
+ * @param userPrivileges - Array of user privileges from whoami API
11
+ * @param privilegeName - Name of the privilege to check
12
+ * @returns true if user has the privilege, false otherwise
13
+ */
14
+ export declare const hasPrivilege: (userPrivileges: UserPrivilege[] | null, privilegeName: string) => boolean;
15
+ //# sourceMappingURL=privilegeService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privilegeService.d.ts","sourceRoot":"","sources":["../../src/privilegeService/privilegeService.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAAa,OAAO,CACvD,aAAa,EAAE,GAAG,IAAI,CASvB,CAAC;AAEF;;;;;GAKG;AAEH,eAAO,MAAM,YAAY,GACvB,gBAAgB,aAAa,EAAE,GAAG,IAAI,EACtC,eAAe,MAAM,KACpB,OAMF,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getPatientPrograms } from './programService';
2
+ export { type ProgramEnrollment, type PatientProgramsResponse } from './model';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/programService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,SAAS,CAAC"}