Skip to content
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

Dispensing: Payments Modal (select insurance) #6176

Closed
8 tasks
Tracked by #6000
jmbrunskill opened this issue Jan 20, 2025 · 3 comments · Fixed by #6413
Closed
8 tasks
Tracked by #6000

Dispensing: Payments Modal (select insurance) #6176

jmbrunskill opened this issue Jan 20, 2025 · 3 comments · Fixed by #6413
Assignees
Labels
feature: dispensing Team Piwakawaka James, Carl, John, Zachariah
Milestone

Comments

@jmbrunskill
Copy link
Contributor

jmbrunskill commented Jan 20, 2025

Payments Modal

If the system has any insurance providers setup & if the invoice total is > 0, when clicking the finalise button, show a payments modal.

This modal will show the total to pay, and allow the user to select the insurance details

Image

The insurance data in this modal will be saved in mSupply insurance fields (they'll need to be added to the invoice table)
Image

This modal will be extendable via a plugin in future.

Other data might be saved by plugins, such as amount paid, this will be only available via plugin data.

If store pref Receive payments from prescription window is enabled, instead of the current Confirm Verified button, show a Pay button that opens a modal with the payment workflow.

Notes

  • Add dedicated Payments

    • Add a panel dedicated to price split showing the total price of the prescription (sell price per item x units)

      • Total to be paid by patient

Tasks

  • The insurance policy selected should be synced to mSupply as nameInsuranceJoinId
  • The amount paid by insurance should be synced to mSupply as insuranceDiscountAmount
  • The discount percentage from the selected policy should be synced to mSupply as insuranceDiscountRate

Acceptance Criteria 🧾

  • When there's a 0 cost for the prescription, no Payment window shows on finalise
  • If there are no insurance providers configured, no Payment window shows on finalise
  • Payment window shows correct total price for the prescription
  • The user can select an insurance policy (if configured for the current patient)
  • Insurance policy should show the discount rate and policy type (Family or Personal)

Epic Link 🔗

#6000

Moneyworks Jobcode 🧰

OMS:CIDV

@jmbrunskill
Copy link
Contributor Author

The amount paid will recorded as a cash_in transaction in OMS = invoice
Given the desire to not create cash_in transactions, we're looking at storing the data as plugin data

Also evaluating if we can do this as a plugin, as we don't have global prefs implemented...

@jmbrunskill
Copy link
Contributor Author

Questions:

  • Is it ok to have a separate pay button instead of replacing the finalise button?
  • Should we skip the payment step if the amount to pay is 0?

@jmbrunskill jmbrunskill changed the title Dispensing: Payments Modal Dispensing: Payments Modal (select insurance) Jan 27, 2025
@GeronimoJohn GeronimoJohn self-assigned this Jan 29, 2025
@GeronimoJohn GeronimoJohn self-assigned this Feb 3, 2025
@GeronimoJohn
Copy link
Contributor

The PR above sets up the necessary groundwork to render various text fields in the payments modal. This modal will only be displayed when the cost is greater than $0 upon finalise/verified. Currently, it only shows the total amount that a patient is required to pay.

The rest of the text fields - Insurance Scheme, % Covered, Total to be paid by insurance can be added once #6289 have been worked on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: dispensing Team Piwakawaka James, Carl, John, Zachariah
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants