SORMAS-Project
SORMAS-Project copied to clipboard
Collapsible pathogen test forms when editing a sample while processing lab messages [3]
Situation Description
When processing lab messages, users sometimes get to editing a sample. The sample edit component shown in such situations displays the existing and the newly added pathogen tests derived from the lab message's test reports below a sample edit form.
The composition of forms below each other can become very long, and displays a lot of fields. This makes working with it quite difficult for the user, as a lot of scrolling up and down is required and it is hard to find relevant fields.
Feature Description
- [ ] Make the pathogen test forms collapsible. By default, collapse all existing and unchanged pathogen test forms, and only fully show the changed and newly added pathogen tests.
- [ ] When a pathogen test is collapsed, display the following information in a short line entry
-
testType
-
testedDisease
-
testedDiseaseVariant
-
testResult
- checkmark icon for
testResultVerified
= true -
testDateTime
-
cqValue
if given and applicable
-
- [ ] Display a delete icon with which individually collapsed entries can be deleted. Only delete them fully if the overall form is saved so the deletion could still technically be discarded (cf. implementation for vaccinations via https://github.com/hzi-braunschweig/SORMAS-Project/issues/8980
- [ ] Display an edit icon which, upon pressing, expands the collapsed pathogen tests and allows to edit them again
- [ ] When a pathogen test is collapsed, display the following information in a short line entry
- [ ] For expanded pathogen tests, display CANCEL and DONE buttons at the bottom of the form
- [ ] CANCEL: closes the creation form for new pathogen tests and collapses the edited pathogen tests without any changes
- [ ] DONE: Adds newly created pathogen tests and collapses them; saves changes and collapses edited pathogen tests
- In both cases, the forms need to be validated when done is pressed and the saving prevented with errors for invalid data
Additional Information
@FredrikSchaeferVitagroup I updated the original description but didn't change anything that you had already entered. I hope thats fine.
A similar feature is implemented in PhysiciansReportCaseImmunizationsComponent.java
@kwa20 I'm having a question regarding the CANCEL
and DONE
buttons. When initialializing the sample edit form, all changed and newly added pathogen tests shall be expanded. Does this mean they shall all have those buttons?
Does the user need to click one of those buttons for each of those pathogen tests? What shall happen when the user clicks the SAVE
button with one or several pathogen tests still expanded?
@FredrikSchaeferVitagroup Yes exactly, the buttons should be displayed per expanded pathogen test. The user should be able to click one of these buttons for each test but if the user clicks SAVE
, we can simply save all of the data regardless whether they where expanded or not and proceed.
Validated on local env with the version: 1.77.0-SNAPSHOT (77114f6)