care_fe icon indicating copy to clipboard operation
care_fe copied to clipboard

Symptoms: Building depth in consultation

Open aparnacoronasafe opened this issue 2 years ago • 17 comments

When a new consultation is filed (https://care.coronasafe.in/facility/c92cc4df-0fea-4d37-9c24-1c9f07bfac23/patient/b144585a-bf1b-4000-8c3f-00fc859b52fc/consultation) The first field in the form is to record symptoms. Multiple symptoms can be recorded. However, the "date on onset of symptoms" field only appears as a common field for all symptoms.

Change suggested When multiple symptoms are selected from the dropdown, "date of onset of symptom" must be taken individually for each of the symtoms. It is okey to group a few symptoms in giving the date.

Suggested format Symptoms must be a small section within a consultation in the following design Screenshot 2022-09-20 at 12 58 41 PM

  • There must be a checkbox to mention if the patient is asymptomatic. If selected, the rest of the fields must not appear.
  • Otherwise, the user must have the option to enter a date on onset - and mention symptoms against it. The symptoms will appear in the dropdown with multi-select option.
  • The user should be able to add more symptoms wherein another row of date and symptoms dropdown will appear.

Visualising saved data Symptoms must appear as they appear currently on the patient dashboard (https://care.coronasafe.in/facility/015ad911-39b7-4104-b304-bf8178c33830/patient/aefb147a-eb09-4dd0-8390-e2cd5a05f326/consultation/c5e82e5f-2bab-4cab-9239-307770792bce) as a card. However, it must appear as a timeline with dates, in chronological order and the symptoms against it.

Updating symptoms The symptoms will the updated by the nurses via the Log-Update form. Such updated symptoms must also appear in the patient dashboard, along with the respective date that the log update is filed on.

aparnacoronasafe avatar Sep 20 '22 07:09 aparnacoronasafe

I'll do the front end modification's for this along with #3594

rithviknishad avatar Sep 20 '22 07:09 rithviknishad

Hi, This pr/issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs for 7 more days. Thank you for your contributions.

stale[bot] avatar Oct 09 '22 15:10 stale[bot]

@aparnacoronasafe is this still required?

rithviknishad avatar Jul 19 '23 13:07 rithviknishad

@aparnacoronasafe could you confirm if this is still required?

Ashesh3 avatar Dec 26 '23 20:12 Ashesh3

@rithviknishad assign me the related PR

hrit2773 avatar Apr 05 '24 05:04 hrit2773

You can create a fresh PR @hrit2773

rithviknishad avatar Apr 05 '24 05:04 rithviknishad

@rithviknishad @aparnacoronasafe mark this issue into discussion. The point of discussion would be....adding other symptoms fields for every onset date when the user enters OTHERS option there should be a separate field appearing asking the user to enter the details about other symptoms...I feel this update is required because there are multiple symptoms select fields for every onset date and this means user can enter OTHERS option multiple times.

hrit2773 avatar Apr 22 '24 13:04 hrit2773

@rithviknishad @vigneshhari @Ashesh3 @sainak otherwise if the form gets complex we can remove the OTHERS option from symptom Choices and lets add an optional field of other symptoms with one onset date separately this would reduce the complexity also.

hrit2773 avatar Apr 24 '24 03:04 hrit2773

@hrit2773

We've discussed with @aparnacoronasafe and the following things need to be done:

  1. The JSON field should be converted to a dedicated table. The table should have the following fields: symptom (varchar with choices); other symptom (varchar, nullable); onset_date (date field); cure_date (date field); consultation (foreign key -> PatientConsultation);

  2. Through the daily rounds/log update form, we should be able to mark existing symptoms as cured or add a new symptom.

  3. Ensure existing data is migrated. (JSON to Table)

  4. When the user selects "Others" from the symptoms dropdown, a dialog popup should appear for the user to type the other symptom as text, once confirmed, that text symptom can be shown in the inline view for the symptoms select field.

cc: @aparnacoronasafe @sainak

rithviknishad avatar Apr 27 '24 13:04 rithviknishad

@rithviknishad the new table would contain symptoms field which is a field of multiple symptoms right and not just one symptom so the cure date would also be for multiple symptoms together right because from frontend we are selecting multiple symptoms for one onset date. can you just confirm

hrit2773 avatar Apr 29 '24 12:04 hrit2773

@rithviknishad @aparnacoronasafe something like this? from implies the onset date and if cure date exists then the string would be " from {onset date} to {cure date} " in this case as there is no cure date so "to {cure date}" is not visible and the symptom not having a cure date is marked in red color whereas if the symptom is cured then its marked with green just changed the chip variant in frontend Screenshot 2024-05-07 190910

hrit2773 avatar May 07 '24 13:05 hrit2773

@rithviknishad @aparnacoronasafe can you also provide clarity on how to update these symptoms from both edit consultation details and log update. In edit consultation page can we add more symptoms.

hrit2773 avatar May 08 '24 04:05 hrit2773

@rithviknishad for linking the symptoms with the daily rounds we also need to add a daily round foreign key field in the ConsultationSymptom model because to update log we have to get access to the symptoms which were part of that particular log update. Screenshot 2024-05-09 222549

hrit2773 avatar May 09 '24 16:05 hrit2773

@rithviknishad so in total we will have 2 foreign key fields one is consultation and other one daily round

hrit2773 avatar May 09 '24 16:05 hrit2773

@rithviknishad this is the design to mark the symptoms as cured which is the symptoms status and is in the log update daily rounds form. Can you plz acknowledge it any tell me if any improvements needed in the design Screenshot 2024-05-11 221011

hrit2773 avatar May 11 '24 16:05 hrit2773

@hrit2773

The backend looks almost good 😄. @sainak Will be making some minor changes to get it ready for merge.

As for the front end, many changes are required, as the code is not maintainable and the UI isn't satisfactory. Since another high-priority PR #7839 requires this feature, I'll do the front-end changes for https://github.com/coronasafe/care/pull/2095 in #7839.

rithviknishad avatar May 17 '24 06:05 rithviknishad

@rithviknishad good by the way I was just trying to do my own design stuff. just the rough kind of UI making enhancements will be good

hrit2773 avatar May 17 '24 07:05 hrit2773