care_fe icon indicating copy to clipboard operation
care_fe copied to clipboard

Improving AssetBed and Camera Preset relations

Open NNSiri opened this issue 10 months ago • 8 comments

Currently, each camera bed preset is stored as an individual AssetBed record (1 preset => 1 AssetBed record; 10 presets => 10 AssetBed records). This is not very efficient. Instead a camera (asset) can be linked to a bed (which represents an AssetBed record), and multiple presets can be added for this AssetBed record.

Action Items

  • [ ] Create a new model CameraPreset (having many-to-one relation with AssetBed model).
  • [ ] Add fields for tracking modifications made to the CameraPreset records (created_by and modified_by along with created and updated at datetime fields)
  • [ ] Necessary changes in FE to reflect these.

Originally reported issue

Describe the bug The Camera Feed option do not appear on most patient pages. This has been observed randomly in many patients cards. Initially we though it to be dependent on assigning a bed to the patient. But later we are observing that, inspire of assigning the beds, and under View Facility>Live Monitoring all 3 cameras are functional. But under View Patient>select patient the feed option will not appear. It must be a bug or it is dependent on some other data entry field, apart from assigning bed to a patient.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Facility > GH Nagamangala'

  2. Click on 'view patients'

  3. Scroll down to 'Patient Name Narayana Swamy Bed 5'

  4. See error Camera Feed option not seen

  5. Go to View Facility > GH Nagamanagala

  6. Click on Live Monitoring

  7. All 3 cameras are Live

Expected behavior Camera Feed option should be available for all patients with beds assigned.

Screenshots Camera Feed Feature not appearing WhatsApp Image 2024-04-01 at 14 33 54_65bf55b9

All 3 cameras are live WhatsApp Image 2024-04-01 at 14 33 18_79daf601

Desktop (please complete the following information):

  • OS: [e.g. windows ]
  • Browser [e.g. chrome]

NNSiri avatar Apr 01 '24 09:04 NNSiri

@NNSiri the "Feed" tab/button is hidden for any of the following reasons as of today:

  • No bed assigned to the patient
  • No camera is attached/configured to the patient's bed.
  • The consultation has ended (discharged).
  • User is not one of the following: "District Admin", "State Admin", "Doctor"

@NNSiri could you also specify which user type this bug is present for? The screenshots attached above does not confirm if both are same users.

@gigincg read-only users of the above mentioned users also does not have access to the camera feed from consultation dashboard. Should we allow for read only user types?

image image

rithviknishad avatar Apr 01 '24 09:04 rithviknishad

@rithviknishad

  • Bed is assigned to the patient
  • Camera was configured to the patient (later we found that the presets were getting deleted) this is observed in many hospitals . So may be we should restrict who deletes the Camera Presets.
  • The consultation was not ended. Patient is not yet discharged
  • User : State Admin

NNSiri avatar Apr 01 '24 10:04 NNSiri

@rithviknishad We understood, that the issue is observed when the presets are deleted. but we do not know who deleted the presets. can we restrict the delete option, and keep only edit preset option. ?

NNSiri avatar Apr 02 '24 06:04 NNSiri

@NNSiri The presets being deleted seems is being repeatedly reported from the field now. We can work on improving the audit trail for Preset Deletions to track this better.

@rithviknishad Can you update the issue to improve the AssetBed through table as well as add audit-trail for soft deleted presets

gigincg avatar Apr 02 '24 15:04 gigincg

Updated the issue body with the following:

Currently, each camera bed preset is stored as an individual AssetBed record (1 preset => 1 AssetBed record; 10 presets => 10 AssetBed records). This is not very efficient. Instead a camera (asset) can be linked to a bed (which represents an AssetBed record), and multiple presets can be added for this AssetBed record.

Action Items

  • [ ] Create a new model CameraPreset (having many-to-one relation with AssetBed model).
  • [ ] Add fields for tracking modifications made to the CameraPreset records (created_by and modified_by along with created and updated at datetime fields)
  • [ ] Necessary changes in FE to reflect these.

rithviknishad avatar Apr 02 '24 16:04 rithviknishad

Any update on this feature ?

NNSiri avatar Apr 16 '24 12:04 NNSiri

@NNSiri We have discussed the issue and I am currently in the process of implementing those changes.

aeswibon avatar Apr 16 '24 12:04 aeswibon

@aeswibon unassigning you from this issue due to inactivity ,

nihal467 avatar May 27 '24 06:05 nihal467