Sounds like a bug... Do we know if this is specific to images, or specific to 
this UI?  In the MDR-TB module we have a custom UI for recording sputum tests 
which includes the ability to upload a PDF and store it as a complex obs.  I 
haven't had problems uploading PDF files using it.  However, this is only in 
OpenMRS 1.6, and I know validation has been reworked since then.

Mark

From: [email protected] [mailto:[email protected]] On Behalf Of Suranga 
Kasthurirathne
Sent: Tuesday, May 15, 2012 12:01 PM
To: [email protected]
Subject: Re: [OPENMRS-DEV] Regarding error while creating an Observation, using 
'Complex' concept data-type


Hi Jibesh,

I worked with complex handlers over the last summer, and faced the same issue.

If you go to the demo.openmrs.org<http://demo.openmrs.org> site and try to 
re-create it, you will find that it works just fine, and the image gets 
uploaded.

Unfortunately, this problem occurs due to the ObsValidator.  Somehow, Spring 
calls the obs validator before the picture has finished uploading into the 
system, and therefore assumes that we have not uploaded one.

The quick (and ugly)  fix for this is to go to the obs validator, and comment 
out the lines that tests if the uploaded image is null.

For a long term fix to this problem, you will need to open a ticket :-)


Best regards,
Suranga


On Tue, May 15, 2012 at 9:06 PM, Jibesh Patra 
<[email protected]<mailto:[email protected]>> wrote:
Hi devs,
I am trying to follow the instructions given here [0] & getting error while 
trying to create a new Observation for a patient.
As per the instruction, I have created a concept of data-type complex & handler 
as ImageHandler. Now, while creating new observation for a patient, in the 
'Complex Value' field I am browsing and selecting an image. On saving the 
observation I am greeted with error statement reading "Please fix all errors 
and try again". I am attaching a screenshot of the mentioned error. Can someone 
please have a look and help me?

[0] 
https://wiki.openmrs.org/display/docs/Creating+Complex+Observations+and+Concepts

Thank you,
--
Jibesh Patra
________________________________
Click here to 
unsubscribe<mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l> 
from OpenMRS Developers' mailing list



--
Best Regards,

Suranga

________________________________
Click here to 
unsubscribe<mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l> 
from OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to