Skip to content

Commit

Permalink
Fix/fix patient redirection in billing
Browse files Browse the repository at this point in the history
Fix/fix patient redirection in billing
  • Loading branch information
Michaelndula authored Nov 20, 2024
2 parents 07fff6e + dd2a640 commit 48e4619
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/esm-billing-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ehospital/esm-billing-app",
"version": "1.0.6",
"version": "1.0.7",
"description": "Billing frontend module for use in O3",
"browser": "dist/ehospital-esm-billing-app.js",
"main": "src/index.ts",
Expand Down Expand Up @@ -120,5 +120,5 @@
"*.{js,jsx,ts,tsx}": "eslint --cache --fix"
},
"packageManager": "[email protected]",
"gitHead": "27f80c085bda44314a96269a35c1a13907758a0d"
"gitHead": "6202441056f704884709c18ffde63df9b6464cb3"
}
13 changes: 11 additions & 2 deletions packages/esm-billing-app/src/bills-table/bills-table.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ const BillsTable = () => {
header: t('billedItems', 'Billed Items'),
key: 'billedItems',
},
{
header: t('itemPrice', 'Price'),
key: 'billingPrice',
},
{
header: t('billStatus', 'Status'),
key: 'status'
}
];

const searchResults = useMemo(() => {
Expand Down Expand Up @@ -90,7 +98,7 @@ const BillsTable = () => {
const setBilledItems = (bill) =>
bill?.lineItems?.reduce((acc, item) => acc + (acc ? ' & ' : '') + (item.billableService || item.item || ''), '');

const billingUrl = '${openmrsSpaBase}/home/billing/patient/${patientUuid}/${uuid}';
const billingUrl = '${openmrsSpaBase}/billing/patient/${patientUuid}/${uuid}';

const rowData = results?.map((bill, index) => {
return {
Expand All @@ -108,7 +116,8 @@ const BillsTable = () => {
identifier: bill.identifier,
department: '--',
billedItems: setBilledItems(bill),
billingPrice: '--',
billingPrice: bill.totalAmount,
status: bill.status
};
});

Expand Down

0 comments on commit 48e4619

Please sign in to comment.