-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
O3-2879 Add billing form and billing history to patient chart #8
Conversation
@@ -64,10 +68,21 @@ const BillHistory: React.FC<BillHistoryProps> = ({ patientUuid }) => { | |||
const setBilledItems = (bill) => | |||
bill.lineItems.reduce((acc, item) => acc + (acc ? ' & ' : '') + (item.billableService || item.item || ''), ''); | |||
|
|||
const formatCurrency = (amount) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract this utility to a utils file so it can be reused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be duplication actually, using the function Cynthia adjusted
const currencyCode = defaultCurrency._default || 'UGX'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this? there's a PR from Cynthia that was merged and resolves this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ODORA0 , i have left a few comments
@@ -42,6 +44,8 @@ const BillHistory: React.FC<BillHistoryProps> = ({ patientUuid }) => { | |||
const { paginated, goTo, results, currentPage } = usePagination(bills, PAGE_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add the page sizes to the config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense
|
||
const postBillItems = () => { | ||
const bill = { | ||
cashPoint: '54065383-b4d4-42d2-af4d-d250a1fd2590', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these concepts or uuids from the api?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, UUID from the API not concepts
quantity: parseInt(item.Qnty), | ||
price: item.Price, | ||
priceName: 'Default', | ||
priceUuid: '7b9171ac-d3c1-49b4-beff-c9902aee5245', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
<TableCell></TableCell> | ||
<TableCell></TableCell> | ||
<TableCell style={{ fontWeight: 'bold' }}>Grand Total:</TableCell> | ||
<TableCell id="GrandTotalSum">{grandTotal}</TableCell> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could try adding the prefix of the currency from the config
Requirements
For changes to apps
If applicable
Summary
This PR adds the ability to launch the billing form from the billing history in the patient chart
Screenshots
Screen.Recording.2024-02-21.at.20.14.20.mov
Related Issue
Other