care_fe
care_fe copied to clipboard
Symptoms: Building depth in consultation
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
- 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.
I'll do the front end modification's for this along with #3594
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.
@aparnacoronasafe is this still required?
@aparnacoronasafe could you confirm if this is still required?
@rithviknishad assign me the related PR
You can create a fresh PR @hrit2773
@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.
@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
We've discussed with @aparnacoronasafe and the following things need to be done:
-
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);
-
Through the daily rounds/log update form, we should be able to mark existing symptoms as cured or add a new symptom.
-
Ensure existing data is migrated. (JSON to Table)
-
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 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
@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
@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.
@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.
@rithviknishad so in total we will have 2 foreign key fields one is consultation and other one daily round
@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
@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 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