ohcnetwork / care_fe

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://care.ohc.network
MIT License
249 stars 430 forks source link

Heartbeat description is missing in events log #8457

Closed nihal467 closed 1 month ago

nihal467 commented 2 months ago

Describe the bug

Heartbeat description we added during a patient log update is missing in the events log present in the patients consultation page

To Reproduce Steps to reproduce the behavior:

  1. Go to patient tab and open any active consultation
  2. click on the log update and add a rhythm description for the patient and save it
  3. in the patient consultation page, on the event log
  4. See the error

Expected behavior

Heartbeat rhythm description should be visible in the events log at the patient consultation page

Screenshots

image image

HitishRaoP commented 1 month ago

@nihal467 when we submit the Log Update Form, it is logged as rhythm_detail but when we fetch it from the api to display in the evenlist page it is logged as rhythm_details and it is always null. I think this is causing the error.

During Form submission: Screenshot 2024-09-11 171726

Fetching from api: Screenshot 2024-09-11 171751

rithviknishad commented 1 month ago

Thanks for debugging the root cause @HitishRaoP

Looks like there's a spelling mistake in the event types. It'll have to be updated here: https://github.com/ohcnetwork/care/blob/develop/care/facility/management/commands/load_event_types.py#L123

cc: @sainak

DraKen0009 commented 1 month ago

@rithviknishad can you please assign this issue to me.