HFE has an inherent limitation explained as follows below:-
After submitting data with a form, when opening that form again in “view or edit mode”, there is no existing smart mechanism for matching a question on the form to it’s corresponding answer. Let’s use the
<obs/> tag as an example it being the most popular HFE tag.
I will mention out that an attempt was made to resolve this same issue with the
Obs data model had to be adjusted by adding a pointer for the form_field to the Obs class however, refactoring the tag implementation to reply on the updated Obs model was never completed(see HTML-163 and HTML-10).
Expand for details on how to reproduce this bug with the <obs/> tag (GIF inclusive)
- Create a form with many questions(using the
<obs/>) but having the same concept question(
<section> Field 1: <obs conceptId="CIEL:123" style="textarea" col="6" /> Field 2: <obs conceptId="CIEL:123" style="textarea" col="6" /> Field 3: <obs conceptId="CIEL:123" style="textarea" col="6" /> Field 4: <obs conceptId="CIEL:123" style="textarea" col="6" /> </section>
- See the bug unmasked below:
Did you see how answers were poorly mapped to their questions in edit mode?
Condition class also needs to have a pointer for the form-field for cases where the condition is being recorded by HFE specifically the
<condition /> tag as a solution to the problem described above.
Actually, since HFE framework is
Encounter centric, @mksd suggests we could add this support at all qualifying members linked to an Encounter all in one ticket?
Thoughts, ideas, early findings are all welcome.