Patient document uploads in bahmni

Hello guys… I want to know more about patient document upload features in bahmni. Actualy where the uploaded documents are saving and in which format its saving?? And i have a doubt, if it is saved as image format is there is any option for link any other server path in our network so that image should be saved in that location?? Is it possible to fix the path??

Regards Mithun G

Moved to the bahmni category.

all such uploaded documents would be by default stored in subdirectories under “/home/bahmni/document_images/” You can find the configuration in “/opt/openmrs/bahmnicore.properties” against “bahmnicore.documents.baseDirectory” key.

1 Like

Thank you…

Hi @gsluthra and @mohant,

All the images, patient documents, radiology uploads are getting uploaded to the docker location /home/bahmni/document_images/100 but while retrieving it, it is showing 301 permanently moved and 404 not found. So, the document or image is displayed as broken in the UI.

Please find the screenshots attached.

Is this a related issue?

https://bahmni.atlassian.net/browse/BAH-3335

@chandhana, can you please check the directory permissions for ‘document_images’ and its subdirectories using the ls -l. Ensure that the “Other user” has read permission.

Yes, I have followed these steps to fix the issue, but the build failed with error at 170 line in docker-compose.yml file.

Will only these 3 changes from the commit be enough to fix the issue?

@umairfayaz I have manually changed the permissions and given read permissions to other user in the docker container and tested but still facing the same issue.

Can you pull the latest docker images (and use latest docker-compose.yml, and .env files) and retry this? I feel like things should just work out-of-the-box, and these are likely some local changes on your machine that are causing things to not work.

If you can reset to latest Bahmni docker images (ensure you are pulling latest) and then make your changes step-by-step, it will be easier for u to debug which change breaks the doc upload functionality.

Hi @gsluthra,

We have commented the default-config and are using our custom config module. Does this effect the upload document functionality in any way. Because rest all configurations are same in the docker-compose file.

Also, should we add any specific roles or privileges like app:document-upload, because I have given this to my user but still the issue is not resolved.

One update would be, now the issue is 403 forbidden and not 404 not found.

Can you please let us know what we can do to fix this at the earliest.

image

Hi @chandhana - I have created a new bug for this: [BAH-3498] - Bahmni - JIRA Please provide any additional information here. Will request someone from the team to pick this up today/tomorrow.

Hello @chandhana The issue seems to be with proxy rule forwarding. Please take a read at this troubleshooting step here. https://bahmni.atlassian.net/wiki/spaces/BAH/pages/3119710209/Common+Troubleshooting+Guide+docker#Getting-404-Error-when-accessing-patient-documents-or-implementer-interface-or-some-service-of-Bahmni%3A

Let us know if you still face the issue. Thanks