During the recent AMPATH xforms training, many wanted to reuse their existing form schemas (already used for infopath formentry) to create xforms. But this was not possible because whenever they were on the patient dashboard and tried to enter a form, always infopath came up. The workaround was to create new forms as duplicates of the same schema and ensure that they saved them with xforms. Problem with this was that whenever they needed to change the form schema, they had to make the same change in two places (one for the infopath form schema and the other for the xforms form schema)
I wished choosing a form for data entry on the patient dashboard would, if the same form is attached to more than one module, present some sort of way to choose which module. Or any other way.
NB: I noticed that this is not a problem for htmlformentry since it does not use the form schemas.
Because i needed to continue the training without requiring my students to duplicate their existing form schemas, i temporarily created a hack in the xforms module which overrides the PersonFormEntryPortletController and instead of populating the model with Map<Form, FormEntryHandler> entryUrlMap which is keyed by Form hence meaning that the last module to be put as handler wins, it instead populates it with Map<FormModuleKey, FormEntryHandler> entryUrlMap where FormModuleKey looks like:
As a result when a form had more than one module handling it, it would be be listed, under the formentry tab, as many times as the number of modules with the module id suffix as the example below:
Basic Form - (xforms)
Basic Form - (formentry)
So now over to you all, do you think think we should allow a form schema to be shared by more than one form entry module?