Describe the bug
If a user removes an item from a repeating item that was prepopulated and then subsequently attempts repopulation, the repopulate service does not correctly provide data. It appears to rely on the order of the original items in the QuestionnaireResponse when it compares to the populate information.
To Reproduce
- Launch CCMP form
- Create new reponse
- Navigate to "Recorded problems/diagnoses" in the "Clinical details" section.
- Remove an item from the top of the table
- Click repopulate
- Compare original order of table (image 1) with the repopulate suggestions (image 2)
- Note how all table entries now mismatch and suggestions are to replace all with new ones rather than just the missing one.
This is a realistic scenario if a user has curated a repeating group and removed unwanted items. Then they save progress and return at a later date. They attempt repopulation to update with any new information but are presented with a large amount of noisy changes.
Expected behavior
Just differences should be presented and not be reliant on a specific order to be maintained.
Describe the bug
If a user removes an item from a repeating item that was prepopulated and then subsequently attempts repopulation, the repopulate service does not correctly provide data. It appears to rely on the order of the original items in the QuestionnaireResponse when it compares to the populate information.
To Reproduce
This is a realistic scenario if a user has curated a repeating group and removed unwanted items. Then they save progress and return at a later date. They attempt repopulation to update with any new information but are presented with a large amount of noisy changes.
Expected behavior
Just differences should be presented and not be reliant on a specific order to be maintained.