@kenyaemr/esm-billing-app 5.4.2-pre.2806 → 5.4.2-pre.2823
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 +5 -5
- package/dist/304.js +1 -0
- package/dist/304.js.map +1 -0
- package/dist/638.js +1 -0
- package/dist/638.js.map +1 -0
- package/dist/kenyaemr-esm-billing-app.js +1 -1
- package/dist/kenyaemr-esm-billing-app.js.buildmanifest.json +51 -51
- package/dist/kenyaemr-esm-billing-app.js.map +1 -1
- package/dist/main.js +10 -10
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/claims/claims-management/table/claim-summary-modal/claim-summary.modal.tsx +153 -0
- package/src/claims/claims-management/table/claim-summary-modal/claim-summary.scss +54 -0
- package/src/claims/claims-management/table/claim-table.component.tsx +8 -0
- package/src/claims/claims-management/table/use-facility-claims.ts +11 -4
- package/src/index.ts +2 -0
- package/src/routes.json +4 -0
- package/src/types/index.ts +1 -0
- package/dist/701.js +0 -1
- package/dist/701.js.map +0 -1
- package/dist/84.js +0 -1
- package/dist/84.js.map +0 -1
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},{"component":"billingAdmin","route":"billing-admin"}],"extensions":[{"component":"accountingDashboardLink","name":"accounting-dashboard-link","slots":["homepage-dashboard-slot"],"meta":{"name":"accounting","slot":"accounting-dashboard-slot","title":"Accounting"}},{"name":"billing-dashboard","component":"billingDashboard","slot":"accounting-dashboard-slot"},{"component":"benefitsPackageDashboardLink","name":"benefits-package-dashboard-link","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","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":"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":"claimsManagementOverviewDashboardLink","name":"claims-management-overview-link","slots":["claims-management-dashboard-link-slot"]},{"component":"preAuthRequestsDashboardLink","name":"preauthrequest-overview-link","slots":["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"},{"name":"patient-info-sha-status","component":"patientBannerShaStatus","slot":"patient-banner-tags-slot"},{"name":"payments-points-dashboard-link","component":"paymentPointDashboardLink","slot":"billing-admin-dashboard-slot","meta":{"name":"cashier-points","title":"Payment Point","slot":"payment-point-dashboard-slot"}},{"name":"payment-points-dashboard","component":"paymentPoints","slot":"payment-point-dashboard-slot"},{"name":"payment-mode-dashboard-link","component":"paymentModeLink","slot":"billing-admin-dashboard-slot","meta":{"name":"payment-modes","title":"Payment Mode","slot":"payment-mode-dashboard-slot"}},{"name":"payment-mode-dashboard","component":"paymentModeDashboard","slot":"payment-mode-dashboard-slot"},{"name":"bill-deposit-dashboard-link","component":"billDepositDashboardLink","slot":"billing-admin-dashboard-slot","meta":{"name":"bill-deposit","title":"Bill Deposit","slot":"billing-deposit-dashboard-slot"}},{"name":"bill-deposit-dashboard","component":"billDepositDashboard","slot":"billing-deposit-dashboard-slot"},{"name":"billable-exemptions-dashboard-link","component":"billableExemptionsLink","slot":"billing-admin-dashboard-slot","meta":{"name":"billable-exemptions","title":"Billable Exemptions","slot":"billing-exemptions-dashboard-slot"}},{"name":"billable-exemptions-dashboard","component":"billableExemptions","slot":"billing-exemptions-dashboard-slot"},{"name":"clinical-charges-dashboard-link","component":"clinicalChargesLink","slot":"billing-admin-dashboard-slot","meta":{"name":"clinical-charges","title":"Clinical Charges","slot":"clinical-charges-dashboard-slot"}},{"name":"clinical-charges-dashboard","component":"clinicalCharges","slot":"clinical-charges-dashboard-slot"},{"name":"payment-history-dashboard-link","component":"paymentHistoryLink","slot":"billing-admin-dashboard-slot","meta":{"name":"payment-history","title":"Payment History","slot":"payment-history-dashboard-slot"}},{"name":"payment-history-dashboard","component":"paymentHistoryDashboard","slot":"payment-history-dashboard-slot"},{"name":"patient-billing-dashboard-link","component":"patientBillingLink","slot":"billing-admin-dashboard-slot","meta":{"name":"patient-billing","title":"Patient Billing","slot":"patient-billing-dashboard-slot"}},{"name":"patient-billing-dashboard","component":"patientBilling","slot":"patient-billing-dashboard-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":"commodityForm","title":"Charge Commodity 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":"add-deposit-workspace","component":"addDepositWorkspace","title":"Add Deposit","type":"other-form"},{"name":"deposit-transaction-workspace","component":"depositTransactionWorkspace","title":"Deposit Transaction","type":"other-form"},{"name":"payment-workspace","component":"paymentWorkspace","title":"Payment 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":"clock-in-modal","component":"clockIn"},{"name":"create-bill-item-modal","component":"createBillItemModal"},{"name":"delete-deposit-modal","component":"deleteDepositModal"},{"name":"reverse-transaction-modal","component":"reverseTransactionModal"},{"name":"print-preview-modal","component":"printPreviewModal"},{"name":"bill-action-modal","component":"billActionModal"},{"name":"require-billing-modal","component":"requirePaymentModal"}],"version":"5.4.2-pre.
|
|
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},{"component":"billingAdmin","route":"billing-admin"}],"extensions":[{"component":"accountingDashboardLink","name":"accounting-dashboard-link","slots":["homepage-dashboard-slot"],"meta":{"name":"accounting","slot":"accounting-dashboard-slot","title":"Accounting"}},{"name":"billing-dashboard","component":"billingDashboard","slot":"accounting-dashboard-slot"},{"component":"benefitsPackageDashboardLink","name":"benefits-package-dashboard-link","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","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":"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":"claimsManagementOverviewDashboardLink","name":"claims-management-overview-link","slots":["claims-management-dashboard-link-slot"]},{"component":"preAuthRequestsDashboardLink","name":"preauthrequest-overview-link","slots":["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"},{"name":"patient-info-sha-status","component":"patientBannerShaStatus","slot":"patient-banner-tags-slot"},{"name":"payments-points-dashboard-link","component":"paymentPointDashboardLink","slot":"billing-admin-dashboard-slot","meta":{"name":"cashier-points","title":"Payment Point","slot":"payment-point-dashboard-slot"}},{"name":"payment-points-dashboard","component":"paymentPoints","slot":"payment-point-dashboard-slot"},{"name":"payment-mode-dashboard-link","component":"paymentModeLink","slot":"billing-admin-dashboard-slot","meta":{"name":"payment-modes","title":"Payment Mode","slot":"payment-mode-dashboard-slot"}},{"name":"payment-mode-dashboard","component":"paymentModeDashboard","slot":"payment-mode-dashboard-slot"},{"name":"bill-deposit-dashboard-link","component":"billDepositDashboardLink","slot":"billing-admin-dashboard-slot","meta":{"name":"bill-deposit","title":"Bill Deposit","slot":"billing-deposit-dashboard-slot"}},{"name":"bill-deposit-dashboard","component":"billDepositDashboard","slot":"billing-deposit-dashboard-slot"},{"name":"billable-exemptions-dashboard-link","component":"billableExemptionsLink","slot":"billing-admin-dashboard-slot","meta":{"name":"billable-exemptions","title":"Billable Exemptions","slot":"billing-exemptions-dashboard-slot"}},{"name":"billable-exemptions-dashboard","component":"billableExemptions","slot":"billing-exemptions-dashboard-slot"},{"name":"clinical-charges-dashboard-link","component":"clinicalChargesLink","slot":"billing-admin-dashboard-slot","meta":{"name":"clinical-charges","title":"Clinical Charges","slot":"clinical-charges-dashboard-slot"}},{"name":"clinical-charges-dashboard","component":"clinicalCharges","slot":"clinical-charges-dashboard-slot"},{"name":"payment-history-dashboard-link","component":"paymentHistoryLink","slot":"billing-admin-dashboard-slot","meta":{"name":"payment-history","title":"Payment History","slot":"payment-history-dashboard-slot"}},{"name":"payment-history-dashboard","component":"paymentHistoryDashboard","slot":"payment-history-dashboard-slot"},{"name":"patient-billing-dashboard-link","component":"patientBillingLink","slot":"billing-admin-dashboard-slot","meta":{"name":"patient-billing","title":"Patient Billing","slot":"patient-billing-dashboard-slot"}},{"name":"patient-billing-dashboard","component":"patientBilling","slot":"patient-billing-dashboard-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":"commodityForm","title":"Charge Commodity 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":"add-deposit-workspace","component":"addDepositWorkspace","title":"Add Deposit","type":"other-form"},{"name":"deposit-transaction-workspace","component":"depositTransactionWorkspace","title":"Deposit Transaction","type":"other-form"},{"name":"payment-workspace","component":"paymentWorkspace","title":"Payment 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":"claim-summary-modal","component":"claimSummaryModal"},{"name":"clock-in-modal","component":"clockIn"},{"name":"create-bill-item-modal","component":"createBillItemModal"},{"name":"delete-deposit-modal","component":"deleteDepositModal"},{"name":"reverse-transaction-modal","component":"reverseTransactionModal"},{"name":"print-preview-modal","component":"printPreviewModal"},{"name":"bill-action-modal","component":"billActionModal"},{"name":"require-billing-modal","component":"requirePaymentModal"}],"version":"5.4.2-pre.2823"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { Button, ModalBody, ModalFooter, ModalHeader, Tag } from '@carbon/react';
|
|
2
|
+
import { formatDate, parseDate } from '@openmrs/esm-framework';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { FacilityClaim } from '../../../../types';
|
|
6
|
+
import { useFacilityClaims } from '../use-facility-claims';
|
|
7
|
+
import { statusColors } from '../../../utils';
|
|
8
|
+
import { CardHeader } from '@openmrs/esm-patient-common-lib';
|
|
9
|
+
import styles from './claim-summary.scss';
|
|
10
|
+
import upperCase from 'lodash-es/upperCase';
|
|
11
|
+
|
|
12
|
+
type ExtendedClaim = FacilityClaim & {
|
|
13
|
+
id: string;
|
|
14
|
+
providerName: string;
|
|
15
|
+
patientName: string;
|
|
16
|
+
patientId?: string;
|
|
17
|
+
visitType?: { uuid: string; display: string };
|
|
18
|
+
patient?: {
|
|
19
|
+
uuid: string;
|
|
20
|
+
display: string;
|
|
21
|
+
person?: {
|
|
22
|
+
display?: string;
|
|
23
|
+
gender: string;
|
|
24
|
+
age: number;
|
|
25
|
+
birthdate: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const ClaimSummaryModal = ({ closeModal, claimId }: { closeModal: () => void; claimId: string }) => {
|
|
31
|
+
const { t } = useTranslation();
|
|
32
|
+
const { claims } = useFacilityClaims();
|
|
33
|
+
|
|
34
|
+
const claim = claims.find((claim) => claim.id === claimId) as ExtendedClaim | undefined;
|
|
35
|
+
|
|
36
|
+
if (!claim) {
|
|
37
|
+
return (
|
|
38
|
+
<React.Fragment>
|
|
39
|
+
<ModalHeader closeModal={closeModal}>{t('claimSummary', 'Claim Summary')}</ModalHeader>
|
|
40
|
+
<ModalBody>
|
|
41
|
+
<p>{t('claimNotFound', 'Claim not found')}</p>
|
|
42
|
+
</ModalBody>
|
|
43
|
+
<ModalFooter>
|
|
44
|
+
<Button kind="primary" onClick={closeModal} type="button">
|
|
45
|
+
{t('close', 'Close')}
|
|
46
|
+
</Button>
|
|
47
|
+
</ModalFooter>
|
|
48
|
+
</React.Fragment>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<React.Fragment>
|
|
54
|
+
<ModalHeader closeModal={closeModal}>{t('claimSummary', 'Claim Summary')}</ModalHeader>
|
|
55
|
+
<ModalBody>
|
|
56
|
+
<div className={styles.container}>
|
|
57
|
+
<CardHeader title={t('patientInformation', 'Patient Information')}>
|
|
58
|
+
<div />
|
|
59
|
+
</CardHeader>
|
|
60
|
+
<div className={styles.section}>
|
|
61
|
+
<div className={styles.grid}>
|
|
62
|
+
<div className={styles.field}>
|
|
63
|
+
<span className={styles.label}>{t('patientName', 'Patient Name')}</span>
|
|
64
|
+
<span className={styles.value}>{upperCase(claim.patient?.person?.display) || '-'}</span>
|
|
65
|
+
</div>
|
|
66
|
+
<div className={styles.field}>
|
|
67
|
+
<span className={styles.label}>{t('gender', 'Gender')}</span>
|
|
68
|
+
<span className={styles.value}>{claim.patient?.person?.gender || '-'}</span>
|
|
69
|
+
</div>
|
|
70
|
+
<div className={styles.field}>
|
|
71
|
+
<span className={styles.label}>{t('age', 'Age')}</span>
|
|
72
|
+
<span className={styles.value}>
|
|
73
|
+
{claim.patient?.person?.age ? `${claim.patient.person.age} years` : '-'}
|
|
74
|
+
</span>
|
|
75
|
+
</div>
|
|
76
|
+
<div className={styles.field}>
|
|
77
|
+
<span className={styles.label}>{t('birthdate', 'Birthdate')}</span>
|
|
78
|
+
<span className={styles.value}>
|
|
79
|
+
{claim.patient?.person?.birthdate
|
|
80
|
+
? formatDate(parseDate(claim.patient.person.birthdate), { time: false, noToday: true })
|
|
81
|
+
: '-'}
|
|
82
|
+
</span>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<CardHeader title={t('claimInformation', 'Claim Information')}>
|
|
88
|
+
<div />
|
|
89
|
+
</CardHeader>
|
|
90
|
+
<div className={styles.section}>
|
|
91
|
+
<div className={styles.grid}>
|
|
92
|
+
<div className={styles.field}>
|
|
93
|
+
<span className={styles.label}>{t('claimNumber', 'Claim Number')}</span>
|
|
94
|
+
<span className={styles.value}>{t('CO-01878', 'CO-01878')}</span>
|
|
95
|
+
</div>
|
|
96
|
+
<div className={styles.field}>
|
|
97
|
+
<span className={styles.label}>{t('dateFrom', 'Date From')}</span>
|
|
98
|
+
<span className={styles.value}>
|
|
99
|
+
{claim.dateFrom ? formatDate(parseDate(claim.dateFrom), { time: false, noToday: true }) : '-'}
|
|
100
|
+
</span>
|
|
101
|
+
</div>
|
|
102
|
+
<div className={styles.field}>
|
|
103
|
+
<span className={styles.label}>{t('dateTo', 'Date To')}</span>
|
|
104
|
+
<span className={styles.value}>
|
|
105
|
+
{claim.dateTo ? formatDate(parseDate(claim.dateTo), { time: false, noToday: true }) : '-'}
|
|
106
|
+
</span>
|
|
107
|
+
</div>
|
|
108
|
+
<div className={styles.field}>
|
|
109
|
+
<span className={styles.label}>{t('visitType', 'Visit Type')}</span>
|
|
110
|
+
<span className={styles.value}>{claim.visitType?.display || claim.use || '-'}</span>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<CardHeader title={t('providerInformation', 'Provider Information')}>
|
|
116
|
+
<div />
|
|
117
|
+
</CardHeader>
|
|
118
|
+
<div className={styles.section}>
|
|
119
|
+
<div className={styles.grid}>
|
|
120
|
+
<div className={styles.field}>
|
|
121
|
+
<span className={styles.label}>{t('providerName', 'Provider Name')}</span>
|
|
122
|
+
<span className={styles.value}>{claim.providerName || '-'}</span>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<CardHeader title={t('financialSummary', 'Financial Summary')}>
|
|
128
|
+
<div />
|
|
129
|
+
</CardHeader>
|
|
130
|
+
<div className={styles.section}>
|
|
131
|
+
<div className={styles.totalContainer}>
|
|
132
|
+
<span className={styles.totalLabel}>{t('claimedAmount', 'Claimed Amount')}</span>
|
|
133
|
+
<span className={styles.totalValue}>
|
|
134
|
+
{claim.claimedTotal ? `KES ${claim.claimedTotal.toLocaleString()}` : 'KES 0'}
|
|
135
|
+
</span>
|
|
136
|
+
</div>
|
|
137
|
+
<div className={styles.totalContainer}>
|
|
138
|
+
<span className={styles.totalLabel}>{t('approvedAmount', 'Approved Amount')}</span>
|
|
139
|
+
<span className={styles.totalValue}>
|
|
140
|
+
{claim.approvedTotal ? `KES ${claim.approvedTotal.toLocaleString()}` : 'KES 0'}
|
|
141
|
+
</span>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</ModalBody>
|
|
146
|
+
<ModalFooter>
|
|
147
|
+
<Button kind="primary" onClick={closeModal} type="button">
|
|
148
|
+
{t('close', 'Close')}
|
|
149
|
+
</Button>
|
|
150
|
+
</ModalFooter>
|
|
151
|
+
</React.Fragment>
|
|
152
|
+
);
|
|
153
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@carbon/colors';
|
|
4
|
+
.container {
|
|
5
|
+
padding: layout.$spacing-05;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.section {
|
|
9
|
+
margin-top: layout.$spacing-06;
|
|
10
|
+
background-color:colors.$white;
|
|
11
|
+
padding: layout.$spacing-05;
|
|
12
|
+
margin-bottom: layout.$spacing-06;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.grid {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: repeat(2, 1fr);
|
|
18
|
+
gap: layout.$spacing-05;
|
|
19
|
+
margin-bottom: layout.$spacing-05;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.field {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: layout.$spacing-02;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.label {
|
|
29
|
+
@include type.type-style('label-01');
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.value {
|
|
35
|
+
@include type.type-style('body-short-01');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.totalContainer {
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
padding: layout.$spacing-05;
|
|
42
|
+
border-radius: layout.$spacing-02;
|
|
43
|
+
margin-top: layout.$spacing-03;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.totalLabel {
|
|
47
|
+
@include type.type-style('body-short-01');
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.totalValue {
|
|
52
|
+
@include type.type-style('heading-compact-01');
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
}
|
|
@@ -153,6 +153,13 @@ const ClaimsTable: React.FC<TableProps> = ({
|
|
|
153
153
|
});
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
+
const handleViewSummary = (claimId: string) => {
|
|
157
|
+
const dispose = showModal('claim-summary-modal', {
|
|
158
|
+
closeModal: () => dispose(),
|
|
159
|
+
claimId,
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
|
|
156
163
|
// Cell rendering functions
|
|
157
164
|
const renderStatusCell = (row: DataTableRow) => {
|
|
158
165
|
return <ClaimStatus row={row} />;
|
|
@@ -161,6 +168,7 @@ const ClaimsTable: React.FC<TableProps> = ({
|
|
|
161
168
|
const renderActionCell = (row: DataTableRow, rowStatus: string, size: 'lg' | 'md' | 'sm') => {
|
|
162
169
|
return (
|
|
163
170
|
<OverflowMenu size={size} flipped>
|
|
171
|
+
<OverflowMenuItem itemText={t('viewSummary', 'View Summary')} onClick={() => handleViewSummary(row.id)} />
|
|
164
172
|
{['ENTERED', 'ERRORED'].includes(rowStatus) && (
|
|
165
173
|
<OverflowMenuItem
|
|
166
174
|
itemText={t('retryRequest', 'Retry request')}
|
|
@@ -4,7 +4,7 @@ import { FacilityClaim } from '../../../types';
|
|
|
4
4
|
|
|
5
5
|
export const useFacilityClaims = () => {
|
|
6
6
|
const customPresentation =
|
|
7
|
-
'custom:(uuid,claimCode,use,dateFrom,dateTo,claimedTotal,approvedTotal,status,externalId,responseUUID,provider:(person:(display),display),patient:(uuid,display))';
|
|
7
|
+
'custom:(uuid,claimCode,use,dateFrom,dateTo,claimedTotal,approvedTotal,status,externalId,responseUUID,provider:(person:(display),display),patient:(uuid,display,person:(display,gender,age,birthdate)),visitType:(uuid,display))';
|
|
8
8
|
const url = `${restBaseUrl}/claim?v=${customPresentation}`;
|
|
9
9
|
|
|
10
10
|
const { data, error, isLoading, mutate, isValidating } = useSWR<FetchResponse<{ results: Array<FacilityClaim> }>>(
|
|
@@ -14,15 +14,22 @@ export const useFacilityClaims = () => {
|
|
|
14
14
|
|
|
15
15
|
const formatClaim = (
|
|
16
16
|
claim: FacilityClaim,
|
|
17
|
-
): FacilityClaim & {
|
|
17
|
+
): FacilityClaim & {
|
|
18
|
+
id: string;
|
|
19
|
+
providerName: string;
|
|
20
|
+
patientName: string;
|
|
21
|
+
patientId?: string;
|
|
22
|
+
visitType?: { uuid: string; display: string };
|
|
23
|
+
} => ({
|
|
18
24
|
...claim,
|
|
19
25
|
id: claim.uuid,
|
|
20
|
-
providerName: claim.provider?.person?.display,
|
|
26
|
+
providerName: claim.provider?.person?.display || claim.provider?.display || '',
|
|
21
27
|
approvedTotal: claim.approvedTotal ?? 0,
|
|
22
28
|
status: claim.status,
|
|
23
|
-
patientName: claim.patient?.display,
|
|
29
|
+
patientName: claim.patient?.display || '',
|
|
24
30
|
insurer: claim.insurer ?? '',
|
|
25
31
|
patientId: claim.patient?.uuid,
|
|
32
|
+
visitType: claim.visitType,
|
|
26
33
|
});
|
|
27
34
|
|
|
28
35
|
const formattedClaims = data?.data.results.map(formatClaim) ?? [];
|
package/src/index.ts
CHANGED
|
@@ -69,6 +69,7 @@ import { ClockOut } from './bill-administration/payment-points/payment-point/clo
|
|
|
69
69
|
// Print Preview Components
|
|
70
70
|
import PrintPreviewModal from './print-preview/print-preview.modal';
|
|
71
71
|
import PaymentWorkspace from './invoice/payments/payment-form/payment.workspace';
|
|
72
|
+
import { ClaimSummaryModal } from './claims/claims-management/table/claim-summary-modal/claim-summary.modal';
|
|
72
73
|
|
|
73
74
|
// Translation
|
|
74
75
|
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
|
|
@@ -132,6 +133,7 @@ export const bulkImportBillableServicesModal = getSyncLifecycle(BulkImportBillab
|
|
|
132
133
|
// Claims Management Components
|
|
133
134
|
export const claimsOverview = getSyncLifecycle(ClaimsManagementOverview, options);
|
|
134
135
|
export const manageClaimRequestModal = getSyncLifecycle(ManageClaimRequest, options);
|
|
136
|
+
export const claimSummaryModal = getSyncLifecycle(ClaimSummaryModal, options);
|
|
135
137
|
|
|
136
138
|
// Print Preview Components
|
|
137
139
|
export const printPreviewModal = getSyncLifecycle(PrintPreviewModal, options);
|
package/src/routes.json
CHANGED
package/src/types/index.ts
CHANGED