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

Migrate to a New Model for Storing Vaccination Details of a Patient #7876

Open
3 tasks
gigincg opened this issue May 21, 2024 · 16 comments · May be fixed by #8035
Open
3 tasks

Migrate to a New Model for Storing Vaccination Details of a Patient #7876

gigincg opened this issue May 21, 2024 · 16 comments · May be fixed by #8035

Comments

@gigincg
Copy link
Member

gigincg commented May 21, 2024

Currently CARE only supports storage of Vaccination details related to COVID. We need to generalise this and create a new model to store all vaccination details of a patient. Thereby removing these fields from the PatientRegistration Table. The Vaccination model should store comprehensive vaccination information to track a patient’s vaccination history effectively.

  • Backend Changes to create the new model PatientVaccination & related viewsets and serializers with Suggestive Fields:
    • patient (ForeignKey to PatientRegistration)
    • vaccine_name (choices from vaccineEnum)
    • date_of_vaccination (DateField)
    • dose_number (PositiveIntegerField, default 1)
    • vaccination_center (CharField, max_length=255)
    • batch_number (CharField, max_length=100)
    • created_by (ForeignKey to User)
    • last_edited_by (ForeignKey to User)
  • Create Mockups/Suggestion for handling the same in the UI.
  • Frontend Changes in PatientRegistration Form, Patient Profile, Link in Patient Dashboard for Vaccination Details
@hrit2773
Copy link
Contributor

hrit2773 commented May 24, 2024

@gigincg @rithviknishad can you assign this to me

@gigincg
Copy link
Member Author

gigincg commented May 26, 2024

Hey @hrit2773 Can you outline your plan for solving this issue?

@Atharva-Kanherkar
Copy link

@gigincg I would love to work on the issue too. I have worked with creating models for databases, mainly in typescript and graphQL. I would love to contribute.

@gigincg
Copy link
Member Author

gigincg commented May 26, 2024

@Atharva-Kanherkar The Care backend is in Django/Python. If you wanna take this up, please do explain your approach.

Since this is a core issue, we can only assign this issue post design discussions. If you would prefer to discuss over our community calls, you can find the invites in our slack

@hrit2773
Copy link
Contributor

hrit2773 commented May 28, 2024

Screenshot 2024-05-28 163450
@gigincg the form may look like this. Once the user enters "Yes" for the question "Is patient Vaccinated?" this will be visible and vaccine name will be a search and select form field

@hrit2773
Copy link
Contributor

Screenshot 2024-05-28 170621
@gigincg we can create a table kind of layout instead of just vaccine name, last vaccinated on, number of doses. This would show all the vaccination details of the patient for multiple vaccines he/she has taken.

@hrit2773
Copy link
Contributor

@gigincg and for backend new model Patient Vaccination can be created along with its serializers and viewsets. So backend can be done as specified along with proper validations. I can start working on both frontend and backend once this is approved

@hrit2773
Copy link
Contributor

hrit2773 commented May 28, 2024

@gigincg and for vaccine name choices we can add new vaccine names. Will find the names from web

@hrit2773
Copy link
Contributor

@gigincg any other changes from your side? Plz let me know

@gigincg
Copy link
Member Author

gigincg commented May 29, 2024

@hrit2773 Assigning you the issue.

Your appriach sounds good.

Given the backend changes and migrations required, file a PR to the github.com/coronasafe/docs repo explaining the Model Changes and Migrations you will be doing before working on dev. Also please confirm if you will be making both the FE and BE PRs required.

@hrit2773
Copy link
Contributor

@gigincg Yes I will be doing both frontend and Backend PR's and will raise a draft PR explaining the model changes

@hrit2773
Copy link
Contributor

hrit2773 commented May 29, 2024

@gigincg coronasafe/docs#27 can you just review this. I have updated both the model changes in the backend and the frontend mockups

@gigincg
Copy link
Member Author

gigincg commented Jun 2, 2024

@hrit2773 Reviewed the docs, take a look at the notes and go ahead with the implementation (Backend and Frontend PRs)

Copy link

Hi, @coronasafe/care-frontend-maintainers, This issue has been automatically marked as stale because it has not had any recent activity.

@github-actions github-actions bot added the stale label Jun 17, 2024
@hrit2773 hrit2773 linked a pull request Jun 18, 2024 that will close this issue
@hrit2773
Copy link
Contributor

@hrit2773
Copy link
Contributor

@gigincg can you plz review the frontend and backend changes. I have completed all the functionalities. Any small UI changes required? will do them immediately. cc: @rithviknishad

@github-actions github-actions bot removed the stale label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants