You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by JahnabDutta September 4, 2023
Boundary based visualization
Features
A boundary in terms of x and y coordinates around a patient bed.
User is able to add and delete a boundary along with modifying the existing boundary in terms of left, right, top and bottom boundaries.
When boundary is initially added, it is based on the point presets of the patient bed and the respective zoom level of the presets.
Movement of the camera is validated based on the
boundary.
How to use
Go to assets page.
Select a working camera asset and move to configure page.
There, in the Live Feed section, boundary configuration can be achieved.
If no boundary is present, click on Add Boundary button to add a boundary.
Else, modify or delete the boundary.
To view the validation, move to a patient using the bed which has a boundary. Then, click on the Camera Feed button. Now move the camera to see the validation.
Implementation
Adding a new boundary and deleting an existing boundary
In care_fe repository, move to ONVIFCamera.tsx page.
Refer to addBoundaryPreset to add a new boundary.
Refer to deleteBoundaryPreset to delete an existing boundary.
ONVIFCamera component uses the LiveFeed component which in turn uses the CameraBoundaryConfigure component where the UI for addition, deletion and preview of boundary is present.
The previewBoundary function in LiveFeed is used to preview the boundary edges.
Modifying an existing boundary
In care_fe repository, move to ONVIFCamera.tsx page.
Refer to updateBoundaryPreset to modify an existing boundary.
ONVIFCamera component uses the LiveFeed component which in turn uses the UpdateCameraBoundaryConfigure component where the UI for modification of boundary is present.
In the LiveFeed page, the gotoDirectionalBoundary function is used to move the camera to the directional boundary being modified.
Validation based on boundary
In care_fe repository, move to Feed.tsx page.
refer to the function other inside cameraPTZActionCBs function to see the validation based on boundary.
To go to backend validation, move to care repo and refer to onvif.py page.
The validation rules are written in validate_action function.
Patient Privacy Feature
Features
A button to toggle patient privacy.
When privacy is toggled on, the camera feed is not shown to the user.
Role based priviledge to toggle privacy.
How to use
Go to the page of a patient.
Toggle the privacy button.
Click on Camera Feed button to see effect of privacy.
Implementation
Enabling privacy toggle in frontend
Go to PatientPrivacyTogggle.tsx file in care_fe repo.
The getPrivacyInfo function is used to get the current privacy status from the backend.
The togglePrivacy function is used to toggle the privacy of the patient.
Validating privacy toggle in backend.
Go to bed.py in care/facility/api/viewsets.
The toggle_patient_privacy API is used to deal with validating role priviledge and toggling privacy.
Lock asset feature
Features
Provides dedicated access to the camera to the user.
User is able to view the current occupier of the camera if he does not own the camera access.
User is also able to request for the camera access.
Works in real-time.
How to use
Open two different browsers with two differnt users.
Move to the page of a patient and click on Camera Feed button.
The user who enters first will have camera access to move the camera. The other user will be able to view the camera feed but will not be able to move the camera.
The other user will be able to see the details of first user and send him request to leave the camera.
Implementation
Setting up dedicated camera access
In care_fe repository, move to Feed.tsx page.
Refer to the functions lockAsset, unlockAsset for methods of locking,unlocking asset, and requestAccess for requesting access to the camera.
Refer to base.py and onvif.py in care/utils/assetintegration.
In onvif.py, the api request for lock_asset, unlock_asset is handled via the the respective functions.
The request_access api is used to send request to the user who has camera access.
Displaying current occupier of the camera
In care_fe repository, in Feed.tsx page, the currentCameraOccupierInfo function is used to display the current occupier of the camera.
There is another function subscriptionInfo used to display information about subscription to push notifications.
Making access realtime
In care repo, move to base.py in care/utils/assetintegration.
Here refer to the functions add_to_waiting_queue and remove_from waiting_queue to see how queue of users is maintained who await camera access.
Then, the generate_notification function is used to send push notifications to the user who has camera access.
The request_access function is used to send request to the user who has camera access.
The text was updated successfully, but these errors were encountered:
Discussed in https://github.com/orgs/coronasafe/discussions/6219
Originally posted by JahnabDutta September 4, 2023
Boundary based visualization
Features
boundary.
How to use
assets
page.configure
page.Live Feed
section, boundary configuration can be achieved.Add Boundary
button to add a boundary.Camera Feed
button. Now move the camera to see the validation.Implementation
Adding a new boundary and deleting an existing boundary
ONVIFCamera.tsx
page.addBoundaryPreset
to add a new boundary.deleteBoundaryPreset
to delete an existing boundary.ONVIFCamera
component uses theLiveFeed
component which in turn uses theCameraBoundaryConfigure
component where the UI for addition, deletion and preview of boundary is present.previewBoundary
function inLiveFeed
is used to preview the boundary edges.Modifying an existing boundary
ONVIFCamera.tsx
page.updateBoundaryPreset
to modify an existing boundary.ONVIFCamera
component uses theLiveFeed
component which in turn uses theUpdateCameraBoundaryConfigure
component where the UI for modification of boundary is present.LiveFeed
page, thegotoDirectionalBoundary
function is used to move the camera to the directional boundary being modified.Validation based on boundary
Feed.tsx
page.other
insidecameraPTZActionCBs
function to see the validation based on boundary.onvif.py
page.validate_action
function.Patient Privacy Feature
Features
How to use
Camera Feed
button to see effect of privacy.Implementation
Enabling privacy toggle in frontend
PatientPrivacyTogggle.tsx
file in care_fe repo.getPrivacyInfo
function is used to get the current privacy status from the backend.togglePrivacy
function is used to toggle the privacy of the patient.Validating privacy toggle in backend.
bed.py
incare/facility/api/viewsets
.toggle_patient_privacy
API is used to deal with validating role priviledge and toggling privacy.Lock asset feature
Features
How to use
Camera Feed
button.Implementation
Setting up dedicated camera access
Feed.tsx
page.lockAsset
,unlockAsset
for methods of locking,unlocking asset, andrequestAccess
for requesting access to the camera.base.py
andonvif.py
incare/utils/assetintegration
.onvif.py
, the api request forlock_asset
,unlock_asset
is handled via the the respective functions.request_access
api is used to send request to the user who has camera access.Displaying current occupier of the camera
Feed.tsx
page, thecurrentCameraOccupierInfo
function is used to display the current occupier of the camera.subscriptionInfo
used to display information about subscription to push notifications.Making access realtime
base.py
incare/utils/assetintegration
.add_to_waiting_queue
andremove_from waiting_queue
to see how queue of users is maintained who await camera access.generate_notification
function is used to send push notifications to the user who has camera access.request_access
function is used to send request to the user who has camera access.The text was updated successfully, but these errors were encountered: