No extensions listed for built-in forms?

Hi all,

After removing the ‘built-in’ Visit Note form’s UUID from formentry_app.json I could indeed see that the form was not locked anymore in Configure Metadata \ Manage Forms. But once unlocked I also saw that it is not added to any UI location, although it appears in the link list of actions for an active visit (on the right menu). I edited the JSON precisely to then delete the UI location and get rid of the built-in form’s link. So, how can I achieve this?

Any help would be much appreciated!

To be more precise, here is what I don’t understand: When doing

Form visitNoteForm = formService.getFormByUuid("c75f120a-04ec-11e3-8780-2b40bef9a44b");
List<Extension> visitNoteExtensions = hfeAppService.getFormExtensions(visitNoteForm);

it turns out that visitNoteExtensions is an empty list. However it is clear that Visite Note is a form hooked to the current visit actions.

Where is the configuration saying that Visit Note should show up in the current visit’s actions?

Anyone? Sorry guys I am still stuck with this and I am sure that anyone familiar with coreapps will be able to shed some light on it in two mins.

If no one helps try debugging getFormExtensions

Am not sure how that feature works, but i believe @darius might know how to help you, hopefully he will chime in

This is only taking me one step further into

Collection<FormResource> visitNotesFormResources = formService.getFormResourcesForForm(visitNotesForm);

It is clear from FormEntryAppService#getFormExtensions’s code that when there are no FormResource found for a Form then no Extension will be returned either. After that it is calling a DAO layer… It is not clear to me what those FormResource are for and so I don’t really understand why Visit Note would or wouldn’t have any.

@darius When you have a min, I basically just want to find a way to deactivate Visit Note and Vitals. That’s my bottom line… Thanks!

By deactivate, do you simply mean that you do not want to see Visit Notes or Vitals anywhere?

Yes ideally that’s what we would like to achieve. How could we do that?

I’m just peeking at the last 2 messages and not rereading the thread. I think you need to disable the extensions for the vitals and visit note forms, e.g.

If the UI doesn’t let you do this, you can do it in code by calling AppFrameworkService.disableExtension()

Thanks a million Darius, removing the Vitals and Visit Note sections from visitActions_extension.json works, as well as, alternatively, disabling those extensions through our own module’s activator via AppFrameworkService#disableExtension. Exactly what we needed, cheers.

1 Like