I have a couple of forms built with HTML Form Entry which are entered at different times during the patient lifecycle. In the legacy UI this was done by editing the forms, but I am unable to do so in the new UI - probably because the visit has ended. The previously entered data is not loaded in the ref app UI yet it is displayed in the legacy UI
I cannot have two instances of the form as the data entered cannot be duplicated, and neither can I break the from into smaller components as it has to match the paper version.
Can you clarify this? I know that the refapp UI does not display encounters that don’t belong to any visit. Is that the situation, or something else?
If you have a couple of HTML Forms that are really once-per-patient forms rather than once-per-visit, you could write some custom code (either a widget or an extension) to display these in a special way on the patient summary, with an appropriate Enter/Edit link.
You could either do this, or else achieve what I presume is better UX by highlighting these with their own special section or link on the patient summary.
To do once-per-patient forms, in the controller you would test the patient’s encounters to see if they have an existing one already (by EncounterType or by Form, as you prefer) and if they do you can show them a link to edit it, or if not, a link to create it.
Alternately, if you just want a special link, create a “general actions” extension that goes to a new page you create like “fillOutXyzForm.page” whose controller just does a redirect to either the edit or enter URL in htmlformentryui.
@ssmusoke, this seems like a pretty common use case that people have, so it would be great if once you’ve decided how to approach this, you add some documentation on the wiki for the next person, with a few code snippets.