Upload Failed on Sana Client

87 views
Skip to first unread message

Jubert Maquiling

unread,
Jan 8, 2012, 8:07:24 PM1/8/12
to sana-users
Hi All,

I've been working on a several local (VM and test servers) installations of SANA for our office. The installation seems correct however when I start to upload Saved Procedures, it starts saying:

"Upload in progress"

then flashes:

"Upload of [Client Name] for patient failed."

and eventually says

"Upload failed".

If this would be helpful, this is my installation environment:

Dev't Server: Ubuntu 10.04 Lucid, Django 1.3.1, Sana MDS 1.1.0, Python 2.6
Client: Sana latest current version (3 buttons on dashboard) and Sana Ver 1 (4 buttons on dashboard)
Phones: 2 x Samsung GTI5700 (Provided by Sana Team), Samsung GTS5570

Any insight on what could be the problem?

Best,

Jubert Maquiling
NWTF

Jubert Maquiling

unread,
Jan 8, 2012, 9:22:54 PM1/8/12
to sana-users
Update:

I tested to complete all the contents of the procedure and start the upload and it "Uploaded Successfully". Now my problem is that, though it says it was successfully, it does not actually update the database:

Here's some transcript taken from Sana MDS Log:

+0.000s json.py:296  Received valid binarychunk form
+0.000s json.py:306  File _size: 837730
+0.001s api.py:358  Registering binary chunk for: encounter -> SPMGnywknVpmYCPYpAUJUE, element_id -> patientPhoto)
+0.004s util.py:44  (0.000) SELECT `mrs_savedprocedure`.`id`, `mrs_savedprocedure`.`guid`, `mrs_savedprocedure`.`procedure_guid`, `mrs_savedprocedure`.`client_id`, `mrs_savedprocedure`.`responses`, `mrs_savedprocedure`.`upload_username`, `mrs_savedprocedure`.`upload_password`, `mrs_savedprocedure`.`uploaded`, `mrs_savedprocedure`.`created`, `mrs_savedprocedure`.`modified`, `mrs_savedprocedure`.`encounter` FROM `mrs_savedprocedure` WHERE `mrs_savedprocedure`.`guid` = SPMGnywknVpmYCPYpAUJUE ; args=(u'SPMGnywknVpmYCPYpAUJUE',)
+0.004s api.py:362  Success opening SavedProcedure -> 7 .
+0.007s util.py:44  (0.000) SELECT `mrs_binaryresource`.`id`, `mrs_binaryresource`.`procedure_id`, `mrs_binaryresource`.`element_id`, `mrs_binaryresource`.`guid`, `mrs_binaryresource`.`content_type`, `mrs_binaryresource`.`data`, `mrs_binaryresource`.`upload_progress`, `mrs_binaryresource`.`total_size`, `mrs_binaryresource`.`uploaded`, `mrs_binaryresource`.`created`, `mrs_binaryresource`.`modified`, `mrs_binaryresource`.`convert_before_upload`, `mrs_binaryresource`.`conversion_complete` FROM `mrs_binaryresource` WHERE (`mrs_binaryresource`.`element_id` = patientPhoto AND `mrs_binaryresource`.`guid` = 4 AND `mrs_binaryresource`.`procedure_id` = 7 ); args=(u'patientPhoto', u'4', 7)
+0.007s api.py:368  Opened BinaryResource -> 7, new: False
+0.008s util.py:44  (0.000) SELECT (1) AS `a` FROM `mrs_binaryresource` WHERE `mrs_binaryresource`.`id` = 7 LIMIT 1; args=(7,)
+0.010s util.py:44  (0.000) UPDATE `mrs_binaryresource` SET `procedure_id` = 7, `element_id` = patientPhoto, `guid` = 4, `content_type` = PICTURE, `data` = binary/2012/01/09/7.jpg, `upload_progress` = 20000, `total_size` = 837730, `uploaded` = False, `created` = 2012-01-09 09:56:08, `modified` = 2012-01-09 09:56:08, `convert_before_upload` = False, `conversion_complete` = True WHERE `mrs_binaryresource`.`id` = 7 ; args=(7, u'patientPhoto', u'4', u'PICTURE', u'binary/2012/01/09/7.jpg', 20000, 837730, False, u'2012-01-09 09:56:08', u'2012-01-09 09:56:08', False, True, 7)
+0.010s api.py:402  upload_progress = 20000
+0.011s api.py:410  writing 40000 bytes.
+0.011s api.py:417  offset -> 60000, upload_progress = 20000
--
JUBERT T MAQUILING
NWTF

Chris Arriola

unread,
Jan 9, 2012, 12:08:50 AM1/9/12
to sana-...@googlegroups.com
I had a similar issue before which I was able to resolve by making sure that the concept description EXACTLY matched the procedure question. 

Hope this helps,
Chris
--
Chris Arriola

Jubert Maquiling

unread,
Jan 9, 2012, 3:34:13 AM1/9/12
to sana-...@googlegroups.com
Thank you Chris. I'll try this.

Cheers!

Jubert

Macharia Paul

unread,
May 27, 2013, 11:42:58 PM5/27/13
to sana-...@googlegroups.com
Hello Sanarians,

I am new in using sana and have an issue as described above, Chris how do I make the decription same as the question?

Paul Macharia

Eric Winkler

unread,
May 31, 2013, 6:27:31 PM5/31/13
to sana-...@googlegroups.com
The 'description' field can be changed in the OpenMRS Concept dictionary. You should be able to access that dictionary through the menu bar or admin page of the OpenMRS web interface. The "question" would be the procedure element attribute in the xml form that gets processed on the client. You may also want to refer to the How to Define Your Own Procedures page on the wiki.
Best,
Eric

Paul Macharia

unread,
Jun 12, 2013, 2:14:34 PM6/12/13
to sana-users on behalf of Eric Winkler
Hi all,

I have been designing XML files to use in sana mobile.


The files need to be copied onto the Android device SD card and then updated within the application.

Attach the phone with a USB cable and copy the file to:

/mnt/sdcard/media/sana/resource/procedure/

On the phone with Sana app running, select

Settings --> Sana Resources --> Manage Procedures

Press to install (Or use Menu --> Load All Procedures).

On following the instructions above I get an error "something's wrong with the file! null"


Please help

Paul

Paul Macharia

unread,
Jun 12, 2013, 3:46:11 PM6/12/13
to sana-users on behalf of Eric Winkler

Thanks Eric,

I am getting better by day. Please tell what is the " procedure element attribute " the XML line below. Could sound trivial but I am lost...

<Page>
<Element type="SELECT" concept="SURGERY SITE" id="9" question="Site of surgery" answer="" choices="Head and Neck,Chest,Abdomen,Pelvis,Extremities,Others"/>
</Page>

Thanks

Paul
--
You received this message because you are subscribed to a topic in the Google Groups "sana-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sana-users/c6wKbSG0n1E/unsubscribe?hl=en .
To unsubscribe from this group and all its topics, send an email to sana-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out .


Eric Winkler

unread,
Jun 13, 2013, 11:22:51 AM6/13/13
to sana-...@googlegroups.com
The Procedure Element refers to the Element node within the sample you posted below. Technically it is nor an attribute so if that was stated as such somewhere it likely needs to be corrected..
Reply all
Reply to author
Forward
0 new messages