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

Privacy consultation bed #2506

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open

Conversation

@khavinshankar khavinshankar requested a review from a team as a code owner September 30, 2024 04:10
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 38 lines in your changes missing coverage. Please review.

Project coverage is 70.06%. Comparing base (69c2b83) to head (efb4763).

Files with missing lines Patch % Lines
care/utils/assetintegration/usage_manager.py 73.23% 13 Missing and 6 partials ⚠️
care/utils/assetintegration/onvif.py 30.43% 16 Missing ⚠️
care/facility/api/viewsets/asset.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2506      +/-   ##
===========================================
+ Coverage    70.03%   70.06%   +0.02%     
===========================================
  Files          198      199       +1     
  Lines        11674    11779     +105     
  Branches      1607     1626      +19     
===========================================
+ Hits          8176     8253      +77     
- Misses        3107     3132      +25     
- Partials       391      394       +3     

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

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

@vigneshhari vigneshhari left a comment

Choose a reason for hiding this comment

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

Is there no TTL for a lock? Feels like if you forget to unlock, if the locked user forgets to unlock, the resource is just locked forever.

care/facility/api/viewsets/asset.py Outdated Show resolved Hide resolved
care/facility/api/viewsets/bed.py Show resolved Hide resolved
care/facility/api/viewsets/bed.py Outdated Show resolved Hide resolved
care/utils/assetintegration/usage_manager.py Outdated Show resolved Hide resolved
care/utils/assetintegration/usage_manager.py Outdated Show resolved Hide resolved
send_webpush(username=current_user, message=message)

def lock_camera(self) -> bool:
current_user = cache.get(self.current_user_cache_key)
Copy link
Member

Choose a reason for hiding this comment

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

This is not how we implement locks in care, refer to other lock implementations

Copy link
Member Author

Choose a reason for hiding this comment

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

@vigneshhari This implementation was based on the existing implementation of locks in discharge summary (https://github.com/ohcnetwork/care/blob/develop/care/facility/utils/reports/discharge_summary.py#L40)

care/utils/assetintegration/usage_manager.py Outdated Show resolved Hide resolved
@vigneshhari
Copy link
Member

Why are there no tests for this change?

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.

4 participants