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

feat(patient notes): add edit window validation and update endpoint #1221

Merged
merged 45 commits into from
Feb 12, 2024

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Mar 18, 2023

Required for: coronasafe/care_fe#4884

  • Introduced an edit history feature to track all modifications to notes over time
  • Added PUT and PATCH endpoints to facilitate updates to notes

In PatientNotesSerializer:

  • Implemented a mechanism to record and store the history of edits made to a note
  • Ensured that the edit history is included in the validated data

@coronasafe/code-reviewers

- Add edit window validation to restrict updates to notes after a certain time
- Add PUT and PATCH endpoints to update notes
@Ashesh3 Ashesh3 requested a review from a team as a code owner March 18, 2023 05:17
@sonarcloud
Copy link

sonarcloud bot commented Mar 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (a538bca) 61.62% compared to head (3ecf5b6) 61.80%.

Files Patch % Lines
care/facility/api/viewsets/patient.py 75.00% 4 Missing and 5 partials ⚠️
care/facility/api/serializers/patient.py 92.59% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1221      +/-   ##
==========================================
+ Coverage   61.62%   61.80%   +0.18%     
==========================================
  Files         212      212              
  Lines       11664    11728      +64     
  Branches     1655     1663       +8     
==========================================
+ Hits         7188     7249      +61     
+ Misses       4180     4177       -3     
- Partials      296      302       +6     

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

@Ashesh3
Copy link
Member Author

Ashesh3 commented Apr 14, 2023

@vigneshhari any updates on this?

care/facility/api/viewsets/patient.py Outdated Show resolved Hide resolved
care/facility/api/serializers/patient.py Outdated Show resolved Hide resolved
care/facility/api/viewsets/patient.py Show resolved Hide resolved
@Ashesh3
Copy link
Member Author

Ashesh3 commented Apr 18, 2023

The above commits were not reflected on this PR, most likely a temporary issue with Github. I made a sample dummy commit to force the update here. The dummy commit can be ignored.

@sonarcloud
Copy link

sonarcloud bot commented Apr 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@Ashesh3
Copy link
Member Author

Ashesh3 commented May 19, 2023

@vigneshhari any updates on this?

@sainak
Copy link
Member

sainak commented Jul 19, 2023

@Ashesh3 resolve the conflicts

@Ashesh3
Copy link
Member Author

Ashesh3 commented Jul 19, 2023

@Ashesh3 resolve the conflicts

Resolved.

@Ashesh3 Ashesh3 requested a review from sainak July 19, 2023 11:31
@Ashesh3 Ashesh3 requested a review from sainak July 21, 2023 08:57
care/facility/api/serializers/patient.py Outdated Show resolved Hide resolved
care/facility/api/serializers/patient.py Show resolved Hide resolved
care/facility/api/serializers/patient.py Outdated Show resolved Hide resolved
care/facility/models/patient.py Outdated Show resolved Hide resolved
care/facility/migrations/0405_patientnotesedit.py Outdated Show resolved Hide resolved
care/facility/migrations/0405_patientnotesedit.py Outdated Show resolved Hide resolved
care/facility/migrations/0405_patientnotesedit.py Outdated Show resolved Hide resolved
care/facility/models/patient.py Outdated Show resolved Hide resolved
care/facility/api/serializers/patient.py Outdated Show resolved Hide resolved
care/facility/api/serializers/patient.py Outdated Show resolved Hide resolved
care/facility/api/serializers/patient.py Outdated Show resolved Hide resolved
care/facility/api/serializers/patient.py Outdated Show resolved Hide resolved
@Ashesh3
Copy link
Member Author

Ashesh3 commented Jan 23, 2024

@vigneshhari The changes are done, could you review once?
@sainak @rithviknishad could you also review this once?

@Ashesh3
Copy link
Member Author

Ashesh3 commented Jan 31, 2024

@vigneshhari Could you review this? Got 3 approvals

@vigneshhari vigneshhari merged commit e623b74 into coronasafe:master Feb 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants