@kenyaemr/esm-billing-app 5.4.2-pre.2383 → 5.4.2-pre.2389
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 +8 -8
- package/dist/655.js +1 -0
- package/dist/655.js.map +1 -0
- package/dist/703.js +1 -0
- package/dist/703.js.map +1 -0
- package/dist/kenyaemr-esm-billing-app.js +1 -1
- package/dist/kenyaemr-esm-billing-app.js.buildmanifest.json +51 -27
- 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-form/social-health-authority/patient-banner-sha-status.extension.tsx +93 -0
- package/src/billing-form/social-health-authority/patient-banner-sha-status.scss +50 -0
- package/src/index.ts +8 -1
- package/src/routes.json +6 -1
- package/dist/452.js +0 -1
- package/dist/452.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":"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-group-nav-slot"},{"component":"billDepositDashboardLink","name":"bill-deposit-dashboard-link","slot":"billing-dashboard-group-nav-slot"},{"component":"paymentHistoryLink","name":"payment-history-link","slot":"billing-dashboard-group-nav-slot"},{"component":"paymentPointsLink","name":"payment-points-link","slot":"billing-dashboard-group-nav-slot"},{"component":"paymentModesLink","name":"payment-modes-link","slot":"billing-dashboard-group-nav-slot"},{"component":"billManagerLink","name":"bill-manager-link","slot":"billing-dashboard-group-nav-slot"},{"component":"chargeableItemsLink","name":"chargeable-items-link","slot":"billing-dashboard-group-nav-slot"},{"component":"billableExemptionsLink","name":"billable-exemptions-link","slot":"billing-dashboard-group-nav-slot"},{"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":"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"}],"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":"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-group-nav-slot"},{"component":"billDepositDashboardLink","name":"bill-deposit-dashboard-link","slot":"billing-dashboard-group-nav-slot"},{"component":"paymentHistoryLink","name":"payment-history-link","slot":"billing-dashboard-group-nav-slot"},{"component":"paymentPointsLink","name":"payment-points-link","slot":"billing-dashboard-group-nav-slot"},{"component":"paymentModesLink","name":"payment-modes-link","slot":"billing-dashboard-group-nav-slot"},{"component":"billManagerLink","name":"bill-manager-link","slot":"billing-dashboard-group-nav-slot"},{"component":"chargeableItemsLink","name":"chargeable-items-link","slot":"billing-dashboard-group-nav-slot"},{"component":"billableExemptionsLink","name":"billable-exemptions-link","slot":"billing-dashboard-group-nav-slot"},{"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"},{"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"}],"version":"5.4.2-pre.2389"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InlineLoading, InlineNotification, Tag } from '@carbon/react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { useConfig, usePatient } from '@openmrs/esm-framework';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { isWithinInterval } from 'date-fns';
|
|
7
|
+
import { useSHAEligibility } from '../hie.resource';
|
|
8
|
+
import { BillingConfig } from '../../config-schema';
|
|
9
|
+
import styles from './patient-banner-sha-status.scss';
|
|
10
|
+
|
|
11
|
+
interface PatientBannerShaStatusProps {
|
|
12
|
+
patientUuid: string;
|
|
13
|
+
renderedFrom: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const PatientBannerShaStatus: React.FC<PatientBannerShaStatusProps> = ({ patientUuid, renderedFrom }) => {
|
|
17
|
+
const { t } = useTranslation();
|
|
18
|
+
const { shaIdentificationNumberUUID } = useConfig<BillingConfig>();
|
|
19
|
+
const { patient, isLoading: isLoadingPatient } = usePatient(patientUuid);
|
|
20
|
+
|
|
21
|
+
const shaIdentificationNumber = patient?.identifier?.filter((identifier) =>
|
|
22
|
+
identifier?.type?.coding?.some((coding) => coding.code === shaIdentificationNumberUUID),
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const { data, isLoading: isLoadingHIEEligibility, error } = useSHAEligibility(patientUuid, shaIdentificationNumber);
|
|
26
|
+
|
|
27
|
+
const isRegisteredOnSHA = data?.status === 1;
|
|
28
|
+
const isActive = isRegisteredOnSHA
|
|
29
|
+
? isWithinInterval(new Date(), {
|
|
30
|
+
start: new Date(data?.coverageStartDate),
|
|
31
|
+
end: new Date(data?.coverageEndDate),
|
|
32
|
+
})
|
|
33
|
+
: false;
|
|
34
|
+
const civilServantScheme = data?.coverageType === 'CIVIL_SERVANT' && data?.status === 1;
|
|
35
|
+
const hasCrNumber = !!data?.memberCrNumber && data.memberCrNumber.length > 0;
|
|
36
|
+
|
|
37
|
+
const isPatientChart = renderedFrom === 'patient-chart';
|
|
38
|
+
|
|
39
|
+
if (!isPatientChart) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (isLoadingHIEEligibility || isLoadingPatient) {
|
|
44
|
+
return <InlineLoading status="active" description={t('loading', 'Loading ...')} />;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (error) {
|
|
48
|
+
return (
|
|
49
|
+
<InlineNotification
|
|
50
|
+
aria-label="closes notification"
|
|
51
|
+
kind="error"
|
|
52
|
+
lowContrast
|
|
53
|
+
statusIconDescription="notification"
|
|
54
|
+
title={t('error', 'Error')}
|
|
55
|
+
subtitle={t('errorRetrievingHIESubscription', 'Error retrieving HIE subscription')}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const renderStatusTag = (isActiveStatus: boolean) => (
|
|
61
|
+
<Tag className={classNames(styles.tag, isActiveStatus ? styles.activeTag : styles.inactiveTag)}>
|
|
62
|
+
{isActiveStatus ? t('active', 'Active') : t('inactive', 'Inactive')}
|
|
63
|
+
</Tag>
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const renderCivilServantTag = (isEligible: boolean) => (
|
|
67
|
+
<Tag className={classNames(styles.tag, isEligible ? styles.activeTag : styles.inactiveTag)}>
|
|
68
|
+
{isEligible ? t('eligible', 'Eligible') : t('notEligible', 'Not Eligible')}
|
|
69
|
+
</Tag>
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<div>
|
|
74
|
+
<span className={styles.separator}>·</span>
|
|
75
|
+
<span>{t('phc', 'PHC')}</span>
|
|
76
|
+
{renderStatusTag(isActive || hasCrNumber)}
|
|
77
|
+
|
|
78
|
+
<span className={styles.separator}>·</span>
|
|
79
|
+
<span>{t('shif', 'SHIF')}</span>
|
|
80
|
+
{renderStatusTag(isActive)}
|
|
81
|
+
|
|
82
|
+
<span className={styles.separator}>·</span>
|
|
83
|
+
<span>{t('eccif', 'ECCIF')}</span>
|
|
84
|
+
{renderStatusTag(isActive)}
|
|
85
|
+
|
|
86
|
+
<span className={styles.separator}>·</span>
|
|
87
|
+
<span>{t('civilServantScheme', 'CIVIL SERVANT SCHEME')}</span>
|
|
88
|
+
{renderCivilServantTag(civilServantScheme)}
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export default PatientBannerShaStatus;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use '@carbon/colors';
|
|
2
|
+
@use '@carbon/layout';
|
|
3
|
+
@use '@carbon/type';
|
|
4
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
5
|
+
|
|
6
|
+
.shaStatusContainer {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: layout.$spacing-02;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.navDivider {
|
|
13
|
+
background-color: var(--brand-03);
|
|
14
|
+
width: 0.05rem;
|
|
15
|
+
height: 1.5rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tag {
|
|
19
|
+
margin: layout.$spacing-02 0;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.statusTag {
|
|
24
|
+
@extend .tag;
|
|
25
|
+
@include type.type-style('label-01');
|
|
26
|
+
color: colors.$green-80;
|
|
27
|
+
background-color: colors.$green-20;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.activeTag {
|
|
31
|
+
@extend .tag;
|
|
32
|
+
@include type.type-style('label-01');
|
|
33
|
+
color: colors.$green-80;
|
|
34
|
+
background-color: colors.$green-20;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.inactiveTag {
|
|
38
|
+
@extend .tag;
|
|
39
|
+
@include type.type-style('label-01');
|
|
40
|
+
color: colors.$red-80;
|
|
41
|
+
background-color: colors.$red-20;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.bold {
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.statusBackgroundColor {
|
|
49
|
+
background-color: colors.$green-20;
|
|
50
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineConfigSchema, getSyncLifecycle, registerFeatureFlag } from '@openmrs/esm-framework';
|
|
1
|
+
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle, registerFeatureFlag } from '@openmrs/esm-framework';
|
|
2
2
|
import { createDashboardLink } from '@openmrs/esm-patient-common-lib';
|
|
3
3
|
|
|
4
4
|
import { configSchema } from './config-schema';
|
|
@@ -244,6 +244,13 @@ export const reverseTransactionModal = getSyncLifecycle(ReverseTransactionModal,
|
|
|
244
244
|
|
|
245
245
|
// Print Preview Components
|
|
246
246
|
export const printPreviewModal = getSyncLifecycle(PrintPreviewModal, options);
|
|
247
|
+
export const patientBannerShaStatus = getAsyncLifecycle(
|
|
248
|
+
() => import('./billing-form/social-health-authority/patient-banner-sha-status.extension'),
|
|
249
|
+
{
|
|
250
|
+
featureName: 'patient-sha-status',
|
|
251
|
+
moduleName,
|
|
252
|
+
},
|
|
253
|
+
);
|
|
247
254
|
|
|
248
255
|
// App Startup
|
|
249
256
|
export function startupApp() {
|
package/src/routes.json
CHANGED
|
@@ -216,6 +216,11 @@
|
|
|
216
216
|
"name": "cancel-line-item",
|
|
217
217
|
"component": "cancelLineItem",
|
|
218
218
|
"slot": "bill-actions-overflow-menu-slot"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "patient-info-sha-status",
|
|
222
|
+
"component": "patientBannerShaStatus",
|
|
223
|
+
"slot": "patient-banner-tags-slot"
|
|
219
224
|
}
|
|
220
225
|
],
|
|
221
226
|
"workspaces": [
|
|
@@ -333,4 +338,4 @@
|
|
|
333
338
|
"component": "billActionModal"
|
|
334
339
|
}
|
|
335
340
|
]
|
|
336
|
-
}
|
|
341
|
+
}
|