@kenyaemr/esm-billing-app 5.4.2-pre.2746 → 5.4.2-pre.2750
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/127.js +1 -1
- package/dist/40.js +1 -1
- package/dist/84.js +1 -1
- package/dist/84.js.map +1 -1
- package/dist/916.js +1 -1
- package/dist/kenyaemr-esm-billing-app.js.buildmanifest.json +15 -15
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/claims/dashboard/form/claims-form.component.tsx +46 -9
- package/src/config-schema.ts +6 -0
- package/src/hooks/useOTP.ts +212 -149
- package/src/hooks/usePatientIdentifierType.ts +26 -0
- package/src/types/index.ts +17 -0
- package/translations/am.json +4 -1
- package/translations/en.json +3 -0
- package/translations/sw.json +3 -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},{"component":"billingAdmin","route":"billing-admin"}],"extensions":[{"component":"accountingDashboardLink","name":"accounting-dashboard-link","slots":["homepage-dashboard-slot"],"meta":{"name":"accounting","slot":"accounting-dashboard-slot","title":"Accounting"}},{"name":"billing-dashboard","component":"billingDashboard","slot":"accounting-dashboard-slot"},{"component":"benefitsPackageDashboardLink","name":"benefits-package-dashboard-link","meta":{"name":"benefits-package","slot":"patient-chart-benefits-dashboard-slot","path":"insurance-benefits","columns":1,"columnSpan":1},"featureFlag":"healthInformationExchange"},{"component":"benefitsPackage","name":"benefits-package","slot":"patient-chart-benefits-dashboard-slot"},{"component":"root","name":"billing-dashboard-root","slot":"billing-dashboard-slot"},{"component":"benefitsEligibilyRequestForm","name":"benefits-eligibility-request-form"},{"component":"benefitsPreAuthForm","name":"benefits-pre-auth-form"},{"name":"billing-patient-summary","component":"billingPatientSummary","slot":"patient-chart-billing-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"billing-summary-dashboard-link","component":"billingSummaryDashboardLink","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-billing-dashboard-slot","path":"Billing","layoutMode":"anchored"}},{"name":"billing-check-in-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm"},{"name":"patient-banner-billing-tags","component":"visitAttributeTags","slot":"patient-banner-tags-slot","order":2},{"name":"initiate-payment-modal","component":"initiatePaymentDialog"},{"name":"delete-billableservice-modal","component":"deleteBillableServiceModal"},{"name":"refund-bill-modal","component":"refundBillModal"},{"name":"delete-bill-modal","component":"deleteBillModal"},{"name":"lab-order-billable-item","component":"labOrder","slot":"top-of-lab-order-form-slot"},{"name":"procedure-order-billable-item","component":"procedureOrder","slot":"top-of-procedure-order-form-slot"},{"name":"imaging-order-billable-item","component":"imagingOrder","slot":"top-of-imaging-order-form-slot"},{"name":"price-info-order","component":"priceInfoOrder"},{"name":"drug-order-billable-item","component":"drugOrder","slot":"medication-info-slot"},{"name":"order-action-button","component":"orderActionButton","slots":["prescription-action-button-slot","imaging-orders-action","procedure-orders-action","tests-ordered-actions-slot"],"order":0},{"component":"claimsManagementOverviewDashboardLink","name":"claims-management-overview-link","slots":["claims-management-dashboard-link-slot"]},{"component":"preAuthRequestsDashboardLink","name":"preauthrequest-overview-link","slots":["claims-management-dashboard-link-slot"]},{"component":"claimsOverview","name":"claims-overview-dashboard-link","slot":"claims-management-overview-slot"},{"component":"waiveBillActionButton","name":"waive-bill-action-button","slot":"bill-actions-slot"},{"component":"deleteBillActionButton","name":"delete-bill-action-button","slot":"bill-actions-slot"},{"component":"refundLineItem","name":"refund-line-item","slot":"bill-actions-overflow-menu-slot"},{"name":"edit-line-item","component":"editLineItem","slot":"bill-actions-overflow-menu-slot"},{"name":"cancel-line-item","component":"cancelLineItem","slot":"bill-actions-overflow-menu-slot"},{"name":"patient-info-sha-status","component":"patientBannerShaStatus","slot":"patient-banner-tags-slot"},{"name":"payments-points-dashboard-link","component":"paymentPointDashboardLink","slot":"billing-admin-dashboard-slot","meta":{"name":"cashier-points","title":"Payment Point","slot":"payment-point-dashboard-slot"}},{"name":"payment-points-dashboard","component":"paymentPoints","slot":"payment-point-dashboard-slot"},{"name":"payment-mode-dashboard-link","component":"paymentModeLink","slot":"billing-admin-dashboard-slot","meta":{"name":"payment-modes","title":"Payment Mode","slot":"payment-mode-dashboard-slot"}},{"name":"payment-mode-dashboard","component":"paymentModeDashboard","slot":"payment-mode-dashboard-slot"},{"name":"bill-deposit-dashboard-link","component":"billDepositDashboardLink","slot":"billing-admin-dashboard-slot","meta":{"name":"bill-deposit","title":"Bill Deposit","slot":"billing-deposit-dashboard-slot"}},{"name":"bill-deposit-dashboard","component":"billDepositDashboard","slot":"billing-deposit-dashboard-slot"},{"name":"billable-exemptions-dashboard-link","component":"billableExemptionsLink","slot":"billing-admin-dashboard-slot","meta":{"name":"billable-exemptions","title":"Billable Exemptions","slot":"billing-exemptions-dashboard-slot"}},{"name":"billable-exemptions-dashboard","component":"billableExemptions","slot":"billing-exemptions-dashboard-slot"},{"name":"clinical-charges-dashboard-link","component":"clinicalChargesLink","slot":"billing-admin-dashboard-slot","meta":{"name":"clinical-charges","title":"Clinical Charges","slot":"clinical-charges-dashboard-slot"}},{"name":"clinical-charges-dashboard","component":"clinicalCharges","slot":"clinical-charges-dashboard-slot"},{"name":"payment-history-dashboard-link","component":"paymentHistoryLink","slot":"billing-admin-dashboard-slot","meta":{"name":"payment-history","title":"Payment History","slot":"payment-history-dashboard-slot"}},{"name":"payment-history-dashboard","component":"paymentHistoryDashboard","slot":"payment-history-dashboard-slot"},{"name":"patient-billing-dashboard-link","component":"patientBillingLink","slot":"billing-admin-dashboard-slot","meta":{"name":"patient-billing","title":"Patient Billing","slot":"patient-billing-dashboard-slot"}},{"name":"patient-billing-dashboard","component":"patientBilling","slot":"patient-billing-dashboard-slot"}],"workspaces":[{"name":"create-bill-workspace","component":"createBillWorkspace","title":"Create Bill Workspace","type":"other-form"},{"name":"waive-bill-form","component":"waiveBillForm","title":"Waive Bill Form","type":"other-form"},{"name":"edit-bill-form","component":"editBillForm","title":"Edit Bill Form","type":"other-form"},{"name":"billable-service-form","component":"addServiceForm","title":"Create Charge Item Form","type":"other-form"},{"name":"commodity-form","component":"commodityForm","title":"Charge Commodity Form","type":"other-form"},{"name":"billing-form","component":"billingForm","title":"Billing Form","type":"other-form","width":"extra-wide"},{"name":"payment-mode-workspace","component":"paymentModeWorkspace","title":"Payment Mode Workspace","type":"other-form"},{"name":"cancel-bill-workspace","component":"cancelBillWorkspace","title":"Cancel Bill Workspace","type":"other-form"},{"name":"add-deposit-workspace","component":"addDepositWorkspace","title":"Add Deposit","type":"other-form"},{"name":"deposit-transaction-workspace","component":"depositTransactionWorkspace","title":"Deposit Transaction","type":"other-form"},{"name":"payment-workspace","component":"paymentWorkspace","title":"Payment Workspace","type":"other-form"}],"modals":[{"name":"create-payment-point","component":"createPaymentPoint"},{"name":"clock-out-modal","component":"clockOut"},{"name":"bulk-import-billable-services-modal","component":"bulkImportBillableServicesModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"manage-claim-request-modal","component":"manageClaimRequestModal"},{"name":"clock-in-modal","component":"clockIn"},{"name":"create-bill-item-modal","component":"createBillItemModal"},{"name":"delete-deposit-modal","component":"deleteDepositModal"},{"name":"reverse-transaction-modal","component":"reverseTransactionModal"},{"name":"print-preview-modal","component":"printPreviewModal"},{"name":"bill-action-modal","component":"billActionModal"},{"name":"require-billing-modal","component":"requirePaymentModal"}],"version":"5.4.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemr":"^19.0.0"},"pages":[{"component":"billableServicesHome","route":"billable-services"},{"component":"requirePaymentModal","routeRegex":"^patient/.+/chart","online":true,"offline":false},{"component":"billingAdmin","route":"billing-admin"}],"extensions":[{"component":"accountingDashboardLink","name":"accounting-dashboard-link","slots":["homepage-dashboard-slot"],"meta":{"name":"accounting","slot":"accounting-dashboard-slot","title":"Accounting"}},{"name":"billing-dashboard","component":"billingDashboard","slot":"accounting-dashboard-slot"},{"component":"benefitsPackageDashboardLink","name":"benefits-package-dashboard-link","meta":{"name":"benefits-package","slot":"patient-chart-benefits-dashboard-slot","path":"insurance-benefits","columns":1,"columnSpan":1},"featureFlag":"healthInformationExchange"},{"component":"benefitsPackage","name":"benefits-package","slot":"patient-chart-benefits-dashboard-slot"},{"component":"root","name":"billing-dashboard-root","slot":"billing-dashboard-slot"},{"component":"benefitsEligibilyRequestForm","name":"benefits-eligibility-request-form"},{"component":"benefitsPreAuthForm","name":"benefits-pre-auth-form"},{"name":"billing-patient-summary","component":"billingPatientSummary","slot":"patient-chart-billing-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"billing-summary-dashboard-link","component":"billingSummaryDashboardLink","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-billing-dashboard-slot","path":"Billing","layoutMode":"anchored"}},{"name":"billing-check-in-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm"},{"name":"patient-banner-billing-tags","component":"visitAttributeTags","slot":"patient-banner-tags-slot","order":2},{"name":"initiate-payment-modal","component":"initiatePaymentDialog"},{"name":"delete-billableservice-modal","component":"deleteBillableServiceModal"},{"name":"refund-bill-modal","component":"refundBillModal"},{"name":"delete-bill-modal","component":"deleteBillModal"},{"name":"lab-order-billable-item","component":"labOrder","slot":"top-of-lab-order-form-slot"},{"name":"procedure-order-billable-item","component":"procedureOrder","slot":"top-of-procedure-order-form-slot"},{"name":"imaging-order-billable-item","component":"imagingOrder","slot":"top-of-imaging-order-form-slot"},{"name":"price-info-order","component":"priceInfoOrder"},{"name":"drug-order-billable-item","component":"drugOrder","slot":"medication-info-slot"},{"name":"order-action-button","component":"orderActionButton","slots":["prescription-action-button-slot","imaging-orders-action","procedure-orders-action","tests-ordered-actions-slot"],"order":0},{"component":"claimsManagementOverviewDashboardLink","name":"claims-management-overview-link","slots":["claims-management-dashboard-link-slot"]},{"component":"preAuthRequestsDashboardLink","name":"preauthrequest-overview-link","slots":["claims-management-dashboard-link-slot"]},{"component":"claimsOverview","name":"claims-overview-dashboard-link","slot":"claims-management-overview-slot"},{"component":"waiveBillActionButton","name":"waive-bill-action-button","slot":"bill-actions-slot"},{"component":"deleteBillActionButton","name":"delete-bill-action-button","slot":"bill-actions-slot"},{"component":"refundLineItem","name":"refund-line-item","slot":"bill-actions-overflow-menu-slot"},{"name":"edit-line-item","component":"editLineItem","slot":"bill-actions-overflow-menu-slot"},{"name":"cancel-line-item","component":"cancelLineItem","slot":"bill-actions-overflow-menu-slot"},{"name":"patient-info-sha-status","component":"patientBannerShaStatus","slot":"patient-banner-tags-slot"},{"name":"payments-points-dashboard-link","component":"paymentPointDashboardLink","slot":"billing-admin-dashboard-slot","meta":{"name":"cashier-points","title":"Payment Point","slot":"payment-point-dashboard-slot"}},{"name":"payment-points-dashboard","component":"paymentPoints","slot":"payment-point-dashboard-slot"},{"name":"payment-mode-dashboard-link","component":"paymentModeLink","slot":"billing-admin-dashboard-slot","meta":{"name":"payment-modes","title":"Payment Mode","slot":"payment-mode-dashboard-slot"}},{"name":"payment-mode-dashboard","component":"paymentModeDashboard","slot":"payment-mode-dashboard-slot"},{"name":"bill-deposit-dashboard-link","component":"billDepositDashboardLink","slot":"billing-admin-dashboard-slot","meta":{"name":"bill-deposit","title":"Bill Deposit","slot":"billing-deposit-dashboard-slot"}},{"name":"bill-deposit-dashboard","component":"billDepositDashboard","slot":"billing-deposit-dashboard-slot"},{"name":"billable-exemptions-dashboard-link","component":"billableExemptionsLink","slot":"billing-admin-dashboard-slot","meta":{"name":"billable-exemptions","title":"Billable Exemptions","slot":"billing-exemptions-dashboard-slot"}},{"name":"billable-exemptions-dashboard","component":"billableExemptions","slot":"billing-exemptions-dashboard-slot"},{"name":"clinical-charges-dashboard-link","component":"clinicalChargesLink","slot":"billing-admin-dashboard-slot","meta":{"name":"clinical-charges","title":"Clinical Charges","slot":"clinical-charges-dashboard-slot"}},{"name":"clinical-charges-dashboard","component":"clinicalCharges","slot":"clinical-charges-dashboard-slot"},{"name":"payment-history-dashboard-link","component":"paymentHistoryLink","slot":"billing-admin-dashboard-slot","meta":{"name":"payment-history","title":"Payment History","slot":"payment-history-dashboard-slot"}},{"name":"payment-history-dashboard","component":"paymentHistoryDashboard","slot":"payment-history-dashboard-slot"},{"name":"patient-billing-dashboard-link","component":"patientBillingLink","slot":"billing-admin-dashboard-slot","meta":{"name":"patient-billing","title":"Patient Billing","slot":"patient-billing-dashboard-slot"}},{"name":"patient-billing-dashboard","component":"patientBilling","slot":"patient-billing-dashboard-slot"}],"workspaces":[{"name":"create-bill-workspace","component":"createBillWorkspace","title":"Create Bill Workspace","type":"other-form"},{"name":"waive-bill-form","component":"waiveBillForm","title":"Waive Bill Form","type":"other-form"},{"name":"edit-bill-form","component":"editBillForm","title":"Edit Bill Form","type":"other-form"},{"name":"billable-service-form","component":"addServiceForm","title":"Create Charge Item Form","type":"other-form"},{"name":"commodity-form","component":"commodityForm","title":"Charge Commodity Form","type":"other-form"},{"name":"billing-form","component":"billingForm","title":"Billing Form","type":"other-form","width":"extra-wide"},{"name":"payment-mode-workspace","component":"paymentModeWorkspace","title":"Payment Mode Workspace","type":"other-form"},{"name":"cancel-bill-workspace","component":"cancelBillWorkspace","title":"Cancel Bill Workspace","type":"other-form"},{"name":"add-deposit-workspace","component":"addDepositWorkspace","title":"Add Deposit","type":"other-form"},{"name":"deposit-transaction-workspace","component":"depositTransactionWorkspace","title":"Deposit Transaction","type":"other-form"},{"name":"payment-workspace","component":"paymentWorkspace","title":"Payment Workspace","type":"other-form"}],"modals":[{"name":"create-payment-point","component":"createPaymentPoint"},{"name":"clock-out-modal","component":"clockOut"},{"name":"bulk-import-billable-services-modal","component":"bulkImportBillableServicesModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"manage-claim-request-modal","component":"manageClaimRequestModal"},{"name":"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.2750"}
|
package/package.json
CHANGED
|
@@ -36,6 +36,7 @@ import { usePhoneNumberAttribute } from '../../../hooks/usePhoneNumber';
|
|
|
36
36
|
import { formatDateTime } from '../../utils';
|
|
37
37
|
import styles from './claims-form.scss';
|
|
38
38
|
import ClaimsSupportingDocumentsInput from './claims-supporting-documents-inputs.form';
|
|
39
|
+
import { usePatientIdentifier } from '../../../hooks/usePatientIdentifierType';
|
|
39
40
|
|
|
40
41
|
type ClaimsFormProps = {
|
|
41
42
|
bill: MappedBill;
|
|
@@ -61,6 +62,7 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
61
62
|
const { visitAttributeTypes } = useConfig<BillingConfig>();
|
|
62
63
|
const { providers, providersLoading } = useProviderList();
|
|
63
64
|
const { phoneNumber } = usePhoneNumberAttribute(patientUuid);
|
|
65
|
+
const { nationalId, isLoading: isLoadingNationalId, error: errorNationalId } = usePatientIdentifier(patientUuid);
|
|
64
66
|
|
|
65
67
|
const [otpState, setOtpState] = useState<OTPState>(OTPState.NOT_STARTED);
|
|
66
68
|
const [pendingClaimData, setPendingClaimData] = useState<z.infer<typeof ClaimsFormSchema> | null>(null);
|
|
@@ -70,6 +72,7 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
70
72
|
const [currentOtpPhoneNumber, setCurrentOtpPhoneNumber] = useState<string>('');
|
|
71
73
|
|
|
72
74
|
const currentPhoneRef = useRef<string>('');
|
|
75
|
+
const claimSummaryRef = useRef<ClaimSummary | null>(null);
|
|
73
76
|
|
|
74
77
|
const patientName = `${bill.patientName}`;
|
|
75
78
|
const otpExpiryMinutes = 5;
|
|
@@ -186,8 +189,9 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
186
189
|
);
|
|
187
190
|
|
|
188
191
|
const createDynamicOTPHandlers = useCallback(
|
|
189
|
-
(initialPhone: string) => {
|
|
192
|
+
(initialPhone: string, summary: ClaimSummary) => {
|
|
190
193
|
currentPhoneRef.current = initialPhone;
|
|
194
|
+
claimSummaryRef.current = summary;
|
|
191
195
|
|
|
192
196
|
return {
|
|
193
197
|
onRequestOtp: async (phoneNumber: string): Promise<void> => {
|
|
@@ -198,13 +202,12 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
198
202
|
setCurrentOtpPhoneNumber(phoneNumber);
|
|
199
203
|
currentPhoneRef.current = phoneNumber;
|
|
200
204
|
|
|
201
|
-
const
|
|
202
|
-
if (!
|
|
205
|
+
const currentSummary = claimSummaryRef.current;
|
|
206
|
+
if (!currentSummary) {
|
|
203
207
|
throw new Error('No claim data available for OTP request');
|
|
204
208
|
}
|
|
205
209
|
|
|
206
|
-
|
|
207
|
-
await otpManager.requestOTP(phoneNumber, patientName, claimSummary, otpExpiryMinutes);
|
|
210
|
+
await otpManager.requestOTP(phoneNumber, patientName, currentSummary, otpExpiryMinutes, nationalId || null);
|
|
208
211
|
},
|
|
209
212
|
onVerify: async (otp: string): Promise<void> => {
|
|
210
213
|
const phoneForVerification = currentPhoneRef.current;
|
|
@@ -220,7 +223,7 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
220
223
|
},
|
|
221
224
|
};
|
|
222
225
|
},
|
|
223
|
-
[
|
|
226
|
+
[patientName, otpExpiryMinutes, nationalId],
|
|
224
227
|
);
|
|
225
228
|
|
|
226
229
|
const launchOtpVerificationModal = (props: OTPVerificationModalOptions) => {
|
|
@@ -298,6 +301,7 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
298
301
|
setPendingClaimData(null);
|
|
299
302
|
setCurrentOtpPhoneNumber('');
|
|
300
303
|
currentPhoneRef.current = '';
|
|
304
|
+
claimSummaryRef.current = null;
|
|
301
305
|
otpManager.clearAllOTPs();
|
|
302
306
|
|
|
303
307
|
setTimeout(() => {
|
|
@@ -339,12 +343,15 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
339
343
|
return;
|
|
340
344
|
}
|
|
341
345
|
|
|
346
|
+
const claimSummary = generateClaimSummary(data);
|
|
347
|
+
|
|
342
348
|
setPendingClaimData(data);
|
|
343
349
|
setOtpState(OTPState.REQUESTED);
|
|
344
350
|
setCurrentOtpPhoneNumber(phoneNumber);
|
|
345
351
|
currentPhoneRef.current = phoneNumber;
|
|
352
|
+
claimSummaryRef.current = claimSummary;
|
|
346
353
|
|
|
347
|
-
const dynamicHandlers = createDynamicOTPHandlers(phoneNumber);
|
|
354
|
+
const dynamicHandlers = createDynamicOTPHandlers(phoneNumber, claimSummary);
|
|
348
355
|
|
|
349
356
|
setTimeout(() => {
|
|
350
357
|
launchOtpVerificationModal({
|
|
@@ -366,12 +373,25 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
366
373
|
};
|
|
367
374
|
|
|
368
375
|
const handleReopenOTPModal = () => {
|
|
369
|
-
const
|
|
376
|
+
const currentSummary = claimSummaryRef.current;
|
|
377
|
+
if (!currentSummary) {
|
|
378
|
+
showSnackbar({
|
|
379
|
+
kind: 'error',
|
|
380
|
+
title: t('claimError', 'Claim Error'),
|
|
381
|
+
subtitle: t('claimSummaryMissing', 'Claim summary is missing. Please try again.'),
|
|
382
|
+
timeoutInMs: 2500,
|
|
383
|
+
isLowContrast: false,
|
|
384
|
+
});
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
const phoneToUse = currentOtpPhoneNumber || phoneNumber;
|
|
389
|
+
const dynamicHandlers = createDynamicOTPHandlers(phoneToUse, currentSummary);
|
|
370
390
|
|
|
371
391
|
launchOtpVerificationModal({
|
|
372
392
|
otpLength: 5,
|
|
373
393
|
obscureText: false,
|
|
374
|
-
phoneNumber:
|
|
394
|
+
phoneNumber: phoneToUse,
|
|
375
395
|
expiryMinutes: otpExpiryMinutes,
|
|
376
396
|
onRequestOtp: dynamicHandlers.onRequestOtp,
|
|
377
397
|
onVerify: dynamicHandlers.onVerify,
|
|
@@ -384,6 +404,7 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
384
404
|
setPendingClaimData(null);
|
|
385
405
|
setCurrentOtpPhoneNumber('');
|
|
386
406
|
currentPhoneRef.current = '';
|
|
407
|
+
claimSummaryRef.current = null;
|
|
387
408
|
otpManager.clearAllOTPs();
|
|
388
409
|
navigate({
|
|
389
410
|
to: window.getOpenmrsSpaBase() + `home/accounting/patient/${patientUuid}/${billUuid}`,
|
|
@@ -456,6 +477,22 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
456
477
|
</div>
|
|
457
478
|
)}
|
|
458
479
|
|
|
480
|
+
{!nationalId && !isLoadingNationalId && (
|
|
481
|
+
<div className={styles.notificationContainer}>
|
|
482
|
+
<InlineNotification
|
|
483
|
+
kind="warning"
|
|
484
|
+
title={t('noNationalId', 'No National ID')}
|
|
485
|
+
subtitle={t(
|
|
486
|
+
'noNationalIdFound',
|
|
487
|
+
'No national ID found for this patient. This may affect claim processing.',
|
|
488
|
+
)}
|
|
489
|
+
hideCloseButton={true}
|
|
490
|
+
lowContrast={true}
|
|
491
|
+
className={styles.notification}
|
|
492
|
+
/>
|
|
493
|
+
</div>
|
|
494
|
+
)}
|
|
495
|
+
|
|
459
496
|
{otpState === OTPState.REQUESTED && (
|
|
460
497
|
<div className={styles.notificationContainer}>
|
|
461
498
|
<InlineNotification
|
package/src/config-schema.ts
CHANGED
|
@@ -36,6 +36,7 @@ export interface BillingConfig {
|
|
|
36
36
|
};
|
|
37
37
|
localeCurrencyMapping: Record<string, string>;
|
|
38
38
|
phoneNumberAttributeTypeUUID: string;
|
|
39
|
+
nationalIdIdentifierTypeUUID: string;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export const configSchema: ConfigSchema = {
|
|
@@ -74,6 +75,11 @@ export const configSchema: ConfigSchema = {
|
|
|
74
75
|
_description: 'The person attribute type uuid for phone number',
|
|
75
76
|
_default: 'b2c38640-2603-4629-aebd-3b54f33f1e3a',
|
|
76
77
|
},
|
|
78
|
+
nationalIdIdentifierTypeUUID: {
|
|
79
|
+
_type: Type.String,
|
|
80
|
+
_description: 'The person attribute type uuid for national id',
|
|
81
|
+
_default: '49af6cdc-7968-4abb-bf46-de10d7f4859f',
|
|
82
|
+
},
|
|
77
83
|
hieBaseUrl: {
|
|
78
84
|
_type: Type.String,
|
|
79
85
|
_description: 'HIE Base URL for getting interventions and benefit packages',
|