Tell us about your request!
Corporate admins would like to suspend employees from receiving coverage from their organizations
Which app does this concern?
Provider portal
What will be benefit of this feature?
This will lower the risk of claim disputes since suspended employees will not have the option to pay with that organizaiton.
Describe the solution you'd like
Implement a method on patient.models.PatientAccount called suspend.
def suspend(suspended_by: User, asof: datetime.datetime):
# set the status of the employee to `patient.choices.PatientUserAccountStatus.SUSPENDED`
# record the action history for the patient account
# return the patient account and action history just like in patient.models.PatientAccount.create
Implement a method on organization.models.Employee called 'suspend`. This method should suspend all patients accounts managed by the employee's organization AND owned by the user linked to that employee:
def suspend(self, request: HttpRequest, organization: Organization):
# find patient accounts owned by self.user and managed by organization
# for each patient account, suspend
# return the employee
Be sure to catch appropriate exceptions
Create a TextChoice for Employee action types. Call this BenefactorActionType. It should support the following options:
a. CREATE
b. SUSPEND
c. ACTIVATE
Hint: See diagnostics.choices.DiagnosticReportActionType for inspiration
Implement a method on organization.models.Employee called process_action
If the action is BenefactorActionType.SUSPEND, call the self.suspend method and return the employee instance that comes from it.
See diagnostics.models.DiagnosticReport.process_action method for inspiration
Update fhirresourcemanager.models.Patient.get_patient_accounts_of_user_with_patient_mobile.
a. Add a new parameter called account_status: typing.List. Give it a default of [PatientUserAccountStatus.ACTIVE, PatientUserAccountStatus.CREATED]
b. In this same method, update the qeurying patient accounts to retrieve PatientAccounts which have any of the statuses in the account_status list
Hint: See patient_accounts = PatientAccount.objects.filter( owner__in=related_users, account_type__in=account_types )
Tell us about your request! Corporate admins would like to suspend employees from receiving coverage from their organizations
Which app does this concern? Provider portal
What will be benefit of this feature? This will lower the risk of claim disputes since suspended employees will not have the option to pay with that organizaiton.
Describe the solution you'd like
Implement a method on patient.models.PatientAccount called
suspend
.Implement a method on
organization.models.Employee
called 'suspend`. This method should suspend all patients accounts managed by the employee's organization AND owned by the user linked to that employee:Be sure to catch appropriate exceptions
Create a TextChoice for Employee action types. Call this
BenefactorActionType
. It should support the following options: a. CREATE b. SUSPEND c. ACTIVATE Hint: Seediagnostics.choices.DiagnosticReportActionType
for inspirationImplement a method on
organization.models.Employee
calledprocess_action
If the action is BenefactorActionType.SUSPEND, call the
self.suspend
method and return the employee instance that comes from it. Seediagnostics.models.DiagnosticReport.process_action
method for inspirationUpdate
fhirresourcemanager.models.Patient.get_patient_accounts_of_user_with_patient_mobile
. a. Add a new parameter calledaccount_status: typing.List
. Give it a default of[PatientUserAccountStatus.ACTIVE, PatientUserAccountStatus.CREATED]
b. In this same method, update the qeurying patient accounts to retrieve PatientAccounts which have any of the statuses in theaccount_status
list Hint: Seepatient_accounts = PatientAccount.objects.filter( owner__in=related_users, account_type__in=account_types )
Implement an API endpoint to suspend a benefactor See the specification here: https://serenity-health.readme.io/reference/accounts#suspend-a-benefactor
Describe alternatives you've considered N/A
Additional context Related issues: https://github.com/serenity-health/roadmap/issues/23