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

Disable the Bed List of Already occupied Beds (back-end change) #2116

Conversation

AnkurPrabhu
Copy link
Contributor

Proposed Changes

  • Brief of changes made.
    • added a new filter not_occupied_by_hl7_monitor when true filter bed already occupied by hl7 monitors

Associated Issue

Fixes link

Architecture changes

  • Remove this section if not used

Merge Checklist

  • Tests added/fixed
  • Update docs in /docs
  • Linting Complete
  • Any other necessary step

Only PR's with test cases included and passing lint and test pipelines will be reviewed

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

@AnkurPrabhu AnkurPrabhu requested a review from a team as a code owner April 24, 2024 21:07
Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but there is no need to make the filter specific to hl7 monitor right? We can make a filter not_occupied_by_asset_type which accepts the asset type to exclude.

This way it'd work for excluding ONVIF cameras or ventilators too if needed in the future.

@AnkurPrabhu
Copy link
Contributor Author

LGTM, but there is no need to make the filter specific to hl7 monitor right? We can make a filter not_occupied_by_asset_type which accepts the asset type to exclude.

This way it'd work for excluding ONVIF cameras or ventilators too if needed in the future.

yes makes sense and is also scalable

care/facility/api/viewsets/bed.py Outdated Show resolved Hide resolved
@rithviknishad rithviknishad requested a review from sainak May 4, 2024 13:31
Copy link
Member

@sainak sainak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add tests

care/facility/api/viewsets/bed.py Outdated Show resolved Hide resolved
Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tests needed

@AnkurPrabhu
Copy link
Contributor Author

@rithviknishad i have added a test

care/facility/tests/test_bed_api.py Outdated Show resolved Hide resolved
@rithviknishad rithviknishad requested a review from sainak May 20, 2024 04:15
Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
Copy link

codecov bot commented May 20, 2024

Codecov Report

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

Project coverage is 62.71%. Comparing base (51ce81e) to head (8f3b343).
Report is 90 commits behind head on develop.

Current head 8f3b343 differs from pull request most recent head 220f127

Please upload reports for the commit 220f127 to get more accurate results.

Files Patch % Lines
care/facility/api/viewsets/bed.py 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2116      +/-   ##
===========================================
+ Coverage    62.20%   62.71%   +0.51%     
===========================================
  Files          221      237      +16     
  Lines        12204    13035     +831     
  Branches      1742     1853     +111     
===========================================
+ Hits          7591     8175     +584     
- Misses        4305     4522     +217     
- Partials       308      338      +30     

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

@nihal467
Copy link
Member

LGTM @rithviknishad @sainak can you fix the lint issue

@nihal467 nihal467 added P2 and removed P2 labels May 21, 2024
@vigneshhari vigneshhari merged commit 5670c81 into ohcnetwork:develop May 22, 2024
3 checks passed
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.

Disable the Bed List of Already occupied Beds
5 participants