@openmrs/esm-billing-app 1.0.2-pre.805 → 1.0.2-pre.812
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.
- package/dist/4344.js +1 -0
- package/dist/4344.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-billing-app.js +1 -1
- package/dist/openmrs-esm-billing-app.js.buildmanifest.json +31 -31
- package/dist/openmrs-esm-billing-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/billable-services/bill-waiver/bill-waiver-form.component.tsx +2 -3
- package/src/billable-services/bill-waiver/utils.ts +13 -3
- package/src/billable-services/billable-service.resource.ts +13 -5
- package/src/billing.resource.ts +37 -50
- package/src/invoice/payments/utils.ts +11 -5
- package/src/types/index.ts +57 -4
- package/dist/942.js +0 -1
- package/dist/942.js.map +0 -1
package/src/types/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type OpenmrsResource } from '@openmrs/esm-framework';
|
|
2
|
+
|
|
1
3
|
export interface MappedBill {
|
|
2
4
|
uuid: string;
|
|
3
5
|
id: number;
|
|
@@ -121,13 +123,21 @@ export interface Payment {
|
|
|
121
123
|
resourceVersion: string;
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
export type PaymentPayload = {
|
|
127
|
+
amount: number;
|
|
128
|
+
amountTendered: number;
|
|
129
|
+
attributes: Array<Attribute>;
|
|
130
|
+
instanceType: string;
|
|
131
|
+
dateCreated?: Date | number;
|
|
132
|
+
};
|
|
133
|
+
|
|
124
134
|
export interface PatientInvoice {
|
|
125
135
|
uuid: string;
|
|
126
136
|
display: string;
|
|
127
137
|
voided: boolean;
|
|
128
138
|
voidReason: string | null;
|
|
129
|
-
adjustedBy:
|
|
130
|
-
billAdjusted:
|
|
139
|
+
adjustedBy: Array<OpenmrsResource>;
|
|
140
|
+
billAdjusted: OpenmrsResource | null;
|
|
131
141
|
cashPoint: CashPoint;
|
|
132
142
|
cashier: Provider;
|
|
133
143
|
dateCreated: string;
|
|
@@ -136,7 +146,7 @@ export interface PatientInvoice {
|
|
|
136
146
|
payments: Payment[];
|
|
137
147
|
receiptNumber: string;
|
|
138
148
|
status: string;
|
|
139
|
-
adjustmentReason:
|
|
149
|
+
adjustmentReason: string | null;
|
|
140
150
|
id: number;
|
|
141
151
|
resourceVersion: string;
|
|
142
152
|
}
|
|
@@ -156,7 +166,7 @@ export interface FacilityDetail {
|
|
|
156
166
|
}
|
|
157
167
|
|
|
158
168
|
export type ServiceConcept = {
|
|
159
|
-
uuid:
|
|
169
|
+
uuid: string;
|
|
160
170
|
concept: {
|
|
161
171
|
uuid: string;
|
|
162
172
|
display: string;
|
|
@@ -203,3 +213,46 @@ export interface BillableService {
|
|
|
203
213
|
concept?: ServiceConcept;
|
|
204
214
|
servicePrices: Array<ServicePrice>;
|
|
205
215
|
}
|
|
216
|
+
|
|
217
|
+
export type BillPaymentPayload = {
|
|
218
|
+
cashPoint: string;
|
|
219
|
+
cashier: string;
|
|
220
|
+
lineItems: Array<LineItem>;
|
|
221
|
+
payments: Array<PaymentPayload>;
|
|
222
|
+
patient: string;
|
|
223
|
+
status?: string;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
export type CreateBillPayload = {
|
|
227
|
+
cashPoint: string;
|
|
228
|
+
cashier: string;
|
|
229
|
+
lineItems: Array<LineItem>;
|
|
230
|
+
payments: Array<PaymentPayload>;
|
|
231
|
+
patient: string;
|
|
232
|
+
status: string;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
export type UpdateBillPayload = {
|
|
236
|
+
cashPoint: string;
|
|
237
|
+
cashier: string;
|
|
238
|
+
lineItems: Array<LineItem>;
|
|
239
|
+
patient: string;
|
|
240
|
+
status: string;
|
|
241
|
+
uuid: string;
|
|
242
|
+
payments?: Array<PaymentPayload>;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export type CreateBillableServicePayload = {
|
|
246
|
+
name: string;
|
|
247
|
+
shortName: string;
|
|
248
|
+
serviceStatus: string;
|
|
249
|
+
serviceType?: string;
|
|
250
|
+
concept?: string;
|
|
251
|
+
servicePrices: Array<{
|
|
252
|
+
name: string;
|
|
253
|
+
price: number;
|
|
254
|
+
paymentMode: string;
|
|
255
|
+
}>;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export type UpdateBillableServicePayload = Partial<CreateBillableServicePayload>;
|