@kenyaemr/esm-billing-app 5.4.1-pre.2107 → 5.4.1-pre.2110

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.
@@ -285,12 +285,35 @@ export interface Payment {
285
285
  attributes: Attribute[];
286
286
  amount: number;
287
287
  amountTendered: number;
288
+ billLineItem: BillLineItem;
288
289
  dateCreated: number;
289
290
  voided: boolean;
290
291
  resourceVersion: string;
291
292
  }
293
+ export interface BillLineItem {
294
+ uuid: string;
295
+ display: string;
296
+ voided: boolean;
297
+ voidReason: any;
298
+ item: string;
299
+ billableService: string;
300
+ quantity: number;
301
+ price: number;
302
+ priceName: string;
303
+ priceUuid: string;
304
+ lineItemOrder: number;
305
+ paymentStatus: string;
306
+ itemOrServiceConceptUuid: string;
307
+ serviceTypeUuid: string;
308
+ resourceVersion: string;
309
+ }
292
310
 
293
- export type FormPayment = { method: PaymentMethod; amount: string | number; referenceCode?: number | string };
311
+ export type FormPayment = {
312
+ method: PaymentMethod;
313
+ amount: string | number;
314
+ referenceCode?: number | string;
315
+ lineItemUuid: string;
316
+ };
294
317
 
295
318
  export type PaymentFormValue = {
296
319
  payment: Array<FormPayment>;
package/src/utils.ts CHANGED
@@ -166,3 +166,9 @@ export const computeWaivedAmount = (bill: MappedBill) => {
166
166
  .filter((payment) => payment.instanceType.name.toLowerCase() === 'waiver')
167
167
  .reduce((curr: number, prev) => curr + Number(prev.amountTendered), 0);
168
168
  };
169
+
170
+ export const extractBillableName = (billableService: string | { billableService: string }) => {
171
+ const parts =
172
+ typeof billableService === 'string' ? billableService.split(':') : billableService.billableService.split(':');
173
+ return parts.length > 1 ? parts[1] : '';
174
+ };
@@ -61,6 +61,7 @@
61
61
  "chooseInterventions": "Choose interventions",
62
62
  "choosePackage": "Choose package",
63
63
  "claim": "Process claims",
64
+ "claimableItems": "Claimable Items",
64
65
  "claimCode": "Claim Code",
65
66
  "claimedAmount": "Claimed Amount",
66
67
  "claimError": "Claim Error",
@@ -137,6 +138,7 @@
137
138
  "incompletePaymentSubtitle": "Please ensure all selected line items are fully paid, Total amount expected is {{selectedLineItemsAmountDue}}",
138
139
  "initiatePayment": "Initiate Payment",
139
140
  "inputSampleSchema": "Input sample schema",
141
+ "insurancePaidItems": "Items paid through Insurance",
140
142
  "insuranceScheme": "Insurance scheme",
141
143
  "insurer": "Insurer",
142
144
  "interventionCode": "Intervention Code",
@@ -171,6 +173,7 @@
171
173
  "noBillsFoundDescription": "No bills found for this patient",
172
174
  "noCashPoints": "No Cash Points",
173
175
  "noCashPointsConfigured": "There are no cash points configured for this location",
176
+ "noInsurancePaidItems": "No items paid through insurance found",
174
177
  "noItemsSelected": "No items selected",
175
178
  "noMatchingBillsToDisplay": "No matching bills to display",
176
179
  "noMatchingItemsToDisplay": "No matching items to display",
@@ -258,7 +261,7 @@
258
261
  "selectAttributeFormat": "Select attribute format",
259
262
  "selectExemptionCategory": "Select exemption category",
260
263
  "selectInsuranceScheme": "Select insurance scheme",
261
- "selectitemstobeclaimed": "Select items that are to be included in the claims",
264
+ "selectLineItemToPay": "Select line item to pay",
262
265
  "selectPaymentMethod": "Select payment method",
263
266
  "selectPaymentMode": "Select payment mode",
264
267
  "selectProvider": "Select Provider",