Visit Documents UI module (VDUI) v1.1 throws NullPointerException, also failed to attach a document to a finished visit

Thank you @dkayiwa. It is fixed and now correct encounter template is rendered.

But now i can not edit the VDUI encounter. It throws following exception,

You can test it here in demo server

Were you able to edit it before installing the xforms module?

Yes I was able to edit it before installing XForm.

Can you remove the xforms module and then show me how you used to do the edit?

@hpardess and @dkayiwa:

Mmm, no, the encounters of type ‘Visit Document Upload’ are not meant to be edited from the patient dashboard. Upon installing VDUI both the ‘edit’ and ‘delete’ buttons are removed for that encounter type.

If somehow XForms makes the edit button reappear, then it could very well lead to an error as shown above since this behaviour was basically not configured or implemented.

Sorry, my mistake. I could edit it from patient dashboard widget and thought i can do it from visit page too.

@dkayiwa: I observed view button for first time for an encounter in demo server. How can add this button for other encounter?

if you see the attached image, the built-in encounters has view button but custom form does not have.

Also, I saw the print button while i viewed the form

How can i set a custom URL for this print button. suppose I have a XReport template that has details of this form with designed header and footer. so how can i print that report by clicking this button?

@mksd - Is removing the edit and delete buttons done by design? I’m looking for a way to be able to delete a visit document after uploading.

Also noticed, I have to create the visitdocumentsui.visitdocuments.page privilege for an non-admin user to access the VDUI from Current Visit Actions or General Actions. Perhaps the module can create this privilege or use App: visitdocumentsui.visitdocuments.page privilege?

Hi @whiscard,

What about clicking on the bin when the thumbnail is in edit mode?

Yes, because this is in fact done through the above edit mode.

The privilege is created through the config.xml (see here), what else do you think would be needed?

Noted, thanks @mksd, deleting from editing mode works ok

I think the required privilege in the visitActions_extension.json should be “App: visitdocumentsui.visitdocuments.page” instead of “visitdocumentsui.visitdocuments.page”

Please submit a PR, we would be happy to merge that in and release a version 1.2.1.

Ok will do.

Thanks.