@kenyaemr/esm-billing-app 5.4.1-pre.2092 → 5.4.1-pre.2093
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/.turbo/turbo-build.log +80 -80
- package/dist/{421.js → 946.js} +1 -1
- package/dist/946.js.map +1 -0
- package/dist/kenyaemr-esm-billing-app.js +1 -1
- package/dist/kenyaemr-esm-billing-app.js.buildmanifest.json +28 -28
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/claims/claims-management/table/claims-list-table.component.tsx +41 -10
- package/src/claims/claims-management/table/manage-claim-request.modal.tsx +111 -0
- package/src/claims/claims-management/table/preauth-table.tmp.component.tsx +41 -11
- package/src/claims/dashboard/form/claims-form.resource.ts +7 -0
- package/src/index.ts +2 -4
- package/src/routes.json +2 -2
- package/dist/421.js.map +0 -1
- package/src/claims/claims-management/table/retry-claim-request.modal.tsx +0 -63
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemr":"^19.0.0"},"pages":[{"component":"billableServicesHome","route":"billable-services"},{"component":"requirePaymentModal","routeRegex":"^patient/.+/chart","online":true,"offline":false}],"extensions":[{"component":"billingDashboardLink","name":"billing-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"billing","title":"billing","slot":"billing-dashboard-slot"}},{"component":"benefitsPackageDashboardLink","name":"benefits-package-dashboard-link","slot":"patient-chart-dashboard-slot","meta":{"name":"benefits-package","slot":"patient-chart-benefits-dashboard-slot","path":"insurance-benefits","columns":1,"columnSpan":1},"featureFlag":"healthInformationExchange"},{"component":"benefitsPackage","name":"benefits-package","slot":"patient-chart-benefits-dashboard-slot"},{"component":"root","name":"billing-dashboard-root","slot":"billing-dashboard-slot"},{"component":"benefitsEligibilyRequestForm","name":"benefits-eligibility-request-form"},{"component":"benefitsPreAuthForm","name":"benefits-pre-auth-form"},{"name":"billing-patient-summary","component":"billingPatientSummary","slot":"patient-chart-billing-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"billing-summary-dashboard-link","component":"billingSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-billing-dashboard-slot","path":"Billing","layoutMode":"anchored"}},{"name":"billing-check-in-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm"},{"name":"require-billing-modal","component":"requirePaymentModal"},{"name":"patient-banner-billing-tags","component":"visitAttributeTags","slot":"patient-banner-tags-slot","order":2},{"name":"initiate-payment-modal","component":"initiatePaymentDialog"},{"name":"delete-billableservice-modal","component":"deleteBillableServiceModal"},{"name":"refund-bill-modal","component":"refundBillModal"},{"name":"delete-bill-modal","component":"deleteBillModal"},{"name":"lab-order-billable-item","component":"labOrder","slot":"top-of-lab-order-form-slot"},{"name":"procedure-order-billable-item","component":"procedureOrder","slot":"top-of-procedure-order-form-slot"},{"name":"imaging-order-billable-item","component":"imagingOrder","slot":"top-of-imaging-order-form-slot"},{"name":"price-info-order","component":"priceInfoOrder"},{"name":"drug-order-billable-item","component":"drugOrder","slot":"medication-info-slot"},{"name":"order-action-button","component":"orderActionButton","slots":["prescription-action-button-slot","imaging-orders-action","procedure-orders-action","tests-ordered-actions-slot"],"order":0},{"component":"billingOverviewLink","name":"billing-overview-link","order":0,"slot":"billing-dashboard-link-slot"},{"component":"paymentHistoryLink","name":"payment-history-link","slot":"billing-dashboard-link-slot"},{"component":"paymentPointsLink","name":"payment-points-link","slot":"billing-dashboard-link-slot"},{"component":"paymentModesLink","name":"payment-modes-link","slot":"billing-dashboard-link-slot"},{"component":"billManagerLink","name":"bill-manager-link","slot":"billing-dashboard-link-slot"},{"component":"chargeableItemsLink","name":"chargeable-items-link","slot":"billing-dashboard-link-slot"},{"component":"billableExemptionsLink","name":"billable-exemptions-link","slot":"billing-dashboard-link-slot"},{"component":"claimsManagementSideNavGroup","name":"claims-management-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"claims-management","title":"Claims management Overview","slot":"case-management-slot"},"featureFlag":"healthInformationExchange"},{"component":"claimsManagementOverviewDashboardLink","name":"claims-management-overview-link","order":0,"slot":"claims-management-dashboard-link-slot"},{"component":"preAuthRequestsDashboardLink","name":"preauthrequest-overview-link","slot":"claims-management-dashboard-link-slot"},{"component":"claimsOverview","name":"claims-overview-dashboard-link","slot":"claims-management-overview-slot"},{"component":"waiveBillActionButton","name":"waive-bill-action-button","slot":"bill-actions-slot"},{"component":"deleteBillActionButton","name":"delete-bill-action-button","slot":"bill-actions-slot"},{"component":"refundLineItem","name":"refund-line-item","slot":"bill-actions-overflow-menu-slot"},{"name":"edit-line-item","component":"editLineItem","slot":"bill-actions-overflow-menu-slot"},{"name":"cancel-line-item","component":"cancelLineItem","slot":"bill-actions-overflow-menu-slot"}],"workspaces":[{"name":"create-bill-workspace","component":"createBillWorkspace","title":"Create Bill Workspace","type":"other-form"},{"name":"waive-bill-form","component":"waiveBillForm","title":"Waive Bill Form","type":"other-form"},{"name":"edit-bill-form","component":"editBillForm","title":"Edit Bill Form","type":"other-form"},{"name":"billable-service-form","component":"addServiceForm","title":"Create Charge Item Form","type":"other-form"},{"name":"commodity-form","component":"addCommodityForm","title":"Create Charge Item Form","type":"other-form"},{"name":"billing-form","component":"billingForm","title":"Billing Form","type":"other-form","width":"extra-wide"},{"name":"payment-mode-workspace","component":"paymentModeWorkspace","title":"Payment Mode Workspace","type":"other-form"},{"name":"cancel-bill-workspace","component":"cancelBillWorkspace","title":"Cancel Bill Workspace","type":"other-form"},{"name":"bill-deposit-workspace","component":"billDepositWorkspace","title":"Bill Deposit Workspace","type":"other-form"}],"modals":[{"name":"create-payment-point","component":"createPaymentPoint"},{"name":"clock-out-modal","component":"clockOut"},{"name":"bulk-import-billable-services-modal","component":"bulkImportBillableServicesModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemr":"^19.0.0"},"pages":[{"component":"billableServicesHome","route":"billable-services"},{"component":"requirePaymentModal","routeRegex":"^patient/.+/chart","online":true,"offline":false}],"extensions":[{"component":"billingDashboardLink","name":"billing-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"billing","title":"billing","slot":"billing-dashboard-slot"}},{"component":"benefitsPackageDashboardLink","name":"benefits-package-dashboard-link","slot":"patient-chart-dashboard-slot","meta":{"name":"benefits-package","slot":"patient-chart-benefits-dashboard-slot","path":"insurance-benefits","columns":1,"columnSpan":1},"featureFlag":"healthInformationExchange"},{"component":"benefitsPackage","name":"benefits-package","slot":"patient-chart-benefits-dashboard-slot"},{"component":"root","name":"billing-dashboard-root","slot":"billing-dashboard-slot"},{"component":"benefitsEligibilyRequestForm","name":"benefits-eligibility-request-form"},{"component":"benefitsPreAuthForm","name":"benefits-pre-auth-form"},{"name":"billing-patient-summary","component":"billingPatientSummary","slot":"patient-chart-billing-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"billing-summary-dashboard-link","component":"billingSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-billing-dashboard-slot","path":"Billing","layoutMode":"anchored"}},{"name":"billing-check-in-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm"},{"name":"require-billing-modal","component":"requirePaymentModal"},{"name":"patient-banner-billing-tags","component":"visitAttributeTags","slot":"patient-banner-tags-slot","order":2},{"name":"initiate-payment-modal","component":"initiatePaymentDialog"},{"name":"delete-billableservice-modal","component":"deleteBillableServiceModal"},{"name":"refund-bill-modal","component":"refundBillModal"},{"name":"delete-bill-modal","component":"deleteBillModal"},{"name":"lab-order-billable-item","component":"labOrder","slot":"top-of-lab-order-form-slot"},{"name":"procedure-order-billable-item","component":"procedureOrder","slot":"top-of-procedure-order-form-slot"},{"name":"imaging-order-billable-item","component":"imagingOrder","slot":"top-of-imaging-order-form-slot"},{"name":"price-info-order","component":"priceInfoOrder"},{"name":"drug-order-billable-item","component":"drugOrder","slot":"medication-info-slot"},{"name":"order-action-button","component":"orderActionButton","slots":["prescription-action-button-slot","imaging-orders-action","procedure-orders-action","tests-ordered-actions-slot"],"order":0},{"component":"billingOverviewLink","name":"billing-overview-link","order":0,"slot":"billing-dashboard-link-slot"},{"component":"paymentHistoryLink","name":"payment-history-link","slot":"billing-dashboard-link-slot"},{"component":"paymentPointsLink","name":"payment-points-link","slot":"billing-dashboard-link-slot"},{"component":"paymentModesLink","name":"payment-modes-link","slot":"billing-dashboard-link-slot"},{"component":"billManagerLink","name":"bill-manager-link","slot":"billing-dashboard-link-slot"},{"component":"chargeableItemsLink","name":"chargeable-items-link","slot":"billing-dashboard-link-slot"},{"component":"billableExemptionsLink","name":"billable-exemptions-link","slot":"billing-dashboard-link-slot"},{"component":"claimsManagementSideNavGroup","name":"claims-management-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"claims-management","title":"Claims management Overview","slot":"case-management-slot"},"featureFlag":"healthInformationExchange"},{"component":"claimsManagementOverviewDashboardLink","name":"claims-management-overview-link","order":0,"slot":"claims-management-dashboard-link-slot"},{"component":"preAuthRequestsDashboardLink","name":"preauthrequest-overview-link","slot":"claims-management-dashboard-link-slot"},{"component":"claimsOverview","name":"claims-overview-dashboard-link","slot":"claims-management-overview-slot"},{"component":"waiveBillActionButton","name":"waive-bill-action-button","slot":"bill-actions-slot"},{"component":"deleteBillActionButton","name":"delete-bill-action-button","slot":"bill-actions-slot"},{"component":"refundLineItem","name":"refund-line-item","slot":"bill-actions-overflow-menu-slot"},{"name":"edit-line-item","component":"editLineItem","slot":"bill-actions-overflow-menu-slot"},{"name":"cancel-line-item","component":"cancelLineItem","slot":"bill-actions-overflow-menu-slot"}],"workspaces":[{"name":"create-bill-workspace","component":"createBillWorkspace","title":"Create Bill Workspace","type":"other-form"},{"name":"waive-bill-form","component":"waiveBillForm","title":"Waive Bill Form","type":"other-form"},{"name":"edit-bill-form","component":"editBillForm","title":"Edit Bill Form","type":"other-form"},{"name":"billable-service-form","component":"addServiceForm","title":"Create Charge Item Form","type":"other-form"},{"name":"commodity-form","component":"addCommodityForm","title":"Create Charge Item Form","type":"other-form"},{"name":"billing-form","component":"billingForm","title":"Billing Form","type":"other-form","width":"extra-wide"},{"name":"payment-mode-workspace","component":"paymentModeWorkspace","title":"Payment Mode Workspace","type":"other-form"},{"name":"cancel-bill-workspace","component":"cancelBillWorkspace","title":"Cancel Bill Workspace","type":"other-form"},{"name":"bill-deposit-workspace","component":"billDepositWorkspace","title":"Bill Deposit Workspace","type":"other-form"}],"modals":[{"name":"create-payment-point","component":"createPaymentPoint"},{"name":"clock-out-modal","component":"clockOut"},{"name":"bulk-import-billable-services-modal","component":"bulkImportBillableServicesModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"manage-claim-request-modal","component":"manageClaimRequestModal"},{"name":"paid-bill-receipt-print-preview-modal","component":"paidBillReceiptPrintPreviewModal"},{"name":"clock-in-modal","component":"clockIn"},{"name":"create-bill-item-modal","component":"createBillItemModal"}],"version":"5.4.1-pre.2093"}
|
package/package.json
CHANGED
|
@@ -36,6 +36,7 @@ const ClaimsManagementTable: React.FC = () => {
|
|
|
36
36
|
{ value: 'REJECTED', label: t('rejected', 'Rejected') },
|
|
37
37
|
{ value: 'CHECKED', label: t('checked', 'Checked') },
|
|
38
38
|
{ value: 'VALUATED', label: t('valuated', 'Valuated') },
|
|
39
|
+
{ value: 'APPROVED', label: t('approved', 'Approved') },
|
|
39
40
|
],
|
|
40
41
|
[t],
|
|
41
42
|
);
|
|
@@ -108,10 +109,11 @@ const ClaimsManagementTable: React.FC = () => {
|
|
|
108
109
|
);
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
const
|
|
112
|
-
const dispose = showModal('
|
|
112
|
+
const handleClaimAction = (claimId: string, modalType: 'retry' | 'update') => {
|
|
113
|
+
const dispose = showModal('manage-claim-request-modal', {
|
|
113
114
|
closeModal: () => dispose(),
|
|
114
115
|
claimId,
|
|
116
|
+
modalType,
|
|
115
117
|
});
|
|
116
118
|
};
|
|
117
119
|
|
|
@@ -149,16 +151,28 @@ const ClaimsManagementTable: React.FC = () => {
|
|
|
149
151
|
{row.cells.map((cell) => (
|
|
150
152
|
<TableCell key={cell.id}>
|
|
151
153
|
{cell.info.header === 'status' ? (
|
|
152
|
-
<ClaimStatus
|
|
153
|
-
) : cell.info.header === 'action'
|
|
154
|
+
<ClaimStatus row={row} />
|
|
155
|
+
) : cell.info.header === 'action' ? (
|
|
154
156
|
<OverflowMenu size={size} flipped>
|
|
157
|
+
{['ENTERED', 'ERRORED'].includes(rowStatus) && (
|
|
158
|
+
<OverflowMenuItem
|
|
159
|
+
itemText={t('retryRequest', 'Retry request')}
|
|
160
|
+
onClick={() => handleClaimAction(row.id, 'retry')}
|
|
161
|
+
/>
|
|
162
|
+
)}
|
|
155
163
|
<OverflowMenuItem
|
|
156
|
-
itemText={t('
|
|
157
|
-
onClick={() =>
|
|
164
|
+
itemText={t('updateStatus', 'Update status')}
|
|
165
|
+
onClick={() => handleClaimAction(row.id, 'update')}
|
|
158
166
|
/>
|
|
159
167
|
</OverflowMenu>
|
|
160
168
|
) : cell.info.header === 'dateFrom' ? (
|
|
161
169
|
formatDate(parseDate(cell.value))
|
|
170
|
+
) : cell.info.header === 'approvedTotal' ? (
|
|
171
|
+
['APPROVED'].includes(rowStatus) ? (
|
|
172
|
+
row.cells.find((c) => c.info.header === 'claimedTotal')?.value || cell.value
|
|
173
|
+
) : (
|
|
174
|
+
cell.value
|
|
175
|
+
)
|
|
162
176
|
) : (
|
|
163
177
|
cell.value
|
|
164
178
|
)}
|
|
@@ -194,15 +208,32 @@ const ClaimsManagementTable: React.FC = () => {
|
|
|
194
208
|
};
|
|
195
209
|
|
|
196
210
|
export default ClaimsManagementTable;
|
|
197
|
-
|
|
198
|
-
const ClaimStatus = ({ cell, row }: { cell: { value: string }; row: any }) => {
|
|
211
|
+
const ClaimStatus = ({ row }: { row: any }) => {
|
|
199
212
|
const { claims } = useFacilityClaims();
|
|
213
|
+
const { t } = useTranslation();
|
|
200
214
|
|
|
201
215
|
const claim = claims.find((claim) => claim.id === row.id);
|
|
216
|
+
|
|
217
|
+
const getTagType = (status) => {
|
|
218
|
+
switch (status) {
|
|
219
|
+
case 'ENTERED':
|
|
220
|
+
return 'blue';
|
|
221
|
+
case 'ERRORED':
|
|
222
|
+
return 'red';
|
|
223
|
+
case 'REJECTED':
|
|
224
|
+
return 'red';
|
|
225
|
+
case 'CHECKED':
|
|
226
|
+
return 'green';
|
|
227
|
+
case 'VALUATED':
|
|
228
|
+
return 'purple';
|
|
229
|
+
default:
|
|
230
|
+
return 'gray';
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
202
234
|
return (
|
|
203
235
|
<div className={styles.claimStatus}>
|
|
204
|
-
<
|
|
205
|
-
{claim.externalId && <Tag type="blue">{claim.externalId}</Tag>}
|
|
236
|
+
<Tag type={getTagType(claim.status)}>{claim.status}</Tag>
|
|
206
237
|
</div>
|
|
207
238
|
);
|
|
208
239
|
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Button, Loading, ModalBody, ModalFooter, ModalHeader } from '@carbon/react';
|
|
2
|
+
import { showSnackbar } from '@openmrs/esm-framework';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { retryClaim, updateClaimStatus } from '../../dashboard/form/claims-form.resource';
|
|
6
|
+
import { useFacilityClaims } from './use-facility-claims';
|
|
7
|
+
|
|
8
|
+
export const ManageClaimRequest = ({
|
|
9
|
+
closeModal,
|
|
10
|
+
claimId,
|
|
11
|
+
modalType = 'retry',
|
|
12
|
+
}: {
|
|
13
|
+
closeModal: () => void;
|
|
14
|
+
claimId: string;
|
|
15
|
+
modalType: 'retry' | 'update';
|
|
16
|
+
}) => {
|
|
17
|
+
const { t } = useTranslation();
|
|
18
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
19
|
+
const { claims, mutate } = useFacilityClaims();
|
|
20
|
+
|
|
21
|
+
const claim = claims.find((claim) => claim.id === claimId);
|
|
22
|
+
|
|
23
|
+
const handleRetryClaim = () => {
|
|
24
|
+
retryClaim(claim.externalId)
|
|
25
|
+
.then(() => {
|
|
26
|
+
mutate();
|
|
27
|
+
showSnackbar({
|
|
28
|
+
kind: 'success',
|
|
29
|
+
title: t('success', 'Success'),
|
|
30
|
+
subtitle: t('succcessfullRetry', 'Claim sent successfully'),
|
|
31
|
+
timeoutInMs: 3000,
|
|
32
|
+
});
|
|
33
|
+
})
|
|
34
|
+
.catch(() => {
|
|
35
|
+
showSnackbar({
|
|
36
|
+
kind: 'error',
|
|
37
|
+
title: t('error', 'Error'),
|
|
38
|
+
subtitle: t('retryClaimError', 'Request Failed, Please try later'),
|
|
39
|
+
timeoutInMs: 2500,
|
|
40
|
+
});
|
|
41
|
+
})
|
|
42
|
+
.finally(() => {
|
|
43
|
+
setIsSubmitting(false);
|
|
44
|
+
closeModal();
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const handleUpdateStatus = () => {
|
|
49
|
+
setIsSubmitting(true);
|
|
50
|
+
updateClaimStatus(claim.externalId)
|
|
51
|
+
.then(() => {
|
|
52
|
+
mutate();
|
|
53
|
+
showSnackbar({
|
|
54
|
+
kind: 'success',
|
|
55
|
+
title: t('success', 'Success'),
|
|
56
|
+
subtitle: t('successfulUpdate', 'Claim status updated successfully'),
|
|
57
|
+
timeoutInMs: 3000,
|
|
58
|
+
});
|
|
59
|
+
})
|
|
60
|
+
.catch(() => {
|
|
61
|
+
showSnackbar({
|
|
62
|
+
kind: 'error',
|
|
63
|
+
title: t('error', 'Error'),
|
|
64
|
+
subtitle: t('updateStatusError', 'Status update failed, Please try later'),
|
|
65
|
+
timeoutInMs: 2500,
|
|
66
|
+
});
|
|
67
|
+
})
|
|
68
|
+
.finally(() => {
|
|
69
|
+
setIsSubmitting(false);
|
|
70
|
+
closeModal();
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const handleSubmit = () => {
|
|
75
|
+
if (modalType === 'retry') {
|
|
76
|
+
handleRetryClaim();
|
|
77
|
+
} else {
|
|
78
|
+
handleUpdateStatus();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<React.Fragment>
|
|
84
|
+
<ModalHeader closeModal={closeModal}>
|
|
85
|
+
{modalType === 'retry' ? t('retryClaim', 'Retry Claim') : t('updateClaimStatus', 'Update Claim Status')}
|
|
86
|
+
</ModalHeader>
|
|
87
|
+
<ModalBody>
|
|
88
|
+
{modalType === 'retry'
|
|
89
|
+
? t('retryClaimMessage', `Are you sure you want to retry making the request for ${claim.claimCode}?`)
|
|
90
|
+
: t('updateStatusMessage', `You are updating claim status for ${claim.claimCode}:`)}
|
|
91
|
+
</ModalBody>
|
|
92
|
+
<ModalFooter>
|
|
93
|
+
<Button kind="secondary" onClick={closeModal} type="button">
|
|
94
|
+
{t('cancel', 'Cancel')}
|
|
95
|
+
</Button>
|
|
96
|
+
<Button type="submit" onClick={handleSubmit}>
|
|
97
|
+
{isSubmitting ? (
|
|
98
|
+
<>
|
|
99
|
+
<Loading withOverlay={false} small />
|
|
100
|
+
{modalType === 'retry' ? t('retrying', 'Retrying') : t('updating', 'Updating')}
|
|
101
|
+
</>
|
|
102
|
+
) : modalType === 'retry' ? (
|
|
103
|
+
t('retry', 'Retry')
|
|
104
|
+
) : (
|
|
105
|
+
t('update', 'Update')
|
|
106
|
+
)}
|
|
107
|
+
</Button>
|
|
108
|
+
</ModalFooter>
|
|
109
|
+
</React.Fragment>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
@@ -36,6 +36,7 @@ const PreauthTableTemporary: React.FC = () => {
|
|
|
36
36
|
{ value: 'REJECTED', label: t('rejected', 'Rejected') },
|
|
37
37
|
{ value: 'CHECKED', label: t('checked', 'Checked') },
|
|
38
38
|
{ value: 'VALUATED', label: t('valuated', 'Valuated') },
|
|
39
|
+
{ value: 'APPROVED', label: t('approved', 'Approved') },
|
|
39
40
|
],
|
|
40
41
|
[t],
|
|
41
42
|
);
|
|
@@ -106,11 +107,11 @@ const PreauthTableTemporary: React.FC = () => {
|
|
|
106
107
|
</div>
|
|
107
108
|
);
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const dispose = showModal('retry-claim-request-modal', {
|
|
110
|
+
const handleClaimAction = (claimId: string, modalType: 'retry' | 'update') => {
|
|
111
|
+
const dispose = showModal('manage-claim-request-modal', {
|
|
112
112
|
closeModal: () => dispose(),
|
|
113
113
|
claimId,
|
|
114
|
+
modalType,
|
|
114
115
|
});
|
|
115
116
|
};
|
|
116
117
|
|
|
@@ -148,16 +149,28 @@ const PreauthTableTemporary: React.FC = () => {
|
|
|
148
149
|
{row.cells.map((cell) => (
|
|
149
150
|
<TableCell key={cell.id}>
|
|
150
151
|
{cell.info.header === 'status' ? (
|
|
151
|
-
<ClaimStatus
|
|
152
|
-
) : cell.info.header === 'action'
|
|
152
|
+
<ClaimStatus row={row} />
|
|
153
|
+
) : cell.info.header === 'action' ? (
|
|
153
154
|
<OverflowMenu size={size} flipped>
|
|
155
|
+
{['ENTERED', 'ERRORED'].includes(rowStatus) && (
|
|
156
|
+
<OverflowMenuItem
|
|
157
|
+
itemText={t('retryRequest', 'Retry request')}
|
|
158
|
+
onClick={() => handleClaimAction(row.id, 'retry')}
|
|
159
|
+
/>
|
|
160
|
+
)}
|
|
154
161
|
<OverflowMenuItem
|
|
155
|
-
itemText={t('
|
|
156
|
-
onClick={() =>
|
|
162
|
+
itemText={t('updateStatus', 'Update status')}
|
|
163
|
+
onClick={() => handleClaimAction(row.id, 'update')}
|
|
157
164
|
/>
|
|
158
165
|
</OverflowMenu>
|
|
159
166
|
) : cell.info.header === 'dateFrom' ? (
|
|
160
167
|
formatDate(parseDate(cell.value))
|
|
168
|
+
) : cell.info.header === 'approvedTotal' ? (
|
|
169
|
+
['APPROVED'].includes(rowStatus) ? (
|
|
170
|
+
row.cells.find((c) => c.info.header === 'claimedTotal')?.value || cell.value
|
|
171
|
+
) : (
|
|
172
|
+
cell.value
|
|
173
|
+
)
|
|
161
174
|
) : (
|
|
162
175
|
cell.value
|
|
163
176
|
)}
|
|
@@ -193,15 +206,32 @@ const PreauthTableTemporary: React.FC = () => {
|
|
|
193
206
|
};
|
|
194
207
|
|
|
195
208
|
export default PreauthTableTemporary;
|
|
196
|
-
|
|
197
|
-
const ClaimStatus = ({ cell, row }: { cell: { value: string }; row: any }) => {
|
|
209
|
+
const ClaimStatus = ({ row }: { row: any }) => {
|
|
198
210
|
const { claims } = useFacilityClaims();
|
|
211
|
+
const { t } = useTranslation();
|
|
199
212
|
|
|
200
213
|
const claim = claims.find((claim) => claim.id === row.id);
|
|
214
|
+
|
|
215
|
+
const getTagType = (status) => {
|
|
216
|
+
switch (status) {
|
|
217
|
+
case 'ENTERED':
|
|
218
|
+
return 'blue';
|
|
219
|
+
case 'ERRORED':
|
|
220
|
+
return 'red';
|
|
221
|
+
case 'REJECTED':
|
|
222
|
+
return 'red';
|
|
223
|
+
case 'CHECKED':
|
|
224
|
+
return 'green';
|
|
225
|
+
case 'VALUATED':
|
|
226
|
+
return 'purple';
|
|
227
|
+
default:
|
|
228
|
+
return 'gray';
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
201
232
|
return (
|
|
202
233
|
<div className={styles.claimStatus}>
|
|
203
|
-
<
|
|
204
|
-
{claim.externalId && <Tag type="blue">{claim.externalId}</Tag>}
|
|
234
|
+
<Tag type={getTagType(claim.status)}>{claim.status}</Tag>
|
|
205
235
|
</div>
|
|
206
236
|
);
|
|
207
237
|
};
|
|
@@ -90,3 +90,10 @@ export const usePackages = () => {
|
|
|
90
90
|
error: undefined,
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
|
+
|
|
94
|
+
export const updateClaimStatus = (externalId: string) => {
|
|
95
|
+
const url = `/ws/rest/v1/insuranceclaims/claim/update-status?externalId=${externalId}`;
|
|
96
|
+
return openmrsFetch(url, {
|
|
97
|
+
method: 'GET',
|
|
98
|
+
});
|
|
99
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -53,9 +53,7 @@ import OrderActionButton from './billable-services/billiable-item/order-actions/
|
|
|
53
53
|
|
|
54
54
|
// Claims Management Components
|
|
55
55
|
import ClaimsManagementOverview from './claims/claims-management/main/claims-overview-main.component';
|
|
56
|
-
import {
|
|
57
|
-
|
|
58
|
-
// Payment Components
|
|
56
|
+
import { ManageClaimRequest } from './claims/claims-management/table/manage-claim-request.modal';
|
|
59
57
|
import InitiatePaymentDialog from './invoice/payments/initiate-payment/initiate-payment.component';
|
|
60
58
|
import VisitAttributeTags from './invoice/payments/visit-tags/visit-attribute.component';
|
|
61
59
|
import ReceiptPrintPreviewModal from './invoice/print-bill-receipt/receipt-print-preview.modal';
|
|
@@ -232,7 +230,7 @@ export const bulkImportBillableServicesModal = getSyncLifecycle(BulkImportBillab
|
|
|
232
230
|
|
|
233
231
|
// Claims Management Components
|
|
234
232
|
export const claimsOverview = getSyncLifecycle(ClaimsManagementOverview, options);
|
|
235
|
-
export const
|
|
233
|
+
export const manageClaimRequestModal = getSyncLifecycle(ManageClaimRequest, options);
|
|
236
234
|
|
|
237
235
|
// App Startup
|
|
238
236
|
export function startupApp() {
|
package/src/routes.json
CHANGED
|
@@ -309,8 +309,8 @@
|
|
|
309
309
|
"component": "deletePaymentModeModal"
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
|
-
"name": "
|
|
313
|
-
"component": "
|
|
312
|
+
"name": "manage-claim-request-modal",
|
|
313
|
+
"component": "manageClaimRequestModal"
|
|
314
314
|
},
|
|
315
315
|
{
|
|
316
316
|
"name": "paid-bill-receipt-print-preview-modal",
|