Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track previous consultation consultations #1806

Closed
2 tasks
rithviknishad opened this issue Jan 4, 2024 · 12 comments
Closed
2 tasks

Track previous consultation consultations #1806

rithviknishad opened this issue Jan 4, 2024 · 12 comments
Assignees

Comments

@rithviknishad
Copy link
Member

rithviknishad commented Jan 4, 2024

Required Changes

  • Schema Change: Add foreign key field: last_consultation (null if no previous consultation present)
  • Custom Migration to populate the last_consultation field and add logic to fill this field for existing data.
@rithviknishad
Copy link
Member Author

Adding this raises a concern, if a patient is readmitted to a different facility, the newer facility should not be able to access this information

@rithviknishad
Copy link
Member Author

If the pre-readmission consultation's facility is not the same as the current consultation, the serializer should redact the consultation object.

@sainak
Copy link
Member

sainak commented Jan 6, 2024

@rithviknishad why don't we just return the external_id of the previous consultation and let the use navigate to the consultation? This would take care of the access control and would also avoid nested serialization

@rithviknishad
Copy link
Member Author

Yup! That's much simpler and cleaner!

@rithviknishad
Copy link
Member Author

rithviknishad commented Jan 6, 2024

(Possible since we now have the /consultation/id redirecting route in frontend

@Bhavik-ag
Copy link
Contributor

Hey @rithviknishad I am working on this issue !! Please assign me.

@rithviknishad
Copy link
Member Author

As discussed, let's add a field called: last_consultation instead of readmission_consultation.
This new field would be irrelevant to whether the current consultation is a readmission or not.
i.e.,

  • If a patient had a second or Nth (n != 1) consultation filed even after 30 days from the previous consultation, we would still have last_admission with a value and readmission=False.

  • If a patient had a second or Nth (n != 1) consultation filed within 30 days from the previous consultation discharge, we would still have last_admission with a value and readmission=True.

cc: @Bhavik-ag @sainak

@rithviknishad rithviknishad changed the title Track previous consultation for readmission consultations Track previous consultation consultations Jan 16, 2024
@Omkar76
Copy link
Contributor

Omkar76 commented Feb 3, 2024

Please assign me

@rithviknishad
Copy link
Member Author

@Bhavik-ag unassigning due to no activity

@rithviknishad rithviknishad assigned Omkar76 and unassigned Bhavik-ag Feb 3, 2024
@Bhavik-ag
Copy link
Contributor

Bhavik-ag commented Feb 8, 2024

@rithviknishad Yup go ahead !!

@DraKen0009
Copy link
Contributor

@Omkar76 If you aren't currently working on this issue , can I work on it?

@Omkar76
Copy link
Contributor

Omkar76 commented Feb 22, 2024

Hi @DraKen0009, I'm done implementing the requirements. I was just verifying the migrations locally. I will be sending a PR for this one in few minutes.
Feel free to take unassigned issues from here https://github.com/coronasafe/care/issues?q=is%3Aissue+is%3Aopen+no%3Aassignee 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants