Custom encounter in patinet dashboard

@abhijitpparate, hmm, when we were writing most of the HTML Form Entry module, it wasn’t yet prevalent to be writing async and promise-based JavaScript code. It would make sense to improve the pre-validate and pre-submit structure in HFE so that it lets you return Promises and waits for them. (You would need to contribute this improvement.)