Add utility and service methods to parse an xml file into form, htmlform, and form resources

Description

Currently, there is logic in modules outside of htmlformentry to parse an htmlform xml file and use the defined attributes within this file to save or update the underlying Form and HtmlForm OpenMRS objects.

This functionality should ideally be owned and maintained within htmlformentry itself. Consumers can then more easily call the htmlformentry functionality to achieve their goals.

Additionally, these mechanisms should be expanded to support the persistence of additional xml attributes as form resources.

The primary goal of this ticket is to facilitate .

Activity

Mark Goodrich 
May 1, 2025 at 9:48 PM

Small follow-on question added here:

Mike Seaton 
April 23, 2025 at 2:23 PM

Follow-up commit here:

This makes the following changes from the previous commit:

  • Moves the functionality into methods within the HtmlFormEntryService/Impl rather than in a new class

  • No longer deletes existing resources if they are not declared within the htmlform attributes.

Mark Goodrich 
April 23, 2025 at 1:34 PM

No objects… I didn’t review in detail, assume you are just moving code as you said.

Mike Seaton 
April 23, 2025 at 1:28 AM

Having tried to use this as I wrote it, I realize that it will be far more straightforward if I add this functionality as a new method to an existing service rather than make it an entirely new Spring component. See follow-up PR here to make this change:

- any objections?

Details

Assignee

Reporter

Priority

Created April 17, 2025 at 1:51 AM
Updated May 2, 2025 at 3:51 PM