Patient Document bug

In the Patient Document App, after selecting a file to upload the type can be edited but this then disables SAVE. This should be made non-editable.

Also to get files to display on dashboard, the concept set “Patient Document” should contain “Image”, and not “Patient File”.

1 Like

@ouiliam, I suggest that you request access to JIRA so that in addition to reporting these bugs here you can immediately create tickets, so we can get them ready for work quicker.

(When actually creating a JIRA ticket you’d want to put a bit more info in, e.g. exact steps to reproduce, so that a newbie developer can potentially pick it up.)

1 Like

@darius thanks, I made an issue here Bahmni - Issues - Bahmni - JIRA but then got a message “issue not visible”, are there any extra steps I need to do?

@ouiliam I was able to see the issue fine. Are you able to see it now?

I modified the ticket slightly to follow the pattern we’re using for bug reports: Steps to Reproduce, Expected Behavior, Actual Behavior.

Personally I don’t understand why we use an autocomplete widget there, instead of a dropdown, because there would typically be only a small number of allowed options for document type. So, my proposal would be to change this to a dropdown.

Does anyone know the original motivation for the autocomplete and/or think we should stick to that? (@arjun?)

Yes, makes sense.

No, i have no idea.

@darius Thanks, actually I think the document type never changes and they meant to edit the file name there so we should put that there, not filetype.

@ouiliam, I am not sure but I think there could be more than one choice available in the drop-down. I believe ‘Patient file’ refers to the underlying concept to which the document will be attached. This concept is a member of the ‘Patient Document’ set (id:330).

So adding more members to this set should allow selecting more types of patient documents.

Anyway we should definitely add a title to this field to say what it is, eg ‘Document type’ and have it has a drop down.

About having a file name added as a description or something, I don’t know if that’s possible. I suggest for now to use the notes fields.

@ouiliam, as Romain says it is possible to allow multiple possible document types.

Can you please rephrase this ticket so that we:

  1. Add a title to the field so it’s clear what it is
  2. Change it to a dropdown

Is using the notes field sufficient for the filename in your use case? (I don’t think that “filename” is a general enough use case, but “description” might be.)

@darius I’ve been looking at this again, I will update the ticket. One thing I’ve noticed:

if type=Patient file: PDFs and JPGs do not display in the clinical app

if type=Image: PDFs and JPGs display in the clinical app

So we should remove Patient file concept from “Patient Document” concept set and replace with Image.

Patient Dashboard:

image

image

                "dashboardConfig":{
                "showGroupDateTime":true,
                "showDetailsButton": true,
                "conceptNames":[
                    "Image", "Patient file"
                ]
            },

What I take away from this is that we’re missing some validation in the upload of the files, is this correct? Or, is what you’re saying that regardless of the config and which type is chosen, PDFs do not display in the clinical app, but JPGs do?

I did some more testing and found PDFs and JPGs only display in the clinical app if type=Image.

Are you saying that there’s some magic undocumented behavior hardcoded against specific concept names? Or does this have to do with the datatype and complex handler of the concepts in question?

I’m not sure of the reasons, but this should be documented, at least how to get it to work by adding the filetype “Image” to concept set “File Documents”.