ohcnetwork / care_fe

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://care.ohc.network
MIT License
252 stars 437 forks source link

Discharge diagnosis #8299

Closed aparnacoronasafe closed 1 month ago

aparnacoronasafe commented 3 months ago

Is your feature request related to a problem? Please describe. When a patient is admitted, the diagnosis is marked by the doctor usually at the time of first consultation. This is then revised multiple times through the admission. Both the diagnosis itself or the diagnosis type alone may be updated during the term of admission.

It is important to prompt the user to update the diagnosis for a final time right before discharge.

This is important since the patient may not be completely disease-free at discharge. He may simply be free of the life-threatening condition but may still have many underlying chronic illnesses for which the doctor may have suggested some medication in the discharge prescription field.

Describe the solution you'd like For an encounter with "Admission", based on the discharge reason, make the following edits in the discharge pop-up

  1. RECOVERED
  1. REFERRAL
  1. LAMA

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

JOSHIK27 commented 2 months ago

I would like to work on this issue if the submission of the new field i.e 'Diagnosis at discharge' is handled by the backend api endpoint [ /api/v1/consultation/{id}/discharge_patient/ ] @rithviknishad

rithviknishad commented 2 months ago

Yes @JOSHIK27

However, there's a reusable component EditDiagnosesBuilder. You could simply use that.

To populate it with initial value, you could use the useQuery hook with the pre-defined API route for fetching consultation diagnosis instead of manually calling the specified API.

Creation of new diagnosis entries and updating of existing diagnosis entries is handled automatically by the component itself. No need to write any API calls related logic for it.

JOSHIK27 commented 2 months ago

Sure. Thanks

Yes @JOSHIK27

However, there's a reusable component EditDiagnosesBuilder. You could simply use that.

To populate it with initial value, you could use the useQuery hook with the pre-defined API route for fetching consultation diagnosis instead of manually calling the specified API.

Creation of new diagnosis entries and updating of existing diagnosis entries is handled automatically handled by the component itself. No need to write any API calls related logic for it.

JOSHIK27 commented 2 months ago

https://github.com/user-attachments/assets/b22c237a-5365-43c1-98fb-9d96937091cb

I have added the section 'Diagnosis at discharge' and changed the order as instructed above. I fetched the diagnosis from corresponding end point using useQuery hook as you told @rithviknishad. Let me know if its what you needed.

rithviknishad commented 2 months ago

Yup! Raise the PR

JOSHIK27 commented 2 months ago

Here's the pr #8390 @rithviknishad