serenity-health / roadmap

Public roadmap for development of Serenity's apps reported by our community of users
0 stars 1 forks source link

bugfix/prevent payment method access on a suspended employee #99

Closed TuyizereBapt closed 2 years ago

TuyizereBapt commented 2 years ago

Describe the bug Can access the payment method of a suspended employee

Impact Insurance payer can lose money if they pay for suspended employees's medical bills?

To Reproduce Steps to reproduce the behavior:

  1. Add yourself as an employee to one of the corporate clients we have set up
  2. Suspend your self from that company
  3. Start a visit and attempt to pay via that company (this should not be possible)

Expected behavior

  1. When retrieving a patient's payment method, this account should also not be available for use
  2. When paying for a charge item, payment should not be processed if the account is suspended.

Additional context N/A

TuyizereBapt commented 2 years ago

I thnk I fixed the bug. The error was that always PatientAccounts where the provider was the managing_organization and owned by the employee user were being suspended. This is due to misunderstandings I had earlier when I started working. So now the correct PatientAccounts managed by the organization where the employee actually works are suspended