@kenyaemr/esm-billing-app 5.4.2-pre.2308 → 5.4.2-pre.2314
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 +1 -1
- package/dist/985.js +1 -1
- package/dist/985.js.map +1 -1
- package/dist/kenyaemr-esm-billing-app.js.buildmanifest.json +6 -6
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/claims/dashboard/form/claims-form.component.tsx +4 -4
- package/src/claims/utils.ts +0 -18
- package/src/invoice/invoice.component.tsx +3 -6
- package/src/invoice/invoice.resource.ts +6 -7
- package/src/types/index.ts +1 -10
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"}],"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.2314"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenyaemr/esm-billing-app",
|
|
3
|
-
"version": "5.4.2-pre.
|
|
3
|
+
"version": "5.4.2-pre.2314",
|
|
4
4
|
"description": "Billing app for KenyaEMR",
|
|
5
5
|
"browser": "dist/kenyaemr-esm-billing-app.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"lodash-es": "^4.17.15",
|
|
41
|
-
"react-to-print": "
|
|
41
|
+
"react-to-print": "2.14.13"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@carbon/react": "1.x",
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
ComboBox,
|
|
15
15
|
} from '@carbon/react';
|
|
16
16
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
17
|
-
import { navigate, showSnackbar, useConfig, useSession } from '@openmrs/esm-framework';
|
|
17
|
+
import { navigate, showSnackbar, toOmrsIsoString, useConfig, useSession } from '@openmrs/esm-framework';
|
|
18
18
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
19
19
|
import { Controller, FormProvider, useForm } from 'react-hook-form';
|
|
20
20
|
import { useTranslation } from 'react-i18next';
|
|
@@ -32,7 +32,7 @@ import useProviderList from '../../../hooks/useProviderList';
|
|
|
32
32
|
|
|
33
33
|
import styles from './claims-form.scss';
|
|
34
34
|
import debounce from 'lodash-es/debounce';
|
|
35
|
-
import {
|
|
35
|
+
import { formatDateTime } from '../../utils';
|
|
36
36
|
|
|
37
37
|
type ClaimsFormProps = {
|
|
38
38
|
bill: MappedBill;
|
|
@@ -210,8 +210,8 @@ const ClaimsForm: React.FC<ClaimsFormProps> = ({ bill, selectedLineItems }) => {
|
|
|
210
210
|
providedItems,
|
|
211
211
|
claimExplanation: data.claimExplanation,
|
|
212
212
|
claimJustification: data.claimJustification,
|
|
213
|
-
startDate:
|
|
214
|
-
endDate:
|
|
213
|
+
startDate: toOmrsIsoString(data.treatmentStart),
|
|
214
|
+
endDate: toOmrsIsoString(data.treatmentEnd),
|
|
215
215
|
location: mflCodeValue,
|
|
216
216
|
diagnoses: data.diagnoses,
|
|
217
217
|
paidInFacility: true,
|
package/src/claims/utils.ts
CHANGED
|
@@ -48,21 +48,3 @@ export const formatDateTime = (dateString: string) => {
|
|
|
48
48
|
const date = new Date(dateString);
|
|
49
49
|
return date.toLocaleString();
|
|
50
50
|
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Converts a formatted date string back to ISO format
|
|
54
|
-
* @param {string} formattedDate - Date string in locale format (e.g., "7/22/2025, 3:03:43 PM")
|
|
55
|
-
* @returns {string} - ISO date string (e.g., "2025-07-22T15:03:43.000Z")
|
|
56
|
-
*/
|
|
57
|
-
export const convertFormattedDateToISO = (formattedDate) => {
|
|
58
|
-
if (!formattedDate) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
const date = new Date(formattedDate);
|
|
64
|
-
return date.toISOString();
|
|
65
|
-
} catch {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
@@ -28,16 +28,16 @@ import { convertToCurrency } from '../helpers';
|
|
|
28
28
|
import { usePaymentsReconciler } from '../hooks/use-payments-reconciler';
|
|
29
29
|
import { LineItem, MappedBill } from '../types';
|
|
30
30
|
import InvoiceTable from './invoice-table.component';
|
|
31
|
-
import { useShaFacilityStatus } from './invoice.resource';
|
|
32
31
|
import styles from './invoice.scss';
|
|
33
32
|
import Payments from './payments/payments.component';
|
|
34
33
|
import capitalize from 'lodash-es/capitalize';
|
|
35
34
|
import { mutate } from 'swr';
|
|
36
35
|
import startCase from 'lodash-es/startCase';
|
|
36
|
+
import { useCheckShareGnum } from './invoice.resource';
|
|
37
37
|
|
|
38
38
|
const Invoice: React.FC = () => {
|
|
39
39
|
const { t } = useTranslation();
|
|
40
|
-
const {
|
|
40
|
+
const { checkSHARegNum } = useCheckShareGnum();
|
|
41
41
|
const { billUuid, patientUuid } = useParams();
|
|
42
42
|
const { patient, isLoading: isLoadingPatient, error: patientError } = usePatient(patientUuid);
|
|
43
43
|
const { bill, isLoading: isLoadingBill, error: billingError } = useBill(billUuid);
|
|
@@ -51,10 +51,7 @@ const Invoice: React.FC = () => {
|
|
|
51
51
|
const isProcessClaimsFormEnabled = useFeatureFlag('healthInformationExchange');
|
|
52
52
|
|
|
53
53
|
const isShaFacilityStatusValid =
|
|
54
|
-
|
|
55
|
-
shaFacilityStatus.shaFacilityId &&
|
|
56
|
-
shaFacilityStatus.operationalStatus &&
|
|
57
|
-
shaFacilityStatus?.registrationNumber;
|
|
54
|
+
checkSHARegNum?.registrationNumber && checkSHARegNum.registrationNumber.trim() !== '';
|
|
58
55
|
|
|
59
56
|
const handleSelectItem = (lineItems: Array<LineItem>) => {
|
|
60
57
|
const paidLineItems = bill?.lineItems?.filter((item) => item.paymentStatus === 'PAID') ?? [];
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
Visit,
|
|
10
10
|
} from '@openmrs/esm-framework';
|
|
11
11
|
import useSWR from 'swr';
|
|
12
|
-
import { type
|
|
12
|
+
import { type checkSHARegNumResponse } from '../types';
|
|
13
13
|
|
|
14
14
|
export interface VisitQueueEntry {
|
|
15
15
|
queueEntry: VisitQueueEntry;
|
|
@@ -90,20 +90,19 @@ export function removeQueuedPatient(
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
export const
|
|
93
|
+
export const useCheckShareGnum = () => {
|
|
94
94
|
const { authenticated } = useSession();
|
|
95
|
+
const url = `${restBaseUrl}/kenyaemr/checksharegnum`;
|
|
95
96
|
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
const { data, isLoading, error, mutate } = useSWR<FetchResponse<ShaFacilityStatusResponse>>(
|
|
97
|
+
const { data, isLoading, error, mutate } = useSWR<FetchResponse<checkSHARegNumResponse>>(
|
|
99
98
|
authenticated ? url : null,
|
|
100
99
|
openmrsFetch,
|
|
101
100
|
);
|
|
102
101
|
|
|
103
|
-
const
|
|
102
|
+
const checkSHARegNum = data?.data;
|
|
104
103
|
|
|
105
104
|
return {
|
|
106
|
-
|
|
105
|
+
checkSHARegNum,
|
|
107
106
|
isLoading,
|
|
108
107
|
error,
|
|
109
108
|
mutate,
|
package/src/types/index.ts
CHANGED
|
@@ -628,15 +628,6 @@ export interface ProgressTracker {
|
|
|
628
628
|
success?: number;
|
|
629
629
|
failed?: number;
|
|
630
630
|
}
|
|
631
|
-
export interface
|
|
632
|
-
operationalStatus: string;
|
|
633
|
-
approved: string;
|
|
634
|
-
kephLevel: string;
|
|
635
|
-
shaFacilityId: string;
|
|
636
|
-
shaFacilityExpiryDate: string;
|
|
631
|
+
export interface checkSHARegNumResponse {
|
|
637
632
|
registrationNumber: string;
|
|
638
|
-
mflCode: string;
|
|
639
|
-
shaFacilityLicenseNumber: string;
|
|
640
|
-
facilityRegistryCode: string;
|
|
641
|
-
source: string;
|
|
642
633
|
}
|