serenity-health / roadmap

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

feature/set patient last mode of payment as default payment method on checkout/payment #89

Closed chris-dare closed 2 years ago

chris-dare commented 2 years ago

Tell us about your request! It would be helpful to display the last mode of payment that the patient used when checking out a bill payment. So if I paid via Clearspace on my last visit, the default category should be corporate with Clearspace selected by default. When checking out. If I changed the payment method, then that now becomes my last used payment method

Which app does this concern? Provider portal

What will be benefit of this feature? What's the value of this feature? If you can quantity it, that would be awesome!

Describe the solution you'd like

  1. On the backend, update the patient profile to store: a. The last payment method used b. The account uuid of the account used to pay (if cash, then this will be set to None) Expose this in retrieving the details of a patient on GET
  2. On the frontend, implement the feature based on the API update

Describe alternatives you've considered N/A

Additional context

38

63

chris-dare commented 2 years ago

Hi @TuyizereBapt, here's what you need to do on the API side of things:

  1. Extend the Patient model to save the following fields: a. previous_payment_method: Textchoice based on base.choices.PaymentMethodType b. previous_patient_account_uuid (UUIDField)

  2. In ChargeItem.settle_payment, once the account is used to settle the payment, set the patient previous payment method and account to the charge item's payment method and patient account (if a patient account was used)

  3. Document PatientAccount.pay_for_charge_items() -> This is for @dexios1 to do

  4. Update PatientAccount.pay_for_charge_items() such that it sets charge_item.patient_account and charge_item.payer_account after a payment for a charge item is successful

chris-dare commented 2 years ago

@pkdadson this is up for integration.

Look out for these new fields:

previous_payment_method (will be empty or one of the payment method types: cash, corporate, user account or insurance) previous_patient_account_uuid = will be empty if the previous_payment_method is null or cash

chris-dare commented 2 years ago

@pkdadson please let me know when it's integrated on the frontend

chris-dare commented 2 years ago

Notes from review:

API is setting the details but needs to be done on the frontend as well.

Here's what we're getting: Nothing selected by default image

Here's what we should be doing instead: Previous payment method selected by default: image

pkdadson commented 2 years ago

done @dexios1