Using Ajax to Load Providers (HTML Form Entry)

This is related to HTML Forms Taking Too Long to Display and Problem loading HTML forms. In the later discussion it is established that the issue indeed is about loading of providers when the list is substantially long. This happens because the module attempts to preload all the providers in response before serving the form to the client (including some other processing done to bake the list as seen in the code here).

The solution seems to be the use of ajax and hence this topic. Before creating a ticket I searched around in JIRA and found:

which is precisely what is needed to solve this problem. @arbaughj suggested in the comment that the issue is actually the duplicate of:

which indeed it is but I think the approach used to solve HTML-72 is precisely the reason for the problems we are facing. I was wondering whether it is a good idea to reopen the former ticket and work from there or start completely afresh.

@mogoodrich & @darius please provide guidance.


Ah, so the issue here I believe is that the HTML-72 is a simple non-AJAX autocomplete which requires all the providers to be reloaded?

I would create a ticket for re-implementing HTML-72 using AJAX. I’d be fine with replacing the existing autocomplete functioality entirely with new AJAX functionality.

Note that we will also want to expand the autocomplete functionality to the encounterProviderAndRole tag–there is a ticket for this:

That is correct.

@mogoodrich You may assign me to the new ticket right away.

Note that you may be able to leverage this.

I wrote that intending for it to be a reusable widget when I was implementing auto-suggest drug searches, and here is where it is called from:

@willa go ahead and create the new ticket and I’ll add you to it… Sorry, when I said “I would” above I didn’t mean “I will”… :smile:

I was thinking of creating a ProviderStub, serve it via rest and use a jqueryui autocomplete widget on the client side.

@mogoodrich reading what you wrote I realized I misunderstood you. Anyway all is good :smile: I will create the ticket right away.

1 Like