The <encounterDiagnoses/> tag with openmrs-core 2.2 and above saves diagnoses associated with a given encounter as diagnoses rather than obs. This is currently possible in its handler by first saving the encounter in the middle of handling submissions of the involved tags. Saving an encounter requires some preliminary validations which should be specifically done by the FormEntrySession.
Because of this, this ticket will ensure diagnoses are saved in an CustomFormSubmissionAction for the associated <encounterDiagnoses/> submission handler. EncounterDiagnosesElement will extend CustomFormSubmissionAction and register a <postSubmissionAction/> handler referencing itself. This will help avoid re-validating and re-applying all actions on the encounter with respect to the involved HTML-form-entry widgets/tags.