@openmrs/esm-billing-app 1.0.1-pre.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 (179) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc +57 -0
  4. package/.husky/pre-commit +7 -0
  5. package/.husky/pre-push +6 -0
  6. package/.prettierignore +14 -0
  7. package/.turbo.json +18 -0
  8. package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
  9. package/LICENSE +401 -0
  10. package/README.md +7 -0
  11. package/__mocks__/bills.mock.ts +394 -0
  12. package/__mocks__/delivery-summary.mock.ts +89 -0
  13. package/__mocks__/encounter-observation.mock.ts +10651 -0
  14. package/__mocks__/encounter-observations.mock.ts +6189 -0
  15. package/__mocks__/hiv-summary.mock.ts +22 -0
  16. package/__mocks__/patient-summary.mock.ts +32 -0
  17. package/__mocks__/patient.mock.ts +59 -0
  18. package/__mocks__/program-summary.mock.ts +43 -0
  19. package/__mocks__/react-i18next.js +57 -0
  20. package/dist/146.js +1 -0
  21. package/dist/146.js.map +1 -0
  22. package/dist/294.js +2 -0
  23. package/dist/294.js.LICENSE.txt +9 -0
  24. package/dist/294.js.map +1 -0
  25. package/dist/319.js +1 -0
  26. package/dist/384.js +1 -0
  27. package/dist/384.js.map +1 -0
  28. package/dist/421.js +1 -0
  29. package/dist/421.js.map +1 -0
  30. package/dist/533.js +1 -0
  31. package/dist/533.js.map +1 -0
  32. package/dist/574.js +1 -0
  33. package/dist/591.js +2 -0
  34. package/dist/591.js.LICENSE.txt +9 -0
  35. package/dist/591.js.map +1 -0
  36. package/dist/614.js +2 -0
  37. package/dist/614.js.LICENSE.txt +37 -0
  38. package/dist/614.js.map +1 -0
  39. package/dist/753.js +1 -0
  40. package/dist/753.js.map +1 -0
  41. package/dist/757.js +1 -0
  42. package/dist/770.js +1 -0
  43. package/dist/770.js.map +1 -0
  44. package/dist/783.js +1 -0
  45. package/dist/783.js.map +1 -0
  46. package/dist/788.js +1 -0
  47. package/dist/800.js +2 -0
  48. package/dist/800.js.LICENSE.txt +3 -0
  49. package/dist/800.js.map +1 -0
  50. package/dist/807.js +1 -0
  51. package/dist/833.js +1 -0
  52. package/dist/935.js +2 -0
  53. package/dist/935.js.LICENSE.txt +19 -0
  54. package/dist/935.js.map +1 -0
  55. package/dist/992.js +1 -0
  56. package/dist/992.js.map +1 -0
  57. package/dist/main.js +2 -0
  58. package/dist/main.js.LICENSE.txt +47 -0
  59. package/dist/main.js.map +1 -0
  60. package/dist/openmrs-esm-billing-app.js +1 -0
  61. package/dist/openmrs-esm-billing-app.js.buildmanifest.json +609 -0
  62. package/dist/openmrs-esm-billing-app.js.map +1 -0
  63. package/dist/routes.json +1 -0
  64. package/e2e/README.md +115 -0
  65. package/e2e/core/global-setup.ts +32 -0
  66. package/e2e/core/index.ts +1 -0
  67. package/e2e/core/test.ts +20 -0
  68. package/e2e/fixtures/api.ts +27 -0
  69. package/e2e/fixtures/index.ts +1 -0
  70. package/e2e/pages/home-page.ts +9 -0
  71. package/e2e/pages/index.ts +1 -0
  72. package/e2e/specs/sample-test.spec.ts +11 -0
  73. package/e2e/support/github/Dockerfile +34 -0
  74. package/e2e/support/github/docker-compose.yml +24 -0
  75. package/e2e/support/github/run-e2e-docker-env.sh +49 -0
  76. package/example.env +6 -0
  77. package/i18next-parser.config.js +89 -0
  78. package/jest.config.js +34 -0
  79. package/package.json +124 -0
  80. package/playwright.config.ts +32 -0
  81. package/prettier.config.js +8 -0
  82. package/src/bill-history/bill-history.component.tsx +199 -0
  83. package/src/bill-history/bill-history.scss +151 -0
  84. package/src/bill-history/bill-history.test.tsx +122 -0
  85. package/src/billable-services/bill-waiver/bill-selection.component.tsx +76 -0
  86. package/src/billable-services/bill-waiver/bill-waiver-form.component.tsx +110 -0
  87. package/src/billable-services/bill-waiver/bill-waiver-form.scss +34 -0
  88. package/src/billable-services/bill-waiver/bill-waiver.component.tsx +32 -0
  89. package/src/billable-services/bill-waiver/bill-waiver.scss +10 -0
  90. package/src/billable-services/bill-waiver/patient-bills.component.tsx +137 -0
  91. package/src/billable-services/bill-waiver/utils.ts +41 -0
  92. package/src/billable-services/billable-service.resource.ts +72 -0
  93. package/src/billable-services/billable-services-home.component.tsx +51 -0
  94. package/src/billable-services/billable-services.component.tsx +255 -0
  95. package/src/billable-services/billable-services.scss +218 -0
  96. package/src/billable-services/billable-services.test.tsx +16 -0
  97. package/src/billable-services/create-edit/add-billable-service.component.tsx +322 -0
  98. package/src/billable-services/create-edit/add-billable-service.scss +131 -0
  99. package/src/billable-services/create-edit/add-billable-service.test.tsx +152 -0
  100. package/src/billable-services/dashboard/dashboard.component.tsx +15 -0
  101. package/src/billable-services/dashboard/dashboard.scss +27 -0
  102. package/src/billable-services/dashboard/dashboard.test.tsx +11 -0
  103. package/src/billable-services/dashboard/service-metrics.component.tsx +41 -0
  104. package/src/billable-services-admin-card-link.component.test.tsx +21 -0
  105. package/src/billable-services-admin-card-link.component.tsx +25 -0
  106. package/src/billing-dashboard/billing-dashboard.component.tsx +20 -0
  107. package/src/billing-dashboard/billing-dashboard.scss +27 -0
  108. package/src/billing-dashboard/billing-dashboard.test.tsx +13 -0
  109. package/src/billing-form/billing-checkin-form.component.tsx +127 -0
  110. package/src/billing-form/billing-checkin-form.scss +13 -0
  111. package/src/billing-form/billing-checkin-form.test.tsx +134 -0
  112. package/src/billing-form/billing-form.component.tsx +347 -0
  113. package/src/billing-form/billing-form.resource.ts +32 -0
  114. package/src/billing-form/billing-form.scss +88 -0
  115. package/src/billing-form/visit-attributes/visit-attributes-form.component.tsx +173 -0
  116. package/src/billing-form/visit-attributes/visit-attributes-form.scss +22 -0
  117. package/src/billing-header/billing-header.component.tsx +43 -0
  118. package/src/billing-header/billing-header.scss +83 -0
  119. package/src/billing-header/billing-illustration.component.tsx +30 -0
  120. package/src/billing.resource.ts +148 -0
  121. package/src/bills-table/bills-table.component.tsx +280 -0
  122. package/src/bills-table/bills-table.scss +181 -0
  123. package/src/bills-table/bills-table.test.tsx +154 -0
  124. package/src/config-schema.ts +50 -0
  125. package/src/constants.ts +3 -0
  126. package/src/dashboard.meta.ts +7 -0
  127. package/src/declarations.d.ts +4 -0
  128. package/src/helpers/functions.ts +66 -0
  129. package/src/helpers/index.ts +1 -0
  130. package/src/index.ts +72 -0
  131. package/src/invoice/invoice-table.component.tsx +189 -0
  132. package/src/invoice/invoice-table.scss +91 -0
  133. package/src/invoice/invoice.component.tsx +144 -0
  134. package/src/invoice/invoice.scss +93 -0
  135. package/src/invoice/invoice.test.tsx +242 -0
  136. package/src/invoice/payments/invoice-breakdown/invoice-breakdown.component.tsx +17 -0
  137. package/src/invoice/payments/invoice-breakdown/invoice-breakdown.scss +29 -0
  138. package/src/invoice/payments/payment-form/payment-form.component.tsx +105 -0
  139. package/src/invoice/payments/payment-form/payment-form.scss +54 -0
  140. package/src/invoice/payments/payment-history/payment-history.component.tsx +69 -0
  141. package/src/invoice/payments/payment.resource.ts +44 -0
  142. package/src/invoice/payments/payments.component.tsx +147 -0
  143. package/src/invoice/payments/payments.scss +46 -0
  144. package/src/invoice/payments/utils.ts +68 -0
  145. package/src/invoice/payments/visit-tags/visit-attribute.component.tsx +21 -0
  146. package/src/invoice/printable-invoice/print-receipt.component.tsx +29 -0
  147. package/src/invoice/printable-invoice/print-receipt.scss +14 -0
  148. package/src/invoice/printable-invoice/printable-footer.component.tsx +19 -0
  149. package/src/invoice/printable-invoice/printable-footer.scss +17 -0
  150. package/src/invoice/printable-invoice/printable-footer.test.tsx +30 -0
  151. package/src/invoice/printable-invoice/printable-invoice-header.component.tsx +63 -0
  152. package/src/invoice/printable-invoice/printable-invoice-header.scss +61 -0
  153. package/src/invoice/printable-invoice/printable-invoice-header.test.tsx +58 -0
  154. package/src/invoice/printable-invoice/printable-invoice.component.tsx +146 -0
  155. package/src/invoice/printable-invoice/printable-invoice.scss +50 -0
  156. package/src/left-panel-link.component.tsx +41 -0
  157. package/src/left-panel-link.test.tsx +38 -0
  158. package/src/metrics-cards/card.component.tsx +14 -0
  159. package/src/metrics-cards/card.scss +20 -0
  160. package/src/metrics-cards/metrics-cards.component.tsx +42 -0
  161. package/src/metrics-cards/metrics-cards.scss +12 -0
  162. package/src/metrics-cards/metrics-cards.test.tsx +44 -0
  163. package/src/metrics-cards/metrics.resource.ts +45 -0
  164. package/src/modal/require-payment-modal.component.tsx +85 -0
  165. package/src/modal/require-payment.scss +6 -0
  166. package/src/root.component.tsx +19 -0
  167. package/src/root.scss +30 -0
  168. package/src/routes.json +78 -0
  169. package/src/setup-tests.ts +13 -0
  170. package/src/types/index.ts +181 -0
  171. package/test-helpers.tsx +23 -0
  172. package/translations/am.json +117 -0
  173. package/translations/en.json +117 -0
  174. package/translations/es.json +117 -0
  175. package/translations/fr.json +117 -0
  176. package/translations/he.json +117 -0
  177. package/translations/km.json +117 -0
  178. package/tsconfig.json +16 -0
  179. package/webpack.config.js +1 -0
@@ -0,0 +1,394 @@
1
+ import { restBaseUrl } from '@openmrs/esm-framework';
2
+
3
+ export const billsSummary = [
4
+ {
5
+ uuid: '65f9f19a-f70e-44f4-9c6c-55b23dab4a3f',
6
+ display: 'CP2-0011-0',
7
+ voided: false,
8
+ voidReason: null,
9
+ adjustedBy: [],
10
+ billAdjusted: null,
11
+ cashPoint: {
12
+ uuid: '381595a0-2229-4152-9c45-bd3692aac7cc',
13
+ name: 'Pharmacy Cashier',
14
+ description: '',
15
+ retired: false,
16
+ location: {
17
+ uuid: '381595a0-2229-4152-9c45-bd3692aac7cc',
18
+ display: 'Amani Family Medical Clinic',
19
+ links: [
20
+ {
21
+ rel: 'self',
22
+ uri: `http://localhost:8089/openmrs${restBaseUrl}/location/381595a0-2229-4152-9c45-bd3692aac7cc`,
23
+ resourceAlias: 'location',
24
+ },
25
+ ],
26
+ },
27
+ },
28
+ cashier: {
29
+ uuid: '48b55692-e061-4ffa-b1f2-fd4aaf506224',
30
+ display: 'admin - ayunda ayunda ayunda',
31
+ links: [
32
+ {
33
+ rel: 'self',
34
+ uri: `http://localhost:8089/openmrs${restBaseUrl}/provider/48b55692-e061-4ffa-b1f2-fd4aaf506224`,
35
+ resourceAlias: 'provider',
36
+ },
37
+ ],
38
+ },
39
+ dateCreated: '2023-11-29T09:35:20.000+0300',
40
+ lineItems: [
41
+ {
42
+ uuid: '6ff72ef2-4265-4fdb-8563-a3a2eefa484e',
43
+ display: 'BillLineItem',
44
+ billableService: null,
45
+ voided: false,
46
+ voidReason: null,
47
+ item: 'HIV self-test kit',
48
+ quantity: 1,
49
+ price: 500.0,
50
+ priceName: '',
51
+ priceUuid: '',
52
+ lineItemOrder: 0,
53
+ resourceVersion: '1.8',
54
+ },
55
+ ],
56
+ patient: {
57
+ uuid: 'dda9b65f-0037-11ec-85e7-04ed33c79a3e',
58
+ display: 'MGFRYY - WACERA WACERA WACERA',
59
+ links: [
60
+ {
61
+ rel: 'self',
62
+ uri: `http://localhost:8089/openmrs${restBaseUrl}/patient/dda9b65f-0037-11ec-85e7-04ed33c79a3e`,
63
+ resourceAlias: 'patient',
64
+ },
65
+ ],
66
+ },
67
+ payments: [
68
+ {
69
+ uuid: '0ddfed3b-f606-4b3f-bf8a-bcc14a40d21d',
70
+ instanceType: {
71
+ uuid: '8d8718c2-c2cc-11de-8d13-0010c6dffd0f',
72
+ name: 'Mpesa',
73
+ description: 'Mpesa',
74
+ retired: false,
75
+ },
76
+ attributes: [
77
+ {
78
+ uuid: '84aacfcc-9788-4f7b-a56a-407d84af1b54',
79
+ display: 'Mpesa Code: MPESA001',
80
+ voided: false,
81
+ voidReason: null,
82
+ value: 'MPESA001',
83
+ attributeType: {
84
+ uuid: '8d8718c2-c2cc-11de-8d13-0010c6dffd0f',
85
+ name: 'Mpesa Code',
86
+ description: 'Mpesa Code',
87
+ retired: false,
88
+ attributeOrder: 1,
89
+ format: 'java.lang.String',
90
+ foreignKey: null,
91
+ regExp: null,
92
+ required: false,
93
+ },
94
+ order: 1,
95
+ valueName: 'MPESA001',
96
+ resourceVersion: '1.8',
97
+ },
98
+ ],
99
+ amount: 1000.0,
100
+ amountTendered: 0,
101
+ dateCreated: 1701239720000,
102
+ voided: false,
103
+ resourceVersion: '1.8',
104
+ },
105
+ ],
106
+ receiptNumber: 'CP2-0011-0',
107
+ status: 'PENDING',
108
+ adjustmentReason: null,
109
+ id: 30,
110
+ resourceVersion: '1.8',
111
+ },
112
+ {
113
+ uuid: '65f9f19a-f70e-44f4-9c6c-55b23dab4a3f',
114
+ display: 'CP2-0011-0',
115
+ voided: false,
116
+ voidReason: null,
117
+ adjustedBy: [],
118
+ billAdjusted: null,
119
+ cashPoint: {
120
+ uuid: '381595a0-2229-4152-9c45-bd3692aac7cc',
121
+ name: 'Pharmacy Cashier',
122
+ description: '',
123
+ retired: false,
124
+ location: {
125
+ uuid: '381595a0-2229-4152-9c45-bd3692aac7cc',
126
+ display: 'Amani Family Medical Clinic',
127
+ links: [
128
+ {
129
+ rel: 'self',
130
+ uri: `http://localhost:8089/openmrs${restBaseUrl}/location/381595a0-2229-4152-9c45-bd3692aac7cc`,
131
+ resourceAlias: 'location',
132
+ },
133
+ ],
134
+ },
135
+ },
136
+ cashier: {
137
+ uuid: '48b55692-e061-4ffa-b1f2-fd4aaf506224',
138
+ display: 'admin - ayunda ayunda ayunda',
139
+ links: [
140
+ {
141
+ rel: 'self',
142
+ uri: `http://localhost:8089/openmrs${restBaseUrl}/provider/48b55692-e061-4ffa-b1f2-fd4aaf506224`,
143
+ resourceAlias: 'provider',
144
+ },
145
+ ],
146
+ },
147
+ dateCreated: '2023-11-29T09:35:20.000+0300',
148
+ lineItems: [
149
+ {
150
+ uuid: '6ff72ef2-4265-4fdb-8563-a3a2eefa484e',
151
+ display: 'BillLineItem',
152
+ billableService: null,
153
+ voided: false,
154
+ voidReason: null,
155
+ item: 'HIV self-test kit',
156
+ quantity: 1,
157
+ price: 500.0,
158
+ priceName: '',
159
+ priceUuid: '',
160
+ lineItemOrder: 0,
161
+ resourceVersion: '1.8',
162
+ },
163
+ ],
164
+ patient: {
165
+ uuid: 'dda9b65f-0037-11ec-85e7-04ed33c79a3e',
166
+ display: 'MGFRYY - WACERA WACERA WACERA',
167
+ links: [
168
+ {
169
+ rel: 'self',
170
+ uri: `http://localhost:8089/openmrs${restBaseUrl}/patient/dda9b65f-0037-11ec-85e7-04ed33c79a3e`,
171
+ resourceAlias: 'patient',
172
+ },
173
+ ],
174
+ },
175
+ payments: [
176
+ {
177
+ uuid: '0ddfed3b-f606-4b3f-bf8a-bcc14a40d21d',
178
+ instanceType: {
179
+ uuid: '8d8718c2-c2cc-11de-8d13-0010c6dffd0f',
180
+ name: 'Mpesa',
181
+ description: 'Mpesa',
182
+ retired: false,
183
+ },
184
+
185
+ attributes: [
186
+ {
187
+ uuid: '84aacfcc-9788-4f7b-a56a-407d84af1b54',
188
+ display: 'Mpesa Code: MPESA001',
189
+ voided: false,
190
+ voidReason: null,
191
+ value: 'MPESA001',
192
+ attributeType: {
193
+ uuid: '8d8718c2-c2cc-11de-8d13-0010c6dffd0f',
194
+ name: 'Mpesa Code',
195
+ description: 'Mpesa Code',
196
+ retired: false,
197
+ attributeOrder: 1,
198
+ format: 'java.lang.String',
199
+ foreignKey: null,
200
+ regExp: null,
201
+ required: false,
202
+ },
203
+ order: 1,
204
+ valueName: 'MPESA001',
205
+ resourceVersion: '1.8',
206
+ },
207
+ ],
208
+ amount: 1000.0,
209
+ amountTendered: 1000.0,
210
+ dateCreated: 1701239720000,
211
+ voided: false,
212
+ resourceVersion: '1.8',
213
+ },
214
+ ],
215
+ receiptNumber: 'CP2-0011-0',
216
+ status: 'PENDING',
217
+ adjustmentReason: null,
218
+ id: 30,
219
+ resourceVersion: '1.8',
220
+ },
221
+ {
222
+ uuid: '65f9f19a-f70e-44f4-9c6c-55b23dab4a3f',
223
+ display: 'CP2-0011-0',
224
+ voided: false,
225
+ voidReason: null,
226
+ adjustedBy: [],
227
+ billAdjusted: null,
228
+ cashPoint: {
229
+ uuid: '381595a0-2229-4152-9c45-bd3692aac7cc',
230
+ name: 'Pharmacy Cashier',
231
+ description: '',
232
+ retired: false,
233
+ location: {
234
+ uuid: '381595a0-2229-4152-9c45-bd3692aac7cc',
235
+ display: 'Amani Family Medical Clinic',
236
+ links: [
237
+ {
238
+ rel: 'self',
239
+ uri: `http://localhost:8089/openmrs${restBaseUrl}/location/381595a0-2229-4152-9c45-bd3692aac7cc`,
240
+ resourceAlias: 'location',
241
+ },
242
+ ],
243
+ },
244
+ },
245
+ cashier: {
246
+ uuid: '48b55692-e061-4ffa-b1f2-fd4aaf506224',
247
+ display: 'admin - ayunda ayunda ayunda',
248
+ links: [
249
+ {
250
+ rel: 'self',
251
+ uri: `http://localhost:8089/openmrs${restBaseUrl}/provider/48b55692-e061-4ffa-b1f2-fd4aaf506224`,
252
+ resourceAlias: 'provider',
253
+ },
254
+ ],
255
+ },
256
+ dateCreated: '2023-11-29T09:35:20.000+0300',
257
+ lineItems: [
258
+ {
259
+ uuid: '6ff72ef2-4265-4fdb-8563-a3a2eefa484e',
260
+ display: 'BillLineItem',
261
+ billableService: null,
262
+ voided: false,
263
+ voidReason: null,
264
+ item: 'HIV self-test kit',
265
+ quantity: 1,
266
+ price: 500.0,
267
+ priceName: '',
268
+ priceUuid: '',
269
+ lineItemOrder: 0,
270
+ resourceVersion: '1.8',
271
+ },
272
+ ],
273
+ patient: {
274
+ uuid: 'dda9b65f-0037-11ec-85e7-04ed33c79a3e',
275
+ display: 'MGFRYY - WACERA WACERA WACERA',
276
+ links: [
277
+ {
278
+ rel: 'self',
279
+ uri: `http://localhost:8089/openmrs${restBaseUrl}/patient/dda9b65f-0037-11ec-85e7-04ed33c79a3e`,
280
+ resourceAlias: 'patient',
281
+ },
282
+ ],
283
+ },
284
+ payments: [
285
+ {
286
+ uuid: '0ddfed3b-f606-4b3f-bf8a-bcc14a40d21d',
287
+ instanceType: {
288
+ uuid: '8d8718c2-c2cc-11de-8d13-0010c6dffd0f',
289
+ name: 'Mpesa',
290
+ description: 'Mpesa',
291
+ retired: false,
292
+ },
293
+
294
+ attributes: [
295
+ {
296
+ uuid: '84aacfcc-9788-4f7b-a56a-407d84af1b54',
297
+ display: 'Mpesa Code: MPESA001',
298
+ voided: false,
299
+ voidReason: null,
300
+ value: 'MPESA001',
301
+ attributeType: {
302
+ uuid: '8d8718c2-c2cc-11de-8d13-0010c6dffd0f',
303
+ name: 'Mpesa Code',
304
+ description: 'Mpesa Code',
305
+ retired: false,
306
+ attributeOrder: 1,
307
+ format: 'java.lang.String',
308
+ foreignKey: null,
309
+ regExp: null,
310
+ required: false,
311
+ },
312
+ order: 1,
313
+ valueName: 'MPESA001',
314
+ resourceVersion: '1.8',
315
+ },
316
+ ],
317
+ amount: 1000.0,
318
+ amountTendered: 1000.0,
319
+ dateCreated: 1701239720000,
320
+ voided: false,
321
+ resourceVersion: '1.8',
322
+ },
323
+ ],
324
+ receiptNumber: 'CP2-0011-0',
325
+ status: 'PAID',
326
+ adjustmentReason: null,
327
+ id: 30,
328
+ resourceVersion: '1.8',
329
+ },
330
+ ];
331
+
332
+ export const mockBill = {
333
+ id: 26,
334
+ uuid: '6eb8d678-514d-46ad-9554-51e48d96d567',
335
+ patientName: 'James Bond',
336
+ identifier: 'PJYM9 ',
337
+ patientUuid: 'b2fcf02b-7ee3-4d16-a48f-576be2b103aa',
338
+ status: 'PENDING',
339
+ receiptNumber: '0035-6',
340
+ cashier: {
341
+ uuid: 'fe00dd43-4c39-4ce9-9832-bc3620c80c6c',
342
+ display: 'admin - Bildard SONGOI Olero',
343
+ links: [
344
+ {
345
+ rel: 'self',
346
+ uri: `https://data.kenyahmis.org:8500/openmrs${restBaseUrl}/provider/fe00dd43-4c39-4ce9-9832-bc3620c80c6c`,
347
+ resourceAlias: 'provider',
348
+ },
349
+ ],
350
+ },
351
+ cashPointUuid: '54065383-b4d4-42d2-af4d-d250a1fd2590',
352
+ cashPointName: 'Cashier 2',
353
+ cashPointLocation: 'Moi Teaching Refferal Hospital',
354
+ dateCreated: '15 — Dec — 2023',
355
+ lineItems: [
356
+ {
357
+ uuid: '053ab483-79de-43f9-a73b-5823ccd8518b',
358
+ display: 'BillLineItem',
359
+ billableService: null,
360
+ voided: false,
361
+ voidReason: null,
362
+ item: 'Hemoglobin',
363
+ quantity: 1,
364
+ price: 100,
365
+ priceName: '',
366
+ priceUuid: '',
367
+ lineItemOrder: 0,
368
+ paymentStatus: 'PENDING',
369
+ resourceVersion: '1.8',
370
+ },
371
+ ],
372
+ billingService: 'Hemoglobin',
373
+ payments: [],
374
+ totalAmount: 100,
375
+ tenderedAmount: 0,
376
+ };
377
+
378
+ export const mockPayments = [
379
+ {
380
+ uuid: 'db0744e5-033d-4162-9c41-f34cb97de1f7',
381
+ instanceType: {
382
+ uuid: '63eff7a4-6f82-43c4-a333-dbcc58fe9f74',
383
+ name: 'Cash',
384
+ description: 'Cash Payment',
385
+ retired: false,
386
+ },
387
+ attributes: [],
388
+ amount: 500,
389
+ amountTendered: 500,
390
+ dateCreated: 1702646939000,
391
+ voided: false,
392
+ resourceVersion: '1.8',
393
+ },
394
+ ];
@@ -0,0 +1,89 @@
1
+ import { restBaseUrl } from '@openmrs/esm-framework';
2
+
3
+ export const mockLabourAndDeliveryData = {
4
+ data: {
5
+ results: [
6
+ {
7
+ uuid: '3b4daf81-7372-475c-ba5d-13c9c21d8ab1',
8
+ display: 'Delivery 09/23/2022',
9
+ encounterDatetime: '2022-09-23T13:11:06.000+0000',
10
+ patient: {
11
+ uuid: 'b835eff8-98c9-4988-887b-d93da7fbd542',
12
+ display: '100019A - George Roberts',
13
+ links: [
14
+ {
15
+ rel: 'self',
16
+ uri: `http://backend:8080/openmrs${restBaseUrl}/patient/b835eff8-98c9-4988-887b-d93da7fbd542`,
17
+ resourceAlias: 'patient',
18
+ },
19
+ ],
20
+ },
21
+ location: null,
22
+ form: {
23
+ uuid: '496c7cc3-0eea-4e84-a04c-2292949e2f7f',
24
+ display: 'MCH Delivery Form',
25
+ links: [
26
+ {
27
+ rel: 'self',
28
+ uri: `http://backend:8080/openmrs${restBaseUrl}/form/9e1a0c68-ca19-3482-9ffb-0a6b4e591c2a`,
29
+ resourceAlias: 'form',
30
+ },
31
+ ],
32
+ },
33
+ encounterType: {
34
+ uuid: 'c6d09e05-1f25-4164-8860-9f32c5a02df0',
35
+ display: 'Delivery',
36
+ links: [
37
+ {
38
+ rel: 'self',
39
+ uri: `http://backend:8080/openmrs${restBaseUrl}/encountertype/dd528487-82a5-4082-9c72-ed246bd49591`,
40
+ resourceAlias: 'encountertype',
41
+ },
42
+ ],
43
+ },
44
+ obs: [
45
+ {
46
+ uuid: '04d7d2a2-8ffd-418c-9a0c-1d20dec50231',
47
+ display: 'Covid 19 Signs and Symptom Set: Fever, Congestion, Loss of taste',
48
+ links: [
49
+ {
50
+ rel: 'self',
51
+ uri: `http://backend:8080/openmrs${restBaseUrl}/obs/04d7d2a2-8ffd-418c-9a0c-1d20dec50231`,
52
+ resourceAlias: 'obs',
53
+ },
54
+ ],
55
+ },
56
+ {
57
+ uuid: '5ca0c815-2c47-4cda-8c46-1e118b593ea8',
58
+ display: 'Covid 19 Test Set: Positive, No, Respiratory PCR',
59
+ links: [
60
+ {
61
+ rel: 'self',
62
+ uri: `http://backend:8080/openmrs${restBaseUrl}/obs/5ca0c815-2c47-4cda-8c46-1e118b593ea8`,
63
+ resourceAlias: 'obs',
64
+ },
65
+ ],
66
+ },
67
+ ],
68
+ orders: [],
69
+ voided: false,
70
+ visit: null,
71
+ encounterProviders: [],
72
+ diagnoses: [],
73
+ links: [
74
+ {
75
+ rel: 'self',
76
+ uri: `http://backend:8080/openmrs${restBaseUrl}/encounter/3b4daf81-7372-475c-ba5d-13c9c21d8ab1`,
77
+ resourceAlias: 'encounter',
78
+ },
79
+ {
80
+ rel: 'full',
81
+ uri: `http://backend:8080/openmrs${restBaseUrl}/encounter/3b4daf81-7372-475c-ba5d-13c9c21d8ab1?v=full`,
82
+ resourceAlias: 'encounter',
83
+ },
84
+ ],
85
+ resourceVersion: '2.2',
86
+ },
87
+ ],
88
+ },
89
+ };