-
Notifications
You must be signed in to change notification settings - Fork 417
added discharge summary advice field to encounter #2971
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
added discharge summary advice field to encounter #2971
Conversation
📝 WalkthroughWalkthroughThis update introduces a new field, Changes
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
care/emr/migrations/0029_encounter_discharge_summary_advice.py (2)
9-9
: Quote style inconsistencyI see you're using single quotes here while the project might prefer double quotes. I guess static analysis tools also flagged this. It's not a big deal, but it would be nice if you could be consistent with the project's style guide.
- ('emr', '0028_alter_encounter_care_team'), + ("emr", "0028_alter_encounter_care_team"),🧰 Tools
🪛 Ruff (0.8.2)
9-9: Single quotes found but double quotes preferred
Replace single quotes with double quotes
(Q000)
9-9: Single quotes found but double quotes preferred
Replace single quotes with double quotes
(Q000)
14-16
: Migration looks good but has quote inconsistenciesThe migration properly adds the new field. Again, there's that tiny issue with single vs double quotes that static analysis caught.
- model_name='encounter', - name='discharge_summary_advice', + model_name="encounter", + name="discharge_summary_advice",🧰 Tools
🪛 Ruff (0.8.2)
14-14: Single quotes found but double quotes preferred
Replace single quotes with double quotes
(Q000)
15-15: Single quotes found but double quotes preferred
Replace single quotes with double quotes
(Q000)
care/emr/models/encounter.py (1)
31-31
: New field implementation looks goodThe addition of the
discharge_summary_advice
field to the Encounter model is correctly implemented as a TextField with null and blank attributes set to True. It would be slightly more helpful if you added a comment explaining what this field is used for, especially since it's related to clinical discharge information.- discharge_summary_advice = models.TextField(null=True, blank=True) + # Field to store advice given to patient upon discharge + discharge_summary_advice = models.TextField(null=True, blank=True)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
care/emr/migrations/0029_encounter_discharge_summary_advice.py
(1 hunks)care/emr/models/encounter.py
(1 hunks)care/emr/resources/encounter/spec.py
(1 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
care/emr/migrations/0029_encounter_discharge_summary_advice.py
9-9: Single quotes found but double quotes preferred
Replace single quotes with double quotes
(Q000)
9-9: Single quotes found but double quotes preferred
Replace single quotes with double quotes
(Q000)
14-14: Single quotes found but double quotes preferred
Replace single quotes with double quotes
(Q000)
15-15: Single quotes found but double quotes preferred
Replace single quotes with double quotes
(Q000)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Test / Test
- GitHub Check: Analyze (python)
🔇 Additional comments (1)
care/emr/resources/encounter/spec.py (1)
65-65
: Field looks good, but a comment would be helpfulThe addition of the
discharge_summary_advice
field to theEncounterSpecBase
class is appropriate. It might be just a tiny bit more helpful if you added a comment explaining the purpose and usage of this field for future developers.
Need this in the discharge summary |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2971 +/- ##
========================================
Coverage 51.88% 51.89%
========================================
Files 243 243
Lines 10949 10951 +2
Branches 1206 1206
========================================
+ Hits 5681 5683 +2
Misses 5249 5249
Partials 19 19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* Fix permission issue with chronic condition * Multiple clinical condition filters * Clean up codebase * Clean up codebase * Allow booking appointment for ongoing slot (#2934) Allow booking for ongoing slot * Fix edge case with organization structuring * Move death_datetime to deceased_datetime * added update specs for patient (#2947) * Add missing device permissions * Allow hard deleting users that have not logged in * Show only non-deleted users * Show deleted flag in spec * Commented some tests after validation error change * Add name-based filtration in files (#2958) * Update Redis URL to use CERT_NONE for SSL certificate requirements (#2964) * Retrieve External Id in QuestionnaireTag (#2954) added externalId in tag * updated specs for desc (#2957) * Sort the Resources by created date (#2960) order_resources_by_created_date * Task to cleanup expired `TokenSlot` objects and Skip creating slots in the past (#2955) * added validations and tests for enable when in questionnaire (#2941) * added validations and tests * update to remove values instead of raising errors * making tags in questionnaire optional * Auto-set Sort index ohcnetwork/roadmap#64 * added treating doctors and validation for consent (#2956) * Rename treating doctors to care_team, fix tests, optimisations * Add roles to care team. * fixed the custom class validator (#2968) * Fix issues with Valueset validation * Deny same user repeating in the same care team. * Deny same user repeating in the same care team. * Username validation added * update treatment summary for care team (#2970) * Exclude deleted users in token booking's available users API (#2969) * Fix issue with redis * Adds support for searching users in `FacilityUsersViewSet` (#2974) * Allow to update geo org for the user (#2975) * List the drawing files based on the modified_date (#2972) * Update facility org cache in add/remove managing org (#2979) * added discharge summary advice field to encounter (#2971) * added discharge summary advice field to encounter * adding discharge summary advice to discharge summary pdf * used max instead of count to generate sort index (#2981) * Add timezone awareness validation for start and end dates in PeriodSpec (#2980) * Fix typo in class name (#2977) * Fix test cases for period spec (#2982) * fixed recent views duplications (#2984) * fixed recent views duplications * update from comments * fixed tests and enable when nested cases (#2967) * fixed encounter update for not updating discharge summary advice with null (#2988) * Fix cache key formatting in ResourceManager (#2989) fix: correct cache key formatting in ResourceManager * Fix test workflow for accurate failure reporting and Docker image loading (#2996) * Fix the test workflow to show the correct failed step and load the docker image during build * operators * Fix role and role-permission deletion logic (#2995) * Fix role and role-permission deletion logic to avoid deleting non system roles * fix * Prevent duplicate users in scheduling's available users API (#2985) * Perform distinct on `user_id` for available users query * simplify available_users query by reducing unnecessary joins --------- Co-authored-by: Rithvik Nishad <[email protected]> Co-authored-by: Prafful Sharma <[email protected]> Co-authored-by: Nikhila C <[email protected]> Co-authored-by: Areeb Ahmed <[email protected]> Co-authored-by: Jacob John Jeevan <[email protected]> Co-authored-by: Aditya Jindal <[email protected]> Co-authored-by: Aakash Singh <[email protected]>
Proposed Changes
added discharge summary advice field to encounter
Fixes Backend to store Discharge Summary Advice roadmap#26
Architecture changes
Merge Checklist
/docs
Only PR's with test cases included and passing lint and test pipelines will be reviewed
@ohcnetwork/care-backend-maintainers @ohcnetwork/care-backend-admins
Summary by CodeRabbit