@kenyaemr/esm-billing-app 5.4.1-pre.1936 → 5.4.1-pre.1941
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 +71 -71
- package/dist/22.js +1 -0
- package/dist/22.js.map +1 -0
- package/dist/300.js +1 -1
- package/dist/423.js +1 -0
- package/dist/423.js.map +1 -0
- package/dist/917.js +2 -0
- package/dist/917.js.map +1 -0
- package/dist/kenyaemr-esm-billing-app.js +1 -1
- package/dist/kenyaemr-esm-billing-app.js.buildmanifest.json +84 -84
- package/dist/kenyaemr-esm-billing-app.js.map +1 -1
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/billable-services/billiable-item/order-actions/components/base-order-button.component.tsx +42 -0
- package/src/billable-services/billiable-item/order-actions/components/lab-order-button.component.tsx +51 -0
- package/src/billable-services/billiable-item/order-actions/components/medication-order-button.component.tsx +84 -0
- package/src/billable-services/billiable-item/order-actions/components/order-action-button.component.tsx +29 -0
- package/src/billable-services/billiable-item/order-actions/hooks/useBillStatus.ts +12 -0
- package/src/billable-services/billiable-item/order-actions/hooks/useLabOrderAction.ts +27 -0
- package/src/billable-services/billiable-item/order-actions/hooks/useMedicationOrderAction.ts +106 -0
- package/src/billable-services/billiable-item/order-actions/hooks/useModalHandler.ts +66 -0
- package/src/billable-services/billiable-item/order-actions/styles/order-action.scss +0 -0
- package/src/index.ts +2 -2
- package/src/routes.json +3 -3
- package/translations/en.json +2 -5
- package/dist/138.js +0 -2
- package/dist/138.js.map +0 -1
- package/dist/308.js +0 -1
- package/dist/308.js.map +0 -1
- package/dist/614.js +0 -1
- package/dist/614.js.map +0 -1
- package/src/billable-services/billiable-item/test-order/test-order-action.component.tsx +0 -134
- package/src/billable-services/billiable-item/test-order/test-order-action.test.tsx +0 -178
- /package/dist/{138.js.LICENSE.txt → 917.js.LICENSE.txt} +0 -0
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":"
|
|
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","slot":"prescription-action-button-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":"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"}],"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":"retry-claim-request-modal","component":"retryClaimRequestModal"},{"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.1941"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InlineLoading, Button } from '@carbon/react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
export type BaseOrderButtonProps = {
|
|
5
|
+
isDisabled: boolean;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
buttonText: string;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
kind?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'tertiary';
|
|
10
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
className?: string;
|
|
12
|
+
Icon?;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const BaseOrderButton: React.FC<BaseOrderButtonProps> = ({
|
|
16
|
+
isDisabled,
|
|
17
|
+
isLoading,
|
|
18
|
+
buttonText,
|
|
19
|
+
onClick,
|
|
20
|
+
kind = 'primary',
|
|
21
|
+
size = 'md',
|
|
22
|
+
className = '',
|
|
23
|
+
Icon,
|
|
24
|
+
}) => {
|
|
25
|
+
const { t } = useTranslation();
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Button
|
|
29
|
+
kind={isLoading ? 'ghost' : kind}
|
|
30
|
+
renderIcon={!isLoading ? Icon : undefined}
|
|
31
|
+
className={className}
|
|
32
|
+
size={size}
|
|
33
|
+
disabled={isLoading || isDisabled}
|
|
34
|
+
onClick={onClick}>
|
|
35
|
+
{isLoading ? (
|
|
36
|
+
<InlineLoading description={t('verifyingBillStatus', 'Verifying bill status...')} status="active" />
|
|
37
|
+
) : (
|
|
38
|
+
buttonText
|
|
39
|
+
)}
|
|
40
|
+
</Button>
|
|
41
|
+
);
|
|
42
|
+
};
|
package/src/billable-services/billiable-item/order-actions/components/lab-order-button.component.tsx
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { showModal } from '@openmrs/esm-framework';
|
|
3
|
+
import { Order } from '@openmrs/esm-patient-common-lib';
|
|
4
|
+
import { BaseOrderButton } from './base-order-button.component';
|
|
5
|
+
import { useLabOrderAction } from '../hooks/useLabOrderAction';
|
|
6
|
+
import { useModalHandler } from '../hooks/useModalHandler';
|
|
7
|
+
import styles from '../styles/order-action.scss';
|
|
8
|
+
|
|
9
|
+
export interface LabOrderButtonProps {
|
|
10
|
+
order?: Order;
|
|
11
|
+
modalName?: string;
|
|
12
|
+
additionalProps?: Record<string, unknown>;
|
|
13
|
+
actionText?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const LabOrderButton: React.FC<LabOrderButtonProps> = ({
|
|
17
|
+
order,
|
|
18
|
+
modalName = 'pickup-lab-request-modal',
|
|
19
|
+
additionalProps,
|
|
20
|
+
actionText,
|
|
21
|
+
}) => {
|
|
22
|
+
const { isLoading, isDisabled, buttonText: defaultButtonText, isInProgress } = useLabOrderAction(order);
|
|
23
|
+
|
|
24
|
+
const { handleModalClose } = useModalHandler(additionalProps?.mutateUrl as string);
|
|
25
|
+
const buttonText = actionText ?? defaultButtonText;
|
|
26
|
+
|
|
27
|
+
const launchModal = useCallback(() => {
|
|
28
|
+
const dispose = showModal(modalName, {
|
|
29
|
+
closeModal: () => {
|
|
30
|
+
handleModalClose();
|
|
31
|
+
dispose();
|
|
32
|
+
},
|
|
33
|
+
order,
|
|
34
|
+
...(additionalProps && { additionalProps }),
|
|
35
|
+
});
|
|
36
|
+
}, [modalName, order, additionalProps, handleModalClose]);
|
|
37
|
+
|
|
38
|
+
if (isInProgress) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<BaseOrderButton
|
|
44
|
+
isLoading={isLoading}
|
|
45
|
+
isDisabled={isDisabled}
|
|
46
|
+
buttonText={buttonText}
|
|
47
|
+
onClick={launchModal}
|
|
48
|
+
className={styles.actionButton}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { Edit } from '@carbon/react/icons';
|
|
3
|
+
import { showModal, launchWorkspace } from '@openmrs/esm-framework';
|
|
4
|
+
import { BaseOrderButton } from './base-order-button.component';
|
|
5
|
+
import { useMedicationOrderAction, useOrderByUuid } from '../hooks/useMedicationOrderAction';
|
|
6
|
+
import { launchPrescriptionEditWorkspace, useModalHandler } from '../hooks/useModalHandler';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
8
|
+
export interface MedicationOrderButtonProps {
|
|
9
|
+
medicationRequestBundle?: {
|
|
10
|
+
request: fhir.MedicationRequest;
|
|
11
|
+
};
|
|
12
|
+
modalName?: string;
|
|
13
|
+
additionalProps?: Record<string, unknown>;
|
|
14
|
+
actionText?: string;
|
|
15
|
+
closeable?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const MedicationOrderButton: React.FC<MedicationOrderButtonProps> = ({
|
|
19
|
+
medicationRequestBundle,
|
|
20
|
+
modalName,
|
|
21
|
+
additionalProps,
|
|
22
|
+
actionText,
|
|
23
|
+
closeable = true,
|
|
24
|
+
}) => {
|
|
25
|
+
const { t } = useTranslation();
|
|
26
|
+
const {
|
|
27
|
+
isLoading: isMedicationOrderLoading,
|
|
28
|
+
isDisabled,
|
|
29
|
+
buttonText: defaultButtonText,
|
|
30
|
+
shouldShowBillModal,
|
|
31
|
+
dispenseFormProps,
|
|
32
|
+
patientUuid,
|
|
33
|
+
shouldAllowModify,
|
|
34
|
+
} = useMedicationOrderAction(medicationRequestBundle);
|
|
35
|
+
const { data: order, isLoading: isOrderLoading } = useOrderByUuid(medicationRequestBundle?.request?.id);
|
|
36
|
+
const isLoading = isMedicationOrderLoading && isOrderLoading;
|
|
37
|
+
|
|
38
|
+
const { handleModalClose } = useModalHandler(additionalProps?.mutateUrl as string);
|
|
39
|
+
const buttonText = actionText ?? defaultButtonText;
|
|
40
|
+
|
|
41
|
+
const launchModal = useCallback(() => {
|
|
42
|
+
if (shouldShowBillModal) {
|
|
43
|
+
const disposeBill = showModal(modalName ?? 'create-bill-item-modal', {
|
|
44
|
+
closeModal: () => {
|
|
45
|
+
handleModalClose();
|
|
46
|
+
disposeBill();
|
|
47
|
+
},
|
|
48
|
+
medicationRequestBundle,
|
|
49
|
+
});
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (dispenseFormProps) {
|
|
54
|
+
launchWorkspace('dispense-workspace', dispenseFormProps);
|
|
55
|
+
}
|
|
56
|
+
}, [modalName, shouldShowBillModal, handleModalClose, medicationRequestBundle, dispenseFormProps]);
|
|
57
|
+
|
|
58
|
+
if (!closeable) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<div>
|
|
64
|
+
{shouldAllowModify && (
|
|
65
|
+
<BaseOrderButton
|
|
66
|
+
size="lg"
|
|
67
|
+
kind="tertiary"
|
|
68
|
+
Icon={Edit}
|
|
69
|
+
isLoading={isLoading}
|
|
70
|
+
isDisabled={false}
|
|
71
|
+
buttonText={t('modify', 'Modify')}
|
|
72
|
+
onClick={() => launchPrescriptionEditWorkspace(order, patientUuid)}
|
|
73
|
+
/>
|
|
74
|
+
)}
|
|
75
|
+
<BaseOrderButton
|
|
76
|
+
size="lg"
|
|
77
|
+
isLoading={isLoading}
|
|
78
|
+
isDisabled={isDisabled}
|
|
79
|
+
buttonText={buttonText}
|
|
80
|
+
onClick={launchModal}
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LabOrderButton } from './lab-order-button.component';
|
|
3
|
+
import { MedicationOrderButton } from './medication-order-button.component';
|
|
4
|
+
|
|
5
|
+
const OrderActionButton: React.FC<Record<string, any>> = (props) => {
|
|
6
|
+
if (Object.hasOwn(props, 'medicationRequestBundle')) {
|
|
7
|
+
const { medicationRequestBundle, modalName, additionalProps, actionText, closeable } = props;
|
|
8
|
+
return (
|
|
9
|
+
<MedicationOrderButton
|
|
10
|
+
medicationRequestBundle={medicationRequestBundle}
|
|
11
|
+
modalName={modalName}
|
|
12
|
+
additionalProps={additionalProps}
|
|
13
|
+
actionText={actionText}
|
|
14
|
+
closeable={closeable}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (props.orderType === 'lab') {
|
|
20
|
+
const { order, modalName, additionalProps, actionText } = props;
|
|
21
|
+
return (
|
|
22
|
+
<LabOrderButton order={order} modalName={modalName} additionalProps={additionalProps} actionText={actionText} />
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return null;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default OrderActionButton;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useOrderBill, useTestOrderBillStatus } from '../../test-order/test-order-action.resource';
|
|
2
|
+
|
|
3
|
+
export function useBillStatus(orderUuid?: string, patientUuid?: string) {
|
|
4
|
+
const { isLoading, hasPendingPayment } = useTestOrderBillStatus(orderUuid, patientUuid);
|
|
5
|
+
const { itemHasBill } = useOrderBill(patientUuid, orderUuid);
|
|
6
|
+
|
|
7
|
+
return {
|
|
8
|
+
isLoading,
|
|
9
|
+
hasPendingPayment,
|
|
10
|
+
itemHasBill,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import { Order } from '@openmrs/esm-patient-common-lib';
|
|
3
|
+
import { useBillStatus } from './useBillStatus';
|
|
4
|
+
|
|
5
|
+
export enum FulfillerStatus {
|
|
6
|
+
IN_PROGRESS = 'IN_PROGRESS',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function useLabOrderAction(order?: Order) {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const orderUuid = order?.uuid;
|
|
12
|
+
const patientUuid = order?.patient?.uuid;
|
|
13
|
+
|
|
14
|
+
const { isLoading, hasPendingPayment } = useBillStatus(orderUuid, patientUuid);
|
|
15
|
+
|
|
16
|
+
const isInProgress = order?.fulfillerStatus === FulfillerStatus.IN_PROGRESS;
|
|
17
|
+
const buttonText = hasPendingPayment ? t('unsettledBill', 'Unsettled bill') : t('pickLabRequest', 'Pick Lab Request');
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
isLoading,
|
|
21
|
+
isDisabled: hasPendingPayment,
|
|
22
|
+
buttonText,
|
|
23
|
+
isInProgress,
|
|
24
|
+
orderUuid,
|
|
25
|
+
patientUuid,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import { useStockItemQuantity } from '../../useBillableItem';
|
|
3
|
+
import { useBillableServices } from '../../../billable-service.resource';
|
|
4
|
+
|
|
5
|
+
import { useBillStatus } from './useBillStatus';
|
|
6
|
+
import { createMedicationDispenseProps } from '../../test-order/dispense.resource';
|
|
7
|
+
|
|
8
|
+
interface MedicationRequest {
|
|
9
|
+
request: fhir.MedicationRequest;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function useMedicationOrderAction(medicationRequestBundle?: MedicationRequest) {
|
|
13
|
+
const { t } = useTranslation();
|
|
14
|
+
const request = medicationRequestBundle?.request;
|
|
15
|
+
const orderUuid = request?.id;
|
|
16
|
+
const patientUuid = request?.subject?.reference?.split('/')[1];
|
|
17
|
+
const drugUuid = request?.medicationReference?.reference?.split('/')[1];
|
|
18
|
+
|
|
19
|
+
const { isLoading, hasPendingPayment, itemHasBill } = useBillStatus(orderUuid, patientUuid);
|
|
20
|
+
const { stockItemQuantity, stockItemUuid } = useStockItemQuantity(drugUuid);
|
|
21
|
+
const { billableServices } = useBillableServices();
|
|
22
|
+
|
|
23
|
+
const billableItem =
|
|
24
|
+
billableServices?.filter((service) => {
|
|
25
|
+
const stockItem = service?.stockItem.split(':')[0];
|
|
26
|
+
return stockItem === stockItemUuid;
|
|
27
|
+
}) || [];
|
|
28
|
+
|
|
29
|
+
const dispenseFormProps = medicationRequestBundle ? createMedicationDispenseProps({ medicationRequestBundle }) : null;
|
|
30
|
+
|
|
31
|
+
const shouldShowBillModal = stockItemQuantity > 0 && itemHasBill.length < 1 && billableItem.length > 0;
|
|
32
|
+
const isDisabled = hasPendingPayment || (stockItemQuantity < 1 && !!drugUuid);
|
|
33
|
+
|
|
34
|
+
// Modification is allowed only when:
|
|
35
|
+
// 1. There are no pending payments
|
|
36
|
+
// 2. Stock item is available (quantity > 0)
|
|
37
|
+
// 3. Item hasn't been billed yet (no existing bills)
|
|
38
|
+
// 4. Item exists in billable items list
|
|
39
|
+
const shouldAllowModify =
|
|
40
|
+
!hasPendingPayment && stockItemQuantity > 0 && itemHasBill.length < 1 && billableItem.length > 0;
|
|
41
|
+
|
|
42
|
+
const getButtonText = () => {
|
|
43
|
+
if (hasPendingPayment) {
|
|
44
|
+
return t('unsettledBill', 'Unsettled bill');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (stockItemQuantity < 1 && drugUuid) {
|
|
48
|
+
return t('outOfStock', 'Out of Stock');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (shouldShowBillModal) {
|
|
52
|
+
return t('bill', 'Bill');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return t('dispense', 'Dispense');
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
isLoading,
|
|
60
|
+
isDisabled,
|
|
61
|
+
buttonText: getButtonText(),
|
|
62
|
+
shouldShowBillModal,
|
|
63
|
+
dispenseFormProps,
|
|
64
|
+
orderUuid,
|
|
65
|
+
patientUuid,
|
|
66
|
+
billableItem,
|
|
67
|
+
itemHasBill,
|
|
68
|
+
medicationRequestBundle,
|
|
69
|
+
hasPendingPayment,
|
|
70
|
+
shouldAllowModify,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
import { useMemo } from 'react';
|
|
75
|
+
import { FetchResponse, openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
|
|
76
|
+
import { Order } from '@openmrs/esm-patient-common-lib';
|
|
77
|
+
import useSWR from 'swr';
|
|
78
|
+
|
|
79
|
+
const customRepresentation =
|
|
80
|
+
'custom:(uuid,dosingType,orderNumber,accessionNumber,' +
|
|
81
|
+
'patient:ref,action,careSetting:ref,previousOrder:ref,dateActivated,scheduledDate,dateStopped,autoExpireDate,' +
|
|
82
|
+
'orderType:ref,encounter:ref,orderer:(uuid,display,person:(display)),orderReason,orderReasonNonCoded,orderType,urgency,instructions,' +
|
|
83
|
+
'commentToFulfiller,drug:(uuid,display,strength,dosageForm:(display,uuid),concept),dose,doseUnits:ref,' +
|
|
84
|
+
'frequency:ref,asNeeded,asNeededCondition,quantity,quantityUnits:ref,numRefills,dosingInstructions,' +
|
|
85
|
+
'duration,durationUnits:ref,route:ref,brandName,dispenseAsWritten)';
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Hook to get a single order by UUID.
|
|
89
|
+
*
|
|
90
|
+
* @param orderUuid The UUID of the order to fetch.
|
|
91
|
+
*/
|
|
92
|
+
export function useOrderByUuid(orderUuid: string) {
|
|
93
|
+
const ordersUrl = useMemo(
|
|
94
|
+
() => (orderUuid ? `${restBaseUrl}/order/${orderUuid}?v=${customRepresentation}` : null),
|
|
95
|
+
[orderUuid],
|
|
96
|
+
);
|
|
97
|
+
const { data, error, isLoading, isValidating, mutate } = useSWR<FetchResponse<Order>, Error>(ordersUrl, openmrsFetch);
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
data: data?.data,
|
|
101
|
+
error,
|
|
102
|
+
isLoading,
|
|
103
|
+
isValidating,
|
|
104
|
+
mutate,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { launchWorkspace } from '@openmrs/esm-framework';
|
|
2
|
+
import { Order } from '@openmrs/esm-patient-common-lib';
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { mutate } from 'swr';
|
|
5
|
+
|
|
6
|
+
export function useModalHandler(mutateUrl?: string) {
|
|
7
|
+
const handleModalClose = useCallback(() => {
|
|
8
|
+
if (!mutateUrl) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
mutate((key) => typeof key === 'string' && key.startsWith(mutateUrl), undefined, {
|
|
13
|
+
revalidate: true,
|
|
14
|
+
});
|
|
15
|
+
}, [mutateUrl]);
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
handleModalClose,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const launchPrescriptionEditWorkspace = (order: Order, patientUuid: string) => {
|
|
23
|
+
const newItem = {
|
|
24
|
+
uuid: order.uuid,
|
|
25
|
+
display: order.drug?.display,
|
|
26
|
+
previousOrder: order.uuid,
|
|
27
|
+
startDate: new Date(),
|
|
28
|
+
action: 'REVISE',
|
|
29
|
+
drug: order.drug,
|
|
30
|
+
dosage: order.dose,
|
|
31
|
+
unit: {
|
|
32
|
+
value: order.doseUnits?.display,
|
|
33
|
+
valueCoded: order.doseUnits?.uuid,
|
|
34
|
+
},
|
|
35
|
+
frequency: {
|
|
36
|
+
valueCoded: order.frequency?.uuid,
|
|
37
|
+
value: order.frequency?.display,
|
|
38
|
+
},
|
|
39
|
+
route: {
|
|
40
|
+
valueCoded: order.route?.uuid,
|
|
41
|
+
value: order.route?.display,
|
|
42
|
+
},
|
|
43
|
+
commonMedicationName: order.drug?.display,
|
|
44
|
+
isFreeTextDosage: order.dosingType === 'org.openmrs.FreeTextDosingInstructions',
|
|
45
|
+
freeTextDosage: order.dosingType === 'org.openmrs.FreeTextDosingInstructions' ? order.dosingInstructions : '',
|
|
46
|
+
patientInstructions: order.dosingType !== 'org.openmrs.FreeTextDosingInstructions' ? order.dosingInstructions : '',
|
|
47
|
+
asNeeded: order.asNeeded,
|
|
48
|
+
asNeededCondition: order.asNeededCondition,
|
|
49
|
+
duration: order.duration,
|
|
50
|
+
durationUnit: {
|
|
51
|
+
valueCoded: order.durationUnits?.uuid,
|
|
52
|
+
value: order.durationUnits?.display,
|
|
53
|
+
},
|
|
54
|
+
pillsDispensed: order.quantity,
|
|
55
|
+
numRefills: order.numRefills,
|
|
56
|
+
indication: order.orderReasonNonCoded,
|
|
57
|
+
orderer: order.orderer?.uuid,
|
|
58
|
+
careSetting: order.careSetting?.uuid,
|
|
59
|
+
quantityUnits: {
|
|
60
|
+
value: order.quantityUnits?.display,
|
|
61
|
+
valueCoded: order.quantityUnits?.uuid,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
launchWorkspace('add-drug-order', { patientUuid, order: newItem });
|
|
66
|
+
};
|
|
File without changes
|
package/src/index.ts
CHANGED
|
@@ -23,7 +23,6 @@ import ImagingOrder from './billable-services/billiable-item/test-order/imaging-
|
|
|
23
23
|
import LabOrder from './billable-services/billiable-item/test-order/lab-order.component';
|
|
24
24
|
import PriceInfoOrder from './billable-services/billiable-item/test-order/price-info-order.componet';
|
|
25
25
|
import ProcedureOrder from './billable-services/billiable-item/test-order/procedure-order.component';
|
|
26
|
-
import TestOrderAction from './billable-services/billiable-item/test-order/test-order-action.component';
|
|
27
26
|
import { BulkImportBillableServices } from './billable-services/bulk-import-billable-service.modal';
|
|
28
27
|
import BillingCheckInForm from './billing-form/billing-checkin-form.component';
|
|
29
28
|
import BillingForm from './billing-form/billing-form.component';
|
|
@@ -42,6 +41,7 @@ import { ClockIn } from './payment-points/payment-point/clock-in.modal';
|
|
|
42
41
|
import { ClockOut } from './payment-points/payment-point/clock-out.modal';
|
|
43
42
|
import RequirePaymentModal from './prompt-payment/prompt-payment-modal.component';
|
|
44
43
|
import rootComponent from './root.component';
|
|
44
|
+
import OrderActionButton from './billable-services/billiable-item/order-actions/components/order-action-button.component';
|
|
45
45
|
|
|
46
46
|
const moduleName = '@kenyaemr/esm-billing-app';
|
|
47
47
|
|
|
@@ -169,7 +169,7 @@ export const priceInfoOrder = getSyncLifecycle(PriceInfoOrder, options);
|
|
|
169
169
|
export const procedureOrder = getSyncLifecycle(ProcedureOrder, options);
|
|
170
170
|
export const imagingOrder = getSyncLifecycle(ImagingOrder, options);
|
|
171
171
|
export const drugOrder = getSyncLifecycle(DrugOrder, options);
|
|
172
|
-
export const
|
|
172
|
+
export const orderActionButton = getSyncLifecycle(OrderActionButton, options);
|
|
173
173
|
|
|
174
174
|
// bill manager modals
|
|
175
175
|
export const deleteBillModal = getSyncLifecycle(DeleteBillModal, options);
|
package/src/routes.json
CHANGED
|
@@ -135,9 +135,9 @@
|
|
|
135
135
|
"slot": "medication-info-slot"
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
|
-
"name": "
|
|
139
|
-
"component": "
|
|
140
|
-
"slot": "
|
|
138
|
+
"name": "order-action-button",
|
|
139
|
+
"component": "orderActionButton",
|
|
140
|
+
"slot": "prescription-action-button-slot",
|
|
141
141
|
"order": 0
|
|
142
142
|
},
|
|
143
143
|
{
|
package/translations/en.json
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"attributeRetired": "Attribute retired",
|
|
23
23
|
"attributeRetiredReason": "Attribute retired reason",
|
|
24
24
|
"benefits": "Benefits",
|
|
25
|
-
"bill": "Bill",
|
|
26
25
|
"billableExemptionAdministration": "Exemption Administration",
|
|
27
26
|
"billableServicesError": "Billable services error",
|
|
28
27
|
"billAmount": "Bill Amount",
|
|
@@ -57,6 +56,7 @@
|
|
|
57
56
|
"checked": "Checked",
|
|
58
57
|
"checkFilters": "Check the filters above",
|
|
59
58
|
"chooseInterventions": "Choose interventions",
|
|
59
|
+
"choosePackage": "Choose package",
|
|
60
60
|
"claim": "Process claims",
|
|
61
61
|
"claimCode": "Claim Code",
|
|
62
62
|
"claimedAmount": "Claimed Amount",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"discard": "Discard",
|
|
84
84
|
"discardClaim": "Discard Claim",
|
|
85
85
|
"discount": "Discount",
|
|
86
|
-
"dispense": "Dispense",
|
|
87
86
|
"download": "Download",
|
|
88
87
|
"downloadTemplate": "Download template",
|
|
89
88
|
"draft": "Draft",
|
|
90
89
|
"editBillForm": "Edit Bill Form",
|
|
91
90
|
"editChargeItem": "Edit charge item",
|
|
92
91
|
"editItem": "Edit item",
|
|
92
|
+
"editPrescription": "Edit Prescription",
|
|
93
93
|
"editSchema": "Edit Schema",
|
|
94
94
|
"editServiceChargeItem": "Edit Service Charge Item",
|
|
95
95
|
"eligibleBenefits": "Eligible benefits",
|
|
@@ -178,7 +178,6 @@
|
|
|
178
178
|
"noTransactionHistory": "No transaction history",
|
|
179
179
|
"noTransactionHistorySubtitle": "No transaction history loaded for the selected filters",
|
|
180
180
|
"notSearchedState": "Please search for a patient in the input above",
|
|
181
|
-
"outOfStock": "Out of Stock",
|
|
182
181
|
"overflowMenu": "Overflow menu",
|
|
183
182
|
"overPayment": "Over payment",
|
|
184
183
|
"overPaymentSubtitle": "Amount paid {{totalAmountTendered}} should not be greater than amount due {{selectedLineItemsAmountDue}} for selected line items",
|
|
@@ -205,7 +204,6 @@
|
|
|
205
204
|
"payments": "Payments",
|
|
206
205
|
"paymentType": "Payment Type",
|
|
207
206
|
"Phone Number": "Phone Number",
|
|
208
|
-
"pickLabRequest": "Pick Lab Request",
|
|
209
207
|
"policyNumber": "Policy number",
|
|
210
208
|
"preauthRequest": "Preauth requests",
|
|
211
209
|
"preAuthRequests": "Pre-auth requests",
|
|
@@ -281,7 +279,6 @@
|
|
|
281
279
|
"treatmentstart": "Treatment Start",
|
|
282
280
|
"type": "Type",
|
|
283
281
|
"unitPrice": "Unit price",
|
|
284
|
-
"unsettledBill": "Unsettled bill",
|
|
285
282
|
"updateRegistration": "Update registration",
|
|
286
283
|
"valuated": "Valuated",
|
|
287
284
|
"verifyingBillStatus": "Verifying bill status...",
|
package/dist/138.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 138.js.LICENSE.txt */
|
|
2
|
-
(globalThis.webpackChunk_kenyaemr_esm_billing_app=globalThis.webpackChunk_kenyaemr_esm_billing_app||[]).push([[138],{88537:(t,e,r)=>{"use strict";r.d(e,{CH:()=>d,aI:()=>h});var n,o,i,c,a,s,u=r(90380),f=r.n(u),l=r(9247);const h=f().forwardRef((function(t,e){let{children:r,size:c=16,...a}=t;return f().createElement(l.A,{width:c,height:c,ref:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...a},n||(n=f().createElement("circle",{cx:"8",cy:"16",r:"2"})),o||(o=f().createElement("circle",{cx:"16",cy:"16",r:"2"})),i||(i=f().createElement("circle",{cx:"24",cy:"16",r:"2"})),r)})),d=f().forwardRef((function(t,e){let{children:r,size:n=16,...o}=t;return f().createElement(l.A,{width:n,height:n,ref:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},c||(c=f().createElement("circle",{cx:"16",cy:"8",r:"2"})),a||(a=f().createElement("circle",{cx:"16",cy:"16",r:"2"})),s||(s=f().createElement("circle",{cx:"16",cy:"24",r:"2"})),r)}))},68622:(t,e,r)=>{"use strict";r.d(e,{$D:()=>v,x:()=>b});var n,o,i,c,a,s,u,f,l,h=r(90380),d=r.n(h),p=r(9247);const v=d().forwardRef((function(t,e){let{children:r,size:o=16,...i}=t;return d().createElement(p.A,{width:o,height:o,ref:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},n||(n=d().createElement("path",{d:"M2,16H2A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm23.15,7.75L8.25,6.85a12,12,0,0,1,16.9,16.9ZM8.24,25.16A12,12,0,0,1,6.84,8.27L23.73,25.16a12,12,0,0,1-15.49,0Z"})),r)})),b=d().forwardRef((function(t,e){let{children:r,size:n=16,...h}=t;return 16===n||"16"===n||"16px"===n?d().createElement(p.A,{width:n,height:n,ref:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...h},o||(o=d().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),i||(i=d().createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),r):20===n||"20"===n||"20px"===n?d().createElement(p.A,{width:n,height:n,ref:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...h},c||(c=d().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),a||(a=d().createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),r):24===n||"24"===n||"24px"===n?d().createElement(p.A,{width:n,height:n,ref:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...h},s||(s=d().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),u||(u=d().createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),r):d().createElement(p.A,{width:n,height:n,ref:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...h},f||(f=d().createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),l||(l=d().createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),r)}))},54011:(t,e,r)=>{"use strict";function n(t){return"".concat(t/16,"rem")}r.d(e,{YK:()=>c,fi:()=>o});var o={sm:{width:n(320),columns:4,margin:"0"},md:{width:n(672),columns:8,margin:n(16)},lg:{width:n(1056),columns:16,margin:n(16)},xlg:{width:n(1312),columns:16,margin:n(16)},max:{width:n(1584),columns:16,margin:n(24)}};function i(t){return n(8*t)}var c=[i(.25),i(.5),i(1),i(1.5),i(2),i(3),i(4),i(5),i(6),i(8),i(10),i(12),i(20)];i(2),i(3),i(4),i(6),i(8),i(12),i(20),i(3),i(4),i(5),i(6),i(8),n(24),n(32),n(40),n(48),n(64),n(80)},40200:(t,e,r)=>{"use strict";var n=r(71761),o={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var r,i,c,a,s,u,f=!1;e||(e={}),r=e.debug||!1;try{if(c=n(),a=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=t,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(n){if(n.stopPropagation(),e.format)if(n.preventDefault(),void 0===n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[e.format]||o.default;window.clipboardData.setData(i,t)}else n.clipboardData.clearData(),n.clipboardData.setData(e.format,t);e.onCopy&&(n.preventDefault(),e.onCopy(n.clipboardData))})),document.body.appendChild(u),a.selectNodeContents(u),s.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");f=!0}catch(n){r&&console.error("unable to copy using execCommand: ",n),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),f=!0}catch(n){r&&console.error("unable to copy using clipboardData: ",n),r&&console.error("falling back to prompt"),i=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,t)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(a):s.removeAllRanges()),u&&document.body.removeChild(u),c()}return f}},78958:t=>{"use strict";t.exports=function(t,e,r,n,o,i,c,a){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,o,i,c,a],f=0;(s=new Error(e.replace(/%s/g,(function(){return u[f++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},90320:(t,e)=>{"use strict";var r=Symbol.for("react.element");Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen");Symbol.for("react.module.reference"),e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r}},524:(t,e,r)=>{"use strict";t.exports=r(90320)},99126:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>E});var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var r=-1;return t.some((function(t,n){return t[0]===e&&(r=n,!0)})),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var r=t(this.__entries__,e),n=this.__entries__[r];return n&&n[1]},e.prototype.set=function(e,r){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=r:this.__entries__.push([e,r])},e.prototype.delete=function(e){var r=this.__entries__,n=t(r,e);~n&&r.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var r=0,n=this.__entries__;r<n.length;r++){var o=n[r];t.call(e,o[1],o[0])}},e}()}(),o="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==r.g&&r.g.Math===Math?r.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),c="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t){var e=!1,r=!1,n=0;function o(){e&&(e=!1,t()),r&&a()}function i(){c(o)}function a(){var t=Date.now();if(e){if(t-n<2)return;r=!0}else e=!0,r=!1,setTimeout(i,20);n=t}return a}(this.refresh.bind(this))}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,r=e.indexOf(t);~r&&e.splice(r,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){o&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){o&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,r=void 0===e?"":e;a.some((function(t){return!!~r.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),f=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},h=m(0,0,0,0);function d(t){return parseFloat(t)||0}function p(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce((function(e,r){return e+d(t["border-"+r+"-width"])}),0)}var v="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function b(t){return o?v(t)?function(t){var e=t.getBBox();return m(0,0,e.width,e.height)}(t):function(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return h;var n=l(t).getComputedStyle(t),o=function(t){for(var e={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var o=n[r],i=t["padding-"+o];e[o]=d(i)}return e}(n),i=o.left+o.right,c=o.top+o.bottom,a=d(n.width),s=d(n.height);if("border-box"===n.boxSizing&&(Math.round(a+i)!==e&&(a-=p(n,"left","right")+i),Math.round(s+c)!==r&&(s-=p(n,"top","bottom")+c)),!function(t){return t===l(t).document.documentElement}(t)){var u=Math.round(a+i)-e,f=Math.round(s+c)-r;1!==Math.abs(u)&&(a-=u),1!==Math.abs(f)&&(s-=f)}return m(o.left,o.top,a,s)}(t):h}function m(t,e,r,n){return{x:t,y:e,width:r,height:n}}var y=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=b(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),w=function(t,e){var r,n,o,i,c,a,s,u=(n=(r=e).x,o=r.y,i=r.width,c=r.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(a.prototype),f(s,{x:n,y:o,width:i,height:c,top:o,right:n+i,bottom:c+o,left:n}),s);f(this,{target:t,contentRect:u})},g=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new y(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new w(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),A="undefined"!=typeof WeakMap?new WeakMap:new n,_=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=u.getInstance(),n=new g(e,r,this);A.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){_.prototype[t]=function(){var e;return(e=A.get(this))[t].apply(e,arguments)}}));const E=void 0!==i.ResizeObserver?i.ResizeObserver:_},71761:t=>{t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n<t.rangeCount;n++)r.push(t.getRangeAt(n));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||r.forEach((function(e){t.addRange(e)})),e&&e.focus()}}},48407:(t,e,r)=>{"use strict";var n,o=(n=r(99126))&&"object"==typeof n&&"default"in n?n.default:n,i=r(90380);t.exports=function(t){void 0===t&&(t={});var e=i.useRef(null),r=t.onResize,n=i.useRef(void 0);n.current=r;var c=i.useRef(),a=t.ref||e,s=i.useState({width:void 0,height:void 0}),u=s[0],f=s[1],l=i.useRef({width:void 0,height:void 0});return i.useEffect((function(){c.current||(c.current=new o((function(t){if(Array.isArray(t)&&t.length){var e=t[0],r=Math.round(e.contentRect.width),o=Math.round(e.contentRect.height);if(l.current.width!==r||l.current.height!==o){var i={width:r,height:o};n.current?n.current(i):(l.current.width=r,l.current.height=o,f(i))}}})))}),[]),i.useEffect((function(){if("object"==typeof a&&null!==a&&a.current instanceof Element){var t=a.current;return c.current.observe(t),function(){return c.current.unobserve(t)}}}),[a]),i.useMemo((function(){return{ref:a,width:u.width,height:u.height}}),[a,u?u.width:null,u?u.height:null])}},86468:function(t,e,r){"use strict";t.exports="object"==typeof self&&self.self===self&&self||"object"==typeof r.g&&r.g.global===r.g&&r.g||this},2474:(t,e,r)=>{"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}r.d(e,{A:()=>n})},89575:(t,e,r)=>{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n.apply(null,arguments)}r.d(e,{A:()=>n})},79140:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(1087);function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,(0,n.A)(t,e)}},17502:(t,e,r)=>{"use strict";function n(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}r.d(e,{A:()=>n})},1087:(t,e,r)=>{"use strict";function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}r.d(e,{A:()=>n})},7733:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(74512),o=r(31475),i=r(7817);var c=r(84772),a=1/0;const s=function(t){var e=function(t){return t?(t=(0,c.A)(t))===a||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}(t),r=e%1;return e==e?r?e-r:e:0};var u=Math.max,f=Math.min;const l=(h=function(t,e,r){var o=null==t?0:t.length;if(!o)return-1;var i=o-1;return void 0!==r&&(i=s(r),i=r<0?u(o+i,0):f(i,o-1)),function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,(0,n.A)(e,3),i,!0)},function(t,e,r){var c=Object(t);if(!(0,o.A)(t)){var a=(0,n.A)(e,3);t=(0,i.A)(t),e=function(t){return a(c[t],t,c)}}var s=h(t,e,r);return s>-1?c[a?t[s]:s]:void 0});var h},63865:(t,e,r)=>{"use strict";r.d(e,{A:()=>gt});var n=r(65133),o=r(39791);var i=r(61758);const c=function(t,e,r){"__proto__"==e&&i.A?(0,i.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var a=r(26979),s=Object.prototype.hasOwnProperty;const u=function(t,e,r){var n=t[e];s.call(t,e)&&(0,a.A)(n,r)&&(void 0!==r||e in t)||c(t,e,r)},f=function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var s=e[i],f=n?n(r[s],t[s],s,r,t):void 0;void 0===f&&(f=t[s]),o?c(r,s,f):u(r,s,f)}return r};var l=r(7817);var h=r(9158),d=r(97942),p=r(71140);var v=Object.prototype.hasOwnProperty;const b=function(t){if(!(0,d.A)(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=(0,p.A)(t),r=[];for(var n in t)("constructor"!=n||!e&&v.call(t,n))&&r.push(n);return r};var m=r(31475);const y=function(t){return(0,m.A)(t)?(0,h.A)(t,!0):b(t)};var w=r(39600),g="object"==typeof exports&&exports&&!exports.nodeType&&exports,A=g&&"object"==typeof module&&module&&!module.nodeType&&module,_=A&&A.exports===g?w.A.Buffer:void 0,E=_?_.allocUnsafe:void 0;var j=r(53721);var x=r(53271);const O=(0,r(67244).A)(Object.getPrototypeOf,Object);var M=r(11276);const S=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,x.A)(e,(0,j.A)(t)),t=O(t);return e}:M.A;var C=r(2475),R=r(64494);const D=function(t){return(0,R.A)(t,y,S)};var T=r(26781),z=Object.prototype.hasOwnProperty;var L=r(97913);const k=function(t){var e=new t.constructor(t.byteLength);return new L.A(e).set(new L.A(t)),e};var B=/\w*$/;var P=r(83516),I=P.A?P.A.prototype:void 0,U=I?I.valueOf:void 0;const F=function(t,e,r){var n,o,i,c=t.constructor;switch(e){case"[object ArrayBuffer]":return k(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return function(t,e){var r=e?k(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var r=e?k(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return(i=new(o=t).constructor(o.source,B.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return n=t,U?Object(U.call(n)):{}}};var H=Object.create;const V=function(){function t(){}return function(e){if(!(0,d.A)(e))return{};if(H)return H(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var W=r(96956),G=r(15821),N=r(47313);var q=r(58126),Z=r(10248),$=Z.A&&Z.A.isMap;const K=$?(0,q.A)($):function(t){return(0,N.A)(t)&&"[object Map]"==(0,T.A)(t)};var X=Z.A&&Z.A.isSet;const Y=X?(0,q.A)(X):function(t){return(0,N.A)(t)&&"[object Set]"==(0,T.A)(t)};var J="[object Arguments]",Q="[object Function]",tt="[object Object]",et={};et[J]=et["[object Array]"]=et["[object ArrayBuffer]"]=et["[object DataView]"]=et["[object Boolean]"]=et["[object Date]"]=et["[object Float32Array]"]=et["[object Float64Array]"]=et["[object Int8Array]"]=et["[object Int16Array]"]=et["[object Int32Array]"]=et["[object Map]"]=et["[object Number]"]=et[tt]=et["[object RegExp]"]=et["[object Set]"]=et["[object String]"]=et["[object Symbol]"]=et["[object Uint8Array]"]=et["[object Uint8ClampedArray]"]=et["[object Uint16Array]"]=et["[object Uint32Array]"]=!0,et["[object Error]"]=et[Q]=et["[object WeakMap]"]=!1;const rt=function t(e,r,n,i,c,a){var s,h=1&r,v=2&r,b=4&r;if(n&&(s=c?n(e,i,c,a):n(e)),void 0!==s)return s;if(!(0,d.A)(e))return e;var m=(0,W.A)(e);if(m){if(s=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&z.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(e),!h)return function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(e,s)}else{var w=(0,T.A)(e),g=w==Q||"[object GeneratorFunction]"==w;if((0,G.A)(e))return function(t,e){if(e)return t.slice();var r=t.length,n=E?E(r):new t.constructor(r);return t.copy(n),n}(e,h);if(w==tt||w==J||g&&!c){if(s=v||g?{}:function(t){return"function"!=typeof t.constructor||(0,p.A)(t)?{}:V(O(t))}(e),!h)return v?function(t,e){return f(t,S(t),e)}(e,function(t,e){return t&&f(e,y(e),t)}(s,e)):function(t,e){return f(t,(0,j.A)(t),e)}(e,function(t,e){return t&&f(e,(0,l.A)(e),t)}(s,e))}else{if(!et[w])return c?e:{};s=F(e,w,h)}}a||(a=new o.A);var A=a.get(e);if(A)return A;a.set(e,s),Y(e)?e.forEach((function(o){s.add(t(o,r,n,o,e,a))})):K(e)&&e.forEach((function(o,i){s.set(i,t(o,r,n,i,e,a))}));var _=b?v?D:C.A:v?y:l.A,x=m?void 0:_(e);return function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););}(x||e,(function(o,i){x&&(o=e[i=o]),u(s,i,t(o,r,n,i,e,a))})),s};var nt=r(85861),ot=r(14441),it=r(55841),ct=r(8007);var at=r(9322);const st=function(t,e){return null==(t=function(t,e){return e.length<2?t:(0,it.A)(t,(0,ct.A)(e,0,-1))}(t,e=(0,nt.A)(e,t)))||delete t[(0,at.A)((0,ot.A)(e))]};var ut=r(62135),ft=Function.prototype,lt=Object.prototype,ht=ft.toString,dt=lt.hasOwnProperty,pt=ht.call(Object);const vt=function(t){return function(t){if(!(0,N.A)(t)||"[object Object]"!=(0,ut.A)(t))return!1;var e=O(t);if(null===e)return!0;var r=dt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&ht.call(r)==pt}(t)?void 0:t};var bt=r(67313);const mt=function(t){return null!=t&&t.length?(0,bt.A)(t,1):[]};var yt=r(63220),wt=r(20206);const gt=(At=function(t,e){var r={};if(null==t)return r;var o=!1;e=(0,n.A)(e,(function(e){return e=(0,nt.A)(e,t),o||(o=e.length>1),e})),f(t,D(t),r),o&&(r=rt(r,7,vt));for(var i=e.length;i--;)st(r,e[i]);return r},(0,wt.A)((0,yt.A)(At,void 0,mt),At+""));var At},12777:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(65603),o=r(97942);const i=function(t,e,r){var i=!0,c=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return(0,o.A)(r)&&(i="leading"in r?!!r.leading:i,c="trailing"in r?!!r.trailing:c),(0,n.A)(t,e,{leading:i,maxWait:e,trailing:c})}},85608:(t,e,r)=>{"use strict";r.d(e,{Cl:()=>n});var n=function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError}}]);
|