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

Encounter Symptoms #2095

Closed
wants to merge 19 commits into from
Closed

Encounter Symptoms #2095

wants to merge 19 commits into from

Conversation

hrit2773
Copy link
Contributor

@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins

@hrit2773
Copy link
Contributor Author

@rithviknishad I have added a JSON field symptoms_with_dates where each object stores date and list of symptoms. And also overridden the to_representation() method of patient consultation serializers to sort the symptoms timeline based on date(viewing in chronological order as mentioned in the issue). Can you plz confirm these changes.

care/facility/models/patient_consultation.py Outdated Show resolved Hide resolved
care/facility/api/serializers/patient_consultation.py Outdated Show resolved Hide resolved
care/facility/api/serializers/patient_consultation.py Outdated Show resolved Hide resolved
care/facility/api/serializers/patient_consultation.py Outdated Show resolved Hide resolved
@hrit2773
Copy link
Contributor Author

hrit2773 commented May 6, 2024

@rithviknishad ok thats fine but the issue is django.db.utils.ProgrammingError: column "symptom" of relation "facility_consultationsymptoms" does not exist
LINE 1: ..._id", "created_date", "modified_date", "deleted", "symptom",... bulk create is actually unable to identify symptom I guess

care/facility/models/patient_consultation.py Outdated Show resolved Hide resolved
care/facility/models/patient_base.py Outdated Show resolved Hide resolved
Co-authored-by: Rithvik Nishad <[email protected]>
Co-authored-by: Aakash Singh <[email protected]>
@rithviknishad
Copy link
Member

rithviknishad commented May 20, 2024

@sainak For the migration of existing data to the new table, as discussed the following is to be done:

  • All symptoms collected on the consultation table should be present in the new table. The onset date for each new record would be the same as the symptoms_onset_date present in the consultation record.
  • All symptoms collected from ALL of the related daily rounds also needs to be added to the new table IF that symptom was NOT already recorded in the related consultation table. The onset date for such records would be the created_date of the daily round.

@rithviknishad rithviknishad changed the title consultation depth backend Encounter Symptoms May 20, 2024
@sainak sainak marked this pull request as ready for review May 20, 2024 14:37
@sainak sainak requested a review from a team as a code owner May 20, 2024 14:37
rithviknishad

This comment was marked as resolved.

Copy link

codecov bot commented May 21, 2024

Codecov Report

Attention: Patch coverage is 64.58333% with 68 lines in your changes are missing coverage. Please review.

Project coverage is 62.72%. Comparing base (51ce81e) to head (ebb24fc).
Report is 90 commits behind head on develop.

Current head ebb24fc differs from pull request most recent head 0321cfe

Please upload reports for the commit 0321cfe to get more accurate results.

Files Patch % Lines
...e/facility/api/serializers/consultation_symptom.py 45.65% 25 Missing ⚠️
...e/facility/api/serializers/patient_consultation.py 51.51% 9 Missing and 7 partials ⚠️
...are/facility/api/viewsets/consultation_symptoms.py 64.70% 12 Missing ⚠️
care/facility/models/patient_icmr.py 0.00% 8 Missing ⚠️
care/facility/models/consultation_symptom.py 88.33% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2095      +/-   ##
===========================================
+ Coverage    62.20%   62.72%   +0.52%     
===========================================
  Files          221      240      +19     
  Lines        12204    13210    +1006     
  Branches      1742     1877     +135     
===========================================
+ Hits          7591     8286     +695     
- Misses        4305     4580     +275     
- Partials       308      344      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sainak
Copy link
Member

sainak commented May 21, 2024

Closing in favor of #2186

@sainak sainak closed this May 21, 2024
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

Successfully merging this pull request may close these issues.

3 participants