serenity-health / roadmap

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

feature/update restrictions for ending a consultation #88

Open chris-dare opened 2 years ago

chris-dare commented 2 years ago

Tell us about your request! We need to set the minimum requirement for end a consultation to the following:

  1. At least one entry for: a. Chief complaint b. Diagnoses c. Care plan

Which app does this concern? Provider portal

What will be benefit of this feature? Doctors will follow the right process to treat patients

Describe the solution you'd like

  1. On the frontend: a. Implement a restriction to end a consultation only if the requirements have been met. (The previous requirements will need to be eased i.e. service requests and prescription) b. When a doctor tries to exit the encounter wizard via any of the following means:
    • Switching a workspace
    • Accessing another page
    • Closing the browser tab They should be prompted that they are exiting without completing the consultation: "Hi {title} {first_name}, you are exiting an unfinished encounter. Are you sure you want to proceed?"
  2. On the backend, update the method to end a consultation such that it only ends if the requirements have been met

Describe alternatives you've considered N/A

Additional context N/A

chris-dare commented 2 years ago

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

Update encounter.models.Encounter.end() to do the following:

  1. Confirm that there is one entry for encounter.chief_complaint
  2. Confirm that there is one entry for encounter.history_of_presenting_illness
  3. Confirm that there is at least one care plan linked to that encounter (see encounter.models.CarePlan)
  4. Confirm that there is at least one recorded EncounterDiagnosis linkend to that encounter (see encounter.models.EncounterDiagnosis) The encounter should end successfully if and only if these 4 conditions have been met. If there are not met, it should throw an error telling the user which information they are yet to provide. e.g. "Sorry, you cannot end this encounter until you record a care plan! Would you like to do that now?"
seddie62 commented 2 years ago

@dexios1 so when they're leaving the screen should they be forced to end the encounter?

chris-dare commented 2 years ago

@dexios1 so when they're leaving the screen should they be forced to end the encounter?

Yes please.

If I attempt to close the browser, I should get a prompt telling me that I have not yet completed the encounter and tell me what inputs are missing so I can go to those areas and complete them

Same for exiting the encounter wizard to another page