@kenyaemr/esm-billing-app 5.4.2-pre.2553 → 5.4.2-pre.2555
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 +4 -4
- package/dist/{476.js → 570.js} +1 -1
- package/dist/570.js.map +1 -0
- package/dist/kenyaemr-esm-billing-app.js +3 -3
- package/dist/kenyaemr-esm-billing-app.js.buildmanifest.json +22 -22
- package/dist/main.js +3 -3
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/billing-dashboard/billing-dashboard.component.tsx +20 -10
- package/src/bills-table/bills-table.component.tsx +1 -1
- package/src/invoice/invoice-actions.component.tsx +2 -2
- package/src/left-panel-link.component.tsx +42 -15
- package/src/root.component.tsx +1 -1
- package/dist/476.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}],"extensions":[{"component":"accountingDashboardLink","name":"accounting-dashboard-link","slot":"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"}],"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":"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}],"extensions":[{"component":"accountingDashboardLink","name":"accounting-dashboard-link","slot":"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"}],"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":"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.2555"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { useLocation } from 'react-router-dom';
|
|
3
4
|
import BillingHeader from '../billing-header/billing-header.component';
|
|
4
5
|
import BillingTabs from '../billing-tabs/billling-tabs.component';
|
|
5
6
|
import MetricsCards from '../metrics-cards/metrics-cards.component';
|
|
7
|
+
import RootComponent from '../root.component'; // Import your router
|
|
6
8
|
import styles from './billing-dashboard.scss';
|
|
7
9
|
import { ClockOutStrip } from './clock-out-strip.component';
|
|
8
10
|
import { UserHasAccess } from '@openmrs/esm-framework';
|
|
@@ -10,15 +12,23 @@ import { UserHasAccess } from '@openmrs/esm-framework';
|
|
|
10
12
|
function BillingDashboard() {
|
|
11
13
|
const { t } = useTranslation();
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
const currentPath = window.location.pathname;
|
|
16
|
+
const isMainDashboard = currentPath.endsWith('/accounting') || currentPath.endsWith('/accounting/');
|
|
17
|
+
|
|
18
|
+
if (isMainDashboard) {
|
|
19
|
+
return (
|
|
20
|
+
<main className={styles.container}>
|
|
21
|
+
<BillingHeader title={t('home', 'Home')} />
|
|
22
|
+
<ClockOutStrip />
|
|
23
|
+
<UserHasAccess privilege="o3: View Billing Metrics">
|
|
24
|
+
<MetricsCards />
|
|
25
|
+
</UserHasAccess>
|
|
26
|
+
<BillingTabs />
|
|
27
|
+
</main>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return <RootComponent />;
|
|
23
32
|
}
|
|
33
|
+
|
|
24
34
|
export default BillingDashboard;
|
|
@@ -102,7 +102,7 @@ const BillsTable: React.FC<BillTableProps> = ({ defaultBillPaymentStatus = '' })
|
|
|
102
102
|
'',
|
|
103
103
|
);
|
|
104
104
|
|
|
105
|
-
const billingUrl = '${openmrsSpaBase}/home/
|
|
105
|
+
const billingUrl = '${openmrsSpaBase}/home/accounting/patient/${patientUuid}/${uuid}';
|
|
106
106
|
|
|
107
107
|
const rowData = results?.map((bill, index) => ({
|
|
108
108
|
id: `${index}`,
|
|
@@ -124,9 +124,9 @@ export function InvoiceActions({ bill, selectedLineItems = [], activeVisit }: In
|
|
|
124
124
|
|
|
125
125
|
if (activeVisit) {
|
|
126
126
|
await handleEndVisit();
|
|
127
|
-
navigate({ to: `${spaBasePath}/
|
|
127
|
+
navigate({ to: `${spaBasePath}/accounting/patient/${patientUuid}/${billUuid}/claims` });
|
|
128
128
|
} else {
|
|
129
|
-
navigate({ to: `${spaBasePath}/
|
|
129
|
+
navigate({ to: `${spaBasePath}/accounting/patient/${patientUuid}/${billUuid}/claims` });
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
|
|
@@ -16,37 +16,64 @@ export function LinkExtension({ config }: { config: LinkConfig }) {
|
|
|
16
16
|
const location = useLocation();
|
|
17
17
|
const spaBasePath = window.getOpenmrsSpaBase() + 'home';
|
|
18
18
|
|
|
19
|
-
let urlSegment = useMemo(() =>
|
|
19
|
+
let urlSegment = useMemo(() => {
|
|
20
|
+
const rawSegment = last(location.pathname.split('/'));
|
|
21
|
+
const decodedSegment = decodeURIComponent(rawSegment);
|
|
22
|
+
return decodedSegment;
|
|
23
|
+
}, [location.pathname]);
|
|
20
24
|
|
|
21
25
|
const isUUID = (value: string) => {
|
|
22
26
|
const regex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/;
|
|
23
|
-
|
|
27
|
+
const result = regex.test(value);
|
|
28
|
+
return result;
|
|
24
29
|
};
|
|
25
30
|
|
|
26
31
|
if (isUUID(urlSegment)) {
|
|
27
32
|
if (location.pathname.includes('payment-points')) {
|
|
28
|
-
|
|
33
|
+
const newSegment = location.pathname.split('/').at(-2);
|
|
34
|
+
urlSegment = newSegment;
|
|
29
35
|
} else {
|
|
30
|
-
|
|
36
|
+
const pathParts = location.pathname.split('/');
|
|
37
|
+
const mainSectionIndex = pathParts.findIndex((part) => part === nameSegment);
|
|
38
|
+
|
|
39
|
+
if (mainSectionIndex > -1) {
|
|
40
|
+
urlSegment = nameSegment;
|
|
41
|
+
} else {
|
|
42
|
+
const containsOurSection =
|
|
43
|
+
location.pathname.includes('/' + nameSegment + '/') || location.pathname.includes('/' + nameSegment);
|
|
44
|
+
if (containsOurSection) {
|
|
45
|
+
urlSegment = nameSegment;
|
|
46
|
+
} else {
|
|
47
|
+
urlSegment = '';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
31
50
|
}
|
|
32
51
|
} else if (location.pathname.endsWith('claims') || location.pathname.endsWith('claims/')) {
|
|
33
|
-
|
|
34
|
-
|
|
52
|
+
const containsOurSection =
|
|
53
|
+
location.pathname.includes('/' + nameSegment + '/') || location.pathname.split('/').includes(nameSegment);
|
|
54
|
+
if (containsOurSection) {
|
|
55
|
+
urlSegment = nameSegment;
|
|
56
|
+
} else {
|
|
57
|
+
urlSegment = '';
|
|
58
|
+
}
|
|
35
59
|
}
|
|
36
60
|
|
|
37
61
|
const isActive = nameSegment === urlSegment;
|
|
62
|
+
const finalUrl = spaBasePath + '/' + name;
|
|
63
|
+
|
|
38
64
|
return (
|
|
39
|
-
<ConfigurableLink
|
|
40
|
-
to={spaBasePath + '/' + name}
|
|
41
|
-
className={`cds--side-nav__link ${isActive && 'active-left-nav-link'}`}>
|
|
65
|
+
<ConfigurableLink to={finalUrl} className={`cds--side-nav__link ${isActive && 'active-left-nav-link'}`}>
|
|
42
66
|
{t(title)}
|
|
43
67
|
</ConfigurableLink>
|
|
44
68
|
);
|
|
45
69
|
}
|
|
46
70
|
|
|
47
|
-
export const createLeftPanelLink = (config: LinkConfig) =>
|
|
48
|
-
(
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
71
|
+
export const createLeftPanelLink = (config: LinkConfig) => {
|
|
72
|
+
return () => {
|
|
73
|
+
return (
|
|
74
|
+
<BrowserRouter>
|
|
75
|
+
<LinkExtension config={config} />
|
|
76
|
+
</BrowserRouter>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
};
|
package/src/root.component.tsx
CHANGED
|
@@ -16,7 +16,7 @@ import { PaymentPoints } from './payment-points/payment-points.component';
|
|
|
16
16
|
import BillDepositDashboard from './bill-deposit/components/dashboard/bill-deposit-dashboard.component';
|
|
17
17
|
|
|
18
18
|
const RootComponent: React.FC = () => {
|
|
19
|
-
const baseName = window.getOpenmrsSpaBase() + 'home/
|
|
19
|
+
const baseName = window.getOpenmrsSpaBase() + 'home/accounting';
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
22
|
<BrowserRouter basename={baseName}>
|